@codingame/monaco-vscode-chat-service-override 13.1.7 → 14.0.1

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
package/index.js CHANGED
@@ -14,18 +14,14 @@ import { ChatService } from './vscode/src/vs/workbench/contrib/chat/common/chatS
14
14
  import { ChatSlashCommandService } from './vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js';
15
15
  import { IChatSlashCommandService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSlashCommands.service';
16
16
  import { IChatVariablesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatVariables.service';
17
- import { ChatWidgetHistoryService } from './vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js';
17
+ import { ChatWidgetHistoryService } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatWidgetHistoryService';
18
18
  import { IChatWidgetHistoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatWidgetHistoryService.service';
19
19
  import { ILanguageModelStatsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelStats.service';
20
20
  import { LanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
21
21
  import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
22
- import { IInlineChatSavingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSavingService.service';
23
- import { InlineChatSavingServiceImpl } from './vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.js';
24
22
  import { IInlineChatSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service';
25
23
  import { InlineChatSessionServiceImpl } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl';
26
- import { LanguageModelStatsService } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/languageModelStats';
27
- import './vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js';
28
- import './vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js';
24
+ import { LanguageModelStatsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelStats';
29
25
  import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
30
26
  import { LanguageModelToolsService } from './vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js';
31
27
  import { ICodeMapperService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatCodeMapperService.service';
@@ -35,7 +31,11 @@ import { ChatEditingService } from './vscode/src/vs/workbench/contrib/chat/brows
35
31
  import { LanguageModelIgnoredFilesService } from './vscode/src/vs/workbench/contrib/chat/common/ignoredFiles.js';
36
32
  import { ILanguageModelIgnoredFilesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/ignoredFiles.service';
37
33
  import { IChatQuotasService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatQuotasService.service';
38
- import { ChatQuotasService } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/chatQuotasService';
34
+ import { ChatQuotasService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatQuotasService';
35
+ import { IChatMarkdownAnchorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.service';
36
+ import { ChatMarkdownAnchorService } from './vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.js';
37
+ import './vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js';
38
+ import './vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js';
39
39
 
40
40
  function getServiceOverride() {
41
41
  return {
@@ -49,7 +49,6 @@ function getServiceOverride() {
49
49
  [IChatAgentService.toString()]: new SyncDescriptor(ChatAgentService, [], true),
50
50
  [IChatVariablesService.toString()]: new SyncDescriptor(ChatVariablesService, [], true),
51
51
  [IInlineChatSessionService.toString()]: new SyncDescriptor(InlineChatSessionServiceImpl, [], true),
52
- [IInlineChatSavingService.toString()]: new SyncDescriptor(InlineChatSavingServiceImpl, [], true),
53
52
  [IChatCodeBlockContextProviderService.toString()]: new SyncDescriptor(ChatCodeBlockContextProviderService, [], true),
54
53
  [ILanguageModelStatsService.toString()]: new SyncDescriptor(LanguageModelStatsService, [], true),
55
54
  [ILanguageModelIgnoredFilesService.toString()]: new SyncDescriptor(LanguageModelIgnoredFilesService, [], true),
@@ -57,7 +56,8 @@ function getServiceOverride() {
57
56
  [ILanguageModelToolsService.toString()]: new SyncDescriptor(LanguageModelToolsService, [], true),
58
57
  [ICodeMapperService.toString()]: new SyncDescriptor(CodeMapperService, [], true),
59
58
  [IChatEditingService.toString()]: new SyncDescriptor(ChatEditingService, [], true),
60
- [IChatQuotasService.toString()]: new SyncDescriptor(ChatQuotasService, [], true)
59
+ [IChatQuotasService.toString()]: new SyncDescriptor(ChatQuotasService, [], true),
60
+ [IChatMarkdownAnchorService.toString()]: new SyncDescriptor(ChatMarkdownAnchorService, [], true)
61
61
  };
62
62
  }
63
63
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-chat-service-override",
3
- "version": "13.1.7",
3
+ "version": "14.0.1",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - chat service-override",
6
6
  "keywords": [],
@@ -15,25 +15,25 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-1021b67c-93e5-5c78-a270-cbdb2574d980-common": "13.1.7",
19
- "@codingame/monaco-vscode-1cc4ea0a-c5b6-54ed-bb60-078a99119b55-common": "13.1.7",
20
- "@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common": "13.1.7",
21
- "@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common": "13.1.7",
22
- "@codingame/monaco-vscode-47923ab1-c4c8-58b5-89ac-fa1b998eb5dd-common": "13.1.7",
23
- "@codingame/monaco-vscode-4a36e358-d94d-55e0-86ee-3bcd543d9d3f-common": "13.1.7",
24
- "@codingame/monaco-vscode-5108c2c9-4ada-52d8-8c4b-fe03b3160e71-common": "13.1.7",
25
- "@codingame/monaco-vscode-5945a5e2-a66c-5a82-bd2c-1965724b29eb-common": "13.1.7",
26
- "@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "13.1.7",
27
- "@codingame/monaco-vscode-9d05a43d-c330-5ff1-937e-fde4a3852931-common": "13.1.7",
28
- "@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common": "13.1.7",
29
- "@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "13.1.7",
30
- "@codingame/monaco-vscode-api": "13.1.7",
31
- "@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common": "13.1.7",
32
- "@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common": "13.1.7",
33
- "@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common": "13.1.7",
34
- "@codingame/monaco-vscode-e7080bda-ce3e-5243-9a35-98cd9634dbda-common": "13.1.7",
35
- "@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common": "13.1.7",
36
- "@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common": "13.1.7"
18
+ "@codingame/monaco-vscode-1021b67c-93e5-5c78-a270-cbdb2574d980-common": "14.0.1",
19
+ "@codingame/monaco-vscode-168b98e5-dc20-5807-b1f9-798f1f92b37f-common": "14.0.1",
20
+ "@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common": "14.0.1",
21
+ "@codingame/monaco-vscode-4a28f637-7c3c-5e48-a77c-1b7538b38850-common": "14.0.1",
22
+ "@codingame/monaco-vscode-5945a5e2-a66c-5a82-bd2c-1965724b29eb-common": "14.0.1",
23
+ "@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "14.0.1",
24
+ "@codingame/monaco-vscode-8c844347-a703-5de1-9eeb-5e0c7f503a58-common": "14.0.1",
25
+ "@codingame/monaco-vscode-91789cdf-e3cb-5a04-aaeb-6f7df7d3d231-common": "14.0.1",
26
+ "@codingame/monaco-vscode-9e30237f-37af-5bbd-8bc1-5c4f2c0714b3-common": "14.0.1",
27
+ "@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "14.0.1",
28
+ "@codingame/monaco-vscode-api": "14.0.1",
29
+ "@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common": "14.0.1",
30
+ "@codingame/monaco-vscode-d0fb86d3-2a47-594e-955b-9a24631a7124-common": "14.0.1",
31
+ "@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common": "14.0.1",
32
+ "@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common": "14.0.1",
33
+ "@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common": "14.0.1",
34
+ "@codingame/monaco-vscode-ecf3436d-6064-5fbd-a760-37a211ce79c7-common": "14.0.1",
35
+ "@codingame/monaco-vscode-eea37658-2307-56a5-8ed0-b2752c7b7a50-common": "14.0.1",
36
+ "@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common": "14.0.1"
37
37
  },
38
38
  "main": "index.js",
39
39
  "module": "index.js",
@@ -0,0 +1,13 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { ObservableDisposable } from "@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/base/common/observableDisposable";
3
+ export declare class ObjectCache<TValue extends ObservableDisposable, TKey extends NonNullable<unknown> = string> extends Disposable {
4
+ private readonly factory;
5
+ private readonly cache;
6
+ constructor(factory: (key: TKey) => TValue & {
7
+ disposed: false;
8
+ });
9
+ get(key: TKey): TValue & {
10
+ disposed: false;
11
+ };
12
+ remove(key: TKey, dispose: boolean): this;
13
+ }
@@ -0,0 +1,39 @@
1
+
2
+ import { Disposable, DisposableMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
3
+ import { assertNotDisposed } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/base/common/observableDisposable';
4
+
5
+ class ObjectCache extends Disposable {
6
+ constructor(factory) {
7
+ super();
8
+ this.factory = factory;
9
+ this.cache = this._register(( new DisposableMap()));
10
+ }
11
+ get(key) {
12
+ let object = this.cache.get(key);
13
+ if (object?.disposed) {
14
+ this.cache.deleteAndLeak(key);
15
+ object = undefined;
16
+ }
17
+ if (object) {
18
+ assertNotDisposed(object, 'Object must not be disposed.');
19
+ return object;
20
+ }
21
+ object = this.factory(key);
22
+ assertNotDisposed(object, 'Newly created object must not be disposed.');
23
+ object.onDispose(() => {
24
+ this.cache.deleteAndLeak(key);
25
+ });
26
+ this.cache.set(key, object);
27
+ return object;
28
+ }
29
+ remove(key, dispose) {
30
+ if (dispose) {
31
+ this.cache.deleteAndDispose(key);
32
+ return this;
33
+ }
34
+ this.cache.deleteAndLeak(key);
35
+ return this;
36
+ }
37
+ }
38
+
39
+ export { ObjectCache };
@@ -1,21 +1,28 @@
1
1
  import { ICodeEditor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser";
2
2
  import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorExtensions";
3
3
  import { AccessibleContentProvider, AccessibleViewType } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView";
4
- import { IAccessibleViewImplentation } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleViewRegistry";
4
+ import { IAccessibleViewImplementation } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleViewRegistry";
5
5
  import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
6
- export declare class PanelChatAccessibilityHelp implements IAccessibleViewImplentation {
6
+ export declare class PanelChatAccessibilityHelp implements IAccessibleViewImplementation {
7
7
  readonly priority = 107;
8
8
  readonly name = "panelChat";
9
9
  readonly type = AccessibleViewType.Help;
10
10
  readonly when: import("@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey").ContextKeyExpression | undefined;
11
11
  getProvider(accessor: ServicesAccessor): AccessibleContentProvider | undefined;
12
12
  }
13
- export declare class QuickChatAccessibilityHelp implements IAccessibleViewImplentation {
13
+ export declare class QuickChatAccessibilityHelp implements IAccessibleViewImplementation {
14
14
  readonly priority = 107;
15
15
  readonly name = "quickChat";
16
16
  readonly type = AccessibleViewType.Help;
17
17
  readonly when: import("@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey").ContextKeyExpression | undefined;
18
18
  getProvider(accessor: ServicesAccessor): AccessibleContentProvider | undefined;
19
19
  }
20
- export declare function getAccessibilityHelpText(type: "panelChat" | "inlineChat" | "quickChat", keybindingService: IKeybindingService): string;
21
- export declare function getChatAccessibilityHelpProvider(accessor: ServicesAccessor, editor: ICodeEditor | undefined, type: "panelChat" | "inlineChat" | "quickChat"): AccessibleContentProvider | undefined;
20
+ export declare class EditsChatAccessibilityHelp implements IAccessibleViewImplementation {
21
+ readonly priority = 119;
22
+ readonly name = "editsView";
23
+ readonly type = AccessibleViewType.Help;
24
+ readonly when: import("@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey").ContextKeyExpression | undefined;
25
+ getProvider(accessor: ServicesAccessor): AccessibleContentProvider | undefined;
26
+ }
27
+ export declare function getAccessibilityHelpText(type: "panelChat" | "inlineChat" | "quickChat" | "editsView", keybindingService: IKeybindingService): string;
28
+ export declare function getChatAccessibilityHelpProvider(accessor: ServicesAccessor, editor: ICodeEditor | undefined, type: "panelChat" | "inlineChat" | "quickChat" | "editsView"): AccessibleContentProvider | undefined;
@@ -5,6 +5,7 @@ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
5
5
  import { AccessibleViewType, AccessibleContentProvider, AccessibleViewProviderId } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView';
6
6
  import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
7
7
  import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
8
+ import { ActiveAuxiliaryContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
8
9
  import { AccessibilityVerbositySettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
9
10
  import { INLINE_CHAT_ID } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
10
11
  import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents';
@@ -16,7 +17,7 @@ class PanelChatAccessibilityHelp {
16
17
  this.priority = 107;
17
18
  this.name = 'panelChat';
18
19
  this.type = AccessibleViewType.Help;
19
- this.when = ( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Panel)), ( ChatContextKeys.inQuickChat.negate()), ( ContextKeyExpr.or(
20
+ this.when = ( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Panel)), ( ChatContextKeys.inQuickChat.negate()), ( ActiveAuxiliaryContext.isEqualTo('workbench.panel.chat')), ( ContextKeyExpr.or(
20
21
  ChatContextKeys.inChatSession,
21
22
  ChatContextKeys.isResponse,
22
23
  ChatContextKeys.isRequest
@@ -43,106 +44,177 @@ class QuickChatAccessibilityHelp {
43
44
  return getChatAccessibilityHelpProvider(accessor, codeEditor ?? undefined, 'quickChat');
44
45
  }
45
46
  }
47
+ class EditsChatAccessibilityHelp {
48
+ constructor() {
49
+ this.priority = 119;
50
+ this.name = 'editsView';
51
+ this.type = AccessibleViewType.Help;
52
+ this.when = ( ContextKeyExpr.and(( ActiveAuxiliaryContext.isEqualTo('workbench.panel.chatEditing')), ChatContextKeys.inChatInput));
53
+ }
54
+ getProvider(accessor) {
55
+ const codeEditor = accessor.get(ICodeEditorService).getActiveCodeEditor() || accessor.get(ICodeEditorService).getFocusedCodeEditor();
56
+ return getChatAccessibilityHelpProvider(accessor, codeEditor ?? undefined, 'editsView');
57
+ }
58
+ }
46
59
  function getAccessibilityHelpText(type, keybindingService) {
47
60
  const content = [];
48
61
  if (type === 'panelChat' || type === 'quickChat') {
49
62
  if (type === 'quickChat') {
50
63
  content.push(( localize(
51
- 4149,
64
+ 4197,
52
65
  'The quick chat view is comprised of an input box and a request/response list. The input box is used to make requests and the list is used to display responses.'
53
66
  )));
54
67
  content.push(( localize(
55
- 4150,
68
+ 4198,
56
69
  'The quick chat view is a transient interface for making and viewing requests, while the panel chat view is a persistent interface that also supports navigating suggested follow-up questions.'
57
70
  )));
58
71
  }
59
72
  if (type === 'panelChat') {
60
73
  content.push(( localize(
61
- 4151,
74
+ 4199,
62
75
  'The panel chat view is a persistent interface that also supports navigating suggested follow-up questions, while the quick chat view is a transient interface for making and viewing requests.'
63
76
  )));
64
77
  content.push(( localize(
65
- 4152,
78
+ 4200,
66
79
  'In the input box, navigate to the suggested follow up question (Shift+Tab) and press Enter to run it.'
67
80
  )));
68
81
  }
69
82
  content.push(( localize(
70
- 4153,
83
+ 4201,
71
84
  'In the input box, use up and down arrows to navigate your request history. Edit input and use enter or the submit button to run a new request.'
72
85
  )));
73
86
  content.push(( localize(
74
- 4154,
87
+ 4202,
75
88
  'In the input box, inspect the last response in the accessible view{0}.',
76
89
  '<keybinding:editor.action.accessibleView>'
77
90
  )));
78
91
  content.push(( localize(
79
- 4155,
92
+ 4203,
80
93
  'Chat responses will be announced as they come in. A response will indicate the number of code blocks, if any, and then the rest of the response.'
81
94
  )));
82
95
  content.push(( localize(
83
- 4156,
96
+ 4204,
84
97
  'To focus the chat request/response list, which can be navigated with up and down arrows, invoke the Focus Chat command{0}.',
85
98
  getChatFocusKeybindingLabel(keybindingService, type, false)
86
99
  )));
87
100
  content.push(( localize(
88
- 4157,
101
+ 4205,
89
102
  'To focus the input box for chat requests, invoke the Focus Chat Input command{0}.',
90
103
  getChatFocusKeybindingLabel(keybindingService, type, true)
91
104
  )));
92
105
  content.push(( localize(
93
- 4158,
106
+ 4206,
94
107
  'To focus the next code block within a response, invoke the Chat: Next Code Block command{0}.',
95
108
  '<keybinding:workbench.action.chat.nextCodeBlock>'
96
109
  )));
97
110
  if (type === 'panelChat') {
98
111
  content.push(( localize(
99
- 4159,
112
+ 4207,
100
113
  'To create a new chat session, invoke the New Chat command{0}.',
101
114
  '<keybinding:workbench.action.chat.new>'
102
115
  )));
103
116
  }
104
117
  }
118
+ if (type === 'editsView') {
119
+ content.push(( localize(4208, 'The chat editing view is used to apply edits across files.')));
120
+ content.push(( localize(
121
+ 4209,
122
+ 'It is comprised of an input box and a file working set (Shift+Tab).'
123
+ )));
124
+ content.push(( localize(
125
+ 4210,
126
+ 'When a request is made, a progress indicator will play while the edits are being applied.'
127
+ )));
128
+ content.push(( localize(
129
+ 4211,
130
+ 'Once the edits are applied, focus the editor(s) to review, accept, and discard changes.'
131
+ )));
132
+ content.push(( localize(
133
+ 4212,
134
+ 'Navigate between edits in the editor with navigate previous{0} and next{1}',
135
+ '<keybinding:chatEditor.action.navigatePrevious>',
136
+ '<keybinding:chatEditor.action.navigateNext>'
137
+ )));
138
+ content.push(( localize(
139
+ 4213,
140
+ 'In the editor, Accept{0} and Reject the current Change{1}.',
141
+ '<keybinding:chatEditor.action.acceptHunk>',
142
+ '<keybinding:chatEditor.action.reject>'
143
+ )));
144
+ content.push(( localize(4214, 'When in the edits view, some helpful commands include:')));
145
+ content.push(( localize(4215, '- Undo Edits{0}.', '<keybinding:workbench.action.chat.undoEdits>')));
146
+ content.push(( localize(
147
+ 4216,
148
+ '- Attach Files{0}.',
149
+ '<keybinding:workbench.action.chat.editing.attachFiles>'
150
+ )));
151
+ content.push(( localize(
152
+ 4217,
153
+ '- Remove File from Working Set{0}.',
154
+ '<keybinding:chatEditing.removeFileFromWorkingSet>'
155
+ )));
156
+ content.push(( localize(
157
+ 4218,
158
+ '- Accept{0} and Discard File{1}.',
159
+ '<keybinding:chatEditing.acceptFile>',
160
+ '<keybinding:chatEditing.discardFile>'
161
+ )));
162
+ content.push(( localize(4219, '- Save All Files{0}.', '<keybinding:chatEditing.saveAllFiles>')));
163
+ content.push(( localize(4220, '- Accept All Edits{0}.', '<keybinding:chatEditing.acceptAllFiles>')));
164
+ content.push(( localize(
165
+ 4221,
166
+ '- Discard All Edits{0}.',
167
+ '<keybinding:chatEditing.discardAllFiles>'
168
+ )));
169
+ content.push(( localize(4222, '- Open File in Diff{0}.', '<keybinding:chatEditing.openFileInDiff>')));
170
+ content.push(( localize(
171
+ 4223,
172
+ '- Add File to Working Set{0}.',
173
+ '<keybinding:chatEditing.addFileToWorkingSet>'
174
+ )));
175
+ content.push(( localize(4224, '- View Changes{0}.', '<keybinding:chatEditing.viewChanges>')));
176
+ }
105
177
  else {
106
178
  content.push(( localize(
107
- 4160,
179
+ 4225,
108
180
  "Inline chat occurs within a code editor and takes into account the current selection. It is useful for making changes to the current editor. For example, fixing diagnostics, documenting or refactoring code. Keep in mind that AI generated code may be incorrect."
109
181
  )));
110
182
  content.push(( localize(
111
- 4161,
183
+ 4226,
112
184
  "It can be activated via code actions or directly using the command: Inline Chat: Start Inline Chat{0}.",
113
185
  '<keybinding:inlineChat.start>'
114
186
  )));
115
187
  content.push(( localize(
116
- 4162,
188
+ 4227,
117
189
  'In the input box, use Show Previous{0} and Show Next{1} to navigate your request history. Edit input and use enter or the submit button to run a new request.',
118
190
  '<keybinding:history.showPrevious>',
119
191
  '<keybinding:history.showNext>'
120
192
  )));
121
193
  content.push(( localize(
122
- 4163,
194
+ 4228,
123
195
  'In the input box, inspect the response in the accessible view{0}.',
124
196
  '<keybinding:editor.action.accessibleView>'
125
197
  )));
126
198
  content.push(( localize(
127
- 4164,
199
+ 4229,
128
200
  "Context menu actions may run a request prefixed with a /. Type / to discover such ready-made commands."
129
201
  )));
130
202
  content.push(( localize(
131
- 4165,
203
+ 4230,
132
204
  "If a fix action is invoked, a response will indicate the problem with the current code. A diff editor will be rendered and can be reached by tabbing."
133
205
  )));
134
206
  content.push(( localize(
135
- 4166,
207
+ 4231,
136
208
  "Once in the diff editor, enter review mode with{0}. Use up and down arrows to navigate lines with the proposed changes.",
137
209
  AccessibleDiffViewerNext.id
138
210
  )));
139
211
  content.push(( localize(
140
- 4167,
212
+ 4232,
141
213
  "Use tab to reach conditional parts like commands, status, message responses and more."
142
214
  )));
143
215
  }
144
216
  content.push(( localize(
145
- 4168,
217
+ 4233,
146
218
  "Accessibility Signals can be changed via settings with a prefix of signals.chat. By default, if a request takes more than 4 seconds, you will hear a sound indicating that progress is still occurring."
147
219
  )));
148
220
  return content.join('\n');
@@ -150,7 +222,7 @@ function getAccessibilityHelpText(type, keybindingService) {
150
222
  function getChatAccessibilityHelpProvider(accessor, editor, type) {
151
223
  const widgetService = accessor.get(IChatWidgetService);
152
224
  const keybindingService = accessor.get(IKeybindingService);
153
- const inputEditor = type === 'panelChat' || type === 'quickChat' ? widgetService.lastFocusedWidget?.inputEditor : editor;
225
+ const inputEditor = type === 'panelChat' || type === 'editsView' || type === 'quickChat' ? widgetService.lastFocusedWidget?.inputEditor : editor;
154
226
  if (!inputEditor) {
155
227
  return;
156
228
  }
@@ -210,4 +282,4 @@ function getChatFocusKeybindingLabel(keybindingService, type, focusInput) {
210
282
  return !!kb ? ` (${kb})` : fallback;
211
283
  }
212
284
 
213
- export { PanelChatAccessibilityHelp, QuickChatAccessibilityHelp, getAccessibilityHelpText, getChatAccessibilityHelpProvider };
285
+ export { EditsChatAccessibilityHelp, PanelChatAccessibilityHelp, QuickChatAccessibilityHelp, getAccessibilityHelpText, getChatAccessibilityHelpProvider };
@@ -1,9 +1,18 @@
1
- import { IChatResponseViewModel } from "@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatViewModel";
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { IActionViewItemService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/actionViewItemService.service";
3
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
4
+ import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
5
+ import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
6
+ import { IChatResponseViewModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatViewModel";
2
7
  import { ICodeBlockActionContext, ICodeCompareBlockActionContext } from "@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/browser/codeBlockPart";
3
8
  export interface IChatCodeBlockActionContext extends ICodeBlockActionContext {
4
9
  element: IChatResponseViewModel;
5
10
  }
6
11
  export declare function isCodeBlockActionContext(thing: unknown): thing is ICodeBlockActionContext;
7
12
  export declare function isCodeCompareBlockActionContext(thing: unknown): thing is ICodeCompareBlockActionContext;
13
+ export declare class CodeBlockActionRendering extends Disposable implements IWorkbenchContribution {
14
+ static readonly ID = "chat.codeBlockActionRendering";
15
+ constructor(actionViewItemService: IActionViewItemService, instantiationService: IInstantiationService, labelService: ILabelService);
16
+ }
8
17
  export declare function registerChatCodeBlockActions(): void;
9
18
  export declare function registerChatCodeCompareBlockActions(): void;