@codingame/monaco-vscode-chat-service-override 38.0.6 → 38.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/common.js +0 -53
- package/index.js +0 -3
- package/package.json +5 -5
- package/session.js +0 -3
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/missionControlAgentHostContribution.js +1 -1
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionListController.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionListController.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/editorCloudSandboxContribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/editorCloudSandboxContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHost.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostChatContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +1 -1
- package/vscode/src/vs/platform/agentHost/browser/webPubSubRelayTransport.d.ts +0 -135
- package/vscode/src/vs/platform/agentHost/browser/webPubSubRelayTransport.js +0 -510
- package/vscode/src/vs/platform/agentHost/common/agentModelNotices.d.ts +0 -22
- package/vscode/src/vs/platform/agentHost/common/agentModelNotices.js +0 -21
- package/vscode/src/vs/platform/agentHost/common/cloudSandboxAgentHost.d.ts +0 -273
- package/vscode/src/vs/platform/agentHost/common/cloudSandboxAgentHost.js +0 -61
- package/vscode/src/vs/platform/agentHost/common/meta/agentModelMeta.d.ts +0 -7
- package/vscode/src/vs/platform/agentHost/common/meta/agentModelMeta.js +0 -17
- package/vscode/src/vs/platform/agentHost/common/meta/copilotd/cloudSandboxProjectMeta.d.ts +0 -12
- package/vscode/src/vs/platform/agentHost/common/meta/copilotd/cloudSandboxProjectMeta.js +0 -48
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelEnsembleMeta.d.ts +0 -8
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelEnsembleMeta.js +0 -11
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelPricing.d.ts +0 -114
- package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelPricing.js +0 -141
- package/vscode/src/vs/platform/agentHost/common/taskEventReplay.d.ts +0 -48
- package/vscode/src/vs/platform/agentHost/common/taskEventReplay.js +0 -238
- package/vscode/src/vs/platform/agentHost/common/webPubSub/chunking.d.ts +0 -102
- package/vscode/src/vs/platform/agentHost/common/webPubSub/chunking.js +0 -260
- package/vscode/src/vs/platform/agentHost/common/webPubSub/framing.d.ts +0 -102
- package/vscode/src/vs/platform/agentHost/common/webPubSub/framing.js +0 -115
- package/vscode/src/vs/platform/agentHost/common/webPubSub/groups.d.ts +0 -46
- package/vscode/src/vs/platform/agentHost/common/webPubSub/groups.js +0 -92
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +0 -9
- package/vscode/src/vs/sessions/contrib/chat/browser/voiceBridge.contribution.d.ts +0 -14
- package/vscode/src/vs/sessions/contrib/chat/browser/voiceBridge.contribution.js +0 -385
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudAutomationStore.d.ts +0 -67
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudAutomationStore.js +0 -695
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudSandboxSessionConfig.d.ts +0 -4
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudSandboxSessionConfig.js +0 -39
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessions.contribution.d.ts +0 -1
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessions.contribution.js +0 -59
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsActions.d.ts +0 -1
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsActions.js +0 -83
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsChangesets.d.ts +0 -87
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsChangesets.js +0 -176
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.d.ts +0 -422
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.js +0 -2444
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/githubCloudAutomationStore.d.ts +0 -91
- package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/githubCloudAutomationStore.js +0 -620
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHost.contribution.d.ts +0 -1
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHost.contribution.js +0 -5
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHostContribution.d.ts +0 -46
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHostContribution.js +0 -321
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxSessionsProvider.d.ts +0 -104
- package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxSessionsProvider.js +0 -345
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.js +0 -611
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.js +0 -85
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.d.ts +0 -200
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.js +0 -981
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +0 -206
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.js +0 -368
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js +0 -57
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.d.ts +0 -33
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.js +0 -98
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.d.ts +0 -32
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.js +0 -186
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js +0 -116
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.d.ts +0 -32
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js +0 -226
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.js +0 -138
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.d.ts +0 -32
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.js +0 -29
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.js +0 -108
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.js +0 -63
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/media/voiceModeOnboarding.css +0 -252
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.js +0 -178
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.d.ts +0 -47
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.js +0 -322
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.d.ts +0 -146
- package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.js +0 -890
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.d.ts +0 -132
- package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.js +0 -237
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.d.ts +0 -120
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.js +0 -234
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +0 -164
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/repositoryPicker.d.ts +0 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/repositoryPicker.js +0 -122
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupMicrosoftProbe.d.ts +0 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupMicrosoftProbe.js +0 -213
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxAgentHostService.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxAgentHostService.js +0 -561
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxApiService.d.ts +0 -133
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxApiService.js +0 -1176
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxConnectionCustomization.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxConnectionCustomization.js +0 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxCredentialRefresh.d.ts +0 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxCredentialRefresh.js +0 -220
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxHistoryCache.d.ts +0 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxHistoryCache.js +0 -184
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxLegacySessionPreparation.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxLegacySessionPreparation.js +0 -165
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxModels.d.ts +0 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxModels.js +0 -162
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxReadOnlySessionHandler.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxReadOnlySessionHandler.js +0 -129
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionContribution.d.ts +0 -166
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionContribution.js +0 -838
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionHandler.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionHandler.js +0 -604
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxTelemetry.d.ts +0 -289
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxTelemetry.js +0 -497
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlCredentialSealing.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlCredentialSealing.js +0 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentService.d.ts +0 -73
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentService.js +0 -398
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlSharingService.d.ts +0 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlSharingService.js +0 -296
- package/vscode/src/vs/workbench/contrib/chat/browser/speechToText/voiceCodeTranscriptionClient.d.ts +0 -63
- package/vscode/src/vs/workbench/contrib/chat/browser/speechToText/voiceCodeTranscriptionClient.js +0 -361
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.d.ts +0 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.js +0 -198
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.d.ts +0 -131
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.js +0 -871
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.d.ts +0 -66
- package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.js +0 -297
- package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.js +0 -118
|
@@ -1,385 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
5
|
-
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
6
|
-
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
7
|
-
import { CommandsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands';
|
|
8
|
-
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
9
|
-
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
10
|
-
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
11
|
-
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
12
|
-
import { IVoiceSessionController } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.service';
|
|
13
|
-
import { combineVoiceInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/voiceInputUtils';
|
|
14
|
-
import { resolveVoiceModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/voiceToolDispatchService';
|
|
15
|
-
import { ISessionsService } from '@codingame/monaco-vscode-api/vscode/vs/sessions/services/sessions/browser/sessionsService.service';
|
|
16
|
-
import { inheritableSessionTarget } from '@codingame/monaco-vscode-api/vscode/vs/sessions/services/sessions/common/sessionsManagement';
|
|
17
|
-
import { ISessionsManagementService } from '@codingame/monaco-vscode-api/vscode/vs/sessions/services/sessions/common/sessionsManagement.service';
|
|
18
|
-
import { NEW_CHAT_VOICE_SENTINEL } from '@codingame/monaco-vscode-api/vscode/vs/sessions/contrib/chat/browser/newChatVoice';
|
|
19
|
-
import { INewChatVoiceTargetService } from '@codingame/monaco-vscode-api/vscode/vs/sessions/contrib/chat/browser/newChatVoice.service';
|
|
20
|
-
import { INewSessionComposerService } from '@codingame/monaco-vscode-api/vscode/vs/sessions/contrib/chat/browser/newSessionComposerService.service';
|
|
21
|
-
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
22
|
-
|
|
23
|
-
async function prepareNewVoiceSession(
|
|
24
|
-
text,
|
|
25
|
-
sessionsService,
|
|
26
|
-
sessionsManagementService,
|
|
27
|
-
voiceSessionController,
|
|
28
|
-
hasActiveComposer,
|
|
29
|
-
beginVoiceTransition,
|
|
30
|
-
logService
|
|
31
|
-
) {
|
|
32
|
-
const activeSession = sessionsService.activeSession.get();
|
|
33
|
-
const isQuickChat = activeSession?.isQuickChat?.get() ?? false;
|
|
34
|
-
const folderUri = isQuickChat ? undefined : activeSession?.workspace.get()?.uri;
|
|
35
|
-
const previousTarget = voiceSessionController.targetSession.get();
|
|
36
|
-
const previousHadDraftTarget = voiceSessionController.hasDraftTarget.get();
|
|
37
|
-
const restoreVoiceTarget = () => previousHadDraftTarget ? voiceSessionController.setDraftTarget() : voiceSessionController.setTargetSession(previousTarget);
|
|
38
|
-
const fail = () => {
|
|
39
|
-
restoreVoiceTarget();
|
|
40
|
-
return "failed";
|
|
41
|
-
};
|
|
42
|
-
voiceSessionController.setDraftTarget();
|
|
43
|
-
const transition = beginVoiceTransition();
|
|
44
|
-
try {
|
|
45
|
-
const inheritedTarget = inheritableSessionTarget(sessionsManagementService, activeSession, folderUri);
|
|
46
|
-
const target = inheritedTarget.providerId || !activeSession || !folderUri ? inheritedTarget : {
|
|
47
|
-
providerId: activeSession.providerId
|
|
48
|
-
};
|
|
49
|
-
const result = await sessionsService.openNewSession({
|
|
50
|
-
folderUri,
|
|
51
|
-
...target
|
|
52
|
-
});
|
|
53
|
-
if (folderUri) {
|
|
54
|
-
if (!result.session) {
|
|
55
|
-
return fail();
|
|
56
|
-
}
|
|
57
|
-
if (text.trim()) {
|
|
58
|
-
await sessionsManagementService.sendNewChatRequest(result.session, {
|
|
59
|
-
query: text
|
|
60
|
-
});
|
|
61
|
-
return "sent";
|
|
62
|
-
}
|
|
63
|
-
return "prepared";
|
|
64
|
-
}
|
|
65
|
-
return sessionsService.activeSession.get() === undefined && hasActiveComposer() ? "prepared" : fail();
|
|
66
|
-
} catch (error) {
|
|
67
|
-
logService.error("Failed to prepare a new session for Voice Mode:", error);
|
|
68
|
-
return fail();
|
|
69
|
-
} finally {
|
|
70
|
-
transition.dispose();
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
let SessionsVoiceBridgeContribution = class SessionsVoiceBridgeContribution extends Disposable {
|
|
74
|
-
static {
|
|
75
|
-
this.ID = "sessions.voiceBridge";
|
|
76
|
-
}
|
|
77
|
-
constructor(
|
|
78
|
-
configurationService,
|
|
79
|
-
chatWidgetService,
|
|
80
|
-
sessionsService,
|
|
81
|
-
sessionsManagementService,
|
|
82
|
-
newChatVoiceTargetService,
|
|
83
|
-
voiceSessionController,
|
|
84
|
-
newSessionComposerService,
|
|
85
|
-
logService
|
|
86
|
-
) {
|
|
87
|
-
super();
|
|
88
|
-
this.configurationService = configurationService;
|
|
89
|
-
this.chatWidgetService = chatWidgetService;
|
|
90
|
-
this.sessionsService = sessionsService;
|
|
91
|
-
this.sessionsManagementService = sessionsManagementService;
|
|
92
|
-
this.newChatVoiceTargetService = newChatVoiceTargetService;
|
|
93
|
-
this.voiceSessionController = voiceSessionController;
|
|
94
|
-
this.newSessionComposerService = newSessionComposerService;
|
|
95
|
-
this.logService = logService;
|
|
96
|
-
this._commandDisposables = this._register(( new DisposableStore()));
|
|
97
|
-
this._updateCommands();
|
|
98
|
-
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
99
|
-
if (e.affectsConfiguration("agents.voice.enabled")) {
|
|
100
|
-
this._updateCommands();
|
|
101
|
-
}
|
|
102
|
-
}));
|
|
103
|
-
}
|
|
104
|
-
_updateCommands() {
|
|
105
|
-
this._commandDisposables.clear();
|
|
106
|
-
if (this.configurationService.getValue("agents.voice.enabled") !== true) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
this._commandDisposables.add(
|
|
110
|
-
CommandsRegistry.registerCommand("_chat.voice.acceptInput", (_accessor, text) => {
|
|
111
|
-
if (!text) {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
const composer = this._activeComposerTarget();
|
|
115
|
-
if (composer) {
|
|
116
|
-
composer.sendQuery(text);
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
const widget = this._activeSessionWidget() ?? this.chatWidgetService.lastFocusedWidget;
|
|
120
|
-
if (widget?.viewModel) {
|
|
121
|
-
if (widget.viewModel.editing) {
|
|
122
|
-
widget.input.setValue(text, false);
|
|
123
|
-
} else {
|
|
124
|
-
widget.acceptInput(combineVoiceInput(widget.getInput(), text), {
|
|
125
|
-
preserveFocus: true
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
})
|
|
130
|
-
);
|
|
131
|
-
this._commandDisposables.add(CommandsRegistry.registerCommand("_chat.voice.getCurrentSession", () => {
|
|
132
|
-
if (this._activeComposerTarget()) {
|
|
133
|
-
return ( NEW_CHAT_VOICE_SENTINEL.toString());
|
|
134
|
-
}
|
|
135
|
-
const activeChat = this._createdActiveChatResource();
|
|
136
|
-
if (activeChat) {
|
|
137
|
-
return ( activeChat.toString());
|
|
138
|
-
}
|
|
139
|
-
return this.chatWidgetService.lastFocusedWidget?.viewModel?.sessionResource?.toString();
|
|
140
|
-
}));
|
|
141
|
-
this._commandDisposables.add(
|
|
142
|
-
CommandsRegistry.registerCommand("_chat.voice.prepareNewSession", (_accessor, text) => {
|
|
143
|
-
this.newSessionComposerService.notifyUserNavigation();
|
|
144
|
-
return prepareNewVoiceSession(
|
|
145
|
-
text,
|
|
146
|
-
this.sessionsService,
|
|
147
|
-
this.sessionsManagementService,
|
|
148
|
-
this.voiceSessionController,
|
|
149
|
-
() => !!this._activeComposerTarget(),
|
|
150
|
-
() => this.newChatVoiceTargetService.beginVoiceTransition(),
|
|
151
|
-
this.logService
|
|
152
|
-
);
|
|
153
|
-
})
|
|
154
|
-
);
|
|
155
|
-
this._commandDisposables.add(
|
|
156
|
-
CommandsRegistry.registerCommand("_chat.voice.selectModel", (_accessor, requestedModel) => {
|
|
157
|
-
const composer = this._activeComposerTarget();
|
|
158
|
-
const widget = composer ? undefined : this._activeSessionWidget() ?? this.chatWidgetService.lastFocusedWidget;
|
|
159
|
-
const models = composer?.getVoiceModels() ?? widget?.inputPart.availableLanguageModels;
|
|
160
|
-
if (!models) {
|
|
161
|
-
return {
|
|
162
|
-
ok: false,
|
|
163
|
-
reason: "no_input"
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
const resolved = resolveVoiceModel(models, requestedModel);
|
|
167
|
-
if (!resolved.ok || !resolved.identifier) {
|
|
168
|
-
return resolved;
|
|
169
|
-
}
|
|
170
|
-
const selected = composer ? composer.selectVoiceModel(resolved.identifier) : widget.inputPart.switchModelByIdentifier(resolved.identifier, true, true);
|
|
171
|
-
return selected ? resolved : {
|
|
172
|
-
ok: false,
|
|
173
|
-
reason: "selection_failed",
|
|
174
|
-
available_models: resolved.available_models
|
|
175
|
-
};
|
|
176
|
-
})
|
|
177
|
-
);
|
|
178
|
-
this._commandDisposables.add(
|
|
179
|
-
CommandsRegistry.registerCommand("_chat.voice.switchToSession", async (_accessor, resourceStr) => {
|
|
180
|
-
if (!resourceStr) {
|
|
181
|
-
return false;
|
|
182
|
-
}
|
|
183
|
-
if (resourceStr === ( NEW_CHAT_VOICE_SENTINEL.toString())) {
|
|
184
|
-
const composer = this._activeComposerTarget();
|
|
185
|
-
composer?.focus();
|
|
186
|
-
return !!composer;
|
|
187
|
-
}
|
|
188
|
-
let resource;
|
|
189
|
-
try {
|
|
190
|
-
resource = ( URI.parse(resourceStr));
|
|
191
|
-
} catch {
|
|
192
|
-
return false;
|
|
193
|
-
}
|
|
194
|
-
const owner = this.sessionsManagementService.getSessionForChatResource(resource);
|
|
195
|
-
if (owner) {
|
|
196
|
-
await this.sessionsService.openSession(owner.session.resource, {
|
|
197
|
-
preserveFocus: true,
|
|
198
|
-
source: "voice"
|
|
199
|
-
});
|
|
200
|
-
if (!isEqual(owner.chat.resource, owner.session.resource)) {
|
|
201
|
-
await this.sessionsService.openChat(owner.session, owner.chat.resource);
|
|
202
|
-
}
|
|
203
|
-
return true;
|
|
204
|
-
}
|
|
205
|
-
const session = this.sessionsManagementService.getSession(resource);
|
|
206
|
-
if (session) {
|
|
207
|
-
await this.sessionsService.openSession(session.resource, {
|
|
208
|
-
preserveFocus: true,
|
|
209
|
-
source: "voice"
|
|
210
|
-
});
|
|
211
|
-
return true;
|
|
212
|
-
}
|
|
213
|
-
try {
|
|
214
|
-
await this.sessionsService.openSession(resource, {
|
|
215
|
-
preserveFocus: true,
|
|
216
|
-
source: "voice"
|
|
217
|
-
});
|
|
218
|
-
return true;
|
|
219
|
-
} catch {
|
|
220
|
-
return false;
|
|
221
|
-
}
|
|
222
|
-
})
|
|
223
|
-
);
|
|
224
|
-
this._commandDisposables.add(
|
|
225
|
-
CommandsRegistry.registerCommand("_chat.voice.activateSession", (_accessor, resourceStr) => {
|
|
226
|
-
if (!resourceStr || resourceStr === ( NEW_CHAT_VOICE_SENTINEL.toString())) {
|
|
227
|
-
return false;
|
|
228
|
-
}
|
|
229
|
-
let resource;
|
|
230
|
-
try {
|
|
231
|
-
resource = ( URI.parse(resourceStr));
|
|
232
|
-
} catch {
|
|
233
|
-
return false;
|
|
234
|
-
}
|
|
235
|
-
this.voiceSessionController.activateSession(resource);
|
|
236
|
-
return true;
|
|
237
|
-
})
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
|
-
_createdActiveChatResource() {
|
|
241
|
-
const active = this.sessionsService.activeSession.get();
|
|
242
|
-
return active?.isCreated.get() ? active.activeChat.get()?.resource : undefined;
|
|
243
|
-
}
|
|
244
|
-
_activeSessionWidget() {
|
|
245
|
-
const resource = this._createdActiveChatResource();
|
|
246
|
-
return resource ? this.chatWidgetService.getWidgetBySessionResource(resource) : undefined;
|
|
247
|
-
}
|
|
248
|
-
_activeComposerTarget() {
|
|
249
|
-
const composer = this.newChatVoiceTargetService.activeComposer.get();
|
|
250
|
-
if (!composer) {
|
|
251
|
-
return undefined;
|
|
252
|
-
}
|
|
253
|
-
if (composer.routesWhileSessionActive || !this._createdActiveChatResource()) {
|
|
254
|
-
return composer;
|
|
255
|
-
}
|
|
256
|
-
return undefined;
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
SessionsVoiceBridgeContribution = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IChatWidgetService)), ( __param(2, ISessionsService)), ( __param(3, ISessionsManagementService)), ( __param(4, INewChatVoiceTargetService)), ( __param(5, IVoiceSessionController)), ( __param(6, INewSessionComposerService)), ( __param(7, ILogService))], SessionsVoiceBridgeContribution));
|
|
260
|
-
registerWorkbenchContribution2(
|
|
261
|
-
SessionsVoiceBridgeContribution.ID,
|
|
262
|
-
SessionsVoiceBridgeContribution,
|
|
263
|
-
WorkbenchPhase.AfterRestored
|
|
264
|
-
);
|
|
265
|
-
let SessionsVoiceActiveSessionContribution = class SessionsVoiceActiveSessionContribution extends Disposable {
|
|
266
|
-
static {
|
|
267
|
-
this.ID = "sessions.voiceActiveSession";
|
|
268
|
-
}
|
|
269
|
-
constructor(voiceSessionController, sessionsService) {
|
|
270
|
-
super();
|
|
271
|
-
this.voiceSessionController = voiceSessionController;
|
|
272
|
-
this.sessionsService = sessionsService;
|
|
273
|
-
let voiceDraftSession;
|
|
274
|
-
this._register(autorun(reader => {
|
|
275
|
-
const active = this.sessionsService.activeSession.read(reader);
|
|
276
|
-
const hasDraftTarget = this.voiceSessionController.hasDraftTarget.read(reader);
|
|
277
|
-
if (!hasDraftTarget) {
|
|
278
|
-
voiceDraftSession = undefined;
|
|
279
|
-
} else if (!voiceDraftSession && active && !active.isCreated.read(reader)) {
|
|
280
|
-
voiceDraftSession = active;
|
|
281
|
-
}
|
|
282
|
-
if (voiceDraftSession?.isCreated.read(reader)) {
|
|
283
|
-
this.voiceSessionController.promoteDraftTarget(voiceDraftSession.activeChat.read(reader).resource);
|
|
284
|
-
voiceDraftSession = undefined;
|
|
285
|
-
}
|
|
286
|
-
if (!active) {
|
|
287
|
-
this.voiceSessionController.setActiveSessionShown(undefined);
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
if (!active.isCreated.read(reader)) {
|
|
291
|
-
this.voiceSessionController.setActiveSessionShown(null);
|
|
292
|
-
return;
|
|
293
|
-
}
|
|
294
|
-
this.voiceSessionController.setActiveSessionShown(active.activeChat.read(reader)?.resource);
|
|
295
|
-
}));
|
|
296
|
-
}
|
|
297
|
-
};
|
|
298
|
-
SessionsVoiceActiveSessionContribution = ( __decorate([( __param(0, IVoiceSessionController)), ( __param(1, ISessionsService))], SessionsVoiceActiveSessionContribution));
|
|
299
|
-
registerWorkbenchContribution2(
|
|
300
|
-
SessionsVoiceActiveSessionContribution.ID,
|
|
301
|
-
SessionsVoiceActiveSessionContribution,
|
|
302
|
-
WorkbenchPhase.AfterRestored
|
|
303
|
-
);
|
|
304
|
-
let SessionsVoiceListeningContribution = class SessionsVoiceListeningContribution extends Disposable {
|
|
305
|
-
static {
|
|
306
|
-
this.ID = "sessions.voiceListening";
|
|
307
|
-
}
|
|
308
|
-
constructor(voiceSessionController, sessionsService) {
|
|
309
|
-
super();
|
|
310
|
-
let listeningSession;
|
|
311
|
-
this._register(autorun(reader => {
|
|
312
|
-
const connected = voiceSessionController.isConnected.read(reader);
|
|
313
|
-
const voiceState = voiceSessionController.voiceState.read(reader);
|
|
314
|
-
const targetSession = voiceSessionController.targetSession.read(reader);
|
|
315
|
-
const turns = voiceSessionController.transcriptTurns.read(reader);
|
|
316
|
-
const activeSession = sessionsService.activeSession.read(reader);
|
|
317
|
-
const currentSession = activeSession?.activeChat.read(reader)?.resource;
|
|
318
|
-
if (!connected) {
|
|
319
|
-
listeningSession = undefined;
|
|
320
|
-
return;
|
|
321
|
-
}
|
|
322
|
-
if (voiceState !== "listening") {
|
|
323
|
-
listeningSession = undefined;
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
if (!listeningSession) {
|
|
327
|
-
listeningSession = targetSession ?? currentSession;
|
|
328
|
-
} else if (!targetSession && currentSession && !isEqual(currentSession, listeningSession)) {
|
|
329
|
-
const dictationSession = listeningSession;
|
|
330
|
-
const activelyDictating = ( turns.some(t => t.speaker === "user" && t.isPartial && t.text.trim().length > 0));
|
|
331
|
-
if (activelyDictating) {
|
|
332
|
-
voiceSessionController.finishListeningAndSubmitTo(dictationSession);
|
|
333
|
-
} else {
|
|
334
|
-
voiceSessionController.discardListening();
|
|
335
|
-
}
|
|
336
|
-
listeningSession = undefined;
|
|
337
|
-
}
|
|
338
|
-
}));
|
|
339
|
-
}
|
|
340
|
-
};
|
|
341
|
-
SessionsVoiceListeningContribution = ( __decorate([( __param(0, IVoiceSessionController)), ( __param(1, ISessionsService))], SessionsVoiceListeningContribution));
|
|
342
|
-
registerWorkbenchContribution2(
|
|
343
|
-
SessionsVoiceListeningContribution.ID,
|
|
344
|
-
SessionsVoiceListeningContribution,
|
|
345
|
-
WorkbenchPhase.Eventually
|
|
346
|
-
);
|
|
347
|
-
let SessionsVoiceNewComposerContribution = class SessionsVoiceNewComposerContribution extends Disposable {
|
|
348
|
-
static {
|
|
349
|
-
this.ID = "sessions.voiceNewComposer";
|
|
350
|
-
}
|
|
351
|
-
constructor(voiceSessionController, newChatVoiceTargetService) {
|
|
352
|
-
super();
|
|
353
|
-
let voiceComposer;
|
|
354
|
-
let voiceComposerCaptured = false;
|
|
355
|
-
this._register(autorun(reader => {
|
|
356
|
-
const connected = voiceSessionController.isConnected.read(reader) || voiceSessionController.isConnecting.read(reader);
|
|
357
|
-
const activeComposer = newChatVoiceTargetService.activeComposer.read(reader);
|
|
358
|
-
if (!connected) {
|
|
359
|
-
voiceComposer = activeComposer;
|
|
360
|
-
voiceComposerCaptured = false;
|
|
361
|
-
return;
|
|
362
|
-
}
|
|
363
|
-
if (!voiceComposerCaptured) {
|
|
364
|
-
voiceComposer = activeComposer;
|
|
365
|
-
voiceComposerCaptured = true;
|
|
366
|
-
return;
|
|
367
|
-
}
|
|
368
|
-
if (activeComposer && activeComposer !== voiceComposer) {
|
|
369
|
-
if (newChatVoiceTargetService.consumeVoiceTransition()) {
|
|
370
|
-
voiceComposer = activeComposer;
|
|
371
|
-
} else if (!activeComposer.routesWhileSessionActive) {
|
|
372
|
-
voiceSessionController.disconnect("internal");
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
}));
|
|
376
|
-
}
|
|
377
|
-
};
|
|
378
|
-
SessionsVoiceNewComposerContribution = ( __decorate([( __param(0, IVoiceSessionController)), ( __param(1, INewChatVoiceTargetService))], SessionsVoiceNewComposerContribution));
|
|
379
|
-
registerWorkbenchContribution2(
|
|
380
|
-
SessionsVoiceNewComposerContribution.ID,
|
|
381
|
-
SessionsVoiceNewComposerContribution,
|
|
382
|
-
WorkbenchPhase.AfterRestored
|
|
383
|
-
);
|
|
384
|
-
|
|
385
|
-
export { SessionsVoiceNewComposerContribution, prepareNewVoiceSession };
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
-
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
4
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
5
|
-
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
6
|
-
import { IDefaultAccountService } from "@codingame/monaco-vscode-api/vscode/vs/platform/defaultAccount/common/defaultAccount.service";
|
|
7
|
-
import { AutomationDetail, AutomationTrigger } from "@codingame/monaco-vscode-api/vscode/vs/platform/github/common/missionControl/automations";
|
|
8
|
-
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
9
|
-
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
10
|
-
import { IGitHubService } from "@codingame/monaco-vscode-api/vscode/vs/sessions/contrib/github/browser/githubService.service";
|
|
11
|
-
import { IAutomationDescriptor, IAutomationRun, IAutomationSchedule } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/automations/automation";
|
|
12
|
-
import { AutomationCatalogueState, AutomationMutationGuard, IAutomationProviderConfiguration, ICreateAutomationOptions, IGuardedAutomationUpdateResult, IUpdateAutomationOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/automations/automationService";
|
|
13
|
-
import { IChatEntitlementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service";
|
|
14
|
-
import { IWorkbenchGitHubService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/github/common/githubService.service";
|
|
15
|
-
import { ISessionsProviderAutomations } from "@codingame/monaco-vscode-api/vscode/vs/sessions/services/sessions/common/sessionsProvider";
|
|
16
|
-
/** Adapts the account-bound cloud store to the provider-neutral Automation contract. */
|
|
17
|
-
export declare class CloudAutomationStore extends Disposable implements ISessionsProviderAutomations {
|
|
18
|
-
private readonly providerId;
|
|
19
|
-
private readonly sessionTypeId;
|
|
20
|
-
private readonly defaultAccountService;
|
|
21
|
-
private readonly instantiationService;
|
|
22
|
-
private readonly logService;
|
|
23
|
-
private readonly gitHubService;
|
|
24
|
-
private readonly store;
|
|
25
|
-
private readonly refreshError;
|
|
26
|
-
readonly historyState: import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").ISettableObservable<AutomationCatalogueState, void>;
|
|
27
|
-
private historyRefresh;
|
|
28
|
-
private discoveryAttempts;
|
|
29
|
-
private readonly historyScheduler;
|
|
30
|
-
readonly enabled: IObservable<boolean>;
|
|
31
|
-
readonly catalogueState: import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").IObservableWithChange<AutomationCatalogueState, void>;
|
|
32
|
-
readonly unavailableReason: import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").ISettableObservable<string | undefined, void>;
|
|
33
|
-
readonly canCreateAutomation: import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").IObservableWithChange<boolean, void>;
|
|
34
|
-
readonly automations: import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").IObservableWithChange<IAutomationDescriptor[], void>;
|
|
35
|
-
readonly runs: import("@codingame/monaco-vscode-api/vscode/vs/base/common/observable").IObservableWithChange<IAutomationRun[], void>;
|
|
36
|
-
readonly configuration: IAutomationProviderConfiguration;
|
|
37
|
-
constructor(providerId: string, sessionTypeId: string, resolveRepositoryUri: (workspace: URI) => URI | undefined | Promise<URI | undefined>, configurationService: IConfigurationService, defaultAccountService: IDefaultAccountService, entitlementService: IChatEntitlementService, instantiationService: IInstantiationService, logService: ILogService, gitHubService: IGitHubService, workbenchGitHubService: IWorkbenchGitHubService);
|
|
38
|
-
private pickWorkspace;
|
|
39
|
-
refresh(): Promise<void>;
|
|
40
|
-
private refreshHistory;
|
|
41
|
-
private refreshHistoryInBackground;
|
|
42
|
-
getAutomation(id: string): IAutomationDescriptor | undefined;
|
|
43
|
-
runsFor(id: string): IObservable<readonly IAutomationRun[]>;
|
|
44
|
-
getActiveRunFor(id: string): IAutomationRun | undefined;
|
|
45
|
-
canRunAutomation(id: string): boolean;
|
|
46
|
-
canUpdateAutomation(id: string): boolean;
|
|
47
|
-
canDeleteAutomation(id: string): boolean;
|
|
48
|
-
createAutomation(options: ICreateAutomationOptions, guard?: AutomationMutationGuard): Promise<IAutomationDescriptor>;
|
|
49
|
-
updateAutomation(id: string, patch: IUpdateAutomationOptions): Promise<IAutomationDescriptor>;
|
|
50
|
-
updateAutomationIfUnchanged(id: string, patch: IUpdateAutomationOptions, expected: IAutomationDescriptor, guard?: AutomationMutationGuard): Promise<IGuardedAutomationUpdateResult>;
|
|
51
|
-
deleteAutomation(id: string, guard?: AutomationMutationGuard): Promise<void>;
|
|
52
|
-
runAutomation(id: string, token?: CancellationToken): Promise<{
|
|
53
|
-
readonly kind: "accepted";
|
|
54
|
-
}>;
|
|
55
|
-
canStopRun(run: IAutomationRun): boolean;
|
|
56
|
-
stopRun(run: IAutomationRun): Promise<void>;
|
|
57
|
-
private updateValue;
|
|
58
|
-
private validateTarget;
|
|
59
|
-
private requireStore;
|
|
60
|
-
private assertCurrentStore;
|
|
61
|
-
private requireWritableStore;
|
|
62
|
-
private requireEntry;
|
|
63
|
-
private toAutomation;
|
|
64
|
-
private toRun;
|
|
65
|
-
}
|
|
66
|
-
export declare function cloudAutomationSchedule(triggers: AutomationDetail["triggers"]): IAutomationSchedule;
|
|
67
|
-
export declare function cloudAutomationTriggers(schedule: IAutomationSchedule): Readonly<Record<string, AutomationTrigger>>;
|