@codingame/monaco-vscode-chat-service-override 9.0.3 → 10.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 (41) hide show
  1. package/chat.js +8 -2
  2. package/package.json +2 -2
  3. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +24 -25
  4. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +5 -7
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +100 -293
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +115 -26
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +2 -2
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +1 -1
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +6 -8
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +9 -7
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +448 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +58 -43
  14. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +2 -4
  15. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +7 -2
  16. package/vscode/src/vs/workbench/contrib/chat/browser/chatGettingStarted.js +131 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipantContributions.js +88 -88
  18. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +26 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +4 -2
  20. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +6 -22
  21. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +11 -17
  22. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +21 -14
  23. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +3 -3
  24. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/editorHoverWrapper.js +7 -1
  25. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.js +27 -0
  26. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +52 -0
  27. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +25 -29
  28. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.js +8 -1
  29. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +1 -2
  30. package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.js +7 -8
  31. package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.js +70 -20
  32. package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +172 -0
  33. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +30 -12
  34. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  35. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +11 -15
  36. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -2
  37. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +5 -6
  38. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +5 -6
  39. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.js +5 -8
  40. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatContextAttachments.js +0 -58
  41. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions.js +0 -412
package/chat.js CHANGED
@@ -15,7 +15,7 @@ import { IChatVariablesService } from 'vscode/vscode/vs/workbench/contrib/chat/c
15
15
  import { ChatWidgetHistoryService } from './vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js';
16
16
  import { IChatWidgetHistoryService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatWidgetHistoryService.service';
17
17
  import { ILanguageModelStatsService } from 'vscode/vscode/vs/workbench/contrib/chat/common/languageModelStats.service';
18
- import { LanguageModelsService } from 'vscode/vscode/vs/workbench/contrib/chat/common/languageModels';
18
+ import { LanguageModelsService } from './vscode/src/vs/workbench/contrib/chat/common/languageModels.js';
19
19
  import { ILanguageModelsService } from 'vscode/vscode/vs/workbench/contrib/chat/common/languageModels.service';
20
20
  import { IInlineChatSavingService } from 'vscode/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSavingService.service';
21
21
  import { InlineChatSavingServiceImpl } from './vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.js';
@@ -26,6 +26,10 @@ import './vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js';
26
26
  import './vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js';
27
27
  import { ILanguageModelToolsService } from 'vscode/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
28
28
  import { LanguageModelToolsService } from './vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.js';
29
+ import { ICodeMapperService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatCodeMapperService.service';
30
+ import { CodeMapperService } from './vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.js';
31
+ import { IChatEditingService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatEditingService.service';
32
+ import { ChatEditingService } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chatEditingService';
29
33
 
30
34
  function getServiceOverride() {
31
35
  return {
@@ -43,7 +47,9 @@ function getServiceOverride() {
43
47
  [( IChatCodeBlockContextProviderService.toString())]: new SyncDescriptor(ChatCodeBlockContextProviderService, [], true),
44
48
  [( ILanguageModelStatsService.toString())]: new SyncDescriptor(LanguageModelStatsService, [], true),
45
49
  [( IChatAgentNameService.toString())]: new SyncDescriptor(ChatAgentNameService, [], true),
46
- [( ILanguageModelToolsService.toString())]: new SyncDescriptor(LanguageModelToolsService, [], true)
50
+ [( ILanguageModelToolsService.toString())]: new SyncDescriptor(LanguageModelToolsService, [], true),
51
+ [( ICodeMapperService.toString())]: new SyncDescriptor(CodeMapperService, [], true),
52
+ [( IChatEditingService.toString())]: new SyncDescriptor(ChatEditingService, [], true)
47
53
  };
48
54
  }
49
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-chat-service-override",
3
- "version": "9.0.3",
3
+ "version": "10.0.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,6 +26,6 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@9.0.3"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@10.0.0"
30
30
  }
31
31
  }
@@ -1,7 +1,6 @@
1
1
  import { localize } from 'vscode/vscode/vs/nls';
2
2
  import { IChatWidgetService } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chat.service';
3
- import { AccessibleViewType, AccessibleContentProvider, AccessibleViewProviderId } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
4
- import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
3
+ import { AccessibleContentProvider } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
5
4
  import { AccessibleDiffViewerNext } from 'vscode/vscode/vs/editor/browser/widget/diffEditor/commands';
6
5
  import { INLINE_CHAT_ID } from 'vscode/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
7
6
  import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
@@ -13,7 +12,7 @@ class ChatAccessibilityHelp {
13
12
  constructor() {
14
13
  this.priority = 107;
15
14
  this.name = 'panelChat';
16
- this.type = AccessibleViewType.Help;
15
+ this.type = "help" ;
17
16
  this.when = ( (ContextKeyExpr.and(
18
17
  (CONTEXT_CHAT_LOCATION.isEqualTo(ChatAgentLocation.Panel)),
19
18
  (ContextKeyExpr.or(CONTEXT_IN_CHAT_SESSION, CONTEXT_RESPONSE, CONTEXT_REQUEST))
@@ -28,93 +27,93 @@ function getAccessibilityHelpText(type) {
28
27
  const content = [];
29
28
  if (type === 'panelChat') {
30
29
  content.push(( localize(
31
- 7078,
30
+ 7290,
32
31
  'The 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.'
33
32
  )));
34
33
  content.push(( localize(
35
- 7079,
34
+ 7291,
36
35
  '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.'
37
36
  )));
38
37
  content.push(( localize(
39
- 7080,
38
+ 7292,
40
39
  'In the input box, inspect the last response in the accessible view{0}.',
41
40
  '<keybinding:editor.action.accessibleView>'
42
41
  )));
43
42
  content.push(( localize(
44
- 7081,
43
+ 7293,
45
44
  'In the input box, navigate to the suggested follow up question (Shift+Tab) and press Enter to run it.'
46
45
  )));
47
46
  content.push(( localize(
48
- 7082,
47
+ 7294,
49
48
  '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.'
50
49
  )));
51
50
  content.push(( localize(
52
- 7083,
51
+ 7295,
53
52
  'To focus the chat request/response list, which can be navigated with up and down arrows, invoke the Focus Chat command{0}.',
54
53
  '<keybinding:chat.action.focus>'
55
54
  )));
56
55
  content.push(( localize(
57
- 7084,
56
+ 7296,
58
57
  'To focus the input box for chat requests, invoke the Focus Chat Input command{0}.',
59
58
  '<keybinding:workbench.action.chat.focusInput>'
60
59
  )));
61
60
  content.push(( localize(
62
- 7085,
61
+ 7297,
63
62
  'To focus the next code block within a response, invoke the Chat: Next Code Block command{0}.',
64
63
  '<keybinding:workbench.action.chat.nextCodeBlock>'
65
64
  )));
66
65
  content.push(( localize(
67
- 7086,
66
+ 7298,
68
67
  'To focus the next file tree within a response, invoke the Chat: Next File Tree command{0}.',
69
68
  '<keybinding:workbench.action.chat.nextFileTree>'
70
69
  )));
71
70
  content.push(( localize(
72
- 7087,
71
+ 7299,
73
72
  'To create a new chat session, invoke the New Chat command{0}.',
74
73
  '<keybinding:workbench.action.chat.new>'
75
74
  )));
76
75
  }
77
76
  else {
78
77
  content.push(( localize(
79
- 7088,
78
+ 7300,
80
79
  "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."
81
80
  )));
82
81
  content.push(( localize(
83
- 7089,
82
+ 7301,
84
83
  "It can be activated via code actions or directly using the command: Inline Chat: Start Inline Chat{0}.",
85
84
  '<keybinding:inlineChat.start>'
86
85
  )));
87
86
  content.push(( localize(
88
- 7090,
87
+ 7302,
89
88
  '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.',
90
89
  '<keybinding:history.showPrevious>',
91
90
  '<keybinding:history.showNext>'
92
91
  )));
93
92
  content.push(( localize(
94
- 7091,
93
+ 7303,
95
94
  'In the input box, inspect the response in the accessible view{0}.',
96
95
  '<keybinding:editor.action.accessibleView>'
97
96
  )));
98
97
  content.push(( localize(
99
- 7092,
98
+ 7304,
100
99
  "Context menu actions may run a request prefixed with a /. Type / to discover such ready-made commands."
101
100
  )));
102
101
  content.push(( localize(
103
- 7093,
102
+ 7305,
104
103
  "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."
105
104
  )));
106
105
  content.push(( localize(
107
- 7094,
106
+ 7306,
108
107
  "Once in the diff editor, enter review mode with{0}. Use up and down arrows to navigate lines with the proposed changes.",
109
108
  AccessibleDiffViewerNext.id
110
109
  )));
111
110
  content.push(( localize(
112
- 7095,
111
+ 7307,
113
112
  "Use tab to reach conditional parts like commands, status, message responses and more."
114
113
  )));
115
114
  }
116
115
  content.push(( localize(
117
- 7096,
116
+ 7308,
118
117
  "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."
119
118
  )));
120
119
  return content.join('\n');
@@ -134,8 +133,8 @@ function getChatAccessibilityHelpProvider(accessor, editor, type) {
134
133
  const helpText = getAccessibilityHelpText(type);
135
134
  return (
136
135
  (new AccessibleContentProvider(
137
- type === 'panelChat' ? AccessibleViewProviderId.Chat : AccessibleViewProviderId.InlineChat,
138
- { type: AccessibleViewType.Help },
136
+ type === 'panelChat' ? "panelChat" : "inlineChat" ,
137
+ { type: "help" },
139
138
  () => helpText,
140
139
  () => {
141
140
  if (type === 'panelChat' && cachedPosition) {
@@ -147,7 +146,7 @@ function getChatAccessibilityHelpProvider(accessor, editor, type) {
147
146
  ctrl?.focus();
148
147
  }
149
148
  },
150
- type === 'panelChat' ? AccessibilityVerbositySettingId.Chat : AccessibilityVerbositySettingId.InlineChat
149
+ type === 'panelChat' ? "accessibility.verbosity.panelChat" : "accessibility.verbosity.inlineChat"
151
150
  ))
152
151
  );
153
152
  }
@@ -1,11 +1,9 @@
1
1
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
2
- import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
3
2
  import { localize2 } from 'vscode/vscode/vs/nls';
4
3
  import { AccessibilitySignal } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
5
4
  import { IAccessibilitySignalService } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
6
5
  import { registerAction2, Action2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
7
6
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
8
- import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
9
7
  import { ActiveEditorContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
10
8
  import { CHAT_CATEGORY, isChatViewTitleActionContext } from 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
11
9
  import { clearChatEditor } from 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatClear';
@@ -21,7 +19,7 @@ function registerNewChatActions() {
21
19
  constructor() {
22
20
  super({
23
21
  id: 'workbench.action.chatEditor.newChat',
24
- title: ( localize2(7097, "New Chat")),
22
+ title: ( localize2(7309, "New Chat")),
25
23
  icon: Codicon.plus,
26
24
  f1: false,
27
25
  precondition: CONTEXT_CHAT_ENABLED,
@@ -42,16 +40,16 @@ function registerNewChatActions() {
42
40
  constructor() {
43
41
  super({
44
42
  id: ACTION_ID_NEW_CHAT,
45
- title: ( localize2(7097, "New Chat")),
43
+ title: ( localize2(7309, "New Chat")),
46
44
  category: CHAT_CATEGORY,
47
45
  icon: Codicon.plus,
48
46
  precondition: CONTEXT_CHAT_ENABLED,
49
47
  f1: true,
50
48
  keybinding: {
51
- weight: KeybindingWeight.WorkbenchContrib,
52
- primary: KeyMod.CtrlCmd | KeyCode.KeyL,
49
+ weight: 200 ,
50
+ primary: 2048 | 42 ,
53
51
  mac: {
54
- primary: KeyMod.WinCtrl | KeyCode.KeyL
52
+ primary: 256 | 42
55
53
  },
56
54
  when: CONTEXT_IN_CHAT_SESSION
57
55
  },