@codingame/monaco-vscode-katex-common 26.1.1 → 26.1.2
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 +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +45 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +31 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +33 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +47 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +96 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +15 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +83 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +26 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatDisabledClaudeHooksContent.css +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatHookContentPart.css +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +15 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +14 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +206 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +12 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPendingDragAndDrop.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPendingDragAndDrop.js +148 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +108 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +14 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +59 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.js +1 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +13 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +90 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +14 -14
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +32 -32
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.js +0 -11
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +0 -150
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +0 -338
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.js +0 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.d.ts +0 -75
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +0 -364
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/interactiveEditor.css +0 -21
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/media/interactive.css +0 -36
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.d.ts +0 -110
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +0 -692
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +0 -158
package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js
CHANGED
|
@@ -39,12 +39,13 @@ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/in
|
|
|
39
39
|
import { renderAsPlaintext } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/markdownRenderer';
|
|
40
40
|
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
41
41
|
import { ChatViewId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
42
|
-
import { AgentSessionProviders, getAgentSessionProviderName } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
42
|
+
import { AgentSessionProviders, backgroundAgentDisplayName, getAgentSessionProviderName } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
43
43
|
import { BugIndicatingError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
44
44
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
45
45
|
import { LocalChatSessionUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
46
46
|
import { assertNever } from '@codingame/monaco-vscode-api/vscode/vs/base/common/assert';
|
|
47
47
|
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
48
|
+
import { Target } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
|
|
48
49
|
import { autorun, autorunIterableDelta } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
49
50
|
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
50
51
|
import { observableSignalFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableSignalFromEvent';
|
|
@@ -52,39 +53,39 @@ import { observableSignalFromEvent } from '@codingame/monaco-vscode-api/vscode/v
|
|
|
52
53
|
const extensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
53
54
|
extensionPoint: "chatSessions",
|
|
54
55
|
jsonSchema: {
|
|
55
|
-
description: ( localize(
|
|
56
|
+
description: ( localize(5508, "Contributes chat session integrations to the chat widget.")),
|
|
56
57
|
type: "array",
|
|
57
58
|
items: {
|
|
58
59
|
type: "object",
|
|
59
60
|
additionalProperties: false,
|
|
60
61
|
properties: {
|
|
61
62
|
type: {
|
|
62
|
-
description: ( localize(
|
|
63
|
+
description: ( localize(5509, "Unique identifier for the type of chat session.")),
|
|
63
64
|
type: "string"
|
|
64
65
|
},
|
|
65
66
|
name: {
|
|
66
67
|
description: ( localize(
|
|
67
|
-
|
|
68
|
+
5510,
|
|
68
69
|
"Name of the dynamically registered chat participant (eg: @agent). Must not contain whitespace."
|
|
69
70
|
)),
|
|
70
71
|
type: "string",
|
|
71
72
|
pattern: "^[\\w-]+$"
|
|
72
73
|
},
|
|
73
74
|
displayName: {
|
|
74
|
-
description: ( localize(
|
|
75
|
+
description: ( localize(5511, "A longer name for this item which is used for display in menus.")),
|
|
75
76
|
type: "string"
|
|
76
77
|
},
|
|
77
78
|
description: {
|
|
78
|
-
description: ( localize(
|
|
79
|
+
description: ( localize(5512, "Description of the chat session for use in menus and tooltips.")),
|
|
79
80
|
type: "string"
|
|
80
81
|
},
|
|
81
82
|
when: {
|
|
82
|
-
description: ( localize(
|
|
83
|
+
description: ( localize(5513, "Condition which must be true to show this item.")),
|
|
83
84
|
type: "string"
|
|
84
85
|
},
|
|
85
86
|
icon: {
|
|
86
87
|
description: ( localize(
|
|
87
|
-
|
|
88
|
+
5514,
|
|
88
89
|
"Icon identifier (codicon ID) for the chat session editor tab. For example, \"$(github)\" or \"$(cloud)\"."
|
|
89
90
|
)),
|
|
90
91
|
anyOf: [{
|
|
@@ -93,22 +94,22 @@ const extensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
93
94
|
type: "object",
|
|
94
95
|
properties: {
|
|
95
96
|
light: {
|
|
96
|
-
description: ( localize(
|
|
97
|
+
description: ( localize(5515, "Icon path when a light theme is used")),
|
|
97
98
|
type: "string"
|
|
98
99
|
},
|
|
99
100
|
dark: {
|
|
100
|
-
description: ( localize(
|
|
101
|
+
description: ( localize(5516, "Icon path when a dark theme is used")),
|
|
101
102
|
type: "string"
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
}]
|
|
105
106
|
},
|
|
106
107
|
order: {
|
|
107
|
-
description: ( localize(
|
|
108
|
+
description: ( localize(5517, "Order in which this item should be displayed.")),
|
|
108
109
|
type: "integer"
|
|
109
110
|
},
|
|
110
111
|
alternativeIds: {
|
|
111
|
-
description: ( localize(
|
|
112
|
+
description: ( localize(5518, "Alternative identifiers for backward compatibility.")),
|
|
112
113
|
type: "array",
|
|
113
114
|
items: {
|
|
114
115
|
type: "string"
|
|
@@ -116,87 +117,87 @@ const extensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
116
117
|
},
|
|
117
118
|
welcomeTitle: {
|
|
118
119
|
description: ( localize(
|
|
119
|
-
|
|
120
|
+
5519,
|
|
120
121
|
"Title text to display in the chat welcome view for this session type."
|
|
121
122
|
)),
|
|
122
123
|
type: "string"
|
|
123
124
|
},
|
|
124
125
|
welcomeMessage: {
|
|
125
126
|
description: ( localize(
|
|
126
|
-
|
|
127
|
+
5520,
|
|
127
128
|
"Message text (supports markdown) to display in the chat welcome view for this session type."
|
|
128
129
|
)),
|
|
129
130
|
type: "string"
|
|
130
131
|
},
|
|
131
132
|
welcomeTips: {
|
|
132
133
|
description: ( localize(
|
|
133
|
-
|
|
134
|
+
5521,
|
|
134
135
|
"Tips text (supports markdown and theme icons) to display in the chat welcome view for this session type."
|
|
135
136
|
)),
|
|
136
137
|
type: "string"
|
|
137
138
|
},
|
|
138
139
|
inputPlaceholder: {
|
|
139
140
|
description: ( localize(
|
|
140
|
-
|
|
141
|
+
5522,
|
|
141
142
|
"Placeholder text to display in the chat input box for this session type."
|
|
142
143
|
)),
|
|
143
144
|
type: "string"
|
|
144
145
|
},
|
|
145
146
|
capabilities: {
|
|
146
|
-
description: ( localize(
|
|
147
|
+
description: ( localize(5523, "Optional capabilities for this chat session.")),
|
|
147
148
|
type: "object",
|
|
148
149
|
additionalProperties: false,
|
|
149
150
|
properties: {
|
|
150
151
|
supportsFileAttachments: {
|
|
151
152
|
description: ( localize(
|
|
152
|
-
|
|
153
|
+
5524,
|
|
153
154
|
"Whether this chat session supports attaching files or file references."
|
|
154
155
|
)),
|
|
155
156
|
type: "boolean"
|
|
156
157
|
},
|
|
157
158
|
supportsToolAttachments: {
|
|
158
159
|
description: ( localize(
|
|
159
|
-
|
|
160
|
+
5525,
|
|
160
161
|
"Whether this chat session supports attaching tools or tool references."
|
|
161
162
|
)),
|
|
162
163
|
type: "boolean"
|
|
163
164
|
},
|
|
164
165
|
supportsMCPAttachments: {
|
|
165
|
-
description: ( localize(
|
|
166
|
+
description: ( localize(5526, "Whether this chat session supports attaching MCP resources.")),
|
|
166
167
|
type: "boolean"
|
|
167
168
|
},
|
|
168
169
|
supportsImageAttachments: {
|
|
169
|
-
description: ( localize(
|
|
170
|
+
description: ( localize(5527, "Whether this chat session supports attaching images.")),
|
|
170
171
|
type: "boolean"
|
|
171
172
|
},
|
|
172
173
|
supportsSearchResultAttachments: {
|
|
173
|
-
description: ( localize(
|
|
174
|
+
description: ( localize(5528, "Whether this chat session supports attaching search results.")),
|
|
174
175
|
type: "boolean"
|
|
175
176
|
},
|
|
176
177
|
supportsInstructionAttachments: {
|
|
177
|
-
description: ( localize(
|
|
178
|
+
description: ( localize(5529, "Whether this chat session supports attaching instructions.")),
|
|
178
179
|
type: "boolean"
|
|
179
180
|
},
|
|
180
181
|
supportsSourceControlAttachments: {
|
|
181
182
|
description: ( localize(
|
|
182
|
-
|
|
183
|
+
5530,
|
|
183
184
|
"Whether this chat session supports attaching source control changes."
|
|
184
185
|
)),
|
|
185
186
|
type: "boolean"
|
|
186
187
|
},
|
|
187
188
|
supportsProblemAttachments: {
|
|
188
|
-
description: ( localize(
|
|
189
|
+
description: ( localize(5531, "Whether this chat session supports attaching problems.")),
|
|
189
190
|
type: "boolean"
|
|
190
191
|
},
|
|
191
192
|
supportsSymbolAttachments: {
|
|
192
|
-
description: ( localize(
|
|
193
|
+
description: ( localize(5532, "Whether this chat session supports attaching symbols.")),
|
|
193
194
|
type: "boolean"
|
|
194
195
|
}
|
|
195
196
|
}
|
|
196
197
|
},
|
|
197
198
|
commands: {
|
|
198
199
|
markdownDescription: ( localize(
|
|
199
|
-
|
|
200
|
+
5533,
|
|
200
201
|
"Commands available for this chat session, which the user can invoke with a `/`."
|
|
201
202
|
)),
|
|
202
203
|
type: "array",
|
|
@@ -213,17 +214,17 @@ const extensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
213
214
|
properties: {
|
|
214
215
|
name: {
|
|
215
216
|
description: ( localize(
|
|
216
|
-
|
|
217
|
+
5534,
|
|
217
218
|
"A short name by which this command is referred to in the UI, e.g. `fix` or `explain` for commands that fix an issue or explain code. The name should be unique among the commands provided by this participant."
|
|
218
219
|
)),
|
|
219
220
|
type: "string"
|
|
220
221
|
},
|
|
221
222
|
description: {
|
|
222
|
-
description: ( localize(
|
|
223
|
+
description: ( localize(5535, "A description of this command.")),
|
|
223
224
|
type: "string"
|
|
224
225
|
},
|
|
225
226
|
when: {
|
|
226
|
-
description: ( localize(
|
|
227
|
+
description: ( localize(5536, "A condition which must be true to enable this command.")),
|
|
227
228
|
type: "string"
|
|
228
229
|
}
|
|
229
230
|
}
|
|
@@ -231,7 +232,7 @@ const extensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
231
232
|
},
|
|
232
233
|
canDelegate: {
|
|
233
234
|
description: ( localize(
|
|
234
|
-
|
|
235
|
+
5537,
|
|
235
236
|
"Whether delegation is supported. Default is false. Note that enabling this is experimental and may not be respected at all times."
|
|
236
237
|
)),
|
|
237
238
|
type: "boolean",
|
|
@@ -239,7 +240,7 @@ const extensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
239
240
|
},
|
|
240
241
|
customAgentTarget: {
|
|
241
242
|
description: ( localize(
|
|
242
|
-
|
|
243
|
+
5538,
|
|
243
244
|
"When set, the chat session will show a filtered mode picker that prefers custom agents whose target property matches this value. Custom agents without a target property are still shown in all session types. This enables the use of standard agent/mode with contributed sessions."
|
|
244
245
|
)),
|
|
245
246
|
type: "string"
|
|
@@ -360,6 +361,7 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
360
361
|
const builtinSessionProviders = [AgentSessionProviders.Local];
|
|
361
362
|
const contributedSessionProviders = observableFromEvent(this.onDidChangeAvailability, () => Array.from(( this._contributions.keys())).filter(isAgentSessionProviderType)).recomputeInitiallyAndOnChange(this._store);
|
|
362
363
|
this._register(autorun(reader => {
|
|
364
|
+
backgroundAgentDisplayName.read(reader);
|
|
363
365
|
const activatedProviders = [...builtinSessionProviders, ...contributedSessionProviders.read(reader)];
|
|
364
366
|
for (const provider of ( Object.values(AgentSessionProviders))) {
|
|
365
367
|
if (activatedProviders.includes(provider)) {
|
|
@@ -386,11 +388,11 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
386
388
|
reportInProgress(chatSessionType, count) {
|
|
387
389
|
let displayName;
|
|
388
390
|
if (chatSessionType === AgentSessionProviders.Local) {
|
|
389
|
-
displayName = ( localize(
|
|
391
|
+
displayName = ( localize(5539, "Local Agent"));
|
|
390
392
|
} else if (chatSessionType === AgentSessionProviders.Background) {
|
|
391
|
-
displayName = ( localize(
|
|
393
|
+
displayName = ( localize(5540, "Background Agent"));
|
|
392
394
|
} else if (chatSessionType === AgentSessionProviders.Cloud) {
|
|
393
|
-
displayName = ( localize(
|
|
395
|
+
displayName = ( localize(5541, "Cloud Agent"));
|
|
394
396
|
} else {
|
|
395
397
|
displayName = this._contributions.get(chatSessionType)?.contribution.displayName;
|
|
396
398
|
}
|
|
@@ -546,7 +548,7 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
546
548
|
constructor() {
|
|
547
549
|
super({
|
|
548
550
|
id: `workbench.action.chat.openSessionWithPrompt.${contribution.type}`,
|
|
549
|
-
title: ( localize2(
|
|
551
|
+
title: ( localize2(5542, "New {0} with Prompt", contribution.displayName)),
|
|
550
552
|
category: CHAT_CATEGORY,
|
|
551
553
|
icon: Codicon.plus,
|
|
552
554
|
f1: false,
|
|
@@ -573,7 +575,7 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
573
575
|
constructor() {
|
|
574
576
|
super({
|
|
575
577
|
id: `workbench.action.chat.openNewSessionEditor.${contribution.type}`,
|
|
576
|
-
title: ( localize2(
|
|
578
|
+
title: ( localize2(5543, "New {0}", contribution.displayName)),
|
|
577
579
|
category: CHAT_CATEGORY,
|
|
578
580
|
icon: Codicon.plus,
|
|
579
581
|
f1: true,
|
|
@@ -596,7 +598,7 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
596
598
|
constructor() {
|
|
597
599
|
super({
|
|
598
600
|
id: `workbench.action.chat.openNewSessionSidebar.${contribution.type}`,
|
|
599
|
-
title: ( localize2(
|
|
601
|
+
title: ( localize2(5544, "New {0}", contribution.displayName)),
|
|
600
602
|
category: CHAT_CATEGORY,
|
|
601
603
|
icon: Codicon.plus,
|
|
602
604
|
f1: false,
|
|
@@ -946,14 +948,14 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
946
948
|
const confirmationTitle = state.confirmationMessages?.title;
|
|
947
949
|
const titleMessage = confirmationTitle && (typeof confirmationTitle === "string" ? confirmationTitle : confirmationTitle.value);
|
|
948
950
|
const descriptionValue = typeof description === "string" ? description : description.value;
|
|
949
|
-
description = titleMessage ?? ( localize(
|
|
951
|
+
description = titleMessage ?? ( localize(5545, "Waiting for confirmation: {0}", descriptionValue));
|
|
950
952
|
}
|
|
951
953
|
} else if (part.kind === "toolInvocationSerialized") {
|
|
952
954
|
description = part.invocationMessage;
|
|
953
955
|
} else if (part.kind === "progressMessage") {
|
|
954
956
|
description = part.content;
|
|
955
957
|
} else if (part.kind === "thinking") {
|
|
956
|
-
description = ( localize(
|
|
958
|
+
description = ( localize(5546, "Thinking..."));
|
|
957
959
|
}
|
|
958
960
|
}
|
|
959
961
|
return description ? renderAsPlaintext(description, {
|
|
@@ -1061,7 +1063,7 @@ let ChatSessionsService = class ChatSessionsService extends Disposable {
|
|
|
1061
1063
|
}
|
|
1062
1064
|
getCustomAgentTargetForSessionType(chatSessionType) {
|
|
1063
1065
|
const contribution = this._contributions.get(chatSessionType)?.contribution;
|
|
1064
|
-
return contribution?.customAgentTarget;
|
|
1066
|
+
return contribution?.customAgentTarget ?? Target.Undefined;
|
|
1065
1067
|
}
|
|
1066
1068
|
getContentProviderSchemes() {
|
|
1067
1069
|
return Array.from(( this._contentProviders.keys()));
|
|
@@ -1073,7 +1075,7 @@ function registerNewSessionInPlaceAction(type, displayName) {
|
|
|
1073
1075
|
constructor() {
|
|
1074
1076
|
super({
|
|
1075
1077
|
id: `workbench.action.chat.openNewChatSessionInPlace.${type}`,
|
|
1076
|
-
title: ( localize2(
|
|
1078
|
+
title: ( localize2(5547, "New {0}", displayName)),
|
|
1077
1079
|
category: CHAT_CATEGORY,
|
|
1078
1080
|
f1: false,
|
|
1079
1081
|
precondition: ChatContextKeys.enabled
|
|
@@ -1089,7 +1091,7 @@ function registerNewSessionInPlaceAction(type, displayName) {
|
|
|
1089
1091
|
}
|
|
1090
1092
|
await openChatSession(accessor, {
|
|
1091
1093
|
type: type,
|
|
1092
|
-
displayName: ( localize(
|
|
1094
|
+
displayName: ( localize(5548, "Chat")),
|
|
1093
1095
|
position: chatSessionPosition,
|
|
1094
1096
|
replaceEditor: true
|
|
1095
1097
|
});
|
|
@@ -1101,7 +1103,7 @@ function registerNewSessionExternalAction(type, displayName, commandId) {
|
|
|
1101
1103
|
constructor() {
|
|
1102
1104
|
super({
|
|
1103
1105
|
id: `workbench.action.chat.openNewChatSessionExternal.${type}`,
|
|
1104
|
-
title: ( localize2(
|
|
1106
|
+
title: ( localize2(5549, "New {0}", displayName)),
|
|
1105
1107
|
category: CHAT_CATEGORY,
|
|
1106
1108
|
f1: false,
|
|
1107
1109
|
precondition: ChatContextKeys.enabled
|
|
@@ -1144,7 +1146,7 @@ async function openChatSession(accessor, openOptions, chatSendOptions) {
|
|
|
1144
1146
|
override: ChatEditorInput.EditorID,
|
|
1145
1147
|
pinned: true,
|
|
1146
1148
|
title: {
|
|
1147
|
-
fallback: ( localize(
|
|
1149
|
+
fallback: ( localize(5550, "{0}", openOptions.displayName))
|
|
1148
1150
|
}
|
|
1149
1151
|
};
|
|
1150
1152
|
if (openOptions.replaceEditor) {
|
|
@@ -87,8 +87,8 @@ let SearchableOptionPickerActionItem = class SearchableOptionPickerActionItem ex
|
|
|
87
87
|
checked: false,
|
|
88
88
|
class: "searchable-picker-see-more",
|
|
89
89
|
description: undefined,
|
|
90
|
-
tooltip: ( localize(
|
|
91
|
-
label: ( localize(
|
|
90
|
+
tooltip: ( localize(5551, "Search for more options")),
|
|
91
|
+
label: ( localize(5552, "See more...")),
|
|
92
92
|
run: () => {
|
|
93
93
|
this.showSearchableQuickPick(optionGroup);
|
|
94
94
|
}
|
|
@@ -103,7 +103,7 @@ let SearchableOptionPickerActionItem = class SearchableOptionPickerActionItem ex
|
|
|
103
103
|
if (optionGroup?.icon) {
|
|
104
104
|
domChildren.push(renderIcon(optionGroup.icon));
|
|
105
105
|
}
|
|
106
|
-
const label = this.currentOption?.name ?? optionGroup?.name ?? ( localize(
|
|
106
|
+
const label = this.currentOption?.name ?? optionGroup?.name ?? ( localize(5553, "Select..."));
|
|
107
107
|
domChildren.push($("span.chat-session-option-label", undefined, label));
|
|
108
108
|
domChildren.push(...renderLabelWithIcons(`$(chevron-down)`));
|
|
109
109
|
reset(element, ...domChildren);
|
|
@@ -118,7 +118,7 @@ let SearchableOptionPickerActionItem = class SearchableOptionPickerActionItem ex
|
|
|
118
118
|
const disposables = ( new DisposableStore());
|
|
119
119
|
const quickPick = this.quickInputService.createQuickPick();
|
|
120
120
|
disposables.add(quickPick);
|
|
121
|
-
quickPick.placeholder = optionGroup.description ?? ( localize(
|
|
121
|
+
quickPick.placeholder = optionGroup.description ?? ( localize(5554, "Select {0}", optionGroup.name));
|
|
122
122
|
quickPick.matchOnDescription = true;
|
|
123
123
|
quickPick.matchOnDetail = true;
|
|
124
124
|
quickPick.ignoreFocusOut = true;
|
package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js
CHANGED
|
@@ -165,16 +165,16 @@ let ChatViewWelcomePart = class ChatViewWelcomePart extends Disposable {
|
|
|
165
165
|
if (content.suggestedPrompts && content.suggestedPrompts.length) {
|
|
166
166
|
const suggestedPromptsContainer = append(this.element, $(".chat-welcome-view-suggested-prompts"));
|
|
167
167
|
const titleElement = append(suggestedPromptsContainer, $(".chat-welcome-view-suggested-prompts-title"));
|
|
168
|
-
titleElement.textContent = ( localize(
|
|
168
|
+
titleElement.textContent = ( localize(5885, "Suggested Actions"));
|
|
169
169
|
for (const prompt of content.suggestedPrompts) {
|
|
170
170
|
const promptElement = append(suggestedPromptsContainer, $(".chat-welcome-view-suggested-prompt"));
|
|
171
171
|
promptElement.setAttribute("role", "button");
|
|
172
172
|
promptElement.setAttribute("tabindex", "0");
|
|
173
|
-
const promptAriaLabel = prompt.description ? ( localize(
|
|
173
|
+
const promptAriaLabel = prompt.description ? ( localize(5886, "Suggested prompt: {0}, {1}", prompt.label, prompt.description)) : ( localize(5887, "Suggested prompt: {0}", prompt.label));
|
|
174
174
|
promptElement.setAttribute("aria-label", promptAriaLabel);
|
|
175
175
|
const titleElement = append(promptElement, $(".chat-welcome-view-suggested-prompt-title"));
|
|
176
176
|
titleElement.textContent = prompt.label;
|
|
177
|
-
const tooltip = ( localize(
|
|
177
|
+
const tooltip = ( localize(5888, "Suggested prompt: {0}", prompt.prompt));
|
|
178
178
|
promptElement.title = tooltip;
|
|
179
179
|
titleElement.title = tooltip;
|
|
180
180
|
if (prompt.description) {
|
|
@@ -243,7 +243,7 @@ let ChatViewWelcomePart = class ChatViewWelcomePart extends Disposable {
|
|
|
243
243
|
const actions = [];
|
|
244
244
|
if (prompt.uri) {
|
|
245
245
|
const uri = prompt.uri;
|
|
246
|
-
actions.push(( new Action("chat.editPromptFile", ( localize(
|
|
246
|
+
actions.push(( new Action("chat.editPromptFile", ( localize(5889, "Edit Prompt File")), ThemeIcon.asClassName(Codicon.goToFile), true, async () => {
|
|
247
247
|
try {
|
|
248
248
|
await this.openerService.open(uri);
|
|
249
249
|
} catch (error) {
|
|
@@ -49,7 +49,7 @@ let ChatAgentHover = class ChatAgentHover extends Disposable {
|
|
|
49
49
|
this.publisherName = $("span.chat-agent-hover-publisher-name");
|
|
50
50
|
append(hoverElement.publisher, verifiedBadge, this.publisherName);
|
|
51
51
|
hoverElement.warning.appendChild(renderIcon(Codicon.warning));
|
|
52
|
-
hoverElement.warning.appendChild($("span", undefined, ( localize(
|
|
52
|
+
hoverElement.warning.appendChild($("span", undefined, ( localize(5895, "This chat extension is using a reserved name."))));
|
|
53
53
|
}
|
|
54
54
|
setAgent(id) {
|
|
55
55
|
const agent = this.chatAgentService.getAgent(id);
|
|
@@ -95,7 +95,7 @@ function getChatAgentHoverOptions(getAgent, commandService) {
|
|
|
95
95
|
return {
|
|
96
96
|
actions: [{
|
|
97
97
|
commandId: showExtensionsWithIdsCommandId,
|
|
98
|
-
label: ( localize(
|
|
98
|
+
label: ( localize(5896, "View Extension")),
|
|
99
99
|
run: () => {
|
|
100
100
|
const agent = getAgent();
|
|
101
101
|
if (agent) {
|
|
@@ -28,7 +28,7 @@ let ChatAgentCommandContentPart = class ChatAgentCommandContentPart extends Disp
|
|
|
28
28
|
}, {
|
|
29
29
|
groupId
|
|
30
30
|
}));
|
|
31
|
-
const rerun = ( localize(
|
|
31
|
+
const rerun = ( localize(5897, "Rerun without {0}{1}", chatSubcommandLeader, cmd.name));
|
|
32
32
|
const btn = ( new Button(this.domNode, {
|
|
33
33
|
ariaLabel: rerun
|
|
34
34
|
}));
|
|
@@ -21,14 +21,14 @@ let ChatAnonymousRateLimitedPart = class ChatAnonymousRateLimitedPart extends Di
|
|
|
21
21
|
const messageContainer = append(this.domNode, $(".chat-rate-limited-message"));
|
|
22
22
|
const message = append(messageContainer, $("div"));
|
|
23
23
|
message.textContent = ( localize(
|
|
24
|
-
|
|
24
|
+
5898,
|
|
25
25
|
"Continue the conversation by signing in. Your free account gets 50 premium requests a month plus access to more models and AI features."
|
|
26
26
|
));
|
|
27
27
|
const signInButton = this._register(( new Button(messageContainer, {
|
|
28
28
|
...defaultButtonStyles,
|
|
29
29
|
supportIcons: true
|
|
30
30
|
})));
|
|
31
|
-
signInButton.label = ( localize(
|
|
31
|
+
signInButton.label = ( localize(5899, "Enable more AI features"));
|
|
32
32
|
signInButton.element.classList.add("chat-rate-limited-button");
|
|
33
33
|
this._register(signInButton.onDidClick(async () => {
|
|
34
34
|
const commandId = "workbench.action.chat.triggerSetup";
|
|
@@ -96,7 +96,7 @@ let ChatCheckpointFileChangesSummaryContentPart = class ChatCheckpointFileChange
|
|
|
96
96
|
renderViewAllFileChangesButton(container) {
|
|
97
97
|
const button = container.appendChild($(".chat-view-changes-icon"));
|
|
98
98
|
this.hoverService.setupDelayedHover(button, () => ({
|
|
99
|
-
content: ( localize2(
|
|
99
|
+
content: ( localize2(5900, "View All File Changes"))
|
|
100
100
|
}));
|
|
101
101
|
button.classList.add(...ThemeIcon.asClassNameArray(Codicon.diffMultiple));
|
|
102
102
|
button.setAttribute("role", "button");
|
|
@@ -29,7 +29,7 @@ let ChatCodeCitationContentPart = class ChatCodeCitationContentPart extends Disp
|
|
|
29
29
|
buttonSecondaryHoverBackground: undefined,
|
|
30
30
|
buttonSeparator: undefined
|
|
31
31
|
})));
|
|
32
|
-
button.label = ( localize(
|
|
32
|
+
button.label = ( localize(5901, "View matches"));
|
|
33
33
|
this._register(button.onDidClick(() => {
|
|
34
34
|
const citationText = `# Code Citations\n\n` + ( citations.citations.map(c => `## License: ${c.license}\n${( c.value.toString())}\n\n\`\`\`\n${c.snippet}\n\`\`\`\n\n`)).join("\n");
|
|
35
35
|
this.editorService.openEditor({
|
|
@@ -13,7 +13,7 @@ import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/th
|
|
|
13
13
|
export declare abstract class ChatCollapsibleContentPart extends Disposable implements IChatContentPart {
|
|
14
14
|
private title;
|
|
15
15
|
private readonly hoverMessage;
|
|
16
|
-
|
|
16
|
+
protected readonly hoverService: IHoverService;
|
|
17
17
|
private _domNode?;
|
|
18
18
|
private readonly _renderedTitleWithWidgets;
|
|
19
19
|
protected readonly hasFollowingContent: boolean;
|
|
@@ -23,7 +23,7 @@ let ChatCommandButtonContentPart = class ChatCommandButtonContentPart extends Di
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
renderButton(container, command, enabled, secondary) {
|
|
26
|
-
const tooltip = enabled ? command.tooltip : ( localize(
|
|
26
|
+
const tooltip = enabled ? command.tooltip : ( localize(5902, "Button not available in restored chat"));
|
|
27
27
|
const button = this._register(( new Button(container, {
|
|
28
28
|
...defaultButtonStyles,
|
|
29
29
|
supportIcons: true,
|
|
@@ -3,6 +3,7 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
5
5
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
6
|
+
import { ChatSendResult } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
6
7
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
7
8
|
import { isResponseVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel';
|
|
8
9
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
@@ -25,10 +26,10 @@ let ChatConfirmationContentPart = class ChatConfirmationContentPart extends Disp
|
|
|
25
26
|
data: confirmation.data,
|
|
26
27
|
isSecondary: button !== confirmation.buttons?.[0]
|
|
27
28
|
}))) : [{
|
|
28
|
-
label: ( localize(
|
|
29
|
+
label: ( localize(5903, "Accept")),
|
|
29
30
|
data: confirmation.data
|
|
30
31
|
}, {
|
|
31
|
-
label: ( localize(
|
|
32
|
+
label: ( localize(5904, "Dismiss")),
|
|
32
33
|
data: confirmation.data,
|
|
33
34
|
isSecondary: true
|
|
34
35
|
}];
|
|
@@ -56,7 +57,8 @@ let ChatConfirmationContentPart = class ChatConfirmationContentPart extends Disp
|
|
|
56
57
|
options.modeInfo = widget?.input.currentModeInfo;
|
|
57
58
|
options.location = widget?.location;
|
|
58
59
|
Object.assign(options, widget?.getModeRequestOptions());
|
|
59
|
-
|
|
60
|
+
const result = await this.chatService.sendRequest(element.sessionResource, prompt, options);
|
|
61
|
+
if (ChatSendResult.isSent(result)) {
|
|
60
62
|
confirmation.isUsed = true;
|
|
61
63
|
confirmationWidget.setShowButtons(false);
|
|
62
64
|
}
|
|
@@ -405,7 +405,7 @@ function configureAccessibilityContainer(container, title, message) {
|
|
|
405
405
|
container.tabIndex = 0;
|
|
406
406
|
const titleAsString = typeof title === "string" ? title : title.value;
|
|
407
407
|
const messageAsString = typeof message === "string" ? message : message && "value" in message ? message.value : message && "textContent" in message ? message.textContent : "";
|
|
408
|
-
container.setAttribute("aria-label", ( localize(
|
|
408
|
+
container.setAttribute("aria-label", ( localize(5905, "Chat Confirmation Dialog {0} {1}", titleAsString, messageAsString)));
|
|
409
409
|
container.classList.add("chat-confirmation-widget-container");
|
|
410
410
|
}
|
|
411
411
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IMarkdownRendererService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service";
|
|
3
|
+
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
4
|
+
import { IChatRendererContent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel";
|
|
5
|
+
import { IChatContentPart, IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts";
|
|
6
|
+
export declare class ChatDisabledClaudeHooksContentPart extends Disposable implements IChatContentPart {
|
|
7
|
+
private readonly _openerService;
|
|
8
|
+
private readonly _markdownRendererService;
|
|
9
|
+
readonly domNode: HTMLElement;
|
|
10
|
+
constructor(_context: IChatContentPartRenderContext, _openerService: IOpenerService, _markdownRendererService: IMarkdownRendererService);
|
|
11
|
+
hasSameContent(other: IChatRendererContent): boolean;
|
|
12
|
+
addDisposable(disposable: IDisposable): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
4
|
+
import { $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
5
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
6
|
+
import { createMarkdownCommandLink, MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
7
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
8
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
9
|
+
import { openLinkFromMarkdown } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer';
|
|
10
|
+
import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
|
|
11
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
12
|
+
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
13
|
+
import { PromptsConfig } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/config';
|
|
14
|
+
import * as chatDisabledClaudeHooksContent from './media/chatDisabledClaudeHooksContent.css';
|
|
15
|
+
|
|
16
|
+
registerCss(chatDisabledClaudeHooksContent);
|
|
17
|
+
let ChatDisabledClaudeHooksContentPart = class ChatDisabledClaudeHooksContentPart extends Disposable {
|
|
18
|
+
constructor(_context, _openerService, _markdownRendererService) {
|
|
19
|
+
super();
|
|
20
|
+
this._openerService = _openerService;
|
|
21
|
+
this._markdownRendererService = _markdownRendererService;
|
|
22
|
+
this.domNode = $(".chat-disabled-claude-hooks");
|
|
23
|
+
const messageContainer = $(".chat-disabled-claude-hooks-message");
|
|
24
|
+
const icon = $(".chat-disabled-claude-hooks-icon");
|
|
25
|
+
icon.classList.add(...ThemeIcon.asClassNameArray(Codicon.info));
|
|
26
|
+
const enableLink = createMarkdownCommandLink({
|
|
27
|
+
title: ( localize(5906, "Enable")),
|
|
28
|
+
id: "workbench.action.openSettings",
|
|
29
|
+
arguments: [PromptsConfig.USE_CLAUDE_HOOKS]
|
|
30
|
+
});
|
|
31
|
+
const message = ( localize(
|
|
32
|
+
5907,
|
|
33
|
+
"Claude Code hooks are available for this workspace. {0}",
|
|
34
|
+
enableLink
|
|
35
|
+
));
|
|
36
|
+
const content = ( new MarkdownString(message, {
|
|
37
|
+
isTrusted: true
|
|
38
|
+
}));
|
|
39
|
+
const rendered = this._register(this._markdownRendererService.render(content, {
|
|
40
|
+
actionHandler: href => openLinkFromMarkdown(this._openerService, href, true)
|
|
41
|
+
}));
|
|
42
|
+
messageContainer.appendChild(icon);
|
|
43
|
+
messageContainer.appendChild(rendered.element);
|
|
44
|
+
this.domNode.appendChild(messageContainer);
|
|
45
|
+
}
|
|
46
|
+
hasSameContent(other) {
|
|
47
|
+
return other.kind === "disabledClaudeHooks";
|
|
48
|
+
}
|
|
49
|
+
addDisposable(disposable) {
|
|
50
|
+
this._register(disposable);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
ChatDisabledClaudeHooksContentPart = ( __decorate([( __param(1, IOpenerService)), ( __param(2, IMarkdownRendererService))], ChatDisabledClaudeHooksContentPart));
|
|
54
|
+
|
|
55
|
+
export { ChatDisabledClaudeHooksContentPart };
|
|
@@ -30,7 +30,7 @@ let ChatExtensionsContentPart = class ChatExtensionsContentPart extends Disposab
|
|
|
30
30
|
append(
|
|
31
31
|
loadingElement,
|
|
32
32
|
$(ThemeIcon.asCSSSelector(ThemeIcon.modify(Codicon.loading, "spin"))),
|
|
33
|
-
$("span.loading-message", undefined, ( localize(
|
|
33
|
+
$("span.loading-message", undefined, ( localize(5908, "Loading extensions...")))
|
|
34
34
|
);
|
|
35
35
|
const extensionsList = append(this.domNode, $(".extensions-list"));
|
|
36
36
|
const list = this._register(
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
|
|
2
|
+
import { IChatHookPart } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
3
|
+
import { IChatRendererContent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel";
|
|
4
|
+
import { ChatTreeItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
5
|
+
import { ChatCollapsibleContentPart } from "./chatCollapsibleContentPart.js";
|
|
6
|
+
import { IChatContentPart, IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts";
|
|
7
|
+
export declare class ChatHookContentPart extends ChatCollapsibleContentPart implements IChatContentPart {
|
|
8
|
+
private readonly hookPart;
|
|
9
|
+
constructor(hookPart: IChatHookPart, context: IChatContentPartRenderContext, hoverService: IHoverService);
|
|
10
|
+
protected initContent(): HTMLElement;
|
|
11
|
+
hasSameContent(other: IChatRendererContent, _followingContent: IChatRendererContent[], _element: ChatTreeItem): boolean;
|
|
12
|
+
}
|