@codingame/monaco-vscode-chat-service-override 23.0.3 → 23.1.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/package.json +43 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +106 -74
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +2 -2
- 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 +17 -17
- 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.js +3 -3
- 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 +7 -7
- 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/chatViewPane.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +6 -2
- 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.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +57 -7
- 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 +22 -23
- 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 +10 -7
- 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
|
@@ -299,7 +299,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
299
299
|
const liveSessionItems = ( Array.from(( this._sessionModels.values()))
|
|
300
300
|
.filter(session => this.shouldBeInHistory(session))
|
|
301
301
|
.map((session) => {
|
|
302
|
-
const title = session.title || ( localize(
|
|
302
|
+
const title = session.title || ( localize(5807, "New Chat"));
|
|
303
303
|
return {
|
|
304
304
|
sessionResource: session.sessionResource,
|
|
305
305
|
title,
|
|
@@ -816,7 +816,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
816
816
|
else {
|
|
817
817
|
if (!rawResult) {
|
|
818
818
|
this.trace('sendRequest', `Provider returned no response for session ${model.sessionId}`);
|
|
819
|
-
rawResult = { errorDetails: { message: ( localize(
|
|
819
|
+
rawResult = { errorDetails: { message: ( localize(5808, "Provider returned null response")) } };
|
|
820
820
|
}
|
|
821
821
|
const result = rawResult.errorDetails?.responseIsFiltered ? 'filtered' :
|
|
822
822
|
rawResult.errorDetails && gotProgress ? 'errorWithOutput' :
|
|
@@ -51,7 +51,7 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
51
51
|
}
|
|
52
52
|
e.join(this.storeTask, {
|
|
53
53
|
id: 'join.chatSessionStore',
|
|
54
|
-
label: ( localize(
|
|
54
|
+
label: ( localize(5809, "Saving chat history"))
|
|
55
55
|
});
|
|
56
56
|
}));
|
|
57
57
|
}
|
|
@@ -326,7 +326,7 @@ function getSessionMetadata(session) {
|
|
|
326
326
|
const title = session.customTitle || (session instanceof ChatModel ? session.title : undefined);
|
|
327
327
|
return {
|
|
328
328
|
sessionId: session.sessionId,
|
|
329
|
-
title: title || ( localize(
|
|
329
|
+
title: title || ( localize(5810, "New Chat")),
|
|
330
330
|
lastMessageDate: session.lastMessageDate,
|
|
331
331
|
isImported: session.isImported,
|
|
332
332
|
initialLocation: session.initialLocation,
|
package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js
CHANGED
|
@@ -11,7 +11,7 @@ function registerChatFilesExtensionPoint(point) {
|
|
|
11
11
|
return ExtensionsRegistry.registerExtensionPoint({
|
|
12
12
|
extensionPoint: point,
|
|
13
13
|
jsonSchema: {
|
|
14
|
-
description: ( localize(
|
|
14
|
+
description: ( localize(5828, 'Contributes {0} for chat prompts.', point)),
|
|
15
15
|
type: 'array',
|
|
16
16
|
items: {
|
|
17
17
|
additionalProperties: false,
|
|
@@ -27,18 +27,18 @@ function registerChatFilesExtensionPoint(point) {
|
|
|
27
27
|
properties: {
|
|
28
28
|
name: {
|
|
29
29
|
description: ( localize(
|
|
30
|
-
|
|
30
|
+
5829,
|
|
31
31
|
'Identifier for this file. Must be unique within this extension for this contribution point.'
|
|
32
32
|
)),
|
|
33
33
|
type: 'string',
|
|
34
34
|
pattern: '^[\\w.-]+$'
|
|
35
35
|
},
|
|
36
36
|
path: {
|
|
37
|
-
description: ( localize(
|
|
37
|
+
description: ( localize(5830, 'Path to the file relative to the extension root.')),
|
|
38
38
|
type: 'string'
|
|
39
39
|
},
|
|
40
40
|
description: {
|
|
41
|
-
description: ( localize(
|
|
41
|
+
description: ( localize(5831, '(Optional) Description of the file.')),
|
|
42
42
|
type: 'string'
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -75,7 +75,7 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
75
75
|
for (const raw of ext.value) {
|
|
76
76
|
if (!raw.name || !raw.name.match(/^[\w.-]+$/)) {
|
|
77
77
|
ext.collector.error(( localize(
|
|
78
|
-
|
|
78
|
+
5832,
|
|
79
79
|
"Extension '{0}' cannot register {1} entry with invalid name '{2}'.",
|
|
80
80
|
ext.description.identifier.value,
|
|
81
81
|
contributionPoint,
|
|
@@ -85,7 +85,7 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
85
85
|
}
|
|
86
86
|
if (!raw.path) {
|
|
87
87
|
ext.collector.error(( localize(
|
|
88
|
-
|
|
88
|
+
5833,
|
|
89
89
|
"Extension '{0}' cannot register {1} entry '{2}' without path.",
|
|
90
90
|
ext.description.identifier.value,
|
|
91
91
|
contributionPoint,
|
|
@@ -95,7 +95,7 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
95
95
|
}
|
|
96
96
|
if (!raw.description) {
|
|
97
97
|
ext.collector.error(( localize(
|
|
98
|
-
|
|
98
|
+
5834,
|
|
99
99
|
"Extension '{0}' cannot register {1} entry '{2}' without description.",
|
|
100
100
|
ext.description.identifier.value,
|
|
101
101
|
contributionPoint,
|
|
@@ -106,7 +106,7 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
106
106
|
const fileUri = joinPath(ext.description.extensionLocation, raw.path);
|
|
107
107
|
if (!isEqualOrParent(fileUri, ext.description.extensionLocation)) {
|
|
108
108
|
ext.collector.error(( localize(
|
|
109
|
-
|
|
109
|
+
5835,
|
|
110
110
|
"Extension '{0}' {1} entry '{2}' path resolves outside the extension.",
|
|
111
111
|
ext.description.identifier.value,
|
|
112
112
|
contributionPoint,
|
|
@@ -121,7 +121,7 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
121
121
|
catch (e) {
|
|
122
122
|
const msg = e instanceof Error ? e.message : String(e);
|
|
123
123
|
ext.collector.error(( localize(
|
|
124
|
-
|
|
124
|
+
5836,
|
|
125
125
|
"Failed to register {0} entry '{1}': {2}",
|
|
126
126
|
contributionPoint,
|
|
127
127
|
raw.name,
|
|
@@ -55,7 +55,7 @@ let PromptCodeActionProvider = class PromptCodeActionProvider {
|
|
|
55
55
|
modeAttr.range.startColumn + modeAttr.key.length
|
|
56
56
|
));
|
|
57
57
|
result.push({
|
|
58
|
-
title: ( localize(
|
|
58
|
+
title: ( localize(5844, "Rename to 'agent'")),
|
|
59
59
|
edit: {
|
|
60
60
|
edits: [asWorkspaceTextEdit(model, { range: keyRange, text: 'agent' })]
|
|
61
61
|
}
|
|
@@ -67,7 +67,7 @@ let PromptCodeActionProvider = class PromptCodeActionProvider {
|
|
|
67
67
|
if (location && (await this.fileService.canMove(uri, location))) {
|
|
68
68
|
const edit = { oldResource: uri, newResource: location, options: { overwrite: false, copy: false } };
|
|
69
69
|
result.push({
|
|
70
|
-
title: ( localize(
|
|
70
|
+
title: ( localize(5845, "Migrate to custom agent file")),
|
|
71
71
|
edit: {
|
|
72
72
|
edits: [edit]
|
|
73
73
|
}
|
|
@@ -103,7 +103,7 @@ let PromptCodeActionProvider = class PromptCodeActionProvider {
|
|
|
103
103
|
edits.push(edit);
|
|
104
104
|
if (item.range.containsRange(range)) {
|
|
105
105
|
result.push({
|
|
106
|
-
title: ( localize(
|
|
106
|
+
title: ( localize(5846, "Update to '{0}'", newName)),
|
|
107
107
|
edit: {
|
|
108
108
|
edits: [asWorkspaceTextEdit(model, edit)]
|
|
109
109
|
}
|
|
@@ -113,7 +113,7 @@ let PromptCodeActionProvider = class PromptCodeActionProvider {
|
|
|
113
113
|
}
|
|
114
114
|
if (edits.length && result.length === 0 || edits.length > 1) {
|
|
115
115
|
result.push({
|
|
116
|
-
title: ( localize(
|
|
116
|
+
title: ( localize(5847, "Update all tool names")),
|
|
117
117
|
edit: {
|
|
118
118
|
edits: ( edits.map(edit => asWorkspaceTextEdit(model, edit)))
|
|
119
119
|
}
|
|
@@ -128,7 +128,7 @@ let PromptHeaderAutocompletion = class PromptHeaderAutocompletion {
|
|
|
128
128
|
' send: true'
|
|
129
129
|
].join('\n');
|
|
130
130
|
const item = {
|
|
131
|
-
label: ( localize(
|
|
131
|
+
label: ( localize(5848, "Handoff Example")),
|
|
132
132
|
kind: CompletionItemKind.Value,
|
|
133
133
|
insertText: whilespaceAfterColon === 0 ? ` ${value}` : value,
|
|
134
134
|
range: ( new Range(
|
package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js
CHANGED
|
@@ -57,17 +57,17 @@ let PromptHoverProvider = class PromptHoverProvider {
|
|
|
57
57
|
switch (attribute.key) {
|
|
58
58
|
case PromptHeaderAttributes.name:
|
|
59
59
|
return this.createHover(( localize(
|
|
60
|
-
|
|
60
|
+
5849,
|
|
61
61
|
'The name of the instruction file as shown in the UI. If not set, the name is derived from the file name.'
|
|
62
62
|
)), attribute.range);
|
|
63
63
|
case PromptHeaderAttributes.description:
|
|
64
64
|
return this.createHover(( localize(
|
|
65
|
-
|
|
65
|
+
5850,
|
|
66
66
|
'The description of the instruction file. It can be used to provide additional context or information about the instructions and is passed to the language model as part of the prompt.'
|
|
67
67
|
)), attribute.range);
|
|
68
68
|
case PromptHeaderAttributes.applyTo:
|
|
69
69
|
return this.createHover(( localize(
|
|
70
|
-
|
|
70
|
+
5851,
|
|
71
71
|
'One or more glob pattern (separated by comma) that describe for which files the instructions apply to. Based on these patterns, the file is automatically included in the prompt, when the context contains a file that matches one or more of these patterns. Use `**` when you want this file to always be added.\nExample: `**/*.ts`, `**/*.js`, `client/**`'
|
|
72
72
|
)), attribute.range);
|
|
73
73
|
}
|
|
@@ -80,26 +80,26 @@ let PromptHoverProvider = class PromptHoverProvider {
|
|
|
80
80
|
if (attribute.range.containsPosition(position)) {
|
|
81
81
|
switch (attribute.key) {
|
|
82
82
|
case PromptHeaderAttributes.name:
|
|
83
|
-
return this.createHover(( localize(
|
|
83
|
+
return this.createHover(( localize(5852, 'The name of the agent as shown in the UI.')), attribute.range);
|
|
84
84
|
case PromptHeaderAttributes.description:
|
|
85
85
|
return this.createHover(( localize(
|
|
86
|
-
|
|
86
|
+
5853,
|
|
87
87
|
'The description of the custom agent, what it does and when to use it.'
|
|
88
88
|
)), attribute.range);
|
|
89
89
|
case PromptHeaderAttributes.argumentHint:
|
|
90
90
|
return this.createHover(( localize(
|
|
91
|
-
|
|
91
|
+
5854,
|
|
92
92
|
'The argument-hint describes what inputs the custom agent expects or supports.'
|
|
93
93
|
)), attribute.range);
|
|
94
94
|
case PromptHeaderAttributes.model:
|
|
95
|
-
return this.getModelHover(attribute, attribute.range, ( localize(
|
|
95
|
+
return this.getModelHover(attribute, attribute.range, ( localize(5855, 'Specify the model that runs this custom agent.')), isGitHubTarget);
|
|
96
96
|
case PromptHeaderAttributes.tools:
|
|
97
|
-
return this.getToolHover(attribute, position, ( localize(
|
|
97
|
+
return this.getToolHover(attribute, position, ( localize(5856, 'The set of tools that the custom agent has access to.')), header.target);
|
|
98
98
|
case PromptHeaderAttributes.handOffs:
|
|
99
99
|
return this.getHandsOffHover(attribute, position, isGitHubTarget);
|
|
100
100
|
case PromptHeaderAttributes.target:
|
|
101
101
|
return this.createHover(( localize(
|
|
102
|
-
|
|
102
|
+
5857,
|
|
103
103
|
'The target to which the header attributes like tools apply to. Possible values are `github-copilot` and `vscode`.'
|
|
104
104
|
)), attribute.range);
|
|
105
105
|
}
|
|
@@ -112,23 +112,23 @@ let PromptHoverProvider = class PromptHoverProvider {
|
|
|
112
112
|
switch (attribute.key) {
|
|
113
113
|
case PromptHeaderAttributes.name:
|
|
114
114
|
return this.createHover(( localize(
|
|
115
|
-
|
|
115
|
+
5858,
|
|
116
116
|
'The name of the prompt. This is also the name of the slash command that will run this prompt.'
|
|
117
117
|
)), attribute.range);
|
|
118
118
|
case PromptHeaderAttributes.description:
|
|
119
119
|
return this.createHover(( localize(
|
|
120
|
-
|
|
120
|
+
5859,
|
|
121
121
|
'The description of the reusable prompt, what it does and when to use it.'
|
|
122
122
|
)), attribute.range);
|
|
123
123
|
case PromptHeaderAttributes.argumentHint:
|
|
124
124
|
return this.createHover(( localize(
|
|
125
|
-
|
|
125
|
+
5860,
|
|
126
126
|
'The argument-hint describes what inputs the prompt expects or supports.'
|
|
127
127
|
)), attribute.range);
|
|
128
128
|
case PromptHeaderAttributes.model:
|
|
129
|
-
return this.getModelHover(attribute, attribute.range, ( localize(
|
|
129
|
+
return this.getModelHover(attribute, attribute.range, ( localize(5861, 'The model to use in this prompt.')), false);
|
|
130
130
|
case PromptHeaderAttributes.tools:
|
|
131
|
-
return this.getToolHover(attribute, position, ( localize(
|
|
131
|
+
return this.getToolHover(attribute, position, ( localize(5862, 'The tools to use in this prompt.')), Target.VSCode);
|
|
132
132
|
case PromptHeaderAttributes.agent:
|
|
133
133
|
case PromptHeaderAttributes.mode:
|
|
134
134
|
return this.getAgentHover(attribute, position);
|
|
@@ -177,7 +177,7 @@ let PromptHoverProvider = class PromptHoverProvider {
|
|
|
177
177
|
}
|
|
178
178
|
getToolsetHover(toolSet, range) {
|
|
179
179
|
const lines = [];
|
|
180
|
-
lines.push(( localize(
|
|
180
|
+
lines.push(( localize(5863, 'ToolSet: {0}\n\n', toolSet.referenceName)));
|
|
181
181
|
if (toolSet.description) {
|
|
182
182
|
lines.push(toolSet.description);
|
|
183
183
|
}
|
|
@@ -188,7 +188,7 @@ let PromptHoverProvider = class PromptHoverProvider {
|
|
|
188
188
|
}
|
|
189
189
|
getModelHover(node, range, baseMessage, isGitHubTarget) {
|
|
190
190
|
if (isGitHubTarget) {
|
|
191
|
-
return this.createHover(baseMessage + '\n\n' + ( localize(
|
|
191
|
+
return this.createHover(baseMessage + '\n\n' + ( localize(5864, 'Note: This attribute is not used when target is github-copilot.')), range);
|
|
192
192
|
}
|
|
193
193
|
if (node.value.type === 'string') {
|
|
194
194
|
for (const id of this.languageModelsService.getLanguageModelIds()) {
|
|
@@ -196,9 +196,9 @@ let PromptHoverProvider = class PromptHoverProvider {
|
|
|
196
196
|
if (meta && ILanguageModelChatMetadata.matchesQualifiedName(node.value.value, meta)) {
|
|
197
197
|
const lines = [];
|
|
198
198
|
lines.push(baseMessage + '\n');
|
|
199
|
-
lines.push(( localize(
|
|
200
|
-
lines.push(( localize(
|
|
201
|
-
lines.push(( localize(
|
|
199
|
+
lines.push(( localize(5865, '- Name: {0}', meta.name)));
|
|
200
|
+
lines.push(( localize(5866, '- Family: {0}', meta.family)));
|
|
201
|
+
lines.push(( localize(5867, '- Vendor: {0}', meta.vendor)));
|
|
202
202
|
if (meta.tooltip) {
|
|
203
203
|
lines.push('', '', meta.tooltip);
|
|
204
204
|
}
|
|
@@ -214,33 +214,33 @@ let PromptHoverProvider = class PromptHoverProvider {
|
|
|
214
214
|
if (value.type === 'string' && value.range.containsPosition(position)) {
|
|
215
215
|
const agent = this.chatModeService.findModeByName(value.value);
|
|
216
216
|
if (agent) {
|
|
217
|
-
const description = agent.description.get() || (isBuiltinChatMode(agent) ? ( localize(
|
|
217
|
+
const description = agent.description.get() || (isBuiltinChatMode(agent) ? ( localize(5868, 'Built-in agent')) : ( localize(5869, 'Custom agent')));
|
|
218
218
|
lines.push(`\`${agent.name.get()}\`: ${description}`);
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
else {
|
|
222
222
|
const agents = this.chatModeService.getModes();
|
|
223
|
-
lines.push(( localize(
|
|
223
|
+
lines.push(( localize(5870, 'The agent to use when running this prompt.')));
|
|
224
224
|
lines.push('');
|
|
225
|
-
lines.push(( localize(
|
|
225
|
+
lines.push(( localize(5871, '**Built-in agents:**')));
|
|
226
226
|
for (const agent of agents.builtin) {
|
|
227
227
|
lines.push(`- \`${agent.name.get()}\`: ${agent.description.get() || agent.label.get()}`);
|
|
228
228
|
}
|
|
229
229
|
if (agents.custom.length > 0) {
|
|
230
230
|
lines.push('');
|
|
231
|
-
lines.push(( localize(
|
|
231
|
+
lines.push(( localize(5872, '**Custom agents:**')));
|
|
232
232
|
for (const agent of agents.custom) {
|
|
233
233
|
const description = agent.description.get();
|
|
234
|
-
lines.push(`- \`${agent.name.get()}\`: ${description || ( localize(
|
|
234
|
+
lines.push(`- \`${agent.name.get()}\`: ${description || ( localize(5869, 'Custom agent'))}`);
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
return this.createHover(lines.join('\n'), agentAttribute.range);
|
|
239
239
|
}
|
|
240
240
|
getHandsOffHover(attribute, position, isGitHubTarget) {
|
|
241
|
-
const handoffsBaseMessage = ( localize(
|
|
241
|
+
const handoffsBaseMessage = ( localize(5873, 'Possible handoff actions when the agent has completed its task.'));
|
|
242
242
|
if (isGitHubTarget) {
|
|
243
|
-
return this.createHover(handoffsBaseMessage + '\n\n' + ( localize(
|
|
243
|
+
return this.createHover(handoffsBaseMessage + '\n\n' + ( localize(5874, 'Note: This attribute is not used when target is github-copilot.')), attribute.range);
|
|
244
244
|
}
|
|
245
245
|
return this.createHover(handoffsBaseMessage, attribute.range);
|
|
246
246
|
}
|