@codingame/monaco-vscode-chat-service-override 7.1.0 → 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
4
4
|
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { rtrim } from 'vscode/vscode/vs/base/common/strings';
|
|
@@ -11,7 +11,6 @@ import { SpeechToTextStatus } from 'vscode/vscode/vs/workbench/contrib/speech/co
|
|
|
11
11
|
import { ISpeechService } from 'vscode/vscode/vs/workbench/contrib/speech/common/speechService.service';
|
|
12
12
|
|
|
13
13
|
var VoiceChatService_1;
|
|
14
|
-
const _moduleId = "vs/workbench/contrib/chat/common/voiceChatService";
|
|
15
14
|
var PhraseTextType;
|
|
16
15
|
( ((function(PhraseTextType) {
|
|
17
16
|
PhraseTextType[PhraseTextType["AGENT"] = 1] = "AGENT";
|
|
@@ -21,19 +20,19 @@ var PhraseTextType;
|
|
|
21
20
|
const VoiceChatInProgress = ( (new RawContextKey(
|
|
22
21
|
'voiceChatInProgress',
|
|
23
22
|
false,
|
|
24
|
-
{ type: 'boolean', description: (
|
|
23
|
+
{ type: 'boolean', description: ( localize(7289, "A speech-to-text session is in progress for chat.")) }
|
|
25
24
|
)));
|
|
26
25
|
let VoiceChatService = class VoiceChatService extends Disposable {
|
|
27
26
|
static { VoiceChatService_1 = this; }
|
|
28
27
|
static { this.AGENT_PREFIX = chatAgentLeader; }
|
|
29
28
|
static { this.COMMAND_PREFIX = chatSubcommandLeader; }
|
|
30
29
|
static { this.PHRASES_LOWER = {
|
|
31
|
-
[
|
|
32
|
-
[
|
|
30
|
+
[this.AGENT_PREFIX]: 'at',
|
|
31
|
+
[this.COMMAND_PREFIX]: 'slash'
|
|
33
32
|
}; }
|
|
34
33
|
static { this.PHRASES_UPPER = {
|
|
35
|
-
[
|
|
36
|
-
[
|
|
34
|
+
[this.AGENT_PREFIX]: 'At',
|
|
35
|
+
[this.COMMAND_PREFIX]: 'Slash'
|
|
37
36
|
}; }
|
|
38
37
|
static { this.CHAT_AGENT_ALIAS = ( (new Map([['vscode', 'code']]))); }
|
|
39
38
|
constructor(speechService, chatAgentService, contextKeyService) {
|
|
@@ -15,20 +15,20 @@ import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
|
15
15
|
import { InlineChatEnabler } from 'vscode/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl';
|
|
16
16
|
import { AccessibleViewRegistry } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleViewRegistry';
|
|
17
17
|
import { SubmitAction, CancelAction } from 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatExecuteActions';
|
|
18
|
-
import {
|
|
18
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
19
19
|
import { CONTEXT_CHAT_INPUT_HAS_TEXT } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
20
20
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
21
21
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
22
22
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
23
|
+
import { InlineChatAccessibilityHelp } from './inlineChatAccessibilityHelp.js';
|
|
23
24
|
|
|
24
|
-
const _moduleId = "vs/workbench/contrib/inlineChat/browser/inlineChat.contribution";
|
|
25
25
|
registerEditorContribution(INLINE_CHAT_ID, InlineChatController, EditorContributionInstantiation.Eager);
|
|
26
26
|
const sendActionMenuItem = {
|
|
27
27
|
group: '0_main',
|
|
28
28
|
order: 0,
|
|
29
29
|
command: {
|
|
30
30
|
id: SubmitAction.ID,
|
|
31
|
-
title: (
|
|
31
|
+
title: ( localize(3121, "Send")),
|
|
32
32
|
},
|
|
33
33
|
when: ( (ContextKeyExpr.and(
|
|
34
34
|
CONTEXT_CHAT_INPUT_HAS_TEXT,
|
|
@@ -43,8 +43,8 @@ const cancelActionMenuItem = {
|
|
|
43
43
|
order: 0,
|
|
44
44
|
command: {
|
|
45
45
|
id: CancelAction.ID,
|
|
46
|
-
title: (
|
|
47
|
-
shortTitle: (
|
|
46
|
+
title: ( localize(3122, "Stop Request")),
|
|
47
|
+
shortTitle: ( localize(3123, "Stop")),
|
|
48
48
|
},
|
|
49
49
|
when: ( (ContextKeyExpr.and(CTX_INLINE_CHAT_REQUEST_IN_PROGRESS))),
|
|
50
50
|
};
|
|
@@ -69,6 +69,7 @@ const workbenchContributionsRegistry = ( (Registry.as(Extensions.Workbench)));
|
|
|
69
69
|
workbenchContributionsRegistry.registerWorkbenchContribution(InlineChatNotebookContribution, LifecyclePhase.Restored);
|
|
70
70
|
registerWorkbenchContribution2(InlineChatEnabler.Id, InlineChatEnabler, WorkbenchPhase.AfterRestored);
|
|
71
71
|
AccessibleViewRegistry.register(( (new InlineChatAccessibleView())));
|
|
72
|
+
AccessibleViewRegistry.register(( (new InlineChatAccessibilityHelp())));
|
|
72
73
|
let MenuCopier = class MenuCopier {
|
|
73
74
|
static { this.Id = 'inlineChat.menuCopier'; }
|
|
74
75
|
constructor(configService) {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
|
|
2
|
+
import { AccessibleViewType } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
3
|
+
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
4
|
+
import { getChatAccessibilityHelpProvider } from '../../chat/browser/actions/chatAccessibilityHelp.js';
|
|
5
|
+
import { CONTEXT_CHAT_INPUT_HAS_FOCUS } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
6
|
+
import { CTX_INLINE_CHAT_RESPONSE_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
|
|
7
|
+
|
|
8
|
+
class InlineChatAccessibilityHelp {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.priority = 106;
|
|
11
|
+
this.name = 'inlineChat';
|
|
12
|
+
this.type = AccessibleViewType.Help;
|
|
13
|
+
this.when = ( ContextKeyExpr.or(CTX_INLINE_CHAT_RESPONSE_FOCUSED, CONTEXT_CHAT_INPUT_HAS_FOCUS));
|
|
14
|
+
}
|
|
15
|
+
getProvider(accessor) {
|
|
16
|
+
const codeEditor = accessor.get(ICodeEditorService).getActiveCodeEditor() || accessor.get(ICodeEditorService).getFocusedCodeEditor();
|
|
17
|
+
if (!codeEditor) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
return getChatAccessibilityHelpProvider(accessor, codeEditor, 'inlineChat');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { InlineChatAccessibilityHelp };
|
|
@@ -2,10 +2,10 @@ import { InlineChatController } from 'vscode/vscode/vs/workbench/contrib/inlineC
|
|
|
2
2
|
import { CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_RESPONSE_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
|
|
3
3
|
import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
|
|
4
4
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
5
|
-
import { AccessibleViewType, AccessibleViewProviderId } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
6
|
-
import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
5
|
+
import { AccessibleViewType, AccessibleContentProvider, AccessibleViewProviderId } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
7
6
|
import { MarkdownString } from 'vscode/vscode/vs/base/common/htmlContent';
|
|
8
7
|
import { renderMarkdownAsPlaintext } from 'vscode/vscode/vs/base/browser/markdownRenderer';
|
|
8
|
+
import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
9
9
|
|
|
10
10
|
class InlineChatAccessibleView {
|
|
11
11
|
constructor() {
|
|
@@ -28,17 +28,14 @@ class InlineChatAccessibleView {
|
|
|
28
28
|
if (!responseContent) {
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
options: { type: AccessibleViewType.View }
|
|
39
|
-
};
|
|
31
|
+
return ( new AccessibleContentProvider(
|
|
32
|
+
AccessibleViewProviderId.InlineChat,
|
|
33
|
+
{ type: AccessibleViewType.View },
|
|
34
|
+
() => renderMarkdownAsPlaintext(( new MarkdownString(responseContent)), true),
|
|
35
|
+
() => controller.focus(),
|
|
36
|
+
AccessibilityVerbositySettingId.InlineChat
|
|
37
|
+
));
|
|
40
38
|
}
|
|
41
|
-
dispose() { }
|
|
42
39
|
}
|
|
43
40
|
|
|
44
41
|
export { InlineChatAccessibleView };
|
|
@@ -2,7 +2,7 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
import { Queue, raceCancellation } from 'vscode/vscode/vs/base/common/async';
|
|
3
3
|
import { DisposableStore, MutableDisposable, dispose, combinedDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { isCodeEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
|
|
5
|
-
import {
|
|
5
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
6
6
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
7
7
|
import { SaveReason } from 'vscode/vscode/vs/workbench/common/editor';
|
|
8
8
|
import { IInlineChatSessionService } from 'vscode/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service';
|
|
@@ -22,7 +22,6 @@ import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
|
22
22
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
23
23
|
import { InlineChatController } from 'vscode/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
24
24
|
|
|
25
|
-
const _moduleId = "vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl";
|
|
26
25
|
let InlineChatSavingServiceImpl = class InlineChatSavingServiceImpl {
|
|
27
26
|
constructor(_fileConfigService, _editorGroupService, _textFileService, _editorService, _inlineChatSessionService, _configService, _workingCopyFileService, _logService) {
|
|
28
27
|
this._fileConfigService = _fileConfigService;
|
|
@@ -104,14 +103,9 @@ let InlineChatSavingServiceImpl = class InlineChatSavingServiceImpl {
|
|
|
104
103
|
}
|
|
105
104
|
progress.report({
|
|
106
105
|
message: sessions.size === 1
|
|
107
|
-
? (
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
"Waiting for Inline Chat changes to be Accepted or Discarded..."
|
|
111
|
-
))
|
|
112
|
-
: ( localizeWithPath(
|
|
113
|
-
_moduleId,
|
|
114
|
-
1,
|
|
106
|
+
? ( localize(3104, "Waiting for Inline Chat changes to be Accepted or Discarded..."))
|
|
107
|
+
: ( localize(
|
|
108
|
+
3105,
|
|
115
109
|
"Waiting for Inline Chat changes in {0} editors to be Accepted or Discarded...",
|
|
116
110
|
sessions.size
|
|
117
111
|
))
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ChatEditorInput } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
2
|
-
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
3
|
-
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
4
|
-
|
|
5
|
-
async function clearChatEditor(accessor) {
|
|
6
|
-
const editorService = accessor.get(IEditorService);
|
|
7
|
-
const editorGroupsService = accessor.get(IEditorGroupsService);
|
|
8
|
-
const chatEditorInput = editorService.activeEditor;
|
|
9
|
-
if (chatEditorInput instanceof ChatEditorInput) {
|
|
10
|
-
await editorService.replaceEditors([{
|
|
11
|
-
editor: chatEditorInput,
|
|
12
|
-
replacement: { resource: ChatEditorInput.getNewEditorUri(), options: { pinned: true } }
|
|
13
|
-
}], editorGroupsService.activeGroup);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { clearChatEditor };
|