@codingame/monaco-vscode-xterm-addons-common 26.2.2 → 28.0.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 +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.js +62 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugAttachment.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugAttachment.js +72 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.js +79 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.js +117 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatPasteProviders.js +11 -12
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +28 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.d.ts +0 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.js +0 -209
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +0 -112
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +0 -1314
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-xterm-addons-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "28.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - common package depending on xterm addons",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
19
|
-
"@xterm/addon-clipboard": "0.3.0-beta.
|
|
20
|
-
"@xterm/addon-image": "0.10.0-beta.
|
|
21
|
-
"@xterm/addon-ligatures": "0.11.0-beta.
|
|
22
|
-
"@xterm/addon-progress": "0.3.0-beta.
|
|
23
|
-
"@xterm/addon-search": "0.17.0-beta.
|
|
24
|
-
"@xterm/addon-serialize": "0.15.0-beta.
|
|
25
|
-
"@xterm/addon-unicode11": "0.10.0-beta.
|
|
26
|
-
"@xterm/addon-webgl": "0.20.0-beta.
|
|
18
|
+
"@codingame/monaco-vscode-api": "28.0.0",
|
|
19
|
+
"@xterm/addon-clipboard": "0.3.0-beta.168",
|
|
20
|
+
"@xterm/addon-image": "0.10.0-beta.168",
|
|
21
|
+
"@xterm/addon-ligatures": "0.11.0-beta.168",
|
|
22
|
+
"@xterm/addon-progress": "0.3.0-beta.168",
|
|
23
|
+
"@xterm/addon-search": "0.17.0-beta.168",
|
|
24
|
+
"@xterm/addon-serialize": "0.15.0-beta.168",
|
|
25
|
+
"@xterm/addon-unicode11": "0.10.0-beta.168",
|
|
26
|
+
"@xterm/addon-webgl": "0.20.0-beta.167"
|
|
27
27
|
},
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
@@ -5,12 +5,16 @@ import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/w
|
|
|
5
5
|
import { IChatContextValueItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatContextPickService";
|
|
6
6
|
import { IChatContextPickService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatContextPickService.service";
|
|
7
7
|
import { IChatRequestVariableEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries";
|
|
8
|
+
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
|
|
8
9
|
import { IChatWidget } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
10
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
11
|
+
import { IChatDebugService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatDebugService.service";
|
|
12
|
+
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
9
13
|
import { ITerminalService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
|
|
10
14
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
11
15
|
export declare class ChatContextContributions extends Disposable implements IWorkbenchContribution {
|
|
12
16
|
static readonly ID = "chat.contextContributions";
|
|
13
|
-
constructor(instantiationService: IInstantiationService, contextPickService: IChatContextPickService);
|
|
17
|
+
constructor(instantiationService: IInstantiationService, contextPickService: IChatContextPickService, chatDebugService: IChatDebugService, contextKeyService: IContextKeyService, languageModelToolsService: ILanguageModelToolsService, chatWidgetService: IChatWidgetService);
|
|
14
18
|
}
|
|
15
19
|
export declare class TerminalContext implements IChatContextValueItem {
|
|
16
20
|
private readonly _resource;
|
|
@@ -17,9 +17,15 @@ import { NotebookEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/work
|
|
|
17
17
|
import { IChatContextPickService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatContextPickService.service';
|
|
18
18
|
import { toToolSetVariableEntry, toToolVariableEntry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
|
|
19
19
|
import { isToolSet, ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
20
|
+
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
21
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
20
22
|
import { isImage } from '../widget/input/editor/chatPasteProviders.js';
|
|
21
23
|
import { convertBufferToScreenshotVariable } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatScreenshotContext';
|
|
22
24
|
import { ChatInstructionsPickerPick } from '../promptSyntax/attachInstructionsAction.js';
|
|
25
|
+
import { createDebugEventsAttachment } from '../chatDebug/chatDebugAttachment.js';
|
|
26
|
+
import { IChatDebugService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatDebugService.service';
|
|
27
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
28
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
23
29
|
import { ITerminalService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
|
|
24
30
|
import { TerminalCapability } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/capabilities';
|
|
25
31
|
import { imageToHash } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatImageUtils';
|
|
@@ -28,8 +34,30 @@ let ChatContextContributions = class ChatContextContributions extends Disposable
|
|
|
28
34
|
static {
|
|
29
35
|
this.ID = "chat.contextContributions";
|
|
30
36
|
}
|
|
31
|
-
constructor(
|
|
37
|
+
constructor(
|
|
38
|
+
instantiationService,
|
|
39
|
+
contextPickService,
|
|
40
|
+
chatDebugService,
|
|
41
|
+
contextKeyService,
|
|
42
|
+
languageModelToolsService,
|
|
43
|
+
chatWidgetService
|
|
44
|
+
) {
|
|
32
45
|
super();
|
|
46
|
+
const hasAttachedDebugDataKey = ChatContextKeys.chatSessionHasAttachedDebugData.bindTo(contextKeyService);
|
|
47
|
+
this._store.add(chatWidgetService.onDidChangeFocusedSession(() => {
|
|
48
|
+
const sessionResource = chatWidgetService.lastFocusedWidget?.viewModel?.sessionResource;
|
|
49
|
+
hasAttachedDebugDataKey.set(
|
|
50
|
+
!!sessionResource && chatDebugService.hasAttachedDebugData(sessionResource)
|
|
51
|
+
);
|
|
52
|
+
languageModelToolsService.flushToolUpdates();
|
|
53
|
+
}));
|
|
54
|
+
this._store.add(chatDebugService.onDidAttachDebugData(sessionResource => {
|
|
55
|
+
const focusedSession = chatWidgetService.lastFocusedWidget?.viewModel?.sessionResource;
|
|
56
|
+
if (focusedSession && ( focusedSession.toString()) === ( sessionResource.toString())) {
|
|
57
|
+
hasAttachedDebugDataKey.set(true);
|
|
58
|
+
languageModelToolsService.flushToolUpdates();
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
33
61
|
this._store.add(
|
|
34
62
|
contextPickService.registerChatContextItem(instantiationService.createInstance(ToolsContextPickerPick))
|
|
35
63
|
);
|
|
@@ -45,13 +73,16 @@ let ChatContextContributions = class ChatContextContributions extends Disposable
|
|
|
45
73
|
this._store.add(
|
|
46
74
|
contextPickService.registerChatContextItem(instantiationService.createInstance(ScreenshotContextValuePick))
|
|
47
75
|
);
|
|
76
|
+
this._store.add(
|
|
77
|
+
contextPickService.registerChatContextItem(instantiationService.createInstance(DebugEventsSnapshotContextValuePick))
|
|
78
|
+
);
|
|
48
79
|
}
|
|
49
80
|
};
|
|
50
|
-
ChatContextContributions = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IChatContextPickService))], ChatContextContributions));
|
|
81
|
+
ChatContextContributions = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IChatContextPickService)), ( __param(2, IChatDebugService)), ( __param(3, IContextKeyService)), ( __param(4, ILanguageModelToolsService)), ( __param(5, IChatWidgetService))], ChatContextContributions));
|
|
51
82
|
class ToolsContextPickerPick {
|
|
52
83
|
constructor() {
|
|
53
84
|
this.type = "pickerPick";
|
|
54
|
-
this.label = ( localize(
|
|
85
|
+
this.label = ( localize(4846, "Tools..."));
|
|
55
86
|
this.icon = Codicon.tools;
|
|
56
87
|
this.ordinal = -500;
|
|
57
88
|
}
|
|
@@ -102,7 +133,7 @@ class ToolsContextPickerPick {
|
|
|
102
133
|
picks.push(item);
|
|
103
134
|
}
|
|
104
135
|
return {
|
|
105
|
-
placeholder: ( localize(
|
|
136
|
+
placeholder: ( localize(4847, "Select a tool")),
|
|
106
137
|
picks: Promise.resolve(picks)
|
|
107
138
|
};
|
|
108
139
|
}
|
|
@@ -112,7 +143,7 @@ let OpenEditorContextValuePick = class OpenEditorContextValuePick {
|
|
|
112
143
|
this._editorService = _editorService;
|
|
113
144
|
this._labelService = _labelService;
|
|
114
145
|
this.type = "valuePick";
|
|
115
|
-
this.label = ( localize(
|
|
146
|
+
this.label = ( localize(4848, "Open Editors"));
|
|
116
147
|
this.icon = Codicon.file;
|
|
117
148
|
this.ordinal = 800;
|
|
118
149
|
}
|
|
@@ -148,7 +179,7 @@ let ClipboardImageContextValuePick = class ClipboardImageContextValuePick {
|
|
|
148
179
|
constructor(_clipboardService) {
|
|
149
180
|
this._clipboardService = _clipboardService;
|
|
150
181
|
this.type = "valuePick";
|
|
151
|
-
this.label = ( localize(
|
|
182
|
+
this.label = ( localize(4849, "Image from Clipboard"));
|
|
152
183
|
this.icon = Codicon.fileMedia;
|
|
153
184
|
}
|
|
154
185
|
async isEnabled(widget) {
|
|
@@ -165,8 +196,8 @@ let ClipboardImageContextValuePick = class ClipboardImageContextValuePick {
|
|
|
165
196
|
const fileBuffer = await this._clipboardService.readImage();
|
|
166
197
|
return {
|
|
167
198
|
id: await imageToHash(fileBuffer),
|
|
168
|
-
name: ( localize(
|
|
169
|
-
fullName: ( localize(
|
|
199
|
+
name: ( localize(4850, "Pasted Image")),
|
|
200
|
+
fullName: ( localize(4850, "Pasted Image")),
|
|
170
201
|
value: fileBuffer,
|
|
171
202
|
kind: "image"
|
|
172
203
|
};
|
|
@@ -179,7 +210,7 @@ let TerminalContext = class TerminalContext {
|
|
|
179
210
|
this._terminalService = _terminalService;
|
|
180
211
|
this.type = "valuePick";
|
|
181
212
|
this.icon = Codicon.terminal;
|
|
182
|
-
this.label = ( localize(
|
|
213
|
+
this.label = ( localize(4851, "Terminal"));
|
|
183
214
|
}
|
|
184
215
|
isEnabled(widget) {
|
|
185
216
|
const terminal = this._terminalService.getInstanceFromResource(this._resource);
|
|
@@ -244,7 +275,7 @@ let ScreenshotContextValuePick = class ScreenshotContextValuePick {
|
|
|
244
275
|
this._hostService = _hostService;
|
|
245
276
|
this.type = "valuePick";
|
|
246
277
|
this.icon = Codicon.deviceCamera;
|
|
247
|
-
this.label = (isElectron ? ( localize(
|
|
278
|
+
this.label = (isElectron ? ( localize(4852, "Screenshot Window")) : ( localize(4853, "Screenshot")));
|
|
248
279
|
}
|
|
249
280
|
async isEnabled(widget) {
|
|
250
281
|
return !!widget.attachmentCapabilities.supportsImageAttachments && !!widget.input.selectedLanguageModel.get()?.metadata.capabilities?.vision;
|
|
@@ -255,5 +286,26 @@ let ScreenshotContextValuePick = class ScreenshotContextValuePick {
|
|
|
255
286
|
}
|
|
256
287
|
};
|
|
257
288
|
ScreenshotContextValuePick = ( __decorate([( __param(0, IHostService))], ScreenshotContextValuePick));
|
|
289
|
+
let DebugEventsSnapshotContextValuePick = class DebugEventsSnapshotContextValuePick {
|
|
290
|
+
constructor(_chatDebugService) {
|
|
291
|
+
this._chatDebugService = _chatDebugService;
|
|
292
|
+
this.type = "valuePick";
|
|
293
|
+
this.icon = Codicon.output;
|
|
294
|
+
this.label = ( localize(4854, "Debug Events Snapshot"));
|
|
295
|
+
this.ordinal = -600;
|
|
296
|
+
}
|
|
297
|
+
isEnabled(widget) {
|
|
298
|
+
const sessionResource = widget.viewModel?.sessionResource;
|
|
299
|
+
return !!sessionResource && this._chatDebugService.getEvents(sessionResource).length > 0;
|
|
300
|
+
}
|
|
301
|
+
async asAttachment(widget) {
|
|
302
|
+
const sessionResource = widget.viewModel?.sessionResource;
|
|
303
|
+
if (!sessionResource) {
|
|
304
|
+
return undefined;
|
|
305
|
+
}
|
|
306
|
+
return createDebugEventsAttachment(sessionResource, this._chatDebugService);
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
DebugEventsSnapshotContextValuePick = ( __decorate([( __param(0, IChatDebugService))], DebugEventsSnapshotContextValuePick));
|
|
258
310
|
|
|
259
311
|
export { ChatContextContributions, TerminalContext };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
+
import { IChatDebugService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatDebugService.service";
|
|
3
|
+
import { IChatRequestVariableEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries";
|
|
4
|
+
/**
|
|
5
|
+
* Creates a debug events attachment for a chat session.
|
|
6
|
+
* This can be used to attach debug logs to a chat request.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createDebugEventsAttachment(sessionResource: URI, chatDebugService: IChatDebugService): Promise<IChatRequestVariableEntry>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
|
|
2
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
3
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
|
+
|
|
5
|
+
const debugEventKindDescriptions = {
|
|
6
|
+
generic: "- generic (category: \"discovery\"): File discovery for instructions, skills, agents, hooks. Resolving returns a fileList with full file paths, load status, skip reasons, and source folders. Always resolve these for questions about customization files.\n" + "- generic (other): Miscellaneous logs. Resolving returns additional text details.",
|
|
7
|
+
toolCall: "- toolCall: A tool invocation. Resolving returns tool name, input, output, status, and duration.",
|
|
8
|
+
modelTurn: "- modelTurn: An LLM round-trip. Resolving returns model name, token usage, timing, errors, and prompt sections.",
|
|
9
|
+
subagentInvocation: "- subagentInvocation: A sub-agent spawn. Resolving returns agent name, status, duration, and counts.",
|
|
10
|
+
userMessage: "- userMessage: The full prompt sent to the model. Resolving returns the complete message and all prompt sections (system prompt, instructions, context). Essential for understanding what the model received.",
|
|
11
|
+
agentResponse: "- agentResponse: The model's response. Resolving returns the full response text and sections."
|
|
12
|
+
};
|
|
13
|
+
function formatDebugEventsForContext(events) {
|
|
14
|
+
const lines = [];
|
|
15
|
+
for (const event of events) {
|
|
16
|
+
const ts = event.created.toISOString();
|
|
17
|
+
const id = event.id ? ` [id=${event.id}]` : "";
|
|
18
|
+
switch (event.kind) {
|
|
19
|
+
case "generic":
|
|
20
|
+
lines.push(
|
|
21
|
+
`[${ts}]${id} ${event.level >= 3 ? "ERROR" : event.level >= 2 ? "WARN" : "INFO"}: ${event.name}${event.details ? " - " + event.details : ""}${event.category ? " (category: " + event.category + ")" : ""}`
|
|
22
|
+
);
|
|
23
|
+
break;
|
|
24
|
+
case "toolCall":
|
|
25
|
+
lines.push(
|
|
26
|
+
`[${ts}]${id} TOOL_CALL: ${event.toolName}${event.result ? " result=" + event.result : ""}${event.durationInMillis !== undefined ? " duration=" + event.durationInMillis + "ms" : ""}`
|
|
27
|
+
);
|
|
28
|
+
break;
|
|
29
|
+
case "modelTurn":
|
|
30
|
+
lines.push(
|
|
31
|
+
`[${ts}]${id} MODEL_TURN: ${event.requestName ?? "unknown"}${event.model ? " model=" + event.model : ""}${event.inputTokens !== undefined ? " tokens(in=" + event.inputTokens + ",out=" + (event.outputTokens ?? "?") + ")" : ""}${event.durationInMillis !== undefined ? " duration=" + event.durationInMillis + "ms" : ""}`
|
|
32
|
+
);
|
|
33
|
+
break;
|
|
34
|
+
case "subagentInvocation":
|
|
35
|
+
lines.push(
|
|
36
|
+
`[${ts}]${id} SUBAGENT: ${event.agentName}${event.status ? " status=" + event.status : ""}${event.durationInMillis !== undefined ? " duration=" + event.durationInMillis + "ms" : ""}`
|
|
37
|
+
);
|
|
38
|
+
break;
|
|
39
|
+
case "userMessage":
|
|
40
|
+
lines.push(
|
|
41
|
+
`[${ts}]${id} USER_MESSAGE: ${event.message.substring(0, 200)}${event.message.length > 200 ? "..." : ""} (${event.sections.length} sections)`
|
|
42
|
+
);
|
|
43
|
+
break;
|
|
44
|
+
case "agentResponse":
|
|
45
|
+
lines.push(
|
|
46
|
+
`[${ts}]${id} AGENT_RESPONSE: ${event.message.substring(0, 200)}${event.message.length > 200 ? "..." : ""} (${event.sections.length} sections)`
|
|
47
|
+
);
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return lines.join("\n");
|
|
52
|
+
}
|
|
53
|
+
async function createDebugEventsAttachment(sessionResource, chatDebugService) {
|
|
54
|
+
chatDebugService.markDebugDataAttached(sessionResource);
|
|
55
|
+
if (!chatDebugService.hasInvokedProviders(sessionResource)) {
|
|
56
|
+
await chatDebugService.invokeProviders(sessionResource);
|
|
57
|
+
}
|
|
58
|
+
const events = chatDebugService.getEvents(sessionResource);
|
|
59
|
+
const summary = events.length > 0 ? formatDebugEventsForContext(events) : ( localize(5641, "No debug events found for this conversation."));
|
|
60
|
+
return {
|
|
61
|
+
id: "chatDebugEvents",
|
|
62
|
+
name: ( localize(5642, "Debug Events Snapshot")),
|
|
63
|
+
icon: Codicon.output,
|
|
64
|
+
kind: "debugEvents",
|
|
65
|
+
snapshotTime: Date.now(),
|
|
66
|
+
sessionResource,
|
|
67
|
+
value: summary,
|
|
68
|
+
modelDescription: "These are the debug event logs from the current chat conversation. Analyze them to help answer the user's troubleshooting question.\n" + "\n" + "CRITICAL INSTRUCTION: You MUST call the resolveDebugEventDetails tool on relevant events BEFORE answering. The log lines below are only summaries — they do NOT contain the actual data (file paths, prompt content, tool I/O, etc.). The real information is only available by resolving events. Never answer based solely on the summary lines. Always resolve first, then answer.\n" + "\n" + "Call resolveDebugEventDetails in parallel on all events that could be relevant to the user's question. When in doubt, resolve more events rather than fewer.\n" + "\n" + "IMPORTANT: Do NOT mention event IDs, tool resolution steps, or internal debug mechanics in your response. The user does not know about debug events or event IDs. Present your findings directly and naturally, as if you simply know the answer. Never say things like \"I need to resolve events\" or show event IDs.\n" + "\n" + "Event types and what resolving them returns:\n" + ( Object.values(debugEventKindDescriptions)).join("\n")
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { createDebugEventsAttachment };
|
package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { IChatWidget } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
2
2
|
import { IPromptsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service";
|
|
3
3
|
import { IChatContextPickerItem, IChatContextPicker } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatContextPickService";
|
|
4
|
+
/**
|
|
5
|
+
* Action ID for the `Attach Instruction` action.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ATTACH_INSTRUCTIONS_ACTION_ID = "workbench.action.chat.attach.instructions";
|
|
8
|
+
/**
|
|
9
|
+
* Action ID for the `Configure Instruction` action.
|
|
10
|
+
*/
|
|
11
|
+
export declare const CONFIGURE_INSTRUCTIONS_ACTION_ID = "workbench.action.chat.configure.instructions";
|
|
4
12
|
/**
|
|
5
13
|
* Helper to register the `Attach Prompt` action.
|
|
6
14
|
*/
|
package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js
CHANGED
|
@@ -23,8 +23,8 @@ class ManageInstructionsFilesAction extends Action2 {
|
|
|
23
23
|
constructor() {
|
|
24
24
|
super({
|
|
25
25
|
id: CONFIGURE_INSTRUCTIONS_ACTION_ID,
|
|
26
|
-
title: ( localize2(
|
|
27
|
-
shortTitle: ( localize2(
|
|
26
|
+
title: ( localize2(6262, "Configure Instructions & Rules...")),
|
|
27
|
+
shortTitle: ( localize2(6263, "Instructions & Rules")),
|
|
28
28
|
icon: Codicon.bookmark,
|
|
29
29
|
f1: true,
|
|
30
30
|
precondition: ChatContextKeys.enabled,
|
|
@@ -41,7 +41,7 @@ class ManageInstructionsFilesAction extends Action2 {
|
|
|
41
41
|
const openerService = accessor.get(IOpenerService);
|
|
42
42
|
const instaService = accessor.get(IInstantiationService);
|
|
43
43
|
const pickers = instaService.createInstance(PromptFilePickers);
|
|
44
|
-
const placeholder = ( localize(
|
|
44
|
+
const placeholder = ( localize(6264, "Select the instructions file to open"));
|
|
45
45
|
const result = await pickers.selectPromptFile({
|
|
46
46
|
placeholder,
|
|
47
47
|
type: PromptsType.instructions,
|
|
@@ -59,7 +59,7 @@ let ChatInstructionsPickerPick = class ChatInstructionsPickerPick {
|
|
|
59
59
|
constructor(promptsService) {
|
|
60
60
|
this.promptsService = promptsService;
|
|
61
61
|
this.type = "pickerPick";
|
|
62
|
-
this.label = ( localize(
|
|
62
|
+
this.label = ( localize(6265, "Instructions..."));
|
|
63
63
|
this.icon = Codicon.bookmark;
|
|
64
64
|
this.commandId = ATTACH_INSTRUCTIONS_ACTION_ID;
|
|
65
65
|
}
|
|
@@ -89,10 +89,10 @@ let ChatInstructionsPickerPick = class ChatInstructionsPickerPick {
|
|
|
89
89
|
return result;
|
|
90
90
|
});
|
|
91
91
|
return {
|
|
92
|
-
placeholder: ( localize(
|
|
92
|
+
placeholder: ( localize(6266, "Select instructions files to attach")),
|
|
93
93
|
picks,
|
|
94
94
|
configure: {
|
|
95
|
-
label: ( localize(
|
|
95
|
+
label: ( localize(6267, "Configure Instructions...")),
|
|
96
96
|
commandId: CONFIGURE_INSTRUCTIONS_ACTION_ID
|
|
97
97
|
}
|
|
98
98
|
};
|
|
@@ -100,4 +100,4 @@ let ChatInstructionsPickerPick = class ChatInstructionsPickerPick {
|
|
|
100
100
|
};
|
|
101
101
|
ChatInstructionsPickerPick = ( __decorate([( __param(0, IPromptsService))], ChatInstructionsPickerPick));
|
|
102
102
|
|
|
103
|
-
export { ChatInstructionsPickerPick, registerAttachPromptActions };
|
|
103
|
+
export { ATTACH_INSTRUCTIONS_ACTION_ID, CONFIGURE_INSTRUCTIONS_ACTION_ID, ChatInstructionsPickerPick, registerAttachPromptActions };
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
+
import { ICodeEditor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser";
|
|
3
|
+
import { PromptsStorage } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService";
|
|
4
|
+
/**
|
|
5
|
+
* Options to override the default folder-picker and editor-open behaviour
|
|
6
|
+
* of the new-prompt-file actions. The agentic editor passes these to open
|
|
7
|
+
* files in the embedded editor and pre-resolve the target folder.
|
|
8
|
+
*/
|
|
9
|
+
export interface INewPromptOptions {
|
|
10
|
+
readonly targetFolder?: URI;
|
|
11
|
+
readonly targetStorage?: PromptsStorage;
|
|
12
|
+
readonly openFile?: (uri: URI) => Promise<ICodeEditor | undefined>;
|
|
13
|
+
}
|
|
1
14
|
export declare const NEW_PROMPT_COMMAND_ID = "workbench.command.new.prompt";
|
|
2
15
|
export declare const NEW_INSTRUCTIONS_COMMAND_ID = "workbench.command.new.instructions";
|
|
3
16
|
export declare const NEW_AGENT_COMMAND_ID = "workbench.command.new.agent";
|