mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
better ux
This commit is contained in:
parent
3bfb50e6ee
commit
c239682ad8
2 changed files with 5 additions and 10 deletions
|
|
@ -127,8 +127,6 @@ export class ConsistentItemService extends Disposable {
|
|||
|
||||
const editorId = editor.getId()
|
||||
this.itemIdsOfEditorId[editorId]?.delete(itemId)
|
||||
if (this.itemIdsOfEditorId[editorId]?.size === 0)
|
||||
delete this.itemIdsOfEditorId[editorId]
|
||||
|
||||
this.disposeFnOfItemId[itemId]?.()
|
||||
delete this.disposeFnOfItemId[itemId]
|
||||
|
|
@ -175,8 +173,6 @@ export class ConsistentItemService extends Disposable {
|
|||
|
||||
// clear
|
||||
this.consistentItemIdsOfURI[uri.fsPath]?.delete(consistentItemId)
|
||||
if (this.consistentItemIdsOfURI[uri.fsPath]?.size === 0)
|
||||
delete this.consistentItemIdsOfURI[uri.fsPath]
|
||||
|
||||
delete this.infoOfConsistentItemId[consistentItemId]
|
||||
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ export const SelectedFiles = (
|
|||
</div>
|
||||
|
||||
{/* clear all selections button */}
|
||||
{type !== 'staging' || selections.length === 0 || i !== selections.length - 1
|
||||
{/* {type !== 'staging' || selections.length === 0 || i !== selections.length - 1
|
||||
? null
|
||||
: <div className={`flex items-center ${isThisSelectionOpened ? 'w-full' : ''}`}>
|
||||
<div
|
||||
|
|
@ -402,7 +402,7 @@ export const SelectedFiles = (
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
} */}
|
||||
</div>
|
||||
{/* selection text */}
|
||||
{isThisSelectionOpened &&
|
||||
|
|
@ -423,9 +423,8 @@ export const SelectedFiles = (
|
|||
</div>)
|
||||
|
||||
return <Fragment key={thisKey}>
|
||||
{selections.length > 0 && i === selections.length &&
|
||||
<div className='w-full'></div> // divider between `selections` and `prospectiveSelections`
|
||||
}
|
||||
{/* divider between `selections` and `prospectiveSelections` */}
|
||||
{/* {selections.length > 0 && i === selections.length && <div className='w-full'></div>} */}
|
||||
{selectionHTML}
|
||||
</Fragment>
|
||||
|
||||
|
|
@ -675,7 +674,7 @@ export const SidebarChat = () => {
|
|||
{/* top row */}
|
||||
<>
|
||||
{/* selections */}
|
||||
<SelectedFiles type='staging' selections={selections || []} setSelections={chatThreadsService.setStaging.bind(chatThreadsService)} showProspectiveSelections={previousMessages.length === 0}/>
|
||||
<SelectedFiles type='staging' selections={selections || []} setSelections={chatThreadsService.setStaging.bind(chatThreadsService)} showProspectiveSelections={previousMessages.length === 0} />
|
||||
</>
|
||||
|
||||
{/* middle row */}
|
||||
|
|
|
|||
Loading…
Reference in a new issue