@codingame/monaco-vscode-chat-service-override 23.1.0 → 23.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +41 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +48 -48
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +101 -101
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +28 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.js +33 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +52 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +65 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +53 -53
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +21 -21
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +8 -8
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +18 -18
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +10 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +9 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +15 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
|
@@ -30,7 +30,7 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
|
|
|
30
30
|
},
|
|
31
31
|
jsonSchema: {
|
|
32
32
|
description: ( localize(
|
|
33
|
-
|
|
33
|
+
5948,
|
|
34
34
|
'Contributes a tool that can be invoked by a language model in a chat session, or from a standalone command. Registered tools can be used by all extensions.'
|
|
35
35
|
)),
|
|
36
36
|
type: 'array',
|
|
@@ -56,7 +56,7 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
|
|
|
56
56
|
properties: {
|
|
57
57
|
name: {
|
|
58
58
|
description: ( localize(
|
|
59
|
-
|
|
59
|
+
5949,
|
|
60
60
|
"A unique name for this tool. This name must be a globally unique identifier, and is also used as a name when presenting this tool to a language model."
|
|
61
61
|
)),
|
|
62
62
|
type: 'string',
|
|
@@ -64,7 +64,7 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
|
|
|
64
64
|
},
|
|
65
65
|
toolReferenceName: {
|
|
66
66
|
markdownDescription: ( localize(
|
|
67
|
-
|
|
67
|
+
5950,
|
|
68
68
|
"If {0} is enabled for this tool, the user may use '#' with this name to invoke the tool in a query. Otherwise, the name is not required. Name must not contain whitespace.",
|
|
69
69
|
'`canBeReferencedInPrompt`'
|
|
70
70
|
)),
|
|
@@ -73,32 +73,32 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
|
|
|
73
73
|
},
|
|
74
74
|
displayName: {
|
|
75
75
|
description: ( localize(
|
|
76
|
-
|
|
76
|
+
5951,
|
|
77
77
|
"A human-readable name for this tool that may be used to describe it in the UI."
|
|
78
78
|
)),
|
|
79
79
|
type: 'string'
|
|
80
80
|
},
|
|
81
81
|
userDescription: {
|
|
82
|
-
description: ( localize(
|
|
82
|
+
description: ( localize(5952, "A description of this tool that may be shown to the user.")),
|
|
83
83
|
type: 'string'
|
|
84
84
|
},
|
|
85
85
|
modelDescription: {
|
|
86
86
|
description: ( localize(
|
|
87
|
-
|
|
87
|
+
5953,
|
|
88
88
|
"A description of this tool that may be used by a language model to select it."
|
|
89
89
|
)),
|
|
90
90
|
type: 'string'
|
|
91
91
|
},
|
|
92
92
|
inputSchema: {
|
|
93
93
|
description: ( localize(
|
|
94
|
-
|
|
94
|
+
5954,
|
|
95
95
|
"A JSON schema for the input this tool accepts. The input must be an object at the top level. A particular language model may not support all JSON schema features. See the documentation for the language model family you are using for more information."
|
|
96
96
|
)),
|
|
97
97
|
$ref: toolsParametersSchemaSchemaId
|
|
98
98
|
},
|
|
99
99
|
canBeReferencedInPrompt: {
|
|
100
100
|
markdownDescription: ( localize(
|
|
101
|
-
|
|
101
|
+
5955,
|
|
102
102
|
"If true, this tool shows up as an attachment that the user can add manually to their request. Chat participants will receive the tool in {0}.",
|
|
103
103
|
'`ChatRequest#toolReferences`'
|
|
104
104
|
)),
|
|
@@ -106,7 +106,7 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
|
|
|
106
106
|
},
|
|
107
107
|
icon: {
|
|
108
108
|
markdownDescription: ( localize(
|
|
109
|
-
|
|
109
|
+
5956,
|
|
110
110
|
'An icon that represents this tool. Either a file path, an object with file paths for dark and light themes, or a theme icon reference, like "\\$(zap)"'
|
|
111
111
|
)),
|
|
112
112
|
anyOf: [{
|
|
@@ -116,11 +116,11 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
|
|
|
116
116
|
type: 'object',
|
|
117
117
|
properties: {
|
|
118
118
|
light: {
|
|
119
|
-
description: ( localize(
|
|
119
|
+
description: ( localize(5957, 'Icon path when a light theme is used')),
|
|
120
120
|
type: 'string'
|
|
121
121
|
},
|
|
122
122
|
dark: {
|
|
123
|
-
description: ( localize(
|
|
123
|
+
description: ( localize(5958, 'Icon path when a dark theme is used')),
|
|
124
124
|
type: 'string'
|
|
125
125
|
}
|
|
126
126
|
}
|
|
@@ -128,14 +128,14 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
|
|
|
128
128
|
},
|
|
129
129
|
when: {
|
|
130
130
|
markdownDescription: ( localize(
|
|
131
|
-
|
|
131
|
+
5959,
|
|
132
132
|
"Condition which must be true for this tool to be enabled. Note that a tool may still be invoked by another extension even when its `when` condition is false."
|
|
133
133
|
)),
|
|
134
134
|
type: 'string'
|
|
135
135
|
},
|
|
136
136
|
tags: {
|
|
137
137
|
description: ( localize(
|
|
138
|
-
|
|
138
|
+
5960,
|
|
139
139
|
"A set of tags that roughly describe the tool's capabilities. A tool user may use these to filter the set of tools to just ones that are relevant for the task at hand, or they may want to pick a tag that can be used to identify just the tools contributed by this extension."
|
|
140
140
|
)),
|
|
141
141
|
type: 'array',
|
|
@@ -153,7 +153,7 @@ const languageModelToolSetsExtensionPoint = ExtensionsRegistry.registerExtension
|
|
|
153
153
|
deps: [languageModelToolsExtensionPoint],
|
|
154
154
|
jsonSchema: {
|
|
155
155
|
description: ( localize(
|
|
156
|
-
|
|
156
|
+
5961,
|
|
157
157
|
'Contributes a set of language model tools that can be used together.'
|
|
158
158
|
)),
|
|
159
159
|
type: 'array',
|
|
@@ -171,23 +171,23 @@ const languageModelToolSetsExtensionPoint = ExtensionsRegistry.registerExtension
|
|
|
171
171
|
properties: {
|
|
172
172
|
name: {
|
|
173
173
|
description: ( localize(
|
|
174
|
-
|
|
174
|
+
5962,
|
|
175
175
|
"A name for this tool set. Used as reference and should not contain whitespace."
|
|
176
176
|
)),
|
|
177
177
|
type: 'string',
|
|
178
178
|
pattern: '^[\\w-]+$'
|
|
179
179
|
},
|
|
180
180
|
description: {
|
|
181
|
-
description: ( localize(
|
|
181
|
+
description: ( localize(5963, "A description of this tool set.")),
|
|
182
182
|
type: 'string'
|
|
183
183
|
},
|
|
184
184
|
icon: {
|
|
185
|
-
markdownDescription: ( localize(
|
|
185
|
+
markdownDescription: ( localize(5964, "An icon that represents this tool set, like `$(zap)`")),
|
|
186
186
|
type: 'string'
|
|
187
187
|
},
|
|
188
188
|
tools: {
|
|
189
189
|
markdownDescription: ( localize(
|
|
190
|
-
|
|
190
|
+
5965,
|
|
191
191
|
"A list of tools or tool sets to include in this tool set. Cannot be empty and must reference tools by their `toolReferenceName`."
|
|
192
192
|
)),
|
|
193
193
|
type: 'array',
|
|
@@ -352,9 +352,9 @@ class LanguageModelToolDataRenderer extends Disposable {
|
|
|
352
352
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
353
353
|
}
|
|
354
354
|
const headers = [
|
|
355
|
-
( localize(
|
|
356
|
-
( localize(
|
|
357
|
-
( localize(
|
|
355
|
+
( localize(5966, "Name")),
|
|
356
|
+
( localize(5967, "Display Name")),
|
|
357
|
+
( localize(5968, "Description")),
|
|
358
358
|
];
|
|
359
359
|
const rows = ( contribs.map(t => {
|
|
360
360
|
return [
|
|
@@ -374,7 +374,7 @@ class LanguageModelToolDataRenderer extends Disposable {
|
|
|
374
374
|
}
|
|
375
375
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
376
376
|
id: 'languageModelTools',
|
|
377
|
-
label: ( localize(
|
|
377
|
+
label: ( localize(5969, "Language Model Tools")),
|
|
378
378
|
access: {
|
|
379
379
|
canToggle: false
|
|
380
380
|
},
|
|
@@ -394,10 +394,10 @@ class LanguageModelToolSetDataRenderer extends Disposable {
|
|
|
394
394
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
395
395
|
}
|
|
396
396
|
const headers = [
|
|
397
|
-
( localize(
|
|
398
|
-
( localize(
|
|
399
|
-
( localize(
|
|
400
|
-
( localize(
|
|
397
|
+
( localize(5970, "Name")),
|
|
398
|
+
( localize(5971, "Reference Name")),
|
|
399
|
+
( localize(5972, "Tools")),
|
|
400
|
+
( localize(5973, "Description")),
|
|
401
401
|
];
|
|
402
402
|
const rows = ( contribs.map(t => {
|
|
403
403
|
return [
|
|
@@ -418,7 +418,7 @@ class LanguageModelToolSetDataRenderer extends Disposable {
|
|
|
418
418
|
}
|
|
419
419
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
420
420
|
id: 'languageModelToolSets',
|
|
421
|
-
label: ( localize(
|
|
421
|
+
label: ( localize(5974, "Language Model Tool Sets")),
|
|
422
422
|
access: {
|
|
423
423
|
canToggle: false
|
|
424
424
|
},
|
|
@@ -21,7 +21,7 @@ var PhraseTextType;
|
|
|
21
21
|
const VoiceChatInProgress = ( new RawContextKey(
|
|
22
22
|
'voiceChatInProgress',
|
|
23
23
|
false,
|
|
24
|
-
{ type: 'boolean', description: ( localize(
|
|
24
|
+
{ type: 'boolean', description: ( localize(5988, "A speech-to-text session is in progress for chat.")) }
|
|
25
25
|
));
|
|
26
26
|
let VoiceChatService = class VoiceChatService extends Disposable {
|
|
27
27
|
static { VoiceChatService_1 = this; }
|
|
@@ -34,7 +34,7 @@ const editActionMenuItem = {
|
|
|
34
34
|
order: 0,
|
|
35
35
|
command: {
|
|
36
36
|
id: ChatSubmitAction.ID,
|
|
37
|
-
title: ( localize(
|
|
37
|
+
title: ( localize(8141, "Edit Code")),
|
|
38
38
|
},
|
|
39
39
|
when: ( ContextKeyExpr.and(ChatContextKeys.inputHasText, ( CTX_INLINE_CHAT_REQUEST_IN_PROGRESS.toNegated()), CTX_INLINE_CHAT_EDITING, CTX_INLINE_CHAT_V1_ENABLED)),
|
|
40
40
|
};
|
|
@@ -43,7 +43,7 @@ const generateActionMenuItem = {
|
|
|
43
43
|
order: 0,
|
|
44
44
|
command: {
|
|
45
45
|
id: ChatSubmitAction.ID,
|
|
46
|
-
title: ( localize(
|
|
46
|
+
title: ( localize(8142, "Generate")),
|
|
47
47
|
},
|
|
48
48
|
when: ( ContextKeyExpr.and(ChatContextKeys.inputHasText, ( CTX_INLINE_CHAT_REQUEST_IN_PROGRESS.toNegated()), ( CTX_INLINE_CHAT_EDITING.toNegated()), CTX_INLINE_CHAT_V1_ENABLED)),
|
|
49
49
|
};
|
|
@@ -54,8 +54,8 @@ const cancelActionMenuItem = {
|
|
|
54
54
|
order: 0,
|
|
55
55
|
command: {
|
|
56
56
|
id: CancelAction.ID,
|
|
57
|
-
title: ( localize(
|
|
58
|
-
shortTitle: ( localize(
|
|
57
|
+
title: ( localize(8143, "Cancel Request")),
|
|
58
|
+
shortTitle: ( localize(8144, "Cancel")),
|
|
59
59
|
},
|
|
60
60
|
when: ( ContextKeyExpr.and(CTX_INLINE_CHAT_REQUEST_IN_PROGRESS)),
|
|
61
61
|
};
|
|
@@ -29,13 +29,13 @@ import { IInlineChatSessionService } from '@codingame/monaco-vscode-api/vscode/v
|
|
|
29
29
|
|
|
30
30
|
CommandsRegistry.registerCommandAlias('interactiveEditor.start', 'inlineChat.start');
|
|
31
31
|
CommandsRegistry.registerCommandAlias('interactive.acceptChanges', ACTION_ACCEPT_CHANGES);
|
|
32
|
-
const START_INLINE_CHAT = registerIcon('start-inline-chat', Codicon.sparkle, ( localize(
|
|
32
|
+
const START_INLINE_CHAT = registerIcon('start-inline-chat', Codicon.sparkle, ( localize(8145, 'Icon which spawns the inline chat from the editor toolbar.')));
|
|
33
33
|
const inlineChatContextKey = ( ContextKeyExpr.and(( ContextKeyExpr.or(CTX_INLINE_CHAT_V1_ENABLED, CTX_INLINE_CHAT_V2_ENABLED)), CTX_INLINE_CHAT_POSSIBLE, EditorContextKeys.writable, ( EditorContextKeys.editorSimpleInput.negate())));
|
|
34
34
|
class StartSessionAction extends Action2 {
|
|
35
35
|
constructor() {
|
|
36
36
|
super({
|
|
37
37
|
id: ACTION_START,
|
|
38
|
-
title: ( localize2(
|
|
38
|
+
title: ( localize2(8146, 'Open Inline Chat')),
|
|
39
39
|
category: AbstractInline1ChatAction.category,
|
|
40
40
|
f1: true,
|
|
41
41
|
precondition: inlineChatContextKey,
|
|
@@ -91,7 +91,7 @@ class FocusInlineChat extends EditorAction2 {
|
|
|
91
91
|
constructor() {
|
|
92
92
|
super({
|
|
93
93
|
id: 'inlineChat.focus',
|
|
94
|
-
title: ( localize2(
|
|
94
|
+
title: ( localize2(8147, "Focus Input")),
|
|
95
95
|
f1: true,
|
|
96
96
|
category: AbstractInline1ChatAction.category,
|
|
97
97
|
precondition: ( ContextKeyExpr.and(EditorContextKeys.editorTextFocus, CTX_INLINE_CHAT_VISIBLE, ( CTX_INLINE_CHAT_FOCUSED.negate()), ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()))),
|
|
@@ -114,7 +114,7 @@ class UnstashSessionAction extends EditorAction2 {
|
|
|
114
114
|
constructor() {
|
|
115
115
|
super({
|
|
116
116
|
id: 'inlineChat.unstash',
|
|
117
|
-
title: ( localize2(
|
|
117
|
+
title: ( localize2(8148, "Resume Last Dismissed Inline Chat")),
|
|
118
118
|
category: AbstractInline1ChatAction.category,
|
|
119
119
|
precondition: ( ContextKeyExpr.and(CTX_INLINE_CHAT_HAS_STASHED_SESSION, EditorContextKeys.writable)),
|
|
120
120
|
keybinding: {
|
|
@@ -136,7 +136,7 @@ class UnstashSessionAction extends EditorAction2 {
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
class AbstractInline1ChatAction extends EditorAction2 {
|
|
139
|
-
static { this.category = ( localize2(
|
|
139
|
+
static { this.category = ( localize2(8149, "Inline Chat")); }
|
|
140
140
|
constructor(desc) {
|
|
141
141
|
const massageMenu = (menu) => {
|
|
142
142
|
if (Array.isArray(menu)) {
|
|
@@ -198,7 +198,7 @@ class ArrowOutUpAction extends AbstractInline1ChatAction {
|
|
|
198
198
|
constructor() {
|
|
199
199
|
super({
|
|
200
200
|
id: 'inlineChat.arrowOutUp',
|
|
201
|
-
title: ( localize(
|
|
201
|
+
title: ( localize(8150, 'Cursor Up')),
|
|
202
202
|
precondition: ( ContextKeyExpr.and(
|
|
203
203
|
CTX_INLINE_CHAT_FOCUSED,
|
|
204
204
|
CTX_INLINE_CHAT_INNER_CURSOR_FIRST,
|
|
@@ -219,7 +219,7 @@ class ArrowOutDownAction extends AbstractInline1ChatAction {
|
|
|
219
219
|
constructor() {
|
|
220
220
|
super({
|
|
221
221
|
id: 'inlineChat.arrowOutDown',
|
|
222
|
-
title: ( localize(
|
|
222
|
+
title: ( localize(8151, 'Cursor Down')),
|
|
223
223
|
precondition: ( ContextKeyExpr.and(CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_INNER_CURSOR_LAST, ( EditorContextKeys.isEmbeddedDiffEditor.negate()), ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()))),
|
|
224
224
|
keybinding: {
|
|
225
225
|
weight: KeybindingWeight.EditorCore,
|
|
@@ -235,8 +235,8 @@ class AcceptChanges extends AbstractInline1ChatAction {
|
|
|
235
235
|
constructor() {
|
|
236
236
|
super({
|
|
237
237
|
id: ACTION_ACCEPT_CHANGES,
|
|
238
|
-
title: ( localize2(
|
|
239
|
-
shortTitle: ( localize(
|
|
238
|
+
title: ( localize2(8152, "Accept Changes")),
|
|
239
|
+
shortTitle: ( localize(8153, 'Accept')),
|
|
240
240
|
icon: Codicon.check,
|
|
241
241
|
f1: true,
|
|
242
242
|
precondition: ( ContextKeyExpr.and(CTX_INLINE_CHAT_VISIBLE)),
|
|
@@ -264,7 +264,7 @@ class DiscardHunkAction extends AbstractInline1ChatAction {
|
|
|
264
264
|
constructor() {
|
|
265
265
|
super({
|
|
266
266
|
id: ACTION_DISCARD_CHANGES,
|
|
267
|
-
title: ( localize(
|
|
267
|
+
title: ( localize(8154, 'Discard')),
|
|
268
268
|
icon: Codicon.chromeClose,
|
|
269
269
|
precondition: CTX_INLINE_CHAT_VISIBLE,
|
|
270
270
|
menu: [{
|
|
@@ -287,8 +287,8 @@ class RerunAction extends AbstractInline1ChatAction {
|
|
|
287
287
|
constructor() {
|
|
288
288
|
super({
|
|
289
289
|
id: ACTION_REGENERATE_RESPONSE,
|
|
290
|
-
title: ( localize2(
|
|
291
|
-
shortTitle: ( localize(
|
|
290
|
+
title: ( localize2(8155, "Rerun Request")),
|
|
291
|
+
shortTitle: ( localize(8156, 'Rerun')),
|
|
292
292
|
f1: false,
|
|
293
293
|
icon: Codicon.refresh,
|
|
294
294
|
precondition: CTX_INLINE_CHAT_VISIBLE,
|
|
@@ -327,7 +327,7 @@ class CloseAction extends AbstractInline1ChatAction {
|
|
|
327
327
|
constructor() {
|
|
328
328
|
super({
|
|
329
329
|
id: 'inlineChat.close',
|
|
330
|
-
title: ( localize(
|
|
330
|
+
title: ( localize(8157, 'Close')),
|
|
331
331
|
icon: Codicon.close,
|
|
332
332
|
precondition: CTX_INLINE_CHAT_VISIBLE,
|
|
333
333
|
keybinding: {
|
|
@@ -354,7 +354,7 @@ class ConfigureInlineChatAction extends AbstractInline1ChatAction {
|
|
|
354
354
|
constructor() {
|
|
355
355
|
super({
|
|
356
356
|
id: 'inlineChat.configure',
|
|
357
|
-
title: ( localize2(
|
|
357
|
+
title: ( localize2(8158, 'Configure Inline Chat')),
|
|
358
358
|
icon: Codicon.settingsGear,
|
|
359
359
|
precondition: CTX_INLINE_CHAT_VISIBLE,
|
|
360
360
|
f1: true,
|
|
@@ -373,7 +373,7 @@ class MoveToNextHunk extends AbstractInline1ChatAction {
|
|
|
373
373
|
constructor() {
|
|
374
374
|
super({
|
|
375
375
|
id: 'inlineChat.moveToNextHunk',
|
|
376
|
-
title: ( localize2(
|
|
376
|
+
title: ( localize2(8159, 'Move to Next Change')),
|
|
377
377
|
precondition: CTX_INLINE_CHAT_VISIBLE,
|
|
378
378
|
f1: true,
|
|
379
379
|
keybinding: {
|
|
@@ -390,7 +390,7 @@ class MoveToPreviousHunk extends AbstractInline1ChatAction {
|
|
|
390
390
|
constructor() {
|
|
391
391
|
super({
|
|
392
392
|
id: 'inlineChat.moveToPreviousHunk',
|
|
393
|
-
title: ( localize2(
|
|
393
|
+
title: ( localize2(8160, 'Move to Previous Change')),
|
|
394
394
|
f1: true,
|
|
395
395
|
precondition: CTX_INLINE_CHAT_VISIBLE,
|
|
396
396
|
keybinding: {
|
|
@@ -407,7 +407,7 @@ class ViewInChatAction extends AbstractInline1ChatAction {
|
|
|
407
407
|
constructor() {
|
|
408
408
|
super({
|
|
409
409
|
id: ACTION_VIEW_IN_CHAT,
|
|
410
|
-
title: ( localize(
|
|
410
|
+
title: ( localize(8161, 'View in Chat')),
|
|
411
411
|
icon: Codicon.chatSparkle,
|
|
412
412
|
precondition: CTX_INLINE_CHAT_VISIBLE,
|
|
413
413
|
menu: [{
|
|
@@ -437,7 +437,7 @@ class ToggleDiffForChange extends AbstractInline1ChatAction {
|
|
|
437
437
|
super({
|
|
438
438
|
id: ACTION_TOGGLE_DIFF,
|
|
439
439
|
precondition: ( ContextKeyExpr.and(CTX_INLINE_CHAT_VISIBLE, CTX_INLINE_CHAT_CHANGE_HAS_DIFF)),
|
|
440
|
-
title: ( localize2(
|
|
440
|
+
title: ( localize2(8162, 'Toggle Changes')),
|
|
441
441
|
icon: Codicon.diffSingle,
|
|
442
442
|
toggled: {
|
|
443
443
|
condition: CTX_INLINE_CHAT_CHANGE_SHOWS_DIFF,
|
|
@@ -459,7 +459,7 @@ class ToggleDiffForChange extends AbstractInline1ChatAction {
|
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
class AbstractInline2ChatAction extends EditorAction2 {
|
|
462
|
-
static { this.category = ( localize2(
|
|
462
|
+
static { this.category = ( localize2(8149, "Inline Chat")); }
|
|
463
463
|
constructor(desc) {
|
|
464
464
|
const massageMenu = (menu) => {
|
|
465
465
|
if (Array.isArray(menu)) {
|
|
@@ -545,7 +545,7 @@ class KeepSessionAction2 extends KeepOrUndoSessionAction {
|
|
|
545
545
|
constructor() {
|
|
546
546
|
super(true, {
|
|
547
547
|
id: 'inlineChat2.keep',
|
|
548
|
-
title: ( localize2(
|
|
548
|
+
title: ( localize2(8163, "Keep")),
|
|
549
549
|
f1: true,
|
|
550
550
|
icon: Codicon.check,
|
|
551
551
|
precondition: ( ContextKeyExpr.and(CTX_INLINE_CHAT_VISIBLE, ( ctxHasRequestInProgress.negate()), ctxHasEditorModification)),
|
|
@@ -570,7 +570,7 @@ class UndoAndCloseSessionAction2 extends KeepOrUndoSessionAction {
|
|
|
570
570
|
constructor() {
|
|
571
571
|
super(false, {
|
|
572
572
|
id: 'inlineChat2.close',
|
|
573
|
-
title: ( localize2(
|
|
573
|
+
title: ( localize2(8164, "Close")),
|
|
574
574
|
f1: true,
|
|
575
575
|
icon: Codicon.close,
|
|
576
576
|
precondition: CTX_INLINE_CHAT_VISIBLE,
|
|
@@ -54,14 +54,14 @@ const IGNORED_LANGUAGE_IDS = ( new Set([
|
|
|
54
54
|
LEGACY_MODE_FILE_EXTENSION,
|
|
55
55
|
AGENT_FILE_EXTENSION
|
|
56
56
|
]));
|
|
57
|
-
const CTX_INLINE_CHAT_SHOWING_HINT = ( new RawContextKey('inlineChatShowingHint', false, ( localize(
|
|
57
|
+
const CTX_INLINE_CHAT_SHOWING_HINT = ( new RawContextKey('inlineChatShowingHint', false, ( localize(8176, "Whether inline chat shows a contextual hint"))));
|
|
58
58
|
const _inlineChatActionId = 'inlineChat.startWithCurrentLine';
|
|
59
59
|
class InlineChatExpandLineAction extends EditorAction2 {
|
|
60
60
|
constructor() {
|
|
61
61
|
super({
|
|
62
62
|
id: _inlineChatActionId,
|
|
63
63
|
category: AbstractInline1ChatAction.category,
|
|
64
|
-
title: ( localize2(
|
|
64
|
+
title: ( localize2(8177, "Start in Editor with Current Line")),
|
|
65
65
|
f1: true,
|
|
66
66
|
precondition: ( ContextKeyExpr.and(( CTX_INLINE_CHAT_VISIBLE.negate()), CTX_INLINE_CHAT_V1_ENABLED, EditorContextKeys.writable)),
|
|
67
67
|
keybinding: [{
|
|
@@ -104,7 +104,7 @@ class ShowInlineChatHintAction extends EditorAction2 {
|
|
|
104
104
|
super({
|
|
105
105
|
id: 'inlineChat.showHint',
|
|
106
106
|
category: AbstractInline1ChatAction.category,
|
|
107
|
-
title: ( localize2(
|
|
107
|
+
title: ( localize2(8178, "Show Inline Chat Hint")),
|
|
108
108
|
f1: false,
|
|
109
109
|
precondition: ( ContextKeyExpr.and(( CTX_INLINE_CHAT_VISIBLE.negate()), CTX_INLINE_CHAT_V1_ENABLED, EditorContextKeys.writable)),
|
|
110
110
|
});
|
|
@@ -232,15 +232,15 @@ let InlineChatHintsController = class InlineChatHintsController extends Disposab
|
|
|
232
232
|
this._ctxShowingHint.reset();
|
|
233
233
|
return;
|
|
234
234
|
}
|
|
235
|
-
const agentName = chatAgentService.getDefaultAgent(ChatAgentLocation.EditorInline)?.name ?? ( localize(
|
|
235
|
+
const agentName = chatAgentService.getDefaultAgent(ChatAgentLocation.EditorInline)?.name ?? ( localize(8179, "Chat"));
|
|
236
236
|
const { position, isEol, isWhitespace, kb, model } = showData;
|
|
237
237
|
const inlineClassName = ['a' , 'inline-chat-hint', 'inline-chat-hint-text'];
|
|
238
238
|
let content;
|
|
239
239
|
if (isWhitespace) {
|
|
240
|
-
content = '\u00a0' + ( localize(
|
|
240
|
+
content = '\u00a0' + ( localize(8180, "{0} to edit with {1}", kb, agentName));
|
|
241
241
|
}
|
|
242
242
|
else if (isEol) {
|
|
243
|
-
content = '\u00a0' + ( localize(
|
|
243
|
+
content = '\u00a0' + ( localize(8181, "{0} to continue with {1}", kb, agentName));
|
|
244
244
|
}
|
|
245
245
|
else {
|
|
246
246
|
content = '\u200a' + kb + '\u200a';
|
|
@@ -269,7 +269,7 @@ let InlineChatHintsController = class InlineChatHintsController extends Disposab
|
|
|
269
269
|
getActions: () => [
|
|
270
270
|
toAction({
|
|
271
271
|
id: 'inlineChat.disableHint',
|
|
272
|
-
label: ( localize(
|
|
272
|
+
label: ( localize(8182, "Disable Inline Chat Hint")),
|
|
273
273
|
run: async () => {
|
|
274
274
|
await this._configurationService.updateValue(setting, false);
|
|
275
275
|
}
|
|
@@ -297,7 +297,7 @@ class HideInlineChatHintAction extends EditorAction2 {
|
|
|
297
297
|
constructor() {
|
|
298
298
|
super({
|
|
299
299
|
id: 'inlineChat.hideHint',
|
|
300
|
-
title: ( localize2(
|
|
300
|
+
title: ( localize2(8183, "Hide Inline Chat Hint")),
|
|
301
301
|
precondition: CTX_INLINE_CHAT_SHOWING_HINT,
|
|
302
302
|
keybinding: {
|
|
303
303
|
weight: KeybindingWeight.EditorContrib - 10,
|
|
@@ -13,42 +13,42 @@ import { IRemoteCodingAgentsService } from '@codingame/monaco-vscode-api/vscode/
|
|
|
13
13
|
const extensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
14
14
|
extensionPoint: 'remoteCodingAgents',
|
|
15
15
|
jsonSchema: {
|
|
16
|
-
description: ( localize(
|
|
16
|
+
description: ( localize(10244, 'Contributes remote coding agent integrations to the chat widget.')),
|
|
17
17
|
type: 'array',
|
|
18
18
|
items: {
|
|
19
19
|
type: 'object',
|
|
20
20
|
properties: {
|
|
21
21
|
id: {
|
|
22
|
-
description: ( localize(
|
|
22
|
+
description: ( localize(10245, 'A unique identifier for this item.')),
|
|
23
23
|
type: 'string',
|
|
24
24
|
},
|
|
25
25
|
command: {
|
|
26
26
|
description: ( localize(
|
|
27
|
-
|
|
27
|
+
10246,
|
|
28
28
|
'Identifier of the command to execute. The command must be declared in the "commands" section.'
|
|
29
29
|
)),
|
|
30
30
|
type: 'string'
|
|
31
31
|
},
|
|
32
32
|
displayName: {
|
|
33
33
|
description: ( localize(
|
|
34
|
-
|
|
34
|
+
10247,
|
|
35
35
|
'A user-friendly name for this item which is used for display in menus.'
|
|
36
36
|
)),
|
|
37
37
|
type: 'string'
|
|
38
38
|
},
|
|
39
39
|
description: {
|
|
40
|
-
description: ( localize(
|
|
40
|
+
description: ( localize(10248, 'Description of the remote agent for use in menus and tooltips.')),
|
|
41
41
|
type: 'string'
|
|
42
42
|
},
|
|
43
43
|
followUpRegex: {
|
|
44
44
|
description: ( localize(
|
|
45
|
-
|
|
45
|
+
10249,
|
|
46
46
|
'The last occurrence of pattern in an existing chat conversation is sent to the contributing extension to facilitate follow-up responses.'
|
|
47
47
|
)),
|
|
48
48
|
type: 'string',
|
|
49
49
|
},
|
|
50
50
|
when: {
|
|
51
|
-
description: ( localize(
|
|
51
|
+
description: ( localize(10250, 'Condition which must be true to show this item.')),
|
|
52
52
|
type: 'string'
|
|
53
53
|
},
|
|
54
54
|
},
|
|
@@ -41,68 +41,68 @@ function getAccessibilityHelpText(accessor) {
|
|
|
41
41
|
const focusResponseKeybinding = keybindingService.lookupKeybinding('chat.action.focus')?.getAriaLabel();
|
|
42
42
|
const focusInputKeybinding = keybindingService.lookupKeybinding('workbench.action.chat.focusInput')?.getAriaLabel();
|
|
43
43
|
content.push(( localize(
|
|
44
|
-
|
|
44
|
+
11814,
|
|
45
45
|
"Inline chat occurs within a terminal. It is useful for suggesting terminal commands. Keep in mind that AI generated code may be incorrect."
|
|
46
46
|
)));
|
|
47
47
|
content.push(( localize(
|
|
48
|
-
|
|
48
|
+
11815,
|
|
49
49
|
"It can be activated using the command: Terminal: Start Chat ({0}), which will focus the input box.",
|
|
50
50
|
startChatKeybinding
|
|
51
51
|
)));
|
|
52
52
|
content.push(makeRequestKeybinding ? ( localize(
|
|
53
|
-
|
|
53
|
+
11816,
|
|
54
54
|
"The input box is where the user can type a request and can make the request ({0}). The widget will be closed and all content will be discarded when the Escape key is pressed and the terminal will regain focus.",
|
|
55
55
|
makeRequestKeybinding
|
|
56
56
|
)) : ( localize(
|
|
57
|
-
|
|
57
|
+
11817,
|
|
58
58
|
"The input box is where the user can type a request and can make the request by tabbing to the Make Request button, which is not currently triggerable via keybindings. The widget will be closed and all content will be discarded when the Escape key is pressed and the terminal will regain focus."
|
|
59
59
|
)));
|
|
60
60
|
content.push(openAccessibleViewKeybinding ? ( localize(
|
|
61
|
-
|
|
61
|
+
11818,
|
|
62
62
|
'The response can be inspected in the accessible view ({0}).',
|
|
63
63
|
openAccessibleViewKeybinding
|
|
64
64
|
)) : ( localize(
|
|
65
|
-
|
|
65
|
+
11819,
|
|
66
66
|
'With the input box focused, inspect the response in the accessible view via the Open Accessible View command, which is currently not triggerable by a keybinding.'
|
|
67
67
|
)));
|
|
68
68
|
content.push(focusResponseKeybinding ? ( localize(
|
|
69
|
-
|
|
69
|
+
11820,
|
|
70
70
|
'Reach the response from the input box ({0}).',
|
|
71
71
|
focusResponseKeybinding
|
|
72
72
|
)) : ( localize(
|
|
73
|
-
|
|
73
|
+
11821,
|
|
74
74
|
'Reach the response from the input box by tabbing or assigning a keybinding for the command: Focus Terminal Response.'
|
|
75
75
|
)));
|
|
76
76
|
content.push(focusInputKeybinding ? ( localize(
|
|
77
|
-
|
|
77
|
+
11822,
|
|
78
78
|
'Reach the input box from the response ({0}).',
|
|
79
79
|
focusInputKeybinding
|
|
80
80
|
)) : ( localize(
|
|
81
|
-
|
|
81
|
+
11823,
|
|
82
82
|
'Reach the response from the input box by shift+tabbing or assigning a keybinding for the command: Focus Terminal Input.'
|
|
83
83
|
)));
|
|
84
84
|
content.push(runCommandKeybinding ? ( localize(
|
|
85
|
-
|
|
85
|
+
11824,
|
|
86
86
|
'With focus in the input box or command editor, the Terminal: Run Chat Command ({0}) action.',
|
|
87
87
|
runCommandKeybinding
|
|
88
88
|
)) : ( localize(
|
|
89
|
-
|
|
89
|
+
11825,
|
|
90
90
|
'Run a command by tabbing to the button as the action is currently not triggerable by a keybinding.'
|
|
91
91
|
)));
|
|
92
92
|
content.push(insertCommandKeybinding ? ( localize(
|
|
93
|
-
|
|
93
|
+
11826,
|
|
94
94
|
'With focus in the input box command editor, the Terminal: Insert Chat Command ({0}) action.',
|
|
95
95
|
insertCommandKeybinding
|
|
96
96
|
)) : ( localize(
|
|
97
|
-
|
|
97
|
+
11827,
|
|
98
98
|
'Insert a command by tabbing to the button as the action is currently not triggerable by a keybinding.'
|
|
99
99
|
)));
|
|
100
100
|
content.push(( localize(
|
|
101
|
-
|
|
101
|
+
11828,
|
|
102
102
|
"Use tab to reach conditional parts like commands, status, message responses and more."
|
|
103
103
|
)));
|
|
104
104
|
content.push(( localize(
|
|
105
|
-
|
|
105
|
+
11829,
|
|
106
106
|
"Accessibility Signals can be changed via settings with a prefix of signals.chat. By default, if a request takes more than 4 seconds, you will hear a sound indicating that progress is still occurring."
|
|
107
107
|
)));
|
|
108
108
|
return content.join('\n');
|