From 2ae098ee9671ddd10e0b95deae0c5ad3d6090064 Mon Sep 17 00:00:00 2001 From: Mathew Pareles Date: Wed, 19 Mar 2025 22:19:51 -0700 Subject: [PATCH] improvements --- .../workbench/contrib/void/browser/chatThreadService.ts | 4 +++- .../void/browser/react/src/sidebar-tsx/SidebarChat.tsx | 9 +++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/chatThreadService.ts b/src/vs/workbench/contrib/void/browser/chatThreadService.ts index 6fec12c8..3f2b7e52 100644 --- a/src/vs/workbench/contrib/void/browser/chatThreadService.ts +++ b/src/vs/workbench/contrib/void/browser/chatThreadService.ts @@ -236,7 +236,7 @@ class ChatThreadService extends Disposable implements IChatThreadService { private _addCurrentFileAsStagingSelectionDuringFileChange() { - // add the current file to the thread/message being edited + // add the current file to the thread being edited const model = this._codeEditorService.getActiveCodeEditor()?.getModel() ?? null if (!model) { return; } @@ -269,6 +269,8 @@ class ChatThreadService extends Disposable implements IChatThreadService { } else { // user is editing a message + // do nothing. I don't think it feels good to auto-add the current file when you're editing a message. + // const oldStagingSelections = this.getCurrentMessageState(focusedMessageIdx).stagingSelections || []; // // if the file already exists, do nothing diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx index f878ce07..8c779997 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx @@ -619,14 +619,11 @@ export const SelectedFiles = ( + (isThisSelectionAFile ? '' : ` (${selection.range.startLineNumber}-${selection.range.endLineNumber})`) } - {/* {isThisSelectionAFile && currentURI?.toString() === selection.fileURI.toString() && - + {isThisSelectionAddedAsCurrentFile && currentURI?.toString() === selection.fileURI.toString() && + {`(Current File)`} - } */} - {isThisSelectionAddedAsCurrentFile && - {`(Current File)`} - } + } {type === 'staging' && !isThisSelectionProspective ? // X button