@codingame/monaco-vscode-chat-service-override 13.1.7 → 14.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.
Files changed (78) hide show
  1. package/index.js +9 -9
  2. package/package.json +20 -20
  3. package/vscode/src/vs/base/common/objectCache.d.ts +13 -0
  4. package/vscode/src/vs/base/common/objectCache.js +39 -0
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +12 -5
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +95 -23
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +10 -1
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +81 -19
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +144 -66
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +4 -4
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +1 -1
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +6 -3
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +17 -11
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -6
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +8 -7
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +10 -10
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +11 -8
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +168 -167
  20. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +116 -54
  21. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +1 -1
  22. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.d.ts +11 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.js +34 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.d.ts +11 -11
  25. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.js +105 -70
  26. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +17 -16
  27. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +154 -83
  28. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +3 -3
  29. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +5 -5
  30. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +0 -4
  31. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +150 -130
  32. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +13 -7
  33. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
  34. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +1 -1
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +3 -3
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +1 -1
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +11 -6
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +449 -229
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +2 -2
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +2 -2
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +7 -6
  42. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
  43. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +1 -1
  44. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +2 -2
  45. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +11 -9
  46. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +7 -1
  47. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +76 -13
  48. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewSetup.css.js +1 -1
  49. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  50. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.d.ts +5 -18
  51. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.js +4 -122
  52. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +3 -1
  53. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +5 -4
  54. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +6 -3
  55. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +42 -11
  56. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.d.ts +13 -0
  57. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.js +49 -0
  58. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkProvider.d.ts +14 -0
  59. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkProvider.js +69 -0
  60. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.d.ts +10 -0
  61. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.js +24 -0
  62. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +73 -17
  63. package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.d.ts +11 -0
  64. package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.js +22 -0
  65. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +1 -1
  66. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -2
  67. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +9 -6
  68. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.d.ts +2 -2
  69. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.d.ts +2 -2
  70. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController2.d.ts +39 -0
  71. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController2.js +314 -0
  72. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +34 -19
  73. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.d.ts +0 -3
  74. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +0 -334
  75. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.d.ts +0 -31
  76. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +0 -46
  77. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.d.ts +0 -29
  78. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.js +0 -168
@@ -4,11 +4,11 @@ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codi
4
4
  import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
5
5
  import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
6
6
  import { isElectron } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
7
- import { dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
7
+ import { dirname, basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
8
8
  import { compare } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
9
9
  import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
10
10
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
11
- import { EditorType } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/editorCommon';
11
+ import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
12
12
  import { AbstractGotoSymbolQuickAccessProvider } from '@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common/vscode/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess';
13
13
  import { localize2, localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
14
14
  import { registerAction2, Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
@@ -16,11 +16,14 @@ import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platfo
16
16
  import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
17
17
  import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
18
18
  import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
19
+ import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
19
20
  import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
20
21
  import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
22
+ import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
21
23
  import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
22
- import { ActiveEditorContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
23
- import { DiffEditorInput } from '@codingame/monaco-vscode-5108c2c9-4ada-52d8-8c4b-fe03b3160e71-common/vscode/vs/workbench/common/editor/diffEditorInput';
24
+ import { ActiveEditorContext, TextCompareEditorActiveContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
25
+ import { EditorResourceAccessor, SideBySideEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
26
+ import { DiffEditorInput } from '@codingame/monaco-vscode-4a28f637-7c3c-5e48-a77c-1b7538b38850-common/vscode/vs/workbench/common/editor/diffEditorInput';
24
27
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
25
28
  import { isProposedApiEnabled } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions';
26
29
  import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
@@ -29,7 +32,8 @@ import { VIEW_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/servic
29
32
  import { UntitledTextEditorInput } from '@codingame/monaco-vscode-5945a5e2-a66c-5a82-bd2c-1965724b29eb-common/vscode/vs/workbench/services/untitled/common/untitledTextEditorInput';
30
33
  import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
31
34
  import { FileEditorInput } from '@codingame/monaco-vscode-5945a5e2-a66c-5a82-bd2c-1965724b29eb-common/vscode/vs/workbench/contrib/files/browser/editors/fileEditorInput';
32
- import { NotebookEditorInput } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
35
+ import { TEXT_FILE_EDITOR_ID } from '@codingame/monaco-vscode-eea37658-2307-56a5-8ed0-b2752c7b7a50-common/vscode/vs/workbench/contrib/files/common/files';
36
+ import { NotebookEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
33
37
  import { AnythingQuickAccessProvider } from '@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common/vscode/vs/workbench/contrib/search/browser/anythingQuickAccess';
34
38
  import { isSearchTreeFileMatch, isSearchTreeMatch } from '@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common/vscode/vs/workbench/contrib/search/browser/searchTreeModel/searchTreeCommon';
35
39
  import { SymbolsQuickAccessProvider } from '@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common/vscode/vs/workbench/contrib/search/browser/symbolsQuickAccess';
@@ -39,15 +43,18 @@ import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbe
39
43
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
40
44
  import { WorkingSetEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
41
45
  import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service';
42
- import { ChatRequestAgentPart } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
46
+ import { ChatRequestAgentPart } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
43
47
  import { IChatVariablesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatVariables.service';
44
48
  import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
45
- import { showChatView, showEditsView } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/chat';
49
+ import { PromptFilesConfig } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/promptSyntax/config';
50
+ import { PROMPT_SNIPPET_FILE_EXTENSION } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/promptContentsProviderBase';
51
+ import { showChatView, showEditsView } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
46
52
  import { IChatWidgetService, IQuickChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
47
53
  import { imageToHash, isImage } from '../chatPasteProviders.js';
48
54
  import { isQuickChat } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/browser/chatWidget';
49
- import { convertBufferToScreenshotVariable, ScreenshotVariableId } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/contrib/screenshot';
50
- import { CHAT_CATEGORY } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
55
+ import { convertBufferToScreenshotVariable, ScreenshotVariableId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/contrib/screenshot';
56
+ import { resizeImage } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/imageUtils';
57
+ import { CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
51
58
 
52
59
  function registerChatContextActions() {
53
60
  registerAction2(AttachContextAction);
@@ -88,9 +95,15 @@ function isRelatedFileQuickPickItem(obj) {
88
95
  return (typeof obj === 'object'
89
96
  && obj.kind === 'related-files');
90
97
  }
98
+ function isPromptInstructionsQuickPickItem(obj) {
99
+ if (!obj || typeof obj !== 'object') {
100
+ return false;
101
+ }
102
+ return ('kind' in obj && obj.kind === 'prompt-instructions');
103
+ }
91
104
  class AttachFileAction extends Action2 {
92
105
  getFiles(accessor, ...args) {
93
- const textEditorService = accessor.get(IEditorService);
106
+ const editorService = accessor.get(IEditorService);
94
107
  const contexts = Array.isArray(args[1]) ? args[1] : [args[0]];
95
108
  const files = [];
96
109
  for (const context of contexts) {
@@ -104,8 +117,8 @@ class AttachFileAction extends Action2 {
104
117
  else if (isSearchTreeMatch(context)) {
105
118
  uri = context.parent().resource;
106
119
  }
107
- else if (!context && textEditorService.activeTextEditorControl?.getEditorType() === EditorType.ICodeEditor) {
108
- uri = textEditorService.activeEditor?.resource;
120
+ else if (!context && editorService.activeTextEditorControl) {
121
+ uri = EditorResourceAccessor.getCanonicalUri(editorService.activeEditor, { supportSideBySide: SideBySideEditor.PRIMARY });
109
122
  }
110
123
  if (uri && [Schemas.file, Schemas.vscodeRemote, Schemas.untitled].includes(uri.scheme)) {
111
124
  files.push(uri);
@@ -119,15 +132,14 @@ class AttachFileToChatAction extends AttachFileAction {
119
132
  constructor() {
120
133
  super({
121
134
  id: AttachFileToChatAction.ID,
122
- title: ( localize2(4214, "Add File to Chat")),
135
+ title: ( localize2(4280, "Add File to Chat")),
123
136
  category: CHAT_CATEGORY,
124
137
  f1: false,
125
- precondition: ChatContextKeys.enabled,
138
+ precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)), TextCompareEditorActiveContext)))),
126
139
  menu: [{
127
140
  id: MenuId.ChatCommandCenter,
128
141
  group: 'b_chat_context',
129
- when: ( ActiveEditorContext.isEqualTo('workbench.editors.files.textFileEditor')),
130
- order: 10,
142
+ order: 15,
131
143
  }, {
132
144
  id: MenuId.SearchContext,
133
145
  group: 'z_chat',
@@ -151,15 +163,14 @@ class AttachSelectionToChatAction extends Action2 {
151
163
  constructor() {
152
164
  super({
153
165
  id: AttachSelectionToChatAction.ID,
154
- title: ( localize2(4215, "Add Selection to Chat")),
166
+ title: ( localize2(4281, "Add Selection to Chat")),
155
167
  category: CHAT_CATEGORY,
156
168
  f1: false,
157
- precondition: ChatContextKeys.enabled,
169
+ precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)), TextCompareEditorActiveContext)))),
158
170
  menu: [{
159
171
  id: MenuId.ChatCommandCenter,
160
172
  group: 'b_chat_context',
161
- when: ( ActiveEditorContext.isEqualTo('workbench.editors.files.textFileEditor')),
162
- order: 15,
173
+ order: 10,
163
174
  }, {
164
175
  id: MenuId.SearchContext,
165
176
  group: 'z_chat',
@@ -169,7 +180,7 @@ class AttachSelectionToChatAction extends Action2 {
169
180
  }
170
181
  async run(accessor, ...args) {
171
182
  const variablesService = accessor.get(IChatVariablesService);
172
- const textEditorService = accessor.get(IEditorService);
183
+ const editorService = accessor.get(IEditorService);
173
184
  const [_, matches] = args;
174
185
  if (matches && matches.length > 0) {
175
186
  const uris = ( new Map());
@@ -195,13 +206,14 @@ class AttachSelectionToChatAction extends Action2 {
195
206
  }
196
207
  }
197
208
  else {
198
- const activeEditor = textEditorService.activeTextEditorControl;
199
- const activeUri = textEditorService.activeEditor?.resource;
200
- if (textEditorService.activeTextEditorControl?.getEditorType() === EditorType.ICodeEditor && activeUri && [Schemas.file, Schemas.vscodeRemote, Schemas.untitled].includes(activeUri.scheme)) {
209
+ const activeEditor = editorService.activeTextEditorControl;
210
+ const activeUri = EditorResourceAccessor.getCanonicalUri(editorService.activeEditor, { supportSideBySide: SideBySideEditor.PRIMARY });
211
+ if (editorService.activeTextEditorControl && activeUri && [Schemas.file, Schemas.vscodeRemote, Schemas.untitled].includes(activeUri.scheme)) {
201
212
  const selection = activeEditor?.getSelection();
202
213
  if (selection) {
203
214
  (await showChatView(accessor.get(IViewsService)))?.focusInput();
204
- variablesService.attachContext('file', { uri: activeUri, range: selection }, ChatAgentLocation.Panel);
215
+ const range = selection.isEmpty() ? ( new Range(selection.startLineNumber, 1, selection.startLineNumber + 1, 1)) : selection;
216
+ variablesService.attachContext('file', { uri: activeUri, range }, ChatAgentLocation.Panel);
205
217
  }
206
218
  }
207
219
  }
@@ -212,15 +224,14 @@ class AttachFileToEditingSessionAction extends AttachFileAction {
212
224
  constructor() {
213
225
  super({
214
226
  id: AttachFileToEditingSessionAction.ID,
215
- title: ( localize2(4216, "Add File to {0}", 'Copilot Edits')),
227
+ title: ( localize2(4282, "Add File to {0}", 'Copilot Edits')),
216
228
  category: CHAT_CATEGORY,
217
229
  f1: false,
218
- precondition: ChatContextKeys.enabled,
230
+ precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)), TextCompareEditorActiveContext)))),
219
231
  menu: [{
220
232
  id: MenuId.ChatCommandCenter,
221
233
  group: 'c_edits_context',
222
- when: ( ActiveEditorContext.isEqualTo('workbench.editors.files.textFileEditor')),
223
- order: 10,
234
+ order: 15,
224
235
  }, {
225
236
  id: MenuId.SearchContext,
226
237
  group: 'z_chat',
@@ -244,27 +255,28 @@ class AttachSelectionToEditingSessionAction extends Action2 {
244
255
  constructor() {
245
256
  super({
246
257
  id: AttachSelectionToEditingSessionAction.ID,
247
- title: ( localize2(4217, "Add Selection to {0}", 'Copilot Edits')),
258
+ title: ( localize2(4283, "Add Selection to {0}", 'Copilot Edits')),
248
259
  category: CHAT_CATEGORY,
249
260
  f1: false,
250
- precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ActiveEditorContext.isEqualTo('workbench.editors.files.textFileEditor')))),
261
+ precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)), TextCompareEditorActiveContext)))),
251
262
  menu: {
252
263
  id: MenuId.ChatCommandCenter,
253
264
  group: 'c_edits_context',
254
- order: 15,
265
+ order: 10,
255
266
  }
256
267
  });
257
268
  }
258
269
  async run(accessor, ...args) {
259
270
  const variablesService = accessor.get(IChatVariablesService);
260
- const textEditorService = accessor.get(IEditorService);
261
- const activeEditor = textEditorService.activeTextEditorControl;
262
- const activeUri = textEditorService.activeEditor?.resource;
263
- if (textEditorService.activeTextEditorControl?.getEditorType() === EditorType.ICodeEditor && activeUri && [Schemas.file, Schemas.vscodeRemote, Schemas.untitled].includes(activeUri.scheme)) {
271
+ const editorService = accessor.get(IEditorService);
272
+ const activeEditor = editorService.activeTextEditorControl;
273
+ const activeUri = EditorResourceAccessor.getCanonicalUri(editorService.activeEditor, { supportSideBySide: SideBySideEditor.PRIMARY });
274
+ if (editorService.activeTextEditorControl && activeUri && [Schemas.file, Schemas.vscodeRemote, Schemas.untitled].includes(activeUri.scheme)) {
264
275
  const selection = activeEditor?.getSelection();
265
276
  if (selection) {
266
277
  (await showEditsView(accessor.get(IViewsService)))?.focusInput();
267
- variablesService.attachContext('file', { uri: activeUri, range: selection }, ChatAgentLocation.EditingSession);
278
+ const range = selection.isEmpty() ? ( new Range(selection.startLineNumber, 1, selection.startLineNumber + 1, 1)) : selection;
279
+ variablesService.attachContext('file', { uri: activeUri, range }, ChatAgentLocation.EditingSession);
268
280
  }
269
281
  }
270
282
  }
@@ -274,7 +286,7 @@ class AttachContextAction extends Action2 {
274
286
  static { this._cdt = ( ContextKeyExpr.or(( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Panel)))), ( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Editor)))), ( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Notebook)))), ( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Terminal)))))); }
275
287
  constructor(desc = {
276
288
  id: AttachContextAction.ID,
277
- title: ( localize2(4218, "Attach Context")),
289
+ title: ( localize2(4284, "Attach Context")),
278
290
  icon: Codicon.attach,
279
291
  category: CHAT_CATEGORY,
280
292
  precondition: ( ContextKeyExpr.or(AttachContextAction._cdt, ( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.EditingSession)))))),
@@ -308,7 +320,7 @@ class AttachContextAction extends Action2 {
308
320
  `:${item.range.startLineNumber}-${item.range.endLineNumber}` :
309
321
  `:${item.range.startLineNumber}`);
310
322
  }
311
- async _attachContext(widget, quickInputService, commandService, clipboardService, editorService, labelService, viewsService, chatEditingService, hostService, isInBackground, ...picks) {
323
+ async _attachContext(widget, quickInputService, commandService, clipboardService, editorService, labelService, viewsService, chatEditingService, hostService, fileService, openerService, isInBackground, ...picks) {
312
324
  const toAttach = [];
313
325
  for (const pick of picks) {
314
326
  if (isISymbolQuickPickItem(pick) && pick.symbol) {
@@ -324,14 +336,18 @@ class AttachContextAction extends Action2 {
324
336
  }
325
337
  else if (isIQuickPickItemWithResource(pick) && pick.resource) {
326
338
  if (/\.(png|jpg|jpeg|bmp|gif|tiff)$/i.test(pick.resource.path)) {
327
- toAttach.push({
328
- id: ( pick.resource.toString()),
329
- name: pick.label,
330
- fullName: pick.label,
331
- value: pick.resource,
332
- isDynamic: true,
333
- isImage: true
334
- });
339
+ if (URI.isUri(pick.resource)) {
340
+ const readFile = await fileService.readFile(pick.resource);
341
+ const resizedImage = await resizeImage(readFile.value.buffer);
342
+ toAttach.push({
343
+ id: ( pick.resource.toString()),
344
+ name: pick.label,
345
+ fullName: pick.label,
346
+ value: resizedImage,
347
+ isDynamic: true,
348
+ isImage: true
349
+ });
350
+ }
335
351
  }
336
352
  else {
337
353
  if (chatEditingService) {
@@ -419,7 +435,7 @@ class AttachContextAction extends Action2 {
419
435
  }
420
436
  return acc;
421
437
  }, []));
422
- const selectedFiles = await quickInputService.pick(itemsPromise, { placeHolder: ( localize(4219, 'Add related files to your working set')), canPickMany: true });
438
+ const selectedFiles = await quickInputService.pick(itemsPromise, { placeHolder: ( localize(4285, 'Add related files to your working set')), canPickMany: true });
423
439
  for (const file of selectedFiles ?? []) {
424
440
  chatEditingService?.currentEditingSessionObs.get()?.addFileToWorkingSet(file.value);
425
441
  }
@@ -430,6 +446,14 @@ class AttachContextAction extends Action2 {
430
446
  toAttach.push(convertBufferToScreenshotVariable(blob));
431
447
  }
432
448
  }
449
+ else if (isPromptInstructionsQuickPickItem(pick)) {
450
+ await selectPromptAttachment({
451
+ widget,
452
+ quickInputService,
453
+ labelService,
454
+ openerService,
455
+ });
456
+ }
433
457
  else {
434
458
  const attachmentPick = pick;
435
459
  if (attachmentPick.kind === 'command') {
@@ -459,8 +483,8 @@ class AttachContextAction extends Action2 {
459
483
  const fileBuffer = await clipboardService.readImage();
460
484
  toAttach.push({
461
485
  id: await imageToHash(fileBuffer),
462
- name: ( localize(4220, 'Pasted Image')),
463
- fullName: ( localize(4220, 'Pasted Image')),
486
+ name: ( localize(4286, 'Pasted Image')),
487
+ fullName: ( localize(4286, 'Pasted Image')),
464
488
  value: fileBuffer,
465
489
  isDynamic: true,
466
490
  isImage: true
@@ -498,6 +522,8 @@ class AttachContextAction extends Action2 {
498
522
  const viewsService = accessor.get(IViewsService);
499
523
  const hostService = accessor.get(IHostService);
500
524
  const extensionService = accessor.get(IExtensionService);
525
+ const fileService = accessor.get(IFileService);
526
+ const openerService = accessor.get(IOpenerService);
501
527
  const context = args[0];
502
528
  const widget = context?.widget ?? widgetService.lastFocusedWidget;
503
529
  if (!widget) {
@@ -525,7 +551,7 @@ class AttachContextAction extends Action2 {
525
551
  quickPickItems.push({
526
552
  kind: 'image',
527
553
  id: await imageToHash(imageData),
528
- label: ( localize(4221, 'Image from Clipboard')),
554
+ label: ( localize(4287, 'Image from Clipboard')),
529
555
  iconClass: ThemeIcon.asClassName(Codicon.fileMedia),
530
556
  });
531
557
  }
@@ -535,8 +561,8 @@ class AttachContextAction extends Action2 {
535
561
  icon: ThemeIcon.fromId(Codicon.deviceCamera.id),
536
562
  iconClass: ThemeIcon.asClassName(Codicon.deviceCamera),
537
563
  label: (isElectron
538
- ? ( localize(4222, 'Screenshot Window'))
539
- : ( localize(4223, 'Screenshot'))),
564
+ ? ( localize(4288, 'Screenshot Window'))
565
+ : ( localize(4289, 'Screenshot'))),
540
566
  });
541
567
  }
542
568
  if (widget.viewModel?.sessionId) {
@@ -579,7 +605,7 @@ class AttachContextAction extends Action2 {
579
605
  }
580
606
  quickPickItems.push({
581
607
  kind: 'quickaccess',
582
- label: ( localize(4224, 'Symbol...')),
608
+ label: ( localize(4290, 'Symbol...')),
583
609
  iconClass: ThemeIcon.asClassName(Codicon.symbolField),
584
610
  prefix: SymbolsQuickAccessProvider.PREFIX,
585
611
  id: 'symbol'
@@ -592,10 +618,10 @@ class AttachContextAction extends Action2 {
592
618
  icon: ThemeIcon.fromId(Codicon.serverEnvironment.id),
593
619
  iconClass: ThemeIcon.asClassName(Codicon.serverEnvironment),
594
620
  value: 'kernelVariable',
595
- label: ( localize(4225, 'Kernel Variable...')),
621
+ label: ( localize(4291, 'Kernel Variable...')),
596
622
  command: {
597
623
  id: 'notebook.chat.selectAndInsertKernelVariable',
598
- title: ( localize(4226, 'Select and Insert Kernel Variable')),
624
+ title: ( localize(4292, 'Select and Insert Kernel Variable')),
599
625
  arguments: [{ widget, range: undefined }]
600
626
  }
601
627
  });
@@ -606,7 +632,7 @@ class AttachContextAction extends Action2 {
606
632
  quickPickItems.push({
607
633
  kind: 'related-files',
608
634
  id: 'related-files',
609
- label: ( localize(4227, 'Related Files')),
635
+ label: ( localize(4293, 'Related Files')),
610
636
  iconClass: ThemeIcon.asClassName(Codicon.sparkle),
611
637
  });
612
638
  }
@@ -614,7 +640,7 @@ class AttachContextAction extends Action2 {
614
640
  quickPickItems.push({
615
641
  kind: 'open-editors',
616
642
  id: 'open-editors',
617
- label: ( localize(4228, 'Open Editors')),
643
+ label: ( localize(4294, 'Open Editors')),
618
644
  iconClass: ThemeIcon.asClassName(Codicon.files),
619
645
  });
620
646
  }
@@ -622,11 +648,19 @@ class AttachContextAction extends Action2 {
622
648
  quickPickItems.push({
623
649
  kind: 'search-results',
624
650
  id: 'search-results',
625
- label: ( localize(4229, 'Search Results')),
651
+ label: ( localize(4295, 'Search Results')),
626
652
  iconClass: ThemeIcon.asClassName(Codicon.search),
627
653
  });
628
654
  }
629
655
  }
656
+ if (widget.attachmentModel.promptInstructions.featureEnabled) {
657
+ quickPickItems.push({
658
+ kind: 'prompt-instructions',
659
+ id: 'prompt-instructions',
660
+ label: ( localize(4296, 'Prompt...')),
661
+ iconClass: ThemeIcon.asClassName(Codicon.bookmark),
662
+ });
663
+ }
630
664
  function extractTextFromIconLabel(label) {
631
665
  if (!label) {
632
666
  return '';
@@ -638,19 +672,19 @@ class AttachContextAction extends Action2 {
638
672
  const first = extractTextFromIconLabel(a.label).toUpperCase();
639
673
  const second = extractTextFromIconLabel(b.label).toUpperCase();
640
674
  return compare(first, second);
641
- }), clipboardService, editorService, labelService, viewsService, chatEditingService, hostService, '', context?.placeholder);
675
+ }), clipboardService, editorService, labelService, viewsService, chatEditingService, hostService, fileService, openerService, '', context?.placeholder);
642
676
  }
643
- _show(quickInputService, commandService, widget, quickChatService, quickPickItems, clipboardService, editorService, labelService, viewsService, chatEditingService, hostService, query = '', placeholder) {
677
+ _show(quickInputService, commandService, widget, quickChatService, quickPickItems, clipboardService, editorService, labelService, viewsService, chatEditingService, hostService, fileService, openerService, query = '', placeholder) {
644
678
  const providerOptions = {
645
679
  handleAccept: (item, isBackgroundAccept) => {
646
680
  if ('prefix' in item) {
647
- this._show(quickInputService, commandService, widget, quickChatService, quickPickItems, clipboardService, editorService, labelService, viewsService, chatEditingService, hostService, item.prefix, placeholder);
681
+ this._show(quickInputService, commandService, widget, quickChatService, quickPickItems, clipboardService, editorService, labelService, viewsService, chatEditingService, hostService, fileService, openerService, item.prefix, placeholder);
648
682
  }
649
683
  else {
650
684
  if (!clipboardService) {
651
685
  return;
652
686
  }
653
- this._attachContext(widget, quickInputService, commandService, clipboardService, editorService, labelService, viewsService, chatEditingService, hostService, isBackgroundAccept, item);
687
+ this._attachContext(widget, quickInputService, commandService, clipboardService, editorService, labelService, viewsService, chatEditingService, hostService, fileService, openerService, isBackgroundAccept, item);
654
688
  if (isQuickChat(widget)) {
655
689
  quickChatService.open();
656
690
  }
@@ -699,7 +733,7 @@ class AttachContextAction extends Action2 {
699
733
  SymbolsQuickAccessProvider.PREFIX,
700
734
  AbstractGotoSymbolQuickAccessProvider.PREFIX
701
735
  ],
702
- placeholder: placeholder ?? ( localize(4230, 'Search attachments')),
736
+ placeholder: placeholder ?? ( localize(4297, 'Search attachments')),
703
737
  providerOptions,
704
738
  });
705
739
  }
@@ -708,7 +742,7 @@ registerAction2(class AttachFilesAction extends AttachContextAction {
708
742
  constructor() {
709
743
  super({
710
744
  id: 'workbench.action.chat.editing.attachFiles',
711
- title: ( localize2(4231, "Add Files to Working Set")),
745
+ title: ( localize2(4298, "Add Files to Working Set")),
712
746
  f1: false,
713
747
  category: CHAT_CATEGORY,
714
748
  precondition: ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.EditingSession))
@@ -716,9 +750,53 @@ registerAction2(class AttachFilesAction extends AttachContextAction {
716
750
  }
717
751
  async run(accessor, ...args) {
718
752
  const context = args[0];
719
- const attachFilesContext = { ...context, showFilesOnly: true, placeholder: ( localize(4232, 'Search for files to add to your working set')) };
753
+ const attachFilesContext = { ...context, showFilesOnly: true, placeholder: ( localize(4299, 'Search for files to add to your working set')) };
720
754
  return super.run(accessor, attachFilesContext);
721
755
  }
722
756
  });
757
+ const selectPromptAttachment = async (options) => {
758
+ const { widget, quickInputService, labelService, openerService } = options;
759
+ const { promptInstructions } = widget.attachmentModel;
760
+ const files = await promptInstructions.listNonAttachedFiles()
761
+ .then((files) => {
762
+ return ( files.map((file) => {
763
+ const fileBasename = basename(file);
764
+ const fileWithoutExtension = fileBasename.replace(PROMPT_SNIPPET_FILE_EXTENSION, '');
765
+ const result = {
766
+ type: 'item',
767
+ label: fileWithoutExtension,
768
+ description: labelService.getUriLabel(dirname(file), { relative: true }),
769
+ tooltip: file.fsPath,
770
+ value: file,
771
+ };
772
+ return result;
773
+ }));
774
+ });
775
+ if (files.length === 0) {
776
+ const docsQuickPick = {
777
+ type: 'item',
778
+ label: ( localize(4300, 'Learn how create reusable prompts')),
779
+ description: PromptFilesConfig.DOCUMENTATION_URL,
780
+ tooltip: PromptFilesConfig.DOCUMENTATION_URL,
781
+ value: ( URI.parse(PromptFilesConfig.DOCUMENTATION_URL)),
782
+ };
783
+ const result = await quickInputService.pick([docsQuickPick], {
784
+ placeHolder: ( localize(4301, 'No prompt files found.')),
785
+ canPickMany: false,
786
+ });
787
+ if (!result) {
788
+ return;
789
+ }
790
+ await openerService.open(result.value);
791
+ return;
792
+ }
793
+ const selectedFile = await quickInputService.pick(files, {
794
+ placeHolder: ( localize(4302, 'Select a prompt file')),
795
+ canPickMany: false,
796
+ });
797
+ if (selectedFile) {
798
+ promptInstructions.add(selectedFile.value);
799
+ }
800
+ };
723
801
 
724
802
  export { AttachContextAction, registerChatContextActions };
@@ -2,17 +2,17 @@
2
2
  import { localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
3
3
  import { registerAction2, Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
4
4
  import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service';
5
- import { CHAT_CATEGORY, stringifyItem } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
5
+ import { CHAT_CATEGORY, stringifyItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
6
6
  import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
7
7
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
8
- import { isRequestVM, isResponseVM } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatViewModel';
8
+ import { isRequestVM, isResponseVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatViewModel';
9
9
 
10
10
  function registerChatCopyActions() {
11
11
  registerAction2(class CopyAllAction extends Action2 {
12
12
  constructor() {
13
13
  super({
14
14
  id: 'workbench.action.chat.copyAll',
15
- title: ( localize2(4233, "Copy All")),
15
+ title: ( localize2(4303, "Copy All")),
16
16
  f1: false,
17
17
  category: CHAT_CATEGORY,
18
18
  menu: {
@@ -42,7 +42,7 @@ function registerChatCopyActions() {
42
42
  constructor() {
43
43
  super({
44
44
  id: 'workbench.action.chat.copyItem',
45
- title: ( localize2(4234, "Copy")),
45
+ title: ( localize2(4304, "Copy")),
46
46
  f1: false,
47
47
  category: CHAT_CATEGORY,
48
48
  menu: {
@@ -13,7 +13,7 @@ class LogChatInputHistoryAction extends Action2 {
13
13
  constructor() {
14
14
  super({
15
15
  id: LogChatInputHistoryAction.ID,
16
- title: ( localize2(4235, "Log Chat Input History")),
16
+ title: ( localize2(4305, "Log Chat Input History")),
17
17
  icon: Codicon.attach,
18
18
  category: Categories.Developer,
19
19
  f1: true
@@ -3,17 +3,17 @@ import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/com
3
3
  import { localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
4
  import { registerAction2, Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
5
5
  import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
6
- import { CHAT_CATEGORY } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
6
+ import { CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
7
7
  import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
8
8
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
9
- import { isResponseVM } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatViewModel';
9
+ import { isResponseVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatViewModel';
10
10
 
11
11
  function registerChatFileTreeActions() {
12
12
  registerAction2(class NextFileTreeAction extends Action2 {
13
13
  constructor() {
14
14
  super({
15
15
  id: 'workbench.action.chat.nextFileTree',
16
- title: ( localize2(4248, "Next File Tree")),
16
+ title: ( localize2(4327, "Next File Tree")),
17
17
  keybinding: {
18
18
  primary: KeyMod.CtrlCmd | KeyCode.F9,
19
19
  weight: KeybindingWeight.WorkbenchContrib,
@@ -32,7 +32,7 @@ function registerChatFileTreeActions() {
32
32
  constructor() {
33
33
  super({
34
34
  id: 'workbench.action.chat.previousFileTree',
35
- title: ( localize2(4249, "Previous File Tree")),
35
+ title: ( localize2(4328, "Previous File Tree")),
36
36
  keybinding: {
37
37
  primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.F9,
38
38
  weight: KeybindingWeight.WorkbenchContrib,
@@ -1,23 +1,26 @@
1
1
  import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
2
2
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
3
  import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
4
- import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
5
4
  import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
6
5
  import { IExtensionManagementService } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service";
7
6
  import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
8
7
  import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service";
9
8
  import { IWorkbenchLayoutService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service";
9
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
10
+ import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service";
10
11
  export declare class ChatGettingStartedContribution extends Disposable implements IWorkbenchContribution {
11
12
  private readonly productService;
12
13
  private readonly extensionService;
13
- private readonly commandService;
14
+ private readonly viewsService;
14
15
  private readonly extensionManagementService;
15
16
  private readonly storageService;
16
17
  private readonly viewDescriptorService;
17
18
  private readonly layoutService;
19
+ private readonly configurationService;
18
20
  static readonly ID = "workbench.contrib.chatGettingStarted";
19
21
  private recentlyInstalled;
20
22
  private static readonly hideWelcomeView;
21
- constructor(productService: IProductService, extensionService: IExtensionService, commandService: ICommandService, extensionManagementService: IExtensionManagementService, storageService: IStorageService, viewDescriptorService: IViewDescriptorService, layoutService: IWorkbenchLayoutService);
23
+ constructor(productService: IProductService, extensionService: IExtensionService, viewsService: IViewsService, extensionManagementService: IExtensionManagementService, storageService: IStorageService, viewDescriptorService: IViewDescriptorService, layoutService: IWorkbenchLayoutService, configurationService: IConfigurationService);
22
24
  private registerListeners;
25
+ private onDidInstallChat;
23
26
  }