@codingame/monaco-vscode-chat-service-override 7.0.11 → 7.1.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.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +86 -91
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +5 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +205 -115
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +61 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +3 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +3 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +4 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +10 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +24 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipantContributions.js +29 -108
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +76 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +9 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatContextAttachments.js +9 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions.js +17 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +28 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +2 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +17 -55
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.js +54 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.js +3 -4
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +60 -25
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +6 -7
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +6 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +24 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +9 -12
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.js +4 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.js +0 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-chat-service-override",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.1",
|
|
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@7.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@7.1.1"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -1,130 +1,123 @@
|
|
|
1
|
-
import {
|
|
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, AccessibleViewProviderId } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
3
|
+
import { AccessibleViewType, AccessibleContentProvider, AccessibleViewProviderId } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
4
4
|
import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
5
5
|
import { AccessibleDiffViewerNext } from 'vscode/vscode/vs/editor/browser/widget/diffEditor/commands';
|
|
6
6
|
import { INLINE_CHAT_ID } from 'vscode/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
|
|
7
7
|
import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
|
|
8
8
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
9
|
-
import { CONTEXT_IN_CHAT_SESSION, CONTEXT_RESPONSE, CONTEXT_REQUEST } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
9
|
+
import { CONTEXT_CHAT_LOCATION, CONTEXT_IN_CHAT_SESSION, CONTEXT_RESPONSE, CONTEXT_REQUEST } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
10
|
+
import { ChatAgentLocation } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents';
|
|
10
11
|
|
|
11
|
-
const _moduleId = "vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp";
|
|
12
12
|
class ChatAccessibilityHelp {
|
|
13
13
|
constructor() {
|
|
14
|
-
this.priority =
|
|
14
|
+
this.priority = 107;
|
|
15
15
|
this.name = 'panelChat';
|
|
16
16
|
this.type = AccessibleViewType.Help;
|
|
17
|
-
this.when = ( (ContextKeyExpr.
|
|
17
|
+
this.when = ( (ContextKeyExpr.and(
|
|
18
|
+
(CONTEXT_CHAT_LOCATION.isEqualTo(ChatAgentLocation.Panel)),
|
|
19
|
+
(ContextKeyExpr.or(CONTEXT_IN_CHAT_SESSION, CONTEXT_RESPONSE, CONTEXT_REQUEST))
|
|
20
|
+
)));
|
|
18
21
|
}
|
|
19
22
|
getProvider(accessor) {
|
|
20
23
|
const codeEditor = accessor.get(ICodeEditorService).getActiveCodeEditor() || accessor.get(ICodeEditorService).getFocusedCodeEditor();
|
|
21
24
|
return getChatAccessibilityHelpProvider(accessor, codeEditor ?? undefined, 'panelChat');
|
|
22
25
|
}
|
|
23
|
-
dispose() { }
|
|
24
26
|
}
|
|
25
27
|
function getAccessibilityHelpText(type) {
|
|
26
28
|
const content = [];
|
|
27
29
|
if (type === 'panelChat') {
|
|
28
|
-
content.push((
|
|
29
|
-
|
|
30
|
-
0,
|
|
30
|
+
content.push(( localize(
|
|
31
|
+
7221,
|
|
31
32
|
'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.'
|
|
32
33
|
)));
|
|
33
|
-
content.push((
|
|
34
|
-
|
|
35
|
-
1,
|
|
34
|
+
content.push(( localize(
|
|
35
|
+
7222,
|
|
36
36
|
'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
37
|
)));
|
|
38
|
-
content.push((
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
'
|
|
38
|
+
content.push(( localize(
|
|
39
|
+
7223,
|
|
40
|
+
'In the input box, inspect the last response in the accessible view{0}.',
|
|
41
|
+
'<keybinding:editor.action.accessibleView>'
|
|
42
42
|
)));
|
|
43
|
-
content.push((
|
|
44
|
-
|
|
45
|
-
3,
|
|
43
|
+
content.push(( localize(
|
|
44
|
+
7224,
|
|
46
45
|
'In the input box, navigate to the suggested follow up question (Shift+Tab) and press Enter to run it.'
|
|
47
46
|
)));
|
|
48
|
-
content.push((
|
|
49
|
-
|
|
50
|
-
4,
|
|
47
|
+
content.push(( localize(
|
|
48
|
+
7225,
|
|
51
49
|
'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.'
|
|
52
50
|
)));
|
|
53
|
-
content.push((
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
'
|
|
51
|
+
content.push(( localize(
|
|
52
|
+
7226,
|
|
53
|
+
'To focus the chat request/response list, which can be navigated with up and down arrows, invoke the Focus Chat command{0}.',
|
|
54
|
+
'<keybinding:chat.action.focus>'
|
|
57
55
|
)));
|
|
58
|
-
content.push((
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
'
|
|
56
|
+
content.push(( localize(
|
|
57
|
+
7227,
|
|
58
|
+
'To focus the input box for chat requests, invoke the Focus Chat Input command{0}.',
|
|
59
|
+
'<keybinding:workbench.action.chat.focusInput>'
|
|
62
60
|
)));
|
|
63
|
-
content.push((
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
'
|
|
61
|
+
content.push(( localize(
|
|
62
|
+
7228,
|
|
63
|
+
'To focus the next code block within a response, invoke the Chat: Next Code Block command{0}.',
|
|
64
|
+
'<keybinding:workbench.action.chat.nextCodeBlock>'
|
|
67
65
|
)));
|
|
68
|
-
content.push((
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
'
|
|
66
|
+
content.push(( localize(
|
|
67
|
+
7229,
|
|
68
|
+
'To focus the next file tree within a response, invoke the Chat: Next File Tree command{0}.',
|
|
69
|
+
'<keybinding:workbench.action.chat.nextFileTree>'
|
|
72
70
|
)));
|
|
73
|
-
content.push((
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
'
|
|
71
|
+
content.push(( localize(
|
|
72
|
+
7230,
|
|
73
|
+
'To clear the request/response list, invoke the Chat Clear command{0}.',
|
|
74
|
+
'<keybinding:workbench.action.chat.clear>'
|
|
77
75
|
)));
|
|
78
76
|
}
|
|
79
77
|
else {
|
|
80
|
-
content.push((
|
|
81
|
-
|
|
82
|
-
10,
|
|
78
|
+
content.push(( localize(
|
|
79
|
+
7231,
|
|
83
80
|
"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."
|
|
84
81
|
)));
|
|
85
|
-
content.push((
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
content.push(( localize(
|
|
83
|
+
7232,
|
|
84
|
+
"It can be activated via code actions or directly using the command: Inline Chat: Start Inline Chat{0}.",
|
|
85
|
+
'<keybinding:inlineChat.start>'
|
|
89
86
|
)));
|
|
90
|
-
content.push((
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
'
|
|
87
|
+
content.push(( localize(
|
|
88
|
+
7233,
|
|
89
|
+
'In the input box, use{0} and{1} to navigate your request history. Edit input and use enter or the submit button to run a new request.',
|
|
90
|
+
'<keybinding:inlineChat.previousFromHistory>',
|
|
91
|
+
'<keybinding:inlineChat.nextFromHistory>'
|
|
94
92
|
)));
|
|
95
|
-
content.push((
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
'
|
|
93
|
+
content.push(( localize(
|
|
94
|
+
7234,
|
|
95
|
+
'In the input box, inspect the response in the accessible view{0}.',
|
|
96
|
+
'<keybinding:editor.action.accessibleView>'
|
|
99
97
|
)));
|
|
100
|
-
content.push((
|
|
101
|
-
|
|
102
|
-
14,
|
|
98
|
+
content.push(( localize(
|
|
99
|
+
7235,
|
|
103
100
|
"Context menu actions may run a request prefixed with a /. Type / to discover such ready-made commands."
|
|
104
101
|
)));
|
|
105
|
-
content.push((
|
|
106
|
-
|
|
107
|
-
15,
|
|
102
|
+
content.push(( localize(
|
|
103
|
+
7236,
|
|
108
104
|
"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."
|
|
109
105
|
)));
|
|
110
|
-
content.push((
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
"Once in the diff editor, enter review mode with<keybinding:{0}>. Use up and down arrows to navigate lines with the proposed changes.",
|
|
106
|
+
content.push(( localize(
|
|
107
|
+
7237,
|
|
108
|
+
"Once in the diff editor, enter review mode with{0}. Use up and down arrows to navigate lines with the proposed changes.",
|
|
114
109
|
AccessibleDiffViewerNext.id
|
|
115
110
|
)));
|
|
116
|
-
content.push((
|
|
117
|
-
|
|
118
|
-
17,
|
|
111
|
+
content.push(( localize(
|
|
112
|
+
7238,
|
|
119
113
|
"Use tab to reach conditional parts like commands, status, message responses and more."
|
|
120
114
|
)));
|
|
121
115
|
}
|
|
122
|
-
content.push((
|
|
123
|
-
|
|
124
|
-
18,
|
|
116
|
+
content.push(( localize(
|
|
117
|
+
7239,
|
|
125
118
|
"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."
|
|
126
119
|
)));
|
|
127
|
-
return content.join('\n
|
|
120
|
+
return content.join('\n');
|
|
128
121
|
}
|
|
129
122
|
function getChatAccessibilityHelpProvider(accessor, editor, type) {
|
|
130
123
|
const widgetService = accessor.get(IChatWidgetService);
|
|
@@ -139,22 +132,24 @@ function getChatAccessibilityHelpProvider(accessor, editor, type) {
|
|
|
139
132
|
const cachedPosition = inputEditor.getPosition();
|
|
140
133
|
inputEditor.getSupportedActions();
|
|
141
134
|
const helpText = getAccessibilityHelpText(type);
|
|
142
|
-
return
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
135
|
+
return (
|
|
136
|
+
(new AccessibleContentProvider(
|
|
137
|
+
type === 'panelChat' ? AccessibleViewProviderId.Chat : AccessibleViewProviderId.InlineChat,
|
|
138
|
+
{ type: AccessibleViewType.Help },
|
|
139
|
+
() => helpText,
|
|
140
|
+
() => {
|
|
141
|
+
if (type === 'panelChat' && cachedPosition) {
|
|
142
|
+
inputEditor.setPosition(cachedPosition);
|
|
143
|
+
inputEditor.focus();
|
|
144
|
+
}
|
|
145
|
+
else if (type === 'inlineChat') {
|
|
146
|
+
const ctrl = editor?.getContribution(INLINE_CHAT_ID);
|
|
147
|
+
ctrl?.focus();
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
type === 'panelChat' ? AccessibilityVerbositySettingId.Chat : AccessibilityVerbositySettingId.InlineChat
|
|
151
|
+
))
|
|
152
|
+
);
|
|
158
153
|
}
|
|
159
154
|
|
|
160
155
|
export { ChatAccessibilityHelp, getAccessibilityHelpText, getChatAccessibilityHelpProvider };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
2
2
|
import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
3
|
-
import {
|
|
3
|
+
import { localize2 } from 'vscode/vscode/vs/nls';
|
|
4
4
|
import { AccessibilitySignal } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
|
|
5
5
|
import { IAccessibilitySignalService } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
|
|
6
6
|
import { registerAction2, Action2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
@@ -8,21 +8,20 @@ import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/cont
|
|
|
8
8
|
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
9
9
|
import { ActiveEditorContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
10
10
|
import { CHAT_CATEGORY, isChatViewTitleActionContext } from 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
11
|
-
import { clearChatEditor } from '
|
|
11
|
+
import { clearChatEditor } from 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatClear';
|
|
12
12
|
import { CHAT_VIEW_ID } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
13
13
|
import { IChatWidgetService } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
14
14
|
import { ChatEditorInput } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
15
15
|
import { CONTEXT_CHAT_ENABLED, CONTEXT_IN_CHAT_SESSION } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
16
16
|
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
17
17
|
|
|
18
|
-
const _moduleId = "vs/workbench/contrib/chat/browser/actions/chatClearActions";
|
|
19
18
|
const ACTION_ID_NEW_CHAT = `workbench.action.chat.newChat`;
|
|
20
19
|
function registerNewChatActions() {
|
|
21
20
|
registerAction2(class NewChatEditorAction extends Action2 {
|
|
22
21
|
constructor() {
|
|
23
22
|
super({
|
|
24
23
|
id: 'workbench.action.chatEditor.newChat',
|
|
25
|
-
title: (
|
|
24
|
+
title: ( localize2(7240, "New Chat")),
|
|
26
25
|
icon: Codicon.plus,
|
|
27
26
|
f1: false,
|
|
28
27
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
@@ -43,7 +42,7 @@ function registerNewChatActions() {
|
|
|
43
42
|
constructor() {
|
|
44
43
|
super({
|
|
45
44
|
id: ACTION_ID_NEW_CHAT,
|
|
46
|
-
title: (
|
|
45
|
+
title: ( localize2(7240, "New Chat")),
|
|
47
46
|
category: CHAT_CATEGORY,
|
|
48
47
|
icon: Codicon.plus,
|
|
49
48
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
@@ -73,7 +72,7 @@ function registerNewChatActions() {
|
|
|
73
72
|
const accessibilitySignalService = accessor.get(IAccessibilitySignalService);
|
|
74
73
|
if (isChatViewTitleActionContext(context)) {
|
|
75
74
|
announceChatCleared(accessibilitySignalService);
|
|
76
|
-
context.chatView.clear();
|
|
75
|
+
context.chatView.widget.clear();
|
|
77
76
|
context.chatView.widget.focusInput();
|
|
78
77
|
}
|
|
79
78
|
else {
|