@codingame/monaco-vscode-chat-service-override 15.0.2 → 16.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/index.js +11 -8
- package/package.json +29 -20
- package/vscode/src/vs/editor/common/diff/documentDiffProvider.d.ts +22 -0
- package/vscode/src/vs/editor/common/diff/documentDiffProvider.js +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +80 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.js +17 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/{askToSelectPrompt.d.ts → askToSelectPrompt/askToSelectPrompt.d.ts} +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/askToSelectPrompt.js +79 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/constants.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/constants.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/attachPrompts.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/attachPrompts.js +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPlaceholderText.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPlaceholderText.js +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPromptPickItem.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPromptPickItem.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/handleButtonClick.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/handleButtonClick.js +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +163 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +22 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.js +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +242 -74
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditing.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditing.js +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +688 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +355 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +395 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +98 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +216 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +97 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +831 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +32 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +110 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +985 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +69 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.js +67 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +147 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +284 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +578 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.js +122 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/helpers.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/helpers.js +320 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/notebookCellChanges.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/notebookCellChanges.js +50 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +22 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +166 -62
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +6 -104
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +704 -732
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.d.ts +10 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +329 -236
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusItemService.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusItemService.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +14 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/editorHoverWrapper.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/editorHoverWrapper.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/media/editorHoverWrapper.css +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +217 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css +114 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditorController.css +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSetup.css +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css +90 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.js +65 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/errors.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.js +14 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +16 -8
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +175 -57
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +313 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.js +30 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.d.ts +10 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.js +18 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.js +117 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptPathAutocompletion.js +3 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +6 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +157 -65
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +39 -21
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +11 -10
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +47 -0
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceUtils.d.ts +5 -0
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceUtils.js +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt.js +0 -142
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.d.ts +0 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +0 -331
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.d.ts +0 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +0 -110
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/media/editorHoverWrapper.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewSetup.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatEntitlementsService.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/chatEntitlementsService.js +0 -13
- package/vscode/src/vs/workbench/contrib/chat/common/chatQuotasService.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/chat/common/chatQuotasService.js +0 -85
- package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.js +0 -22
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
.chat-editor-overlay-widget {
|
|
2
|
+
padding: 0px;
|
|
3
|
+
color: var(--vscode-button-foreground);
|
|
4
|
+
background-color: var(--vscode-button-background);
|
|
5
|
+
border-radius: 5px;
|
|
6
|
+
border: 1px solid var(--vscode-contrastBorder);
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
z-index: 10;
|
|
10
|
+
box-shadow: 0 2px 8px var(--vscode-widget-shadow);
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
}
|
|
13
|
+
@keyframes pulse {
|
|
14
|
+
0% {
|
|
15
|
+
box-shadow: 0 2px 8px 0 var(--vscode-widget-shadow);
|
|
16
|
+
}
|
|
17
|
+
50% {
|
|
18
|
+
box-shadow: 0 2px 8px 4px var(--vscode-widget-shadow);
|
|
19
|
+
}
|
|
20
|
+
100% {
|
|
21
|
+
box-shadow: 0 2px 8px 0 var(--vscode-widget-shadow);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.chat-editor-overlay-widget.busy {
|
|
25
|
+
animation: pulse ease-in 2.3s infinite;
|
|
26
|
+
}
|
|
27
|
+
.chat-editor-overlay-widget .chat-editor-overlay-progress {
|
|
28
|
+
align-items: center;
|
|
29
|
+
display: none;
|
|
30
|
+
padding: 0px 5px;
|
|
31
|
+
font-size: 12px;
|
|
32
|
+
font-variant-numeric: tabular-nums;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
}
|
|
36
|
+
.chat-editor-overlay-widget.busy .chat-editor-overlay-progress {
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
}
|
|
39
|
+
@keyframes ellipsis {
|
|
40
|
+
0% {
|
|
41
|
+
content: "";
|
|
42
|
+
}
|
|
43
|
+
25% {
|
|
44
|
+
content: ".";
|
|
45
|
+
}
|
|
46
|
+
50% {
|
|
47
|
+
content: "..";
|
|
48
|
+
}
|
|
49
|
+
75% {
|
|
50
|
+
content: "...";
|
|
51
|
+
}
|
|
52
|
+
100% {
|
|
53
|
+
content: "";
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
.chat-editor-overlay-widget.busy.paused .chat-editor-overlay-progress {
|
|
57
|
+
.codicon-loading {
|
|
58
|
+
display: none;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
.chat-editor-overlay-widget .action-item > .action-label {
|
|
62
|
+
padding: 5px;
|
|
63
|
+
font-size: 12px;
|
|
64
|
+
}
|
|
65
|
+
.chat-editor-overlay-widget.busy .action-item > .action-label.busy::after {
|
|
66
|
+
content: "";
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
width: 3ch;
|
|
71
|
+
animation: ellipsis steps(4, end) 1s infinite;
|
|
72
|
+
}
|
|
73
|
+
.chat-editor-overlay-widget .action-item:first-child > .action-label {
|
|
74
|
+
padding-left: 7px;
|
|
75
|
+
}
|
|
76
|
+
.chat-editor-overlay-widget .action-item:last-child > .action-label {
|
|
77
|
+
padding-right: 7px;
|
|
78
|
+
}
|
|
79
|
+
.chat-editor-overlay-widget.busy .chat-editor-overlay-progress .codicon,
|
|
80
|
+
.chat-editor-overlay-widget .action-item > .action-label.codicon {
|
|
81
|
+
color: var(--vscode-button-foreground);
|
|
82
|
+
}
|
|
83
|
+
.chat-diff-change-content-widget .monaco-action-bar .action-item.disabled,
|
|
84
|
+
.chat-editor-overlay-widget .monaco-action-bar .action-item.disabled {
|
|
85
|
+
> .action-label.codicon::before,
|
|
86
|
+
> .action-label.codicon,
|
|
87
|
+
> .action-label,
|
|
88
|
+
> .action-label:hover {
|
|
89
|
+
color: var(--vscode-button-foreground);
|
|
90
|
+
opacity: 0.7;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
.chat-editor-overlay-widget .action-item.label-item {
|
|
94
|
+
font-variant-numeric: tabular-nums;
|
|
95
|
+
}
|
|
96
|
+
.chat-editor-overlay-widget .monaco-action-bar .action-item.label-item > .action-label,
|
|
97
|
+
.chat-editor-overlay-widget .monaco-action-bar .action-item.label-item > .action-label:hover {
|
|
98
|
+
color: var(--vscode-button-foreground);
|
|
99
|
+
opacity: 1;
|
|
100
|
+
}
|
|
101
|
+
.chat-editor-overlay-widget .action-item.auto {
|
|
102
|
+
position: relative;
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
}
|
|
105
|
+
.chat-editor-overlay-widget .action-item.auto::before {
|
|
106
|
+
content: '';
|
|
107
|
+
position: absolute;
|
|
108
|
+
top: 0;
|
|
109
|
+
left: var(--vscode-action-item-auto-timeout, -100%);
|
|
110
|
+
width: 100%;
|
|
111
|
+
height: 100%;
|
|
112
|
+
background-color: var(--vscode-toolbar-hoverBackground);
|
|
113
|
+
transition: left 0.5s linear;
|
|
114
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.chat-diff-change-content-widget {
|
|
2
|
+
opacity: 0;
|
|
3
|
+
transition: opacity 0.2s ease-in-out;
|
|
4
|
+
display: flex;
|
|
5
|
+
box-shadow: 0 2px 8px var(--vscode-widget-shadow);
|
|
6
|
+
}
|
|
7
|
+
.chat-diff-change-content-widget.hover {
|
|
8
|
+
opacity: 1;
|
|
9
|
+
}
|
|
10
|
+
.chat-diff-change-content-widget .monaco-action-bar {
|
|
11
|
+
padding: 0;
|
|
12
|
+
border-radius: 2px;
|
|
13
|
+
background-color: var(--vscode-button-background);
|
|
14
|
+
color: var(--vscode-button-foreground);
|
|
15
|
+
}
|
|
16
|
+
.chat-diff-change-content-widget .monaco-action-bar .action-item .action-label {
|
|
17
|
+
height: 14px;
|
|
18
|
+
border-radius: 2px;
|
|
19
|
+
color: var(--vscode-button-foreground);
|
|
20
|
+
}
|
|
21
|
+
.chat-diff-change-content-widget .monaco-action-bar .action-item .action-label.codicon {
|
|
22
|
+
width: unset;
|
|
23
|
+
padding: 2px;
|
|
24
|
+
font-size: 12px;
|
|
25
|
+
line-height: 14px;
|
|
26
|
+
color: var(--vscode-button-foreground);
|
|
27
|
+
}
|
|
28
|
+
.chat-diff-change-content-widget .monaco-action-bar .action-item .action-label.codicon[class*='codicon-'] {
|
|
29
|
+
font-size: 12px;
|
|
30
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.chat-welcome-view .chat-setup-view {
|
|
2
|
+
text-align: center;
|
|
3
|
+
.chat-features-container {
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
text-align: initial;
|
|
7
|
+
border-radius: 2px;
|
|
8
|
+
border: 1px solid var(--vscode-chat-requestBorder);
|
|
9
|
+
background-color: var(--vscode-chat-requestBackground);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
.dialog-message-body .chat-setup-view {
|
|
13
|
+
p {
|
|
14
|
+
margin-top: 0;
|
|
15
|
+
margin-bottom: 0;
|
|
16
|
+
}
|
|
17
|
+
p.setup-legal {
|
|
18
|
+
font-size: 12px;
|
|
19
|
+
color: var(--vscode-descriptionForeground);
|
|
20
|
+
margin-top: 2em;
|
|
21
|
+
}
|
|
22
|
+
p.setup-settings {
|
|
23
|
+
font-size: 12px;
|
|
24
|
+
color: var(--vscode-descriptionForeground);
|
|
25
|
+
margin-top: 1em;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
.dialog-message-body .chat-setup-view,
|
|
29
|
+
.chat-welcome-view .chat-setup-view {
|
|
30
|
+
p {
|
|
31
|
+
width: 100%;
|
|
32
|
+
}
|
|
33
|
+
.chat-feature-container {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: 6px;
|
|
37
|
+
padding: 5px 10px 5px 10px;
|
|
38
|
+
}
|
|
39
|
+
.chat-feature-container .codicon[class*='codicon-'] {
|
|
40
|
+
font-size: 16px;
|
|
41
|
+
}
|
|
42
|
+
.codicon[class*='codicon-'] {
|
|
43
|
+
font-size: 13px;
|
|
44
|
+
line-height: 1.4em;
|
|
45
|
+
vertical-align: bottom;
|
|
46
|
+
}
|
|
47
|
+
.button-container {
|
|
48
|
+
padding-top: 20px;
|
|
49
|
+
}
|
|
50
|
+
.monaco-button-dropdown {
|
|
51
|
+
width: 100%;
|
|
52
|
+
}
|
|
53
|
+
.monaco-button-dropdown .monaco-text-button {
|
|
54
|
+
width: 100%;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
.chat-status-bar-entry-tooltip {
|
|
2
|
+
margin-top: 4px;
|
|
3
|
+
margin-bottom: 4px;
|
|
4
|
+
}
|
|
5
|
+
.chat-status-bar-entry-tooltip hr {
|
|
6
|
+
margin-top: 8px;
|
|
7
|
+
margin-bottom: 8px;
|
|
8
|
+
}
|
|
9
|
+
.chat-status-bar-entry-tooltip div.header {
|
|
10
|
+
color: var(--vscode-descriptionForeground);
|
|
11
|
+
margin-bottom: 4px;
|
|
12
|
+
font-weight: 600;
|
|
13
|
+
}
|
|
14
|
+
.chat-status-bar-entry-tooltip div.description {
|
|
15
|
+
color: var(--vscode-descriptionForeground);
|
|
16
|
+
}
|
|
17
|
+
.chat-status-bar-entry-tooltip .monaco-button {
|
|
18
|
+
margin-top: 5px;
|
|
19
|
+
margin-bottom: 5px;
|
|
20
|
+
}
|
|
21
|
+
.chat-status-bar-entry-tooltip .setup .chat-feature-container {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: 5px;
|
|
25
|
+
padding: 4px;
|
|
26
|
+
}
|
|
27
|
+
.chat-status-bar-entry-tooltip .quota-indicator {
|
|
28
|
+
margin-bottom: 6px;
|
|
29
|
+
}
|
|
30
|
+
.chat-status-bar-entry-tooltip .quota-indicator .quota-label {
|
|
31
|
+
display: flex;
|
|
32
|
+
justify-content: space-between;
|
|
33
|
+
margin-bottom: 3px;
|
|
34
|
+
}
|
|
35
|
+
.chat-status-bar-entry-tooltip .quota-indicator .quota-bar {
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 4px;
|
|
38
|
+
background-color: var(--vscode-gauge-foreground);
|
|
39
|
+
border-radius: 4px;
|
|
40
|
+
border: 1px solid var(--vscode-gauge-border);
|
|
41
|
+
}
|
|
42
|
+
.chat-status-bar-entry-tooltip .quota-indicator .quota-bar .quota-bit {
|
|
43
|
+
height: 100%;
|
|
44
|
+
background-color: var(--vscode-gauge-background);
|
|
45
|
+
border-radius: 4px;
|
|
46
|
+
}
|
|
47
|
+
.chat-status-bar-entry-tooltip .quota-indicator.warning .quota-bar {
|
|
48
|
+
background-color: var(--vscode-gauge-warningForeground);
|
|
49
|
+
}
|
|
50
|
+
.chat-status-bar-entry-tooltip .quota-indicator.warning .quota-bar .quota-bit {
|
|
51
|
+
background-color: var(--vscode-gauge-warningBackground);
|
|
52
|
+
}
|
|
53
|
+
.chat-status-bar-entry-tooltip .quota-indicator.error .quota-bar {
|
|
54
|
+
background-color: var(--vscode-gauge-errorForeground);
|
|
55
|
+
}
|
|
56
|
+
.chat-status-bar-entry-tooltip .quota-indicator.error .quota-bar .quota-bit {
|
|
57
|
+
background-color: var(--vscode-gauge-errorBackground);
|
|
58
|
+
}
|
|
59
|
+
.chat-status-bar-entry-tooltip .settings {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
gap: 5px;
|
|
63
|
+
}
|
|
64
|
+
.chat-status-bar-entry-tooltip .settings .setting {
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
}
|
|
68
|
+
.chat-status-bar-entry-tooltip .settings .setting .monaco-checkbox {
|
|
69
|
+
height: 14px;
|
|
70
|
+
width: 14px;
|
|
71
|
+
margin-right: 5px;
|
|
72
|
+
}
|
|
73
|
+
.chat-status-bar-entry-tooltip .settings .setting .codicon {
|
|
74
|
+
font-size: 12px;
|
|
75
|
+
}
|
|
76
|
+
.chat-status-bar-entry-tooltip .settings .setting .setting-label {
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
}
|
|
79
|
+
.chat-status-bar-entry-tooltip .settings .setting.disabled .setting-label {
|
|
80
|
+
color: var(--vscode-disabledForeground);
|
|
81
|
+
}
|
|
82
|
+
.chat-status-bar-entry-tooltip .contribution .body {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: row;
|
|
85
|
+
gap: 6px;
|
|
86
|
+
.detail-item {
|
|
87
|
+
margin-left: auto;
|
|
88
|
+
color: var(--vscode-descriptionForeground);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -3,31 +3,43 @@ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
|
3
3
|
import { createPromptFile } from './utils/createPromptFile.js';
|
|
4
4
|
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
5
5
|
import { askForPromptName } from './dialogs/askForPromptName.js';
|
|
6
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
7
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
6
8
|
import { askForPromptSourceFolder } from './dialogs/askForPromptSourceFolder.js';
|
|
7
9
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
8
10
|
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
9
11
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
10
|
-
import { PromptsConfig } from '@codingame/monaco-vscode-
|
|
12
|
+
import { PromptsConfig } from '@codingame/monaco-vscode-a1eb43d5-da63-5f76-8ad4-acf0d6c3b749-common/vscode/vs/platform/prompts/common/config';
|
|
11
13
|
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
14
|
+
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
15
|
+
import { MenuRegistry, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
12
16
|
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/types.service';
|
|
13
|
-
import { appendToCommandPalette } from '@codingame/monaco-vscode-9b5a5e82-d649-5455-b4bf-ef90d6afd294-common/vscode/vs/workbench/contrib/files/browser/fileActions.contribution';
|
|
14
17
|
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
15
18
|
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
19
|
+
import { CONFIGURE_SYNC_COMMAND_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataSync/common/userDataSync';
|
|
20
|
+
import { SyncResource } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataSync/common/userDataSync';
|
|
21
|
+
import { IUserDataSyncEnablementService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataSync/common/userDataSync.service';
|
|
16
22
|
import { KeybindingsRegistry, KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
23
|
+
import { NeverShowAgainScope } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification';
|
|
24
|
+
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
25
|
+
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
17
26
|
|
|
18
27
|
const BASE_COMMAND_ID = 'workbench.command.prompts.create';
|
|
19
28
|
const LOCAL_COMMAND_ID = `${BASE_COMMAND_ID}.local`;
|
|
20
29
|
const USER_COMMAND_ID = `${BASE_COMMAND_ID}.user`;
|
|
21
|
-
const LOCAL_COMMAND_TITLE = ( localize(
|
|
22
|
-
const USER_COMMAND_TITLE = ( localize(
|
|
30
|
+
const LOCAL_COMMAND_TITLE = ( localize(4908, "Create Prompt"));
|
|
31
|
+
const USER_COMMAND_TITLE = ( localize(4909, "Create User Prompt"));
|
|
23
32
|
const command = async (accessor, type) => {
|
|
33
|
+
const logService = accessor.get(ILogService);
|
|
24
34
|
const fileService = accessor.get(IFileService);
|
|
25
35
|
const labelService = accessor.get(ILabelService);
|
|
26
36
|
const openerService = accessor.get(IOpenerService);
|
|
27
|
-
const commandService = accessor.get(ICommandService);
|
|
28
37
|
const promptsService = accessor.get(IPromptsService);
|
|
38
|
+
const commandService = accessor.get(ICommandService);
|
|
29
39
|
const quickInputService = accessor.get(IQuickInputService);
|
|
40
|
+
const notificationService = accessor.get(INotificationService);
|
|
30
41
|
const workspaceService = accessor.get(IWorkspaceContextService);
|
|
42
|
+
const userDataSyncEnablementService = accessor.get(IUserDataSyncEnablementService);
|
|
31
43
|
const fileName = await askForPromptName(type, quickInputService);
|
|
32
44
|
if (!fileName) {
|
|
33
45
|
return;
|
|
@@ -43,15 +55,43 @@ const command = async (accessor, type) => {
|
|
|
43
55
|
if (!selectedFolder) {
|
|
44
56
|
return;
|
|
45
57
|
}
|
|
46
|
-
const content = ( localize(
|
|
58
|
+
const content = ( localize(4910, "Add prompt contents..."));
|
|
47
59
|
const promptUri = await createPromptFile({
|
|
48
60
|
fileName,
|
|
49
61
|
folder: selectedFolder,
|
|
50
62
|
content,
|
|
51
63
|
fileService,
|
|
52
|
-
|
|
64
|
+
openerService,
|
|
53
65
|
});
|
|
54
66
|
await openerService.open(promptUri);
|
|
67
|
+
if (type !== 'user') {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const isConfigured = userDataSyncEnablementService
|
|
71
|
+
.isResourceEnablementConfigured(SyncResource.Prompts);
|
|
72
|
+
const isSettingsSyncEnabled = userDataSyncEnablementService.isEnabled();
|
|
73
|
+
if ((isConfigured === true) || (isSettingsSyncEnabled === false)) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
notificationService.prompt(Severity.Info, ( localize(
|
|
77
|
+
4911,
|
|
78
|
+
"User prompts are not currently synchronized. Do you want to enable synchronization of the user prompts?"
|
|
79
|
+
)), [
|
|
80
|
+
{
|
|
81
|
+
label: ( localize(4912, "Enable")),
|
|
82
|
+
run: () => {
|
|
83
|
+
commandService.executeCommand(CONFIGURE_SYNC_COMMAND_ID)
|
|
84
|
+
.catch((error) => {
|
|
85
|
+
logService.error(`Failed to run '${CONFIGURE_SYNC_COMMAND_ID}' command: ${error}.`);
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
}
|
|
89
|
+
], {
|
|
90
|
+
neverShowAgain: {
|
|
91
|
+
id: 'workbench.command.prompts.create.user.enable-sync-notification',
|
|
92
|
+
scope: NeverShowAgainScope.PROFILE,
|
|
93
|
+
},
|
|
94
|
+
});
|
|
55
95
|
};
|
|
56
96
|
const commandFactory = (type) => {
|
|
57
97
|
return async (accessor) => {
|
|
@@ -62,21 +102,27 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
62
102
|
id: LOCAL_COMMAND_ID,
|
|
63
103
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
64
104
|
handler: commandFactory('local'),
|
|
65
|
-
when: PromptsConfig.enabledCtx,
|
|
105
|
+
when: ( ContextKeyExpr.and(PromptsConfig.enabledCtx, ChatContextKeys.enabled)),
|
|
66
106
|
});
|
|
67
107
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
68
108
|
id: USER_COMMAND_ID,
|
|
69
109
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
70
110
|
handler: commandFactory('user'),
|
|
71
|
-
when: PromptsConfig.enabledCtx,
|
|
111
|
+
when: ( ContextKeyExpr.and(PromptsConfig.enabledCtx, ChatContextKeys.enabled)),
|
|
112
|
+
});
|
|
113
|
+
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
114
|
+
command: {
|
|
115
|
+
id: LOCAL_COMMAND_ID,
|
|
116
|
+
title: LOCAL_COMMAND_TITLE,
|
|
117
|
+
category: CHAT_CATEGORY
|
|
118
|
+
},
|
|
119
|
+
when: ( ContextKeyExpr.and(PromptsConfig.enabledCtx, ChatContextKeys.enabled))
|
|
120
|
+
});
|
|
121
|
+
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
122
|
+
command: {
|
|
123
|
+
id: USER_COMMAND_ID,
|
|
124
|
+
title: USER_COMMAND_TITLE,
|
|
125
|
+
category: CHAT_CATEGORY,
|
|
126
|
+
},
|
|
127
|
+
when: ( ContextKeyExpr.and(PromptsConfig.enabledCtx, ChatContextKeys.enabled))
|
|
72
128
|
});
|
|
73
|
-
appendToCommandPalette({
|
|
74
|
-
id: LOCAL_COMMAND_ID,
|
|
75
|
-
title: LOCAL_COMMAND_TITLE,
|
|
76
|
-
category: CHAT_CATEGORY,
|
|
77
|
-
}, PromptsConfig.enabledCtx);
|
|
78
|
-
appendToCommandPalette({
|
|
79
|
-
id: USER_COMMAND_ID,
|
|
80
|
-
title: USER_COMMAND_TITLE,
|
|
81
|
-
category: CHAT_CATEGORY,
|
|
82
|
-
}, PromptsConfig.enabledCtx);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
3
|
-
import { PROMPT_FILE_EXTENSION } from '@codingame/monaco-vscode-
|
|
3
|
+
import { PROMPT_FILE_EXTENSION } from '@codingame/monaco-vscode-a1eb43d5-da63-5f76-8ad4-acf0d6c3b749-common/vscode/vs/platform/prompts/common/constants';
|
|
4
4
|
|
|
5
5
|
const askForPromptName = async (_type, quickInputService) => {
|
|
6
6
|
const result = await quickInputService.input({
|
|
7
|
-
placeHolder: ( localize(
|
|
7
|
+
placeHolder: ( localize(4913, "Provide a prompt name", PROMPT_FILE_EXTENSION)),
|
|
8
8
|
});
|
|
9
9
|
if (!result) {
|
|
10
10
|
return undefined;
|
|
@@ -14,7 +14,7 @@ const askForPromptSourceFolder = async (options) => {
|
|
|
14
14
|
return folders[0].uri;
|
|
15
15
|
}
|
|
16
16
|
const pickOptions = {
|
|
17
|
-
placeHolder: ( localize(
|
|
17
|
+
placeHolder: ( localize(4914, "Select a prompt source folder")),
|
|
18
18
|
canPickMany: false,
|
|
19
19
|
matchOnDescription: true,
|
|
20
20
|
};
|
|
@@ -33,7 +33,7 @@ const askForPromptSourceFolder = async (options) => {
|
|
|
33
33
|
}
|
|
34
34
|
return {
|
|
35
35
|
type: 'item',
|
|
36
|
-
label: ( localize(
|
|
36
|
+
label: ( localize(4915, "Current Workspace")),
|
|
37
37
|
description: labelService.getUriLabel(uri, { relative: false }),
|
|
38
38
|
tooltip: uri.fsPath,
|
|
39
39
|
value: uri,
|
|
@@ -48,13 +48,13 @@ const askForPromptSourceFolder = async (options) => {
|
|
|
48
48
|
const showNoFoldersDialog = async (quickInputService, openerService) => {
|
|
49
49
|
const docsQuickPick = {
|
|
50
50
|
type: 'item',
|
|
51
|
-
label: ( localize(
|
|
51
|
+
label: ( localize(4916, 'Learn how to configure reusable prompts')),
|
|
52
52
|
description: DOCUMENTATION_URL,
|
|
53
53
|
tooltip: DOCUMENTATION_URL,
|
|
54
54
|
value: ( URI.parse(DOCUMENTATION_URL)),
|
|
55
55
|
};
|
|
56
56
|
const result = await quickInputService.pick([docsQuickPick], {
|
|
57
|
-
placeHolder: ( localize(
|
|
57
|
+
placeHolder: ( localize(4917, 'No prompt source folders found.')),
|
|
58
58
|
canPickMany: false,
|
|
59
59
|
});
|
|
60
60
|
if (!result) {
|
|
@@ -5,12 +5,12 @@ class BaseCreatePromptError extends Error {
|
|
|
5
5
|
}
|
|
6
6
|
class FolderExists extends BaseCreatePromptError {
|
|
7
7
|
constructor(path) {
|
|
8
|
-
super(( localize(
|
|
8
|
+
super(( localize(4918, "Folder already exists at '{0}'.", path)));
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
class InvalidPromptName extends BaseCreatePromptError {
|
|
12
12
|
constructor(name) {
|
|
13
|
-
super(( localize(
|
|
13
|
+
super(( localize(4919, "Invalid prompt file name '{0}'.", name)));
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
2
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
3
|
-
import {
|
|
3
|
+
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
4
4
|
interface ICreatePromptFileOptions {
|
|
5
5
|
readonly fileName: string;
|
|
6
6
|
readonly folder: URI;
|
|
7
7
|
readonly content: string;
|
|
8
8
|
fileService: IFileService;
|
|
9
|
-
|
|
9
|
+
openerService: IOpenerService;
|
|
10
10
|
}
|
|
11
11
|
export declare const createPromptFile: (options: ICreatePromptFileOptions) => Promise<URI>;
|
|
12
12
|
export {};
|
|
@@ -4,16 +4,16 @@ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
|
4
4
|
import { assert } from '@codingame/monaco-vscode-api/vscode/vs/base/common/assert';
|
|
5
5
|
import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
6
6
|
import { dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
7
|
-
import { isPromptFile } from '@codingame/monaco-vscode-
|
|
7
|
+
import { isPromptFile } from '@codingame/monaco-vscode-a1eb43d5-da63-5f76-8ad4-acf0d6c3b749-common/vscode/vs/platform/prompts/common/constants';
|
|
8
8
|
|
|
9
9
|
const createPromptFile = async (options) => {
|
|
10
|
-
const { fileName, folder, content, fileService,
|
|
10
|
+
const { fileName, folder, content, fileService, openerService } = options;
|
|
11
11
|
const promptUri = URI.joinPath(folder, fileName);
|
|
12
12
|
assert(isPromptFile(promptUri), ( new InvalidPromptName(fileName)));
|
|
13
13
|
if (await fileService.exists(promptUri)) {
|
|
14
14
|
const promptInfo = await fileService.resolve(promptUri);
|
|
15
15
|
assert(!promptInfo.isDirectory, ( new FolderExists(promptUri.fsPath)));
|
|
16
|
-
await
|
|
16
|
+
await openerService.open(promptUri);
|
|
17
17
|
return promptUri;
|
|
18
18
|
}
|
|
19
19
|
await fileService.createFolder(dirname(promptUri));
|
package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.js
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
3
3
|
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
4
4
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
5
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
5
6
|
import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
6
|
-
import { PromptsConfig } from '@codingame/monaco-vscode-
|
|
7
|
-
import {
|
|
8
|
-
import { isPromptFile } from '@codingame/monaco-vscode-52bb4d5b-ba1a-57fd-9bee-b28824214eac-common/vscode/vs/platform/prompts/common/constants';
|
|
7
|
+
import { PromptsConfig } from '@codingame/monaco-vscode-a1eb43d5-da63-5f76-8ad4-acf0d6c3b749-common/vscode/vs/platform/prompts/common/config';
|
|
8
|
+
import { isPromptFile } from '@codingame/monaco-vscode-a1eb43d5-da63-5f76-8ad4-acf0d6c3b749-common/vscode/vs/platform/prompts/common/constants';
|
|
9
9
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
10
10
|
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
11
|
-
import {
|
|
11
|
+
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
12
|
+
import { MenuRegistry, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
12
13
|
import { isCodeEditor, isDiffEditor } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser';
|
|
13
14
|
import { KeybindingsRegistry, KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
14
15
|
import { ATTACH_PROMPT_ACTION_ID } from '../../actions/chatAttachPromptAction/chatAttachPromptAction.js';
|
|
@@ -17,11 +18,9 @@ const COMMAND_ID = 'workbench.command.prompts.use';
|
|
|
17
18
|
const COMMAND_KEY_BINDING = KeyMod.CtrlCmd | KeyCode.Slash | KeyMod.Alt;
|
|
18
19
|
const command = async (accessor) => {
|
|
19
20
|
const commandService = accessor.get(ICommandService);
|
|
20
|
-
const viewsService = accessor.get(IViewsService);
|
|
21
21
|
const options = {
|
|
22
22
|
resource: getActivePromptUri(accessor),
|
|
23
23
|
widget: getFocusedChatWidget(accessor),
|
|
24
|
-
viewsService,
|
|
25
24
|
};
|
|
26
25
|
await commandService.executeCommand(ATTACH_PROMPT_ACTION_ID, options);
|
|
27
26
|
};
|
|
@@ -67,12 +66,15 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
67
66
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
68
67
|
primary: COMMAND_KEY_BINDING,
|
|
69
68
|
handler: command,
|
|
70
|
-
when: PromptsConfig.enabledCtx,
|
|
69
|
+
when: ( ContextKeyExpr.and(PromptsConfig.enabledCtx, ChatContextKeys.enabled)),
|
|
70
|
+
});
|
|
71
|
+
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
72
|
+
command: {
|
|
73
|
+
id: COMMAND_ID,
|
|
74
|
+
title: ( localize(4920, "Use Prompt")),
|
|
75
|
+
category: CHAT_CATEGORY
|
|
76
|
+
},
|
|
77
|
+
when: ( ContextKeyExpr.and(PromptsConfig.enabledCtx, ChatContextKeys.enabled))
|
|
71
78
|
});
|
|
72
|
-
appendToCommandPalette({
|
|
73
|
-
id: COMMAND_ID,
|
|
74
|
-
title: ( localize(4801, "Use Prompt")),
|
|
75
|
-
category: CHAT_CATEGORY,
|
|
76
|
-
}, PromptsConfig.enabledCtx);
|
|
77
79
|
|
|
78
80
|
export { COMMAND_ID, getActiveCodeEditor, getFocusedChatWidget };
|
package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js
CHANGED
|
@@ -13,7 +13,7 @@ import { ChatViewsWelcomeExtensions } from '@codingame/monaco-vscode-9a6d8b6c-ad
|
|
|
13
13
|
const chatViewsWelcomeExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
14
14
|
extensionPoint: 'chatViewsWelcome',
|
|
15
15
|
jsonSchema: {
|
|
16
|
-
description: ( localize(
|
|
16
|
+
description: ( localize(4922, 'Contributes a welcome message to a chat view')),
|
|
17
17
|
type: 'array',
|
|
18
18
|
items: {
|
|
19
19
|
additionalProperties: false,
|
|
@@ -21,22 +21,22 @@ const chatViewsWelcomeExtensionPoint = ExtensionsRegistry.registerExtensionPoint
|
|
|
21
21
|
properties: {
|
|
22
22
|
icon: {
|
|
23
23
|
type: 'string',
|
|
24
|
-
description: ( localize(
|
|
24
|
+
description: ( localize(4923, 'The icon for the welcome message.')),
|
|
25
25
|
},
|
|
26
26
|
title: {
|
|
27
27
|
type: 'string',
|
|
28
|
-
description: ( localize(
|
|
28
|
+
description: ( localize(4924, 'The title of the welcome message.')),
|
|
29
29
|
},
|
|
30
30
|
content: {
|
|
31
31
|
type: 'string',
|
|
32
32
|
description: ( localize(
|
|
33
|
-
|
|
33
|
+
4925,
|
|
34
34
|
'The content of the welcome message. The first command link will be rendered as a button.'
|
|
35
35
|
)),
|
|
36
36
|
},
|
|
37
37
|
when: {
|
|
38
38
|
type: 'string',
|
|
39
|
-
description: ( localize(
|
|
39
|
+
description: ( localize(4926, 'Condition when the welcome message is shown.')),
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
},
|
package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { DeferredPromise } from "@codingame/monaco-vscode-api/vscode/vs/base/common/async";
|
|
2
2
|
import { IMarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
|
|
3
|
-
import { IChatTerminalToolInvocationData, IChatToolInvocation, IChatToolInvocationSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
3
|
+
import { IChatTerminalToolInvocationData, IChatToolInputInvocationData, IChatToolInvocation, IChatToolInvocationSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
4
4
|
import { IPreparedToolInvocation, IToolConfirmationMessages, IToolData, IToolResult } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService";
|
|
5
5
|
export declare class ChatToolInvocation implements IChatToolInvocation {
|
|
6
|
+
readonly toolCallId: string;
|
|
6
7
|
readonly kind: "toolInvocation";
|
|
7
8
|
private _isComplete;
|
|
8
9
|
get isComplete(): boolean;
|
|
@@ -18,8 +19,9 @@ export declare class ChatToolInvocation implements IChatToolInvocation {
|
|
|
18
19
|
pastTenseMessage: string | IMarkdownString | undefined;
|
|
19
20
|
private _confirmationMessages;
|
|
20
21
|
readonly presentation: IPreparedToolInvocation["presentation"];
|
|
21
|
-
readonly
|
|
22
|
-
|
|
22
|
+
readonly toolId: string;
|
|
23
|
+
readonly toolSpecificData?: IChatTerminalToolInvocationData | IChatToolInputInvocationData;
|
|
24
|
+
constructor(preparedInvocation: IPreparedToolInvocation | undefined, toolData: IToolData, toolCallId: string);
|
|
23
25
|
complete(result: IToolResult | undefined): void;
|
|
24
26
|
get confirmationMessages(): IToolConfirmationMessages | undefined;
|
|
25
27
|
toJSON(): IChatToolInvocationSerialized;
|