@codingame/monaco-vscode-katex-common 29.1.0 → 30.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 +2 -2
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +14 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +34 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +12 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +208 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +637 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +202 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +17 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +53 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +296 -63
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +59 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +55 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +110 -59
- 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/searchableOptionPickerActionItem.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +384 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.d.ts +12 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +220 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +1 -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/chatAttachmentsContentPart.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +14 -1
- 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/chatCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
- 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.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +40 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -8
- 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 +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +97 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +5 -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/chatResourceGroupWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +8 -7
- 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.d.ts +15 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +155 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +36 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +2 -2
- 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/chatThinkingContent.css +13 -0
- 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/chatMissingSandboxDepsConfirmationSubPart.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMissingSandboxDepsConfirmationSubPart.js +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +33 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +12 -3
- 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 +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -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 +4 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +37 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +10 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +66 -39
- 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 +13 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +103 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +35 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +39 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +44 -18
- 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 +60 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +4 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +5 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +6 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +39 -39
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +746 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +300 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +55 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +273 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +1963 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +314 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +258 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +886 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +118 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +71 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +40 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +313 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +51 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +265 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +185 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +104 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +43 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +41 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +69 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +469 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +149 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +933 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +180 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +32 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +102 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +643 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +197 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +539 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +39 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +90 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +92 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +0 -152
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +0 -1317
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.d.ts +0 -47
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.js +0 -95
|
@@ -89,8 +89,8 @@ let SearchableOptionPickerActionItem = class SearchableOptionPickerActionItem ex
|
|
|
89
89
|
checked: false,
|
|
90
90
|
class: "searchable-picker-see-more",
|
|
91
91
|
description: undefined,
|
|
92
|
-
tooltip: ( localize(
|
|
93
|
-
label: ( localize(
|
|
92
|
+
tooltip: ( localize(6236, "Search for more options")),
|
|
93
|
+
label: ( localize(6237, "See more...")),
|
|
94
94
|
run: () => {
|
|
95
95
|
this.showSearchableQuickPick(optionGroup);
|
|
96
96
|
}
|
|
@@ -105,7 +105,7 @@ let SearchableOptionPickerActionItem = class SearchableOptionPickerActionItem ex
|
|
|
105
105
|
if (optionGroup?.icon) {
|
|
106
106
|
domChildren.push(renderIcon(optionGroup.icon));
|
|
107
107
|
}
|
|
108
|
-
const label = this.currentOption?.name ?? optionGroup?.name ?? ( localize(
|
|
108
|
+
const label = this.currentOption?.name ?? optionGroup?.name ?? ( localize(6238, "Select..."));
|
|
109
109
|
domChildren.push($("span.chat-session-option-label", undefined, label));
|
|
110
110
|
domChildren.push(...renderLabelWithIcons(`$(chevron-down)`));
|
|
111
111
|
reset(element, ...domChildren);
|
|
@@ -120,9 +120,10 @@ let SearchableOptionPickerActionItem = class SearchableOptionPickerActionItem ex
|
|
|
120
120
|
const disposables = ( new DisposableStore());
|
|
121
121
|
const quickPick = this.quickInputService.createQuickPick();
|
|
122
122
|
disposables.add(quickPick);
|
|
123
|
-
quickPick.placeholder = optionGroup.description ?? ( localize(
|
|
123
|
+
quickPick.placeholder = optionGroup.description ?? ( localize(6239, "Select {0}", optionGroup.name));
|
|
124
124
|
quickPick.matchOnDescription = true;
|
|
125
125
|
quickPick.matchOnDetail = true;
|
|
126
|
+
quickPick.matchOnLabelMode = "fuzzy";
|
|
126
127
|
quickPick.ignoreFocusOut = true;
|
|
127
128
|
quickPick.busy = true;
|
|
128
129
|
quickPick.show();
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { Action2 } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
|
|
3
|
+
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
4
|
+
import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
6
|
+
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
7
|
+
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
8
|
+
import { ILifecycleService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service";
|
|
9
|
+
import { IUserDataProfileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service";
|
|
10
|
+
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
|
|
11
|
+
export declare class UserToolSetsContributions extends Disposable implements IWorkbenchContribution {
|
|
12
|
+
private readonly _languageModelToolsService;
|
|
13
|
+
private readonly _userDataProfileService;
|
|
14
|
+
private readonly _fileService;
|
|
15
|
+
private readonly _logService;
|
|
16
|
+
static readonly ID = "chat.userToolSets";
|
|
17
|
+
constructor(extensionService: IExtensionService, lifecycleService: ILifecycleService, _languageModelToolsService: ILanguageModelToolsService, _userDataProfileService: IUserDataProfileService, _fileService: IFileService, _logService: ILogService);
|
|
18
|
+
private _initToolSets;
|
|
19
|
+
}
|
|
20
|
+
export declare class ConfigureToolSets extends Action2 {
|
|
21
|
+
static readonly ID = "chat.configureToolSets";
|
|
22
|
+
constructor();
|
|
23
|
+
run(accessor: ServicesAccessor): Promise<void>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { isFalsyOrEmpty } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
4
|
+
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
5
|
+
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
6
|
+
import { Disposable, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
8
|
+
import { basename, joinPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
9
|
+
import { isFalsyOrWhitespace } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
10
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
11
|
+
import { isObject, assertType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
12
|
+
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
13
|
+
import { Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
14
|
+
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
15
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
16
|
+
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
17
|
+
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
18
|
+
import { LifecyclePhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
19
|
+
import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
20
|
+
import { IUserDataProfileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
21
|
+
import { CHAT_CONFIG_MENU_ID, CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
22
|
+
import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
23
|
+
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
24
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
25
|
+
import { getAllCodicons, Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
26
|
+
import { isValidBasename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/extpath';
|
|
27
|
+
import { ITextFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service';
|
|
28
|
+
import { parse } from '@codingame/monaco-vscode-api/vscode/vs/base/common/jsonc';
|
|
29
|
+
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/jsonschemas/common/jsonContributionRegistry';
|
|
30
|
+
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
31
|
+
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
32
|
+
import { ChatViewId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
33
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
34
|
+
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
35
|
+
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
36
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
37
|
+
import { observableSignalFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableSignalFromEvent';
|
|
38
|
+
import { transaction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/transaction';
|
|
39
|
+
|
|
40
|
+
const toolEnumValues = [];
|
|
41
|
+
const toolEnumDescriptions = [];
|
|
42
|
+
const toolSetSchemaId = "vscode://schemas/toolsets";
|
|
43
|
+
const toolSetsSchema = {
|
|
44
|
+
id: toolSetSchemaId,
|
|
45
|
+
allowComments: true,
|
|
46
|
+
allowTrailingCommas: true,
|
|
47
|
+
defaultSnippets: [{
|
|
48
|
+
label: ( localize(6683, "Empty tool set")),
|
|
49
|
+
body: {
|
|
50
|
+
"${1:toolSetName}": {
|
|
51
|
+
"tools": ["${2:someTool}", "${3:anotherTool}"],
|
|
52
|
+
"description": "${4:description}",
|
|
53
|
+
"icon": "${5:tools}"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}],
|
|
57
|
+
type: "object",
|
|
58
|
+
description: ( localize(6684, "User tool sets configuration")),
|
|
59
|
+
additionalProperties: {
|
|
60
|
+
type: "object",
|
|
61
|
+
required: ["tools"],
|
|
62
|
+
additionalProperties: false,
|
|
63
|
+
properties: {
|
|
64
|
+
tools: {
|
|
65
|
+
description: ( localize(
|
|
66
|
+
6685,
|
|
67
|
+
"A list of tools or tool sets to include in this tool set. Cannot be empty and must reference tools the way they are referenced in prompts."
|
|
68
|
+
)),
|
|
69
|
+
type: "array",
|
|
70
|
+
minItems: 1,
|
|
71
|
+
items: {
|
|
72
|
+
type: "string",
|
|
73
|
+
enum: toolEnumValues,
|
|
74
|
+
enumDescriptions: toolEnumDescriptions
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
icon: {
|
|
78
|
+
description: ( localize(
|
|
79
|
+
6686,
|
|
80
|
+
"Icon to use for this tool set in the UI. Uses the \"\\$(name)\"-syntax, like \"\\$(zap)\""
|
|
81
|
+
)),
|
|
82
|
+
type: "string",
|
|
83
|
+
enum: Array.from(getAllCodicons(), icon => icon.id),
|
|
84
|
+
markdownEnumDescriptions: Array.from(getAllCodicons(), icon => `$(${icon.id})`)
|
|
85
|
+
},
|
|
86
|
+
description: {
|
|
87
|
+
description: ( localize(6687, "A short description of this tool set.")),
|
|
88
|
+
type: "string"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
const reg = ( Registry.as(Extensions.JSONContribution));
|
|
94
|
+
class RawToolSetsShape {
|
|
95
|
+
static {
|
|
96
|
+
this.suffix = ".toolsets.jsonc";
|
|
97
|
+
}
|
|
98
|
+
static isToolSetFileName(uri) {
|
|
99
|
+
return basename(uri).endsWith(RawToolSetsShape.suffix);
|
|
100
|
+
}
|
|
101
|
+
static from(data, logService) {
|
|
102
|
+
if (!isObject(data)) {
|
|
103
|
+
throw ( new Error(`Invalid tool set data`));
|
|
104
|
+
}
|
|
105
|
+
const map = ( new Map());
|
|
106
|
+
for (const [name, value] of Object.entries(data)) {
|
|
107
|
+
if (isFalsyOrWhitespace(name)) {
|
|
108
|
+
logService.error(`Tool set name cannot be empty`);
|
|
109
|
+
}
|
|
110
|
+
if (isFalsyOrEmpty(value.tools)) {
|
|
111
|
+
logService.error(`Tool set '${name}' cannot have an empty tools array`);
|
|
112
|
+
}
|
|
113
|
+
map.set(name, {
|
|
114
|
+
name,
|
|
115
|
+
tools: value.tools,
|
|
116
|
+
description: value.description,
|
|
117
|
+
icon: value.icon
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
return new class extends RawToolSetsShape {}(map);
|
|
121
|
+
}
|
|
122
|
+
constructor(entries) {
|
|
123
|
+
this.entries = ( Object.freeze(( new Map(entries))));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
let UserToolSetsContributions = class UserToolSetsContributions extends Disposable {
|
|
127
|
+
static {
|
|
128
|
+
this.ID = "chat.userToolSets";
|
|
129
|
+
}
|
|
130
|
+
constructor(
|
|
131
|
+
extensionService,
|
|
132
|
+
lifecycleService,
|
|
133
|
+
_languageModelToolsService,
|
|
134
|
+
_userDataProfileService,
|
|
135
|
+
_fileService,
|
|
136
|
+
_logService
|
|
137
|
+
) {
|
|
138
|
+
super();
|
|
139
|
+
this._languageModelToolsService = _languageModelToolsService;
|
|
140
|
+
this._userDataProfileService = _userDataProfileService;
|
|
141
|
+
this._fileService = _fileService;
|
|
142
|
+
this._logService = _logService;
|
|
143
|
+
Promise.allSettled([
|
|
144
|
+
extensionService.whenInstalledExtensionsRegistered,
|
|
145
|
+
lifecycleService.when(LifecyclePhase.Restored)
|
|
146
|
+
]).then(() => this._initToolSets());
|
|
147
|
+
const toolsObs = observableFromEvent(
|
|
148
|
+
this,
|
|
149
|
+
_languageModelToolsService.onDidChangeTools,
|
|
150
|
+
() => Array.from(_languageModelToolsService.getAllToolsIncludingDisabled())
|
|
151
|
+
);
|
|
152
|
+
const store = this._store.add(( new DisposableStore()));
|
|
153
|
+
this._store.add(autorun(r => {
|
|
154
|
+
const tools = toolsObs.read(r);
|
|
155
|
+
const toolSets = this._languageModelToolsService.toolSets.read(r);
|
|
156
|
+
const data = [];
|
|
157
|
+
for (const tool of tools) {
|
|
158
|
+
if (tool.canBeReferencedInPrompt) {
|
|
159
|
+
data.push({
|
|
160
|
+
name: tool.toolReferenceName ?? tool.displayName,
|
|
161
|
+
sourceLabel: ToolDataSource.classify(tool.source).label,
|
|
162
|
+
sourceOrdinal: ToolDataSource.classify(tool.source).ordinal,
|
|
163
|
+
description: tool.userDescription ?? tool.modelDescription
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
for (const toolSet of toolSets) {
|
|
168
|
+
data.push({
|
|
169
|
+
name: toolSet.referenceName,
|
|
170
|
+
sourceLabel: ToolDataSource.classify(toolSet.source).label,
|
|
171
|
+
sourceOrdinal: ToolDataSource.classify(toolSet.source).ordinal,
|
|
172
|
+
description: toolSet.description
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
toolEnumValues.length = 0;
|
|
176
|
+
toolEnumDescriptions.length = 0;
|
|
177
|
+
data.sort((a, b) => {
|
|
178
|
+
if (a.sourceOrdinal !== b.sourceOrdinal) {
|
|
179
|
+
return a.sourceOrdinal - b.sourceOrdinal;
|
|
180
|
+
}
|
|
181
|
+
if (a.sourceLabel !== b.sourceLabel) {
|
|
182
|
+
return a.sourceLabel.localeCompare(b.sourceLabel);
|
|
183
|
+
}
|
|
184
|
+
return a.name.localeCompare(b.name);
|
|
185
|
+
});
|
|
186
|
+
for (const item of data) {
|
|
187
|
+
toolEnumValues.push(item.name);
|
|
188
|
+
toolEnumDescriptions.push(( localize(6688, "{1} ({0})\n\n{2}", item.sourceLabel, item.name, item.description)));
|
|
189
|
+
}
|
|
190
|
+
store.clear();
|
|
191
|
+
reg.registerSchema(toolSetSchemaId, toolSetsSchema, store);
|
|
192
|
+
}));
|
|
193
|
+
}
|
|
194
|
+
_initToolSets() {
|
|
195
|
+
const promptFolder = observableFromEvent(
|
|
196
|
+
this,
|
|
197
|
+
this._userDataProfileService.onDidChangeCurrentProfile,
|
|
198
|
+
() => this._userDataProfileService.currentProfile.promptsHome
|
|
199
|
+
);
|
|
200
|
+
const toolsSig = observableSignalFromEvent(this, this._languageModelToolsService.onDidChangeTools);
|
|
201
|
+
const fileEventSig = observableSignalFromEvent(
|
|
202
|
+
this,
|
|
203
|
+
Event.filter(this._fileService.onDidFilesChange, e => e.affects(promptFolder.get()))
|
|
204
|
+
);
|
|
205
|
+
const store = this._store.add(( new DisposableStore()));
|
|
206
|
+
const getFilesInFolder = async folder => {
|
|
207
|
+
try {
|
|
208
|
+
return (await this._fileService.resolve(folder)).children ?? [];
|
|
209
|
+
} catch (err) {
|
|
210
|
+
return [];
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
this._store.add(autorun(async r => {
|
|
214
|
+
store.clear();
|
|
215
|
+
toolsSig.read(r);
|
|
216
|
+
fileEventSig.read(r);
|
|
217
|
+
const uri = promptFolder.read(r);
|
|
218
|
+
const cts = ( new CancellationTokenSource());
|
|
219
|
+
store.add(toDisposable(() => cts.dispose(true)));
|
|
220
|
+
const entries = await getFilesInFolder(uri);
|
|
221
|
+
if (cts.token.isCancellationRequested) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
for (const entry of entries) {
|
|
225
|
+
if (!entry.isFile || !RawToolSetsShape.isToolSetFileName(entry.resource)) {
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
store.add(this._fileService.watch(entry.resource));
|
|
229
|
+
let data;
|
|
230
|
+
try {
|
|
231
|
+
const content = await this._fileService.readFile(entry.resource, undefined, cts.token);
|
|
232
|
+
const rawObj = parse(( content.value.toString()));
|
|
233
|
+
data = RawToolSetsShape.from(rawObj, this._logService);
|
|
234
|
+
} catch (err) {
|
|
235
|
+
this._logService.error(`Error reading tool set file ${( entry.resource.toString())}:`, err);
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
if (cts.token.isCancellationRequested) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
for (const [name, value] of data.entries) {
|
|
242
|
+
const tools = [];
|
|
243
|
+
const toolSets = [];
|
|
244
|
+
value.tools.forEach(name => {
|
|
245
|
+
const tool = this._languageModelToolsService.getToolByName(name);
|
|
246
|
+
if (tool) {
|
|
247
|
+
tools.push(tool);
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
const toolSet = this._languageModelToolsService.getToolSetByName(name);
|
|
251
|
+
if (toolSet) {
|
|
252
|
+
toolSets.push(toolSet);
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
if (tools.length === 0 && toolSets.length === 0) {
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
const toolset = this._languageModelToolsService.createToolSet({
|
|
260
|
+
type: "user",
|
|
261
|
+
file: entry.resource,
|
|
262
|
+
label: basename(entry.resource)
|
|
263
|
+
}, `user/${( entry.resource.toString())}/${name}`, name, {
|
|
264
|
+
icon: value.icon ? ThemeIcon.fromId(value.icon) : undefined,
|
|
265
|
+
description: value.description
|
|
266
|
+
});
|
|
267
|
+
transaction(tx => {
|
|
268
|
+
store.add(toolset);
|
|
269
|
+
tools.forEach(tool => store.add(toolset.addTool(tool, tx)));
|
|
270
|
+
toolSets.forEach(toolSet => store.add(toolset.addToolSet(toolSet, tx)));
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}));
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
UserToolSetsContributions = ( __decorate([( __param(0, IExtensionService)), ( __param(1, ILifecycleService)), ( __param(2, ILanguageModelToolsService)), ( __param(3, IUserDataProfileService)), ( __param(4, IFileService)), ( __param(5, ILogService))], UserToolSetsContributions));
|
|
278
|
+
class ConfigureToolSets extends Action2 {
|
|
279
|
+
static {
|
|
280
|
+
this.ID = "chat.configureToolSets";
|
|
281
|
+
}
|
|
282
|
+
constructor() {
|
|
283
|
+
super({
|
|
284
|
+
id: ConfigureToolSets.ID,
|
|
285
|
+
title: ( localize2(6689, "Configure Tool Sets...")),
|
|
286
|
+
shortTitle: ( localize(6690, "Tool Sets")),
|
|
287
|
+
category: CHAT_CATEGORY,
|
|
288
|
+
f1: true,
|
|
289
|
+
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ChatContextKeys.Tools.toolsCount.greater(0))),
|
|
290
|
+
menu: [{
|
|
291
|
+
id: CHAT_CONFIG_MENU_ID,
|
|
292
|
+
when: ( ContextKeyExpr.equals("view", ChatViewId)),
|
|
293
|
+
order: 11,
|
|
294
|
+
group: "2_level"
|
|
295
|
+
}, {
|
|
296
|
+
id: MenuId.ViewTitle,
|
|
297
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.equals("view", ChatViewId)), ( ContextKeyExpr.has(`config.${ChatConfiguration.ChatCustomizationMenuEnabled}`)))),
|
|
298
|
+
order: 11,
|
|
299
|
+
group: "2_level"
|
|
300
|
+
}]
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
async run(accessor) {
|
|
304
|
+
const toolsService = accessor.get(ILanguageModelToolsService);
|
|
305
|
+
const quickInputService = accessor.get(IQuickInputService);
|
|
306
|
+
const editorService = accessor.get(IEditorService);
|
|
307
|
+
const userDataProfileService = accessor.get(IUserDataProfileService);
|
|
308
|
+
const fileService = accessor.get(IFileService);
|
|
309
|
+
const textFileService = accessor.get(ITextFileService);
|
|
310
|
+
const picks = [];
|
|
311
|
+
picks.push({
|
|
312
|
+
label: ( localize(6691, "Create new tool sets file...")),
|
|
313
|
+
alwaysShow: true,
|
|
314
|
+
iconClass: ThemeIcon.asClassName(Codicon.plus)
|
|
315
|
+
});
|
|
316
|
+
for (const toolSet of toolsService.toolSets.get()) {
|
|
317
|
+
if (toolSet.source.type !== "user") {
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
320
|
+
picks.push({
|
|
321
|
+
label: toolSet.referenceName,
|
|
322
|
+
toolset: toolSet,
|
|
323
|
+
tooltip: toolSet.description,
|
|
324
|
+
iconClass: ThemeIcon.asClassName(toolSet.icon)
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
const pick = await quickInputService.pick(picks, {
|
|
328
|
+
canPickMany: false,
|
|
329
|
+
placeHolder: ( localize(6692, "Select a tool set to configure"))
|
|
330
|
+
});
|
|
331
|
+
if (!pick) {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
let resource;
|
|
335
|
+
if (!pick.toolset) {
|
|
336
|
+
const name = await quickInputService.input({
|
|
337
|
+
placeHolder: ( localize(6693, "Type tool sets file name")),
|
|
338
|
+
validateInput: async input => {
|
|
339
|
+
if (!input) {
|
|
340
|
+
return localize(6694, "Invalid file name");
|
|
341
|
+
}
|
|
342
|
+
if (!isValidBasename(input)) {
|
|
343
|
+
return localize(6695, "'{0}' is not a valid file name", input);
|
|
344
|
+
}
|
|
345
|
+
return undefined;
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
if (isFalsyOrWhitespace(name)) {
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
resource = joinPath(
|
|
352
|
+
userDataProfileService.currentProfile.promptsHome,
|
|
353
|
+
`${name}${RawToolSetsShape.suffix}`
|
|
354
|
+
);
|
|
355
|
+
if (!(await fileService.exists(resource))) {
|
|
356
|
+
await textFileService.write(resource, [
|
|
357
|
+
"// Place your tool sets here...",
|
|
358
|
+
"// Example:",
|
|
359
|
+
"// {",
|
|
360
|
+
"// \t\"toolSetName\": {",
|
|
361
|
+
"// \t\t\"tools\": [",
|
|
362
|
+
"// \t\t\t\"someTool\",",
|
|
363
|
+
"// \t\t\t\"anotherTool\"",
|
|
364
|
+
"// \t\t],",
|
|
365
|
+
"// \t\t\"description\": \"description\",",
|
|
366
|
+
"// \t\t\"icon\": \"tools\"",
|
|
367
|
+
"// \t}",
|
|
368
|
+
"// }"
|
|
369
|
+
].join("\n"));
|
|
370
|
+
}
|
|
371
|
+
} else {
|
|
372
|
+
assertType(pick.toolset.source.type === "user");
|
|
373
|
+
resource = pick.toolset.source.file;
|
|
374
|
+
}
|
|
375
|
+
await editorService.openEditor({
|
|
376
|
+
resource,
|
|
377
|
+
options: {
|
|
378
|
+
pinned: true
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export { ConfigureToolSets, UserToolSetsContributions };
|
|
@@ -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(6708, "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(6709, "View Extension")),
|
|
99
99
|
run: () => {
|
|
100
100
|
const agent = getAgent();
|
|
101
101
|
if (agent) {
|
|
@@ -1,31 +1,36 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
2
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
-
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
4
3
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
4
|
+
import { IFileDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
5
5
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
6
6
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
7
7
|
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
8
8
|
import { IChatArtifactsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/chatArtifactsService.service";
|
|
9
|
+
import { IChatImageCarouselService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatImageCarouselService.service";
|
|
9
10
|
export declare class ChatArtifactsWidget extends Disposable {
|
|
10
11
|
private readonly _chatArtifactsService;
|
|
11
12
|
private readonly _instantiationService;
|
|
12
13
|
private readonly _openerService;
|
|
13
14
|
private readonly _configurationService;
|
|
14
|
-
private readonly _commandService;
|
|
15
15
|
private readonly _fileService;
|
|
16
|
+
private readonly _fileDialogService;
|
|
17
|
+
private readonly _chatImageCarouselService;
|
|
16
18
|
readonly domNode: HTMLElement;
|
|
17
19
|
private readonly _autorunDisposable;
|
|
18
|
-
private
|
|
20
|
+
private _currentArtifacts;
|
|
19
21
|
private _isCollapsed;
|
|
20
|
-
private
|
|
21
|
-
private readonly
|
|
22
|
+
private _tree;
|
|
23
|
+
private readonly _treeStore;
|
|
22
24
|
private _expandIcon;
|
|
23
25
|
private _titleElement;
|
|
26
|
+
private _clearButton;
|
|
24
27
|
static readonly ELEMENT_HEIGHT = 22;
|
|
25
28
|
private static readonly MAX_ITEMS_SHOWN;
|
|
26
|
-
|
|
27
|
-
constructor(_chatArtifactsService: IChatArtifactsService, _instantiationService: IInstantiationService, _openerService: IOpenerService, _configurationService: IConfigurationService, _commandService: ICommandService, _fileService: IFileService);
|
|
29
|
+
constructor(_chatArtifactsService: IChatArtifactsService, _instantiationService: IInstantiationService, _openerService: IOpenerService, _configurationService: IConfigurationService, _fileService: IFileService, _fileDialogService: IFileDialogService, _chatImageCarouselService: IChatImageCarouselService);
|
|
28
30
|
render(sessionResource: URI): void;
|
|
31
|
+
private _openGroupInCarousel;
|
|
29
32
|
private _openScreenshotInCarousel;
|
|
33
|
+
private _clearAllArtifacts;
|
|
34
|
+
private _saveArtifact;
|
|
30
35
|
hide(): void;
|
|
31
36
|
}
|