mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
outline
This commit is contained in:
parent
4a00bd3e00
commit
9c76a35837
2 changed files with 14 additions and 8 deletions
|
|
@ -299,7 +299,7 @@ For example, if the user is asking you to "make this variable a better name", ma
|
|||
export const aiRegex_computeReplacementsForFile_userMessage = async ({ searchClause, replaceClause, fileURI, voidFileService }: { searchClause: string, replaceClause: string, fileURI: URI, modelService: IModelService, voidFileService: IVoidFileService }) => {
|
||||
|
||||
// we may want to do this in batches
|
||||
const fileSelection: FileSelection = { type: 'File', fileURI, selectionStr: null, range: null }
|
||||
const fileSelection: FileSelection = { type: 'File', fileURI, selectionStr: null, range: null, state: { isOpened: false } }
|
||||
|
||||
const file = await stringifyFileSelections([fileSelection], voidFileService)
|
||||
|
||||
|
|
|
|||
|
|
@ -376,9 +376,6 @@ export const SelectedFiles = (
|
|||
| { type: 'staging', selections: StagingSelectionItem[]; setSelections: ((newSelections: StagingSelectionItem[]) => void), showProspectiveSelections?: boolean }
|
||||
) => {
|
||||
|
||||
// state for tracking hover on clear all button
|
||||
const [isClearHovered, setIsClearHovered] = useState(false)
|
||||
|
||||
const accessor = useAccessor()
|
||||
const commandService = accessor.get('ICommandService')
|
||||
|
||||
|
|
@ -417,7 +414,7 @@ export const SelectedFiles = (
|
|||
}
|
||||
|
||||
return (
|
||||
<div className='flex items-center flex-wrap text-left relative gap-0.5'>
|
||||
<div className='flex items-center flex-wrap text-left relative gap-x-0.5 gap-y-1'>
|
||||
|
||||
{allSelections.map((selection, i) => {
|
||||
|
||||
|
|
@ -430,7 +427,7 @@ export const SelectedFiles = (
|
|||
return <div // container for summarybox and code
|
||||
key={thisKey}
|
||||
className={`
|
||||
flex flex-col space-y-0.5
|
||||
flex flex-col space-y-[1px]
|
||||
${isThisSelectionOpened ? 'w-full' : ''}
|
||||
`}
|
||||
>
|
||||
|
|
@ -443,7 +440,13 @@ export const SelectedFiles = (
|
|||
select-none
|
||||
${isThisSelectionProspective ? 'bg-void-bg-1 text-void-fg-3 opacity-80' : 'bg-void-bg-3 hover:brightness-95 text-void-fg-1'}
|
||||
text-xs text-nowrap
|
||||
border rounded-sm ${isClearHovered && !isThisSelectionProspective ? 'border-void-border-1' : 'border-void-border-2'} hover:border-void-border-1
|
||||
border rounded-sm ${isThisSelectionProspective
|
||||
? 'border-void-border-2'
|
||||
: isThisSelectionOpened
|
||||
? 'border-void-border-1 ring-1 ring-[#007FD4]'
|
||||
: 'border-void-border-1'
|
||||
}
|
||||
hover:border-void-border-1
|
||||
transition-all duration-150
|
||||
`}
|
||||
onClick={() => {
|
||||
|
|
@ -497,7 +500,10 @@ export const SelectedFiles = (
|
|||
{/* code box */}
|
||||
{isThisSelectionOpened ?
|
||||
<div
|
||||
className='w-full px-1 rounded-sm border-vscode-editor-border'
|
||||
className={`
|
||||
w-full px-1 rounded-sm border-vscode-editor-border
|
||||
${isThisSelectionOpened ? 'ring-1 ring-[#007FD4]' : ''}
|
||||
`}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation(); // don't focus input box
|
||||
}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue