@codingame/monaco-vscode-chat-service-override 11.1.2 → 12.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 (110) hide show
  1. package/index.d.ts +2 -1
  2. package/index.js +64 -1
  3. package/package.json +32 -13
  4. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +21 -0
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +73 -60
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.d.ts +3 -0
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +73 -81
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +9 -0
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +73 -112
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +12 -0
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +253 -101
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.d.ts +1 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +8 -8
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.d.ts +1 -0
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -1
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.d.ts +1 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +16 -14
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +23 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +30 -11
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.d.ts +1 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +12 -12
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.d.ts +1 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +22 -20
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.d.ts +2 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +23 -20
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +52 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +50 -47
  28. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.d.ts +1 -0
  29. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +124 -95
  30. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +17 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +6 -3
  32. package/vscode/src/vs/workbench/contrib/chat/browser/chatEdinputInputContentProvider.d.ts +12 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/chatEdinputInputContentProvider.js +30 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.d.ts +69 -0
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.js +203 -182
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +103 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +458 -165
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +42 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +14 -10
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +26 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/{chatParticipantContributions.js → chatParticipant.contribution.js} +101 -92
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.d.ts +42 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +164 -25
  44. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +26 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +6 -5
  46. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +30 -0
  47. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +10 -7
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +17 -0
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +941 -0
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +26 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +9 -6
  52. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +54 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +32 -15
  54. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +9 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.js +1 -0
  56. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.d.ts +1 -0
  57. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +8 -6
  58. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.d.ts +26 -0
  59. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +16 -19
  60. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.d.ts +15 -0
  61. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +108 -0
  62. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/editorHoverWrapper.d.ts +7 -0
  63. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/editorHoverWrapper.js +3 -8
  64. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/media/editorHoverWrapper.css.js +1 -1
  65. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +31 -0
  66. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +70 -49
  67. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewSetup.css.js +6 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.d.ts +7 -0
  69. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/{chatViewsWelcomeContributions.js → chatViewsWelcomeHandler.js} +13 -13
  70. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.d.ts +44 -0
  71. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.js +3 -1
  72. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +22 -0
  73. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +1 -0
  74. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +80 -0
  75. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +152 -104
  76. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.d.ts +8 -0
  77. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.js +2 -1
  78. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +41 -0
  79. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +2 -1
  80. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.d.ts +31 -0
  81. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +6 -4
  82. package/vscode/src/vs/workbench/contrib/chat/common/ignoredFiles.d.ts +13 -0
  83. package/vscode/src/vs/workbench/contrib/chat/common/ignoredFiles.js +1 -0
  84. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +24 -0
  85. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +23 -21
  86. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +1 -0
  87. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +1 -0
  88. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +39 -0
  89. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +20 -19
  90. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.service.d.ts +7 -0
  91. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.d.ts +1 -0
  92. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +30 -33
  93. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.d.ts +10 -0
  94. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +6 -4
  95. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.d.ts +10 -0
  96. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +9 -7
  97. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.d.ts +44 -0
  98. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +247 -83
  99. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.d.ts +8 -0
  100. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +5 -4
  101. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.d.ts +29 -0
  102. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.js +35 -35
  103. package/chat.js +0 -59
  104. package/vscode/src/vs/editor/common/diff/documentDiffProvider.js +0 -8
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +0 -326
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +0 -76
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorActions.js +0 -110
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorController.js +0 -287
  109. package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.js +0 -130
  110. package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +0 -172
@@ -0,0 +1,42 @@
1
+ import * as dom from "vscode/vscode/vs/base/browser/dom";
2
+ import { CancellationToken } from "vscode/vscode/vs/base/common/cancellation";
3
+ import { IScopedContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey";
4
+ import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
5
+ import { IEditorOptions } from "vscode/vscode/vs/platform/editor/common/editor";
6
+ import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
7
+ import { IStorageService } from "vscode/vscode/vs/platform/storage/common/storage.service";
8
+ import { ITelemetryService } from "vscode/vscode/vs/platform/telemetry/common/telemetry.service";
9
+ import { IThemeService } from "vscode/vscode/vs/platform/theme/common/themeService.service";
10
+ import { EditorPane } from "@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/browser/parts/editor/editorPane";
11
+ import { IEditorOpenContext } from "vscode/vscode/vs/workbench/common/editor";
12
+ import { ChatEditorInput } from "@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput";
13
+ import { IExportableChatData, ISerializableChatData } from "@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatModel";
14
+ import { IEditorGroup } from "vscode/vscode/vs/workbench/services/editor/common/editorGroupsService";
15
+ export interface IChatEditorOptions extends IEditorOptions {
16
+ target?: {
17
+ sessionId: string;
18
+ } | {
19
+ data: IExportableChatData | ISerializableChatData;
20
+ };
21
+ }
22
+ export declare class ChatEditor extends EditorPane {
23
+ private readonly instantiationService;
24
+ private readonly storageService;
25
+ private readonly contextKeyService;
26
+ private widget;
27
+ private _scopedContextKeyService;
28
+ get scopedContextKeyService(): IScopedContextKeyService;
29
+ private _memento;
30
+ private _viewState;
31
+ constructor(group: IEditorGroup, telemetryService: ITelemetryService, themeService: IThemeService, instantiationService: IInstantiationService, storageService: IStorageService, contextKeyService: IContextKeyService);
32
+ private clear;
33
+ protected createEditor(parent: HTMLElement): void;
34
+ protected setEditorVisible(visible: boolean): void;
35
+ focus(): void;
36
+ clearInput(): void;
37
+ setInput(input: ChatEditorInput, options: IChatEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise<void>;
38
+ private updateModel;
39
+ protected saveState(): void;
40
+ getViewState(): object | undefined;
41
+ layout(dimension: dom.Dimension, position?: dom.IDomPosition | undefined): void;
42
+ }
@@ -1,7 +1,9 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
3
4
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
4
5
  import { ServiceCollection } from 'vscode/vscode/vs/platform/instantiation/common/serviceCollection';
6
+ import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
5
7
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
6
8
  import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
7
9
  import 'vscode/vscode/vs/platform/theme/common/colorUtils';
@@ -16,13 +18,13 @@ import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
16
18
  import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
17
19
  import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
18
20
  import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
19
- import { EditorPane } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorPane';
20
- import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
21
- import { clearChatEditor } from '@codingame/monaco-vscode-chat-extensions-interactive-notebook-search-terminal-common/vscode/vs/workbench/contrib/chat/browser/actions/chatClear';
22
- import { ChatEditorInput } from '@codingame/monaco-vscode-chat-extensions-interactive-notebook-search-terminal-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
23
- import { ChatWidget } from '@codingame/monaco-vscode-chat-notebook-common/vscode/vs/workbench/contrib/chat/browser/chatWidget';
21
+ import { EditorPane } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/browser/parts/editor/editorPane';
22
+ import { Memento } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/common/memento';
23
+ import { clearChatEditor } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/actions/chatClear';
24
+ import { ChatEditorInput } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
25
+ import { ChatWidget } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/browser/chatWidget';
24
26
  import { ChatAgentLocation } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents';
25
- import { CHAT_PROVIDER_ID } from '@codingame/monaco-vscode-chat-extensions-interactive-notebook-search-terminal-common/vscode/vs/workbench/contrib/chat/common/chatParticipantContribTypes';
27
+ import { CHAT_PROVIDER_ID } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatParticipantContribTypes';
26
28
  import { EDITOR_DRAG_AND_DROP_BACKGROUND } from 'vscode/vscode/vs/workbench/common/theme';
27
29
 
28
30
  let ChatEditor = class ChatEditor extends EditorPane {
@@ -43,7 +45,10 @@ let ChatEditor = class ChatEditor extends EditorPane {
43
45
  createEditor(parent) {
44
46
  this._scopedContextKeyService = this._register(this.contextKeyService.createScoped(parent));
45
47
  const scopedInstantiationService = this._register(this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, this.scopedContextKeyService]))));
46
- this.widget = this._register(scopedInstantiationService.createInstance(ChatWidget, ChatAgentLocation.Panel, undefined, { supportsFileReferences: true }, {
48
+ this.widget = this._register(scopedInstantiationService.createInstance(ChatWidget, ChatAgentLocation.Panel, undefined, {
49
+ supportsFileReferences: true,
50
+ enableImplicitContext: true
51
+ }, {
47
52
  listForeground: editorForeground,
48
53
  listBackground: editorBackground,
49
54
  overlayBackground: EDITOR_DRAG_AND_DROP_BACKGROUND,
@@ -79,7 +84,7 @@ let ChatEditor = class ChatEditor extends EditorPane {
79
84
  }
80
85
  updateModel(model, viewState) {
81
86
  this._memento = ( new Memento('interactive-session-editor-' + CHAT_PROVIDER_ID, this.storageService));
82
- this._viewState = viewState ?? this._memento.getMemento(1 , 1 );
87
+ this._viewState = viewState ?? this._memento.getMemento(StorageScope.WORKSPACE, StorageTarget.MACHINE);
83
88
  this.widget.setModel(model, { ...this._viewState });
84
89
  }
85
90
  saveState() {
@@ -87,7 +92,6 @@ let ChatEditor = class ChatEditor extends EditorPane {
87
92
  if (this._memento && this._viewState) {
88
93
  const widgetViewState = this.widget.getViewState();
89
94
  this._viewState.inputValue = widgetViewState.inputValue;
90
- this._viewState.selectedLanguageModelId = widgetViewState.selectedLanguageModelId;
91
95
  this._memento.saveMemento();
92
96
  }
93
97
  }
@@ -0,0 +1,26 @@
1
+ import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
2
+ import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
3
+ import { ILogService } from "vscode/vscode/vs/platform/log/common/log.service";
4
+ import { IProductService } from "vscode/vscode/vs/platform/product/common/productService.service";
5
+ import { IWorkbenchContribution } from "vscode/vscode/vs/workbench/common/contributions";
6
+ import { IExtensionsWorkbenchService } from "vscode/vscode/vs/workbench/contrib/extensions/common/extensions.service";
7
+ import { IChatAgentService } from "vscode/vscode/vs/workbench/contrib/chat/common/chatAgents.service";
8
+ export declare class ChatExtensionPointHandler implements IWorkbenchContribution {
9
+ private readonly _chatAgentService;
10
+ private readonly logService;
11
+ static readonly ID = "workbench.contrib.chatExtensionPointHandler";
12
+ private _viewContainer;
13
+ private _participantRegistrationDisposables;
14
+ constructor(_chatAgentService: IChatAgentService, logService: ILogService);
15
+ private handleAndRegisterChatExtensions;
16
+ private registerViewContainer;
17
+ private registerDefaultParticipantView;
18
+ private registerChatEditingView;
19
+ }
20
+ export declare class ChatCompatibilityNotifier extends Disposable implements IWorkbenchContribution {
21
+ private readonly productService;
22
+ static readonly ID = "workbench.contrib.chatCompatNotifier";
23
+ private registeredWelcomeView;
24
+ constructor(extensionsWorkbenchService: IExtensionsWorkbenchService, contextKeyService: IContextKeyService, productService: IProductService);
25
+ private registerWelcomeView;
26
+ }
@@ -1,33 +1,36 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import { isNonEmptyArray, coalesce } from 'vscode/vscode/vs/base/common/arrays';
3
4
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
4
5
  import { toErrorMessage } from 'vscode/vscode/vs/base/common/errorMessage';
5
6
  import { Event } from 'vscode/vscode/vs/base/common/event';
7
+ import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
6
8
  import { DisposableMap, DisposableStore, toDisposable, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
7
9
  import { AmbiguousCharacters, InvisibleCharacters } from 'vscode/vscode/vs/base/common/strings';
8
10
  import { localize, localize2 } from 'vscode/vscode/vs/nls';
9
11
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
10
12
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
13
+ import { ExtensionIdentifier } from 'vscode/vscode/vs/platform/extensions/common/extensions';
11
14
  import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
12
15
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
13
16
  import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
14
17
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
15
- import { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
16
- import { Extensions } from 'vscode/vscode/vs/workbench/common/views';
18
+ import { ViewPaneContainer } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
19
+ import { Extensions, ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
17
20
  import { isProposedApiEnabled } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
18
21
  import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
19
- import { showExtensionsWithIdsCommandId } from 'vscode/vscode/vs/workbench/contrib/extensions/browser/extensionsActions';
22
+ import { showExtensionsWithIdsCommandId } from '@codingame/monaco-vscode-47923ab1-c4c8-58b5-89ac-fa1b998eb5dd-common/vscode/vs/workbench/contrib/extensions/browser/extensionsActions';
20
23
  import { IExtensionsWorkbenchService } from 'vscode/vscode/vs/workbench/contrib/extensions/common/extensions.service';
21
24
  import { ChatAgentLocation } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents';
22
25
  import { IChatAgentService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
23
- import { CONTEXT_CHAT_PANEL_PARTICIPANT_REGISTERED, CONTEXT_CHAT_EXTENSION_INVALID, CONTEXT_CHAT_EDITING_PARTICIPANT_REGISTERED } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
24
- import { CHAT_VIEW_ID } from '@codingame/monaco-vscode-chat-extensions-interactive-notebook-search-terminal-common/vscode/vs/workbench/contrib/chat/browser/chat';
26
+ import { ChatContextKeys } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
27
+ import { ChatViewId } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/chat';
25
28
  import { CHAT_SIDEBAR_PANEL_ID, ChatViewPane, CHAT_EDITING_SIDEBAR_PANEL_ID } from './chatViewPane.js';
26
29
 
27
30
  const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
28
31
  extensionPoint: 'chatParticipants',
29
32
  jsonSchema: {
30
- description: ( localize(7646, 'Contributes a chat participant')),
33
+ description: ( localize(4472, 'Contributes a chat participant')),
31
34
  type: 'array',
32
35
  items: {
33
36
  additionalProperties: false,
@@ -36,12 +39,12 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
36
39
  required: ['name', 'id'],
37
40
  properties: {
38
41
  id: {
39
- description: ( localize(7647, "A unique id for this chat participant.")),
42
+ description: ( localize(4473, "A unique id for this chat participant.")),
40
43
  type: 'string'
41
44
  },
42
45
  name: {
43
46
  description: ( localize(
44
- 7648,
47
+ 4474,
45
48
  "User-facing name for this chat participant. The user will use '@' with this name to invoke the participant. Name must not contain whitespace."
46
49
  )),
47
50
  type: 'string',
@@ -49,37 +52,37 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
49
52
  },
50
53
  fullName: {
51
54
  markdownDescription: ( localize(
52
- 7649,
55
+ 4475,
53
56
  "The full name of this chat participant, which is shown as the label for responses coming from this participant. If not provided, {0} is used.",
54
57
  '`name`'
55
58
  )),
56
59
  type: 'string'
57
60
  },
58
61
  description: {
59
- description: ( localize(7650, "A description of this chat participant, shown in the UI.")),
62
+ description: ( localize(4476, "A description of this chat participant, shown in the UI.")),
60
63
  type: 'string'
61
64
  },
62
65
  isSticky: {
63
66
  description: ( localize(
64
- 7651,
67
+ 4477,
65
68
  "Whether invoking the command puts the chat into a persistent mode, where the command is automatically added to the chat input for the next message."
66
69
  )),
67
70
  type: 'boolean'
68
71
  },
69
72
  sampleRequest: {
70
73
  description: ( localize(
71
- 7652,
74
+ 4478,
72
75
  "When the user clicks this participant in `/help`, this text will be submitted to the participant."
73
76
  )),
74
77
  type: 'string'
75
78
  },
76
79
  when: {
77
- description: ( localize(7653, "A condition which must be true to enable this participant.")),
80
+ description: ( localize(4479, "A condition which must be true to enable this participant.")),
78
81
  type: 'string'
79
82
  },
80
83
  disambiguation: {
81
84
  description: ( localize(
82
- 7654,
85
+ 4480,
83
86
  "Metadata to help with automatically routing user questions to this chat participant."
84
87
  )),
85
88
  type: 'array',
@@ -91,21 +94,21 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
91
94
  properties: {
92
95
  category: {
93
96
  markdownDescription: ( localize(
94
- 7655,
97
+ 4481,
95
98
  "A detailed name for this category, e.g. `workspace_questions` or `web_questions`."
96
99
  )),
97
100
  type: 'string'
98
101
  },
99
102
  description: {
100
103
  description: ( localize(
101
- 7656,
104
+ 4482,
102
105
  "A detailed description of the kinds of questions that are suitable for this chat participant."
103
106
  )),
104
107
  type: 'string'
105
108
  },
106
109
  examples: {
107
110
  description: ( localize(
108
- 7657,
111
+ 4483,
109
112
  "A list of representative example questions that are suitable for this chat participant."
110
113
  )),
111
114
  type: 'array'
@@ -115,7 +118,7 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
115
118
  },
116
119
  commands: {
117
120
  markdownDescription: ( localize(
118
- 7658,
121
+ 4484,
119
122
  "Commands available for this chat participant, which the user can invoke with a `/`."
120
123
  )),
121
124
  type: 'array',
@@ -127,36 +130,36 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
127
130
  properties: {
128
131
  name: {
129
132
  description: ( localize(
130
- 7659,
133
+ 4485,
131
134
  "A short name by which this command is referred to in the UI, e.g. `fix` or * `explain` for commands that fix an issue or explain code. The name should be unique among the commands provided by this participant."
132
135
  )),
133
136
  type: 'string'
134
137
  },
135
138
  description: {
136
- description: ( localize(7660, "A description of this command.")),
139
+ description: ( localize(4486, "A description of this command.")),
137
140
  type: 'string'
138
141
  },
139
142
  when: {
140
- description: ( localize(7661, "A condition which must be true to enable this command.")),
143
+ description: ( localize(4487, "A condition which must be true to enable this command.")),
141
144
  type: 'string'
142
145
  },
143
146
  sampleRequest: {
144
147
  description: ( localize(
145
- 7662,
148
+ 4488,
146
149
  "When the user clicks this command in `/help`, this text will be submitted to the participant."
147
150
  )),
148
151
  type: 'string'
149
152
  },
150
153
  isSticky: {
151
154
  description: ( localize(
152
- 7651,
155
+ 4477,
153
156
  "Whether invoking the command puts the chat into a persistent mode, where the command is automatically added to the chat input for the next message."
154
157
  )),
155
158
  type: 'boolean'
156
159
  },
157
160
  disambiguation: {
158
161
  description: ( localize(
159
- 7663,
162
+ 4489,
160
163
  "Metadata to help with automatically routing user questions to this chat command."
161
164
  )),
162
165
  type: 'array',
@@ -168,21 +171,21 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
168
171
  properties: {
169
172
  category: {
170
173
  markdownDescription: ( localize(
171
- 7664,
174
+ 4490,
172
175
  "A detailed name for this category, e.g. `workspace_questions` or `web_questions`."
173
176
  )),
174
177
  type: 'string'
175
178
  },
176
179
  description: {
177
180
  description: ( localize(
178
- 7665,
181
+ 4491,
179
182
  "A detailed description of the kinds of questions that are suitable for this chat command."
180
183
  )),
181
184
  type: 'string'
182
185
  },
183
186
  examples: {
184
187
  description: ( localize(
185
- 7666,
188
+ 4492,
186
189
  "A list of representative example questions that are suitable for this chat command."
187
190
  )),
188
191
  type: 'array'
@@ -207,7 +210,7 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
207
210
  constructor(_chatAgentService, logService) {
208
211
  this._chatAgentService = _chatAgentService;
209
212
  this.logService = logService;
210
- this._participantRegistrationDisposables = ( (new DisposableMap()));
213
+ this._participantRegistrationDisposables = ( new DisposableMap());
211
214
  this._viewContainer = this.registerViewContainer();
212
215
  this.registerDefaultParticipantView();
213
216
  this.registerChatEditingView();
@@ -221,7 +224,7 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
221
224
  this.logService.error(`Extension '${extension.description.identifier.value}' CANNOT register participant with invalid name: ${providerDescriptor.name}. Name must match /^[\\w-]+$/.`);
222
225
  continue;
223
226
  }
224
- if (providerDescriptor.fullName && AmbiguousCharacters.getInstance(( (new Set()))).containsAmbiguousCharacter(providerDescriptor.fullName)) {
227
+ if (providerDescriptor.fullName && AmbiguousCharacters.getInstance(( new Set())).containsAmbiguousCharacter(providerDescriptor.fullName)) {
225
228
  this.logService.error(`Extension '${extension.description.identifier.value}' CANNOT register participant with fullName that contains ambiguous characters: ${providerDescriptor.fullName}.`);
226
229
  continue;
227
230
  }
@@ -241,23 +244,14 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
241
244
  this.logService.error(`Extension '${extension.description.identifier.value}' CANNOT register participant without both id and name.`);
242
245
  continue;
243
246
  }
244
- const participantsAndCommandsDisambiguation = [];
247
+ const participantsDisambiguation = [];
245
248
  if (providerDescriptor.disambiguation?.length) {
246
- participantsAndCommandsDisambiguation.push(...( (providerDescriptor.disambiguation.map((d) => ({
249
+ participantsDisambiguation.push(...( providerDescriptor.disambiguation.map((d) => ({
247
250
  ...d, category: d.category ?? d.categoryName
248
- })))));
249
- }
250
- if (providerDescriptor.commands) {
251
- for (const command of providerDescriptor.commands) {
252
- if (command.disambiguation?.length) {
253
- participantsAndCommandsDisambiguation.push(...( (command.disambiguation.map((d) => ({
254
- ...d, category: d.category ?? d.categoryName
255
- })))));
256
- }
257
- }
251
+ }))));
258
252
  }
259
253
  try {
260
- const store = ( (new DisposableStore()));
254
+ const store = ( new DisposableStore());
261
255
  store.add(this._chatAgentService.registerAgent(providerDescriptor.id, {
262
256
  extensionId: extension.description.identifier,
263
257
  publisherDisplayName: extension.description.publisherDisplayName ?? extension.description.publisher,
@@ -274,10 +268,10 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
274
268
  fullName: providerDescriptor.fullName,
275
269
  isDefault: providerDescriptor.isDefault,
276
270
  locations: isNonEmptyArray(providerDescriptor.locations) ?
277
- ( (providerDescriptor.locations.map(ChatAgentLocation.fromRaw))) :
271
+ ( providerDescriptor.locations.map(ChatAgentLocation.fromRaw)) :
278
272
  [ChatAgentLocation.Panel],
279
273
  slashCommands: providerDescriptor.commands ?? [],
280
- disambiguation: coalesce(participantsAndCommandsDisambiguation.flat()),
274
+ disambiguation: coalesce(participantsDisambiguation.flat()),
281
275
  }));
282
276
  this._participantRegistrationDisposables.set(getParticipantKey(extension.description.identifier, providerDescriptor.id), store);
283
277
  }
@@ -294,90 +288,106 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
294
288
  });
295
289
  }
296
290
  registerViewContainer() {
297
- const title = ( localize2(7667, "Chat"));
291
+ const title = ( localize2(4493, "Chat"));
298
292
  const icon = Codicon.commentDiscussion;
299
293
  const viewContainerId = CHAT_SIDEBAR_PANEL_ID;
300
- const viewContainer = ( (Registry.as(Extensions.ViewContainersRegistry))).registerViewContainer({
294
+ const viewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
301
295
  id: viewContainerId,
302
296
  title,
303
297
  icon,
304
- ctorDescriptor: ( (new SyncDescriptor(
298
+ ctorDescriptor: ( new SyncDescriptor(
305
299
  ViewPaneContainer,
306
300
  [viewContainerId, { mergeViewWithContainerWhenSingleView: true }]
307
- ))),
301
+ )),
308
302
  storageId: viewContainerId,
309
303
  hideIfEmpty: true,
310
304
  order: 100,
311
- }, 2 , { doNotRegisterOpenCommand: true });
305
+ }, ViewContainerLocation.AuxiliaryBar, { doNotRegisterOpenCommand: true });
312
306
  return viewContainer;
313
307
  }
314
308
  registerDefaultParticipantView() {
315
- const name = 'GitHub Copilot';
316
309
  const viewDescriptor = [{
317
- id: CHAT_VIEW_ID,
310
+ id: ChatViewId,
318
311
  containerIcon: this._viewContainer.icon,
319
312
  containerTitle: this._viewContainer.title.value,
320
313
  singleViewPaneContainerTitle: this._viewContainer.title.value,
321
- name: { value: name, original: name },
314
+ name: ( localize2(4493, "Chat")),
322
315
  canToggleVisibility: false,
323
316
  canMoveView: true,
324
317
  openCommandActionDescriptor: {
325
318
  id: CHAT_SIDEBAR_PANEL_ID,
319
+ title: this._viewContainer.title,
320
+ mnemonicTitle: ( localize(4494, "&&Chat")),
326
321
  keybindings: {
327
- primary: 2048 | 512 | 39 ,
322
+ primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyI,
328
323
  mac: {
329
- primary: 2048 | 256 | 39
324
+ primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KeyI
330
325
  }
331
326
  },
332
- order: 100
327
+ order: 1
333
328
  },
334
- ctorDescriptor: ( (new SyncDescriptor(ChatViewPane, [{ location: ChatAgentLocation.Panel }]))),
335
- when: ( (ContextKeyExpr.or(CONTEXT_CHAT_PANEL_PARTICIPANT_REGISTERED, CONTEXT_CHAT_EXTENSION_INVALID)))
329
+ ctorDescriptor: ( new SyncDescriptor(ChatViewPane, [{ location: ChatAgentLocation.Panel }])),
330
+ when: ( ContextKeyExpr.or(( ContextKeyExpr.and(( ContextKeyExpr.has('config.chat.experimental.offerSetup')), ChatContextKeys.Setup.triggered)), ChatContextKeys.Setup.installed, ChatContextKeys.panelParticipantRegistered, ChatContextKeys.extensionInvalid))
336
331
  }];
337
- ( (Registry.as(Extensions.ViewsRegistry))).registerViews(viewDescriptor, this._viewContainer);
332
+ ( Registry.as(Extensions.ViewsRegistry)).registerViews(viewDescriptor, this._viewContainer);
338
333
  return toDisposable(() => {
339
- ( (Registry.as(Extensions.ViewsRegistry))).deregisterViews(viewDescriptor, this._viewContainer);
334
+ ( Registry.as(Extensions.ViewsRegistry)).deregisterViews(viewDescriptor, this._viewContainer);
340
335
  });
341
336
  }
342
337
  registerChatEditingView() {
343
- const title = ( localize2(7668, "Copilot Edits"));
338
+ const title = ( localize2(4495, "Copilot Edits"));
344
339
  const icon = Codicon.editSession;
345
340
  const viewContainerId = CHAT_EDITING_SIDEBAR_PANEL_ID;
346
- const viewContainer = ( (Registry.as(Extensions.ViewContainersRegistry))).registerViewContainer({
341
+ const viewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
347
342
  id: viewContainerId,
348
343
  title,
349
344
  icon,
350
- ctorDescriptor: ( (new SyncDescriptor(
345
+ ctorDescriptor: ( new SyncDescriptor(
351
346
  ViewPaneContainer,
352
347
  [viewContainerId, { mergeViewWithContainerWhenSingleView: true }]
353
- ))),
348
+ )),
354
349
  storageId: viewContainerId,
355
350
  hideIfEmpty: true,
356
- order: 100,
357
- }, 2 );
351
+ order: 101,
352
+ }, ViewContainerLocation.AuxiliaryBar, { doNotRegisterOpenCommand: true });
358
353
  const id = 'workbench.panel.chat.view.edits';
359
354
  const viewDescriptor = [{
360
- id: id,
355
+ id,
361
356
  containerIcon: viewContainer.icon,
362
357
  containerTitle: title.value,
363
358
  singleViewPaneContainerTitle: title.value,
364
359
  name: { value: title.value, original: title.value },
365
360
  canToggleVisibility: false,
366
361
  canMoveView: true,
367
- ctorDescriptor: ( (new SyncDescriptor(ChatViewPane, [{ location: ChatAgentLocation.EditingSession }]))),
368
- when: CONTEXT_CHAT_EDITING_PARTICIPANT_REGISTERED
362
+ openCommandActionDescriptor: {
363
+ id: viewContainerId,
364
+ title,
365
+ mnemonicTitle: ( localize(4496, "Copilot Ed&&its")),
366
+ keybindings: {
367
+ primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyI,
368
+ linux: {
369
+ primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.Shift | KeyCode.KeyI
370
+ }
371
+ },
372
+ order: 2
373
+ },
374
+ ctorDescriptor: ( new SyncDescriptor(ChatViewPane, [{ location: ChatAgentLocation.EditingSession }])),
375
+ when: ( ContextKeyExpr.or(
376
+ ChatContextKeys.Setup.installed,
377
+ ChatContextKeys.editingParticipantRegistered
378
+ ))
369
379
  }];
370
- ( (Registry.as(Extensions.ViewsRegistry))).registerViews(viewDescriptor, viewContainer);
380
+ ( Registry.as(Extensions.ViewsRegistry)).registerViews(viewDescriptor, viewContainer);
371
381
  return toDisposable(() => {
372
- ( (Registry.as(Extensions.ViewContainersRegistry))).deregisterViewContainer(viewContainer);
373
- ( (Registry.as(Extensions.ViewsRegistry))).deregisterViews(viewDescriptor, viewContainer);
382
+ ( Registry.as(Extensions.ViewContainersRegistry)).deregisterViewContainer(viewContainer);
383
+ ( Registry.as(Extensions.ViewsRegistry)).deregisterViews(viewDescriptor, viewContainer);
374
384
  });
375
385
  }
376
386
  };
377
- ChatExtensionPointHandler = ( (__decorate([
378
- ( (__param(0, IChatAgentService))),
379
- ( (__param(1, ILogService)))
380
- ], ChatExtensionPointHandler)));
387
+ ChatExtensionPointHandler = ( __decorate([
388
+ ( __param(0, IChatAgentService)),
389
+ ( __param(1, ILogService))
390
+ ], ChatExtensionPointHandler));
381
391
  function getParticipantKey(extensionId, participantName) {
382
392
  return `${extensionId.value}_${participantName}`;
383
393
  }
@@ -387,10 +397,10 @@ let ChatCompatibilityNotifier = class ChatCompatibilityNotifier extends Disposab
387
397
  super();
388
398
  this.productService = productService;
389
399
  this.registeredWelcomeView = false;
390
- const isInvalid = CONTEXT_CHAT_EXTENSION_INVALID.bindTo(contextKeyService);
400
+ const isInvalid = ChatContextKeys.extensionInvalid.bindTo(contextKeyService);
391
401
  this._register(Event.runAndSubscribe(extensionsWorkbenchService.onDidChangeExtensionsNotification, () => {
392
402
  const notification = extensionsWorkbenchService.getExtensionsNotification();
393
- const chatExtension = notification?.extensions.find(ext => ext.identifier.id === 'github.copilot-chat');
403
+ const chatExtension = notification?.extensions.find(ext => ExtensionIdentifier.equals(ext.identifier.id, this.productService.defaultChatAgent?.chatExtensionId));
394
404
  if (chatExtension) {
395
405
  isInvalid.set(true);
396
406
  this.registerWelcomeView(chatExtension);
@@ -405,26 +415,25 @@ let ChatCompatibilityNotifier = class ChatCompatibilityNotifier extends Disposab
405
415
  return;
406
416
  }
407
417
  this.registeredWelcomeView = true;
408
- const showExtensionLabel = ( localize(7669, "Show Extension"));
418
+ const showExtensionLabel = ( localize(4497, "Show Extension"));
409
419
  const mainMessage = ( localize(
410
- 7670,
411
- "Chat failed to load because the installed version of the {0} extension is not compatible with this version of {1}. Please ensure that the GitHub Copilot Chat extension is up to date.",
412
- 'GitHub Copilot Chat',
420
+ 4498,
421
+ "Chat failed to load because the installed version of the Copilot Chat extension is not compatible with this version of {0}. Please ensure that the Copilot Chat extension is up to date.",
413
422
  this.productService.nameLong
414
423
  ));
415
- const commandButton = `[${showExtensionLabel}](command:${showExtensionsWithIdsCommandId}?${encodeURIComponent(JSON.stringify([['GitHub.copilot-chat']]))})`;
416
- const versionMessage = `GitHub Copilot Chat version: ${chatExtension.version}`;
417
- const viewsRegistry = ( (Registry.as(Extensions.ViewsRegistry)));
418
- this._register(viewsRegistry.registerViewWelcomeContent(CHAT_VIEW_ID, {
424
+ const commandButton = `[${showExtensionLabel}](command:${showExtensionsWithIdsCommandId}?${encodeURIComponent(JSON.stringify([[this.productService.defaultChatAgent?.chatExtensionId]]))})`;
425
+ const versionMessage = `Copilot Chat version: ${chatExtension.version}`;
426
+ const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
427
+ this._register(viewsRegistry.registerViewWelcomeContent(ChatViewId, {
419
428
  content: [mainMessage, commandButton, versionMessage].join('\n\n'),
420
- when: CONTEXT_CHAT_EXTENSION_INVALID,
429
+ when: ChatContextKeys.extensionInvalid,
421
430
  }));
422
431
  }
423
432
  };
424
- ChatCompatibilityNotifier = ( (__decorate([
425
- ( (__param(0, IExtensionsWorkbenchService))),
426
- ( (__param(1, IContextKeyService))),
427
- ( (__param(2, IProductService)))
428
- ], ChatCompatibilityNotifier)));
433
+ ChatCompatibilityNotifier = ( __decorate([
434
+ ( __param(0, IExtensionsWorkbenchService)),
435
+ ( __param(1, IContextKeyService)),
436
+ ( __param(2, IProductService))
437
+ ], ChatCompatibilityNotifier));
429
438
 
430
439
  export { ChatCompatibilityNotifier, ChatExtensionPointHandler };
@@ -0,0 +1,42 @@
1
+ import { CancellationToken } from "vscode/vscode/vs/base/common/cancellation";
2
+ import { IReadonlyVSDataTransfer } from "vscode/vscode/vs/base/common/dataTransfer";
3
+ import { HierarchicalKind } from "vscode/vscode/vs/base/common/hierarchicalKind";
4
+ import { IRange } from "vscode/vscode/vs/editor/common/core/range";
5
+ import { DocumentPasteContext, DocumentPasteEditProvider, DocumentPasteEditsSession } from "vscode/vscode/vs/editor/common/languages";
6
+ import { ITextModel } from "vscode/vscode/vs/editor/common/model";
7
+ import { ILanguageFeaturesService } from "vscode/vscode/vs/editor/common/services/languageFeatures";
8
+ import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
9
+ import { IChatWidgetService } from "vscode/vscode/vs/workbench/contrib/chat/browser/chat.service";
10
+ import { IExtensionService } from "vscode/vscode/vs/workbench/services/extensions/common/extensions.service";
11
+ import { IModelService } from "vscode/vscode/vs/editor/common/services/model";
12
+ export declare class PasteImageProvider implements DocumentPasteEditProvider {
13
+ private readonly chatWidgetService;
14
+ private readonly extensionService;
15
+ readonly kind: HierarchicalKind;
16
+ readonly providedPasteEditKinds: HierarchicalKind[];
17
+ readonly copyMimeTypes: never[];
18
+ readonly pasteMimeTypes: string[];
19
+ constructor(chatWidgetService: IChatWidgetService, extensionService: IExtensionService);
20
+ provideDocumentPasteEdits(model: ITextModel, ranges: readonly IRange[], dataTransfer: IReadonlyVSDataTransfer, context: DocumentPasteContext, token: CancellationToken): Promise<DocumentPasteEditsSession | undefined>;
21
+ }
22
+ export declare function imageToHash(data: Uint8Array): Promise<string>;
23
+ export declare function isImage(array: Uint8Array): boolean;
24
+ export declare class CopyTextProvider implements DocumentPasteEditProvider {
25
+ readonly providedPasteEditKinds: never[];
26
+ readonly copyMimeTypes: string[];
27
+ readonly pasteMimeTypes: never[];
28
+ prepareDocumentPaste(model: ITextModel, ranges: readonly IRange[], dataTransfer: IReadonlyVSDataTransfer, token: CancellationToken): Promise<undefined | IReadonlyVSDataTransfer>;
29
+ }
30
+ export declare class PasteTextProvider implements DocumentPasteEditProvider {
31
+ private readonly chatWidgetService;
32
+ private readonly modelService;
33
+ readonly kind: HierarchicalKind;
34
+ readonly providedPasteEditKinds: HierarchicalKind[];
35
+ readonly copyMimeTypes: never[];
36
+ readonly pasteMimeTypes: string[];
37
+ constructor(chatWidgetService: IChatWidgetService, modelService: IModelService);
38
+ provideDocumentPasteEdits(model: ITextModel, ranges: readonly IRange[], dataTransfer: IReadonlyVSDataTransfer, context: DocumentPasteContext, token: CancellationToken): Promise<DocumentPasteEditsSession | undefined>;
39
+ }
40
+ export declare class ChatPasteProvidersFeature extends Disposable {
41
+ constructor(languageFeaturesService: ILanguageFeaturesService, chatWidgetService: IChatWidgetService, extensionService: IExtensionService, modelService: IModelService);
42
+ }