Skip to content

Commit ebde1b6

Browse files
committed
1 parent a8b3f64 commit ebde1b6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import { IChatWidgetService } from 'vs/workbench/contrib/chat/browser/chat';
1515
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
1616
import { EditMode } from 'vs/workbench/contrib/interactiveEditor/common/interactiveEditor';
1717

18+
export const interactiveEditorHelpIntro = localize('interactiveSession.makeRequest', "Tab once to reach the make request button, which will re-run the request.");
19+
1820
export function getAccessibilityHelpText(accessor: ServicesAccessor, type: 'chat' | 'editor', currentInput?: string): string {
1921
const keybindingService = accessor.get(IKeybindingService);
2022
const configurationService = accessor.get(IConfigurationService);
@@ -28,7 +30,7 @@ export function getAccessibilityHelpText(accessor: ServicesAccessor, type: 'chat
2830
content.push(descriptionForCommand('workbench.action.chat.insertIntoNewFile', localize('workbench.action.chat.insertIntoNewFile', 'Insert into New File ({0}) creates a new file with the code block as its content'), localize('workbench.action.chat.insertIntoNewFileNoKb', 'Insert into New File creates a new file with the code block as its content and is currently not triggerable by a keybinding.'), keybindingService));
2931
content.push(descriptionForCommand('workbench.action.chat.runInTerminal', localize('workbench.action.chat.runInTerminal', 'Run in Terminal ({0}) runs the code block in the terminal'), localize('workbench.action.chat.runInTerminalNoKb', 'Run in Terminal runs the code block in the terminal and is currently not triggerable by a keybinding.'), keybindingService));
3032
} else {
31-
content.push(localize('interactiveSession.makeRequest', "Tab once to reach the make request button, which will re-run the request."));
33+
content.push(interactiveEditorHelpIntro);
3234
const regex = /^(\/fix|\/explain)/;
3335
const match = currentInput?.match(regex);
3436
const command = match && match.length ? match[0].substring(1) : undefined;

src/vs/workbench/contrib/interactiveEditor/browser/interactiveEditorController.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import { IChatService } from 'vs/workbench/contrib/chat/common/chatService';
3838
import { INotebookEditorService } from 'vs/workbench/contrib/notebook/browser/services/notebookEditorService';
3939
import { CellUri } from 'vs/workbench/contrib/notebook/common/notebookCommon';
4040
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
41+
import { interactiveEditorHelpIntro } from 'vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp';
4142

4243
export const enum State {
4344
CREATE_SESSION = 'CREATE_SESSION',
@@ -412,6 +413,9 @@ export class InteractiveEditorController implements IEditorContribution {
412413
});
413414

414415
const typeListener = this._zone.widget.onDidChangeInput(() => {
416+
if (this._zone.widget.value.includes(interactiveEditorHelpIntro)) {
417+
return;
418+
}
415419
requestCts.cancel();
416420
});
417421

0 commit comments

Comments
 (0)