@codingame/monaco-vscode-chat-service-override 38.0.7 → 38.1.2
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,368 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { Disposable, MutableDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
5
|
-
import { mainWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/window';
|
|
6
|
-
import { getWindow, disposableWindowInterval } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
7
|
-
import { FileAccess } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
8
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
9
|
-
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
10
|
-
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
11
|
-
import { IAuxiliaryWindowService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.service';
|
|
12
|
-
import { AgentsVoiceStorageKeys, AGENTS_VOICE_WINDOW_DEFAULT_HEIGHT, AGENTS_VOICE_WINDOW_DEFAULT_WIDTH } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/agentsVoice/common/agentsVoice';
|
|
13
|
-
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
|
-
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
15
|
-
import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service';
|
|
16
|
-
import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service';
|
|
17
|
-
import { IAgentTitleBarStatusService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusService.service';
|
|
18
|
-
import { IMicCaptureService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.service';
|
|
19
|
-
import { ITtsPlaybackService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.service';
|
|
20
|
-
import { IVoiceSessionController } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.service';
|
|
21
|
-
import { IVoicePlaybackService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/voicePlaybackService.service';
|
|
22
|
-
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
23
|
-
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
24
|
-
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
25
|
-
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
26
|
-
import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
27
|
-
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
28
|
-
import { isDark } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/theme';
|
|
29
|
-
import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service';
|
|
30
|
-
import { resolveVoiceGlowColors } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/voiceGlow';
|
|
31
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
|
|
32
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
|
|
33
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/chartsColors';
|
|
34
|
-
import { editorBackground, editorWidgetBorder, widgetShadow } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/editorColors';
|
|
35
|
-
import { inputBackground, inputBorder } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/inputColors';
|
|
36
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/listColors';
|
|
37
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/menuColors';
|
|
38
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/minimapColors';
|
|
39
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
|
|
40
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
41
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
42
|
-
import { AgentsVoiceWidget } from './agentsVoiceWidget.js';
|
|
43
|
-
import { bindWidgetToController } from './agentsVoiceWidgetBinding.js';
|
|
44
|
-
import { AgentsVoiceSessionsPicker } from './agentsVoiceSessionsPicker.js';
|
|
45
|
-
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
46
|
-
import { StandardMouseEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/mouseEvent';
|
|
47
|
-
import { getVoiceModeContextMenuActions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/speechToText/micButtonMenuActions';
|
|
48
|
-
|
|
49
|
-
let AgentsVoiceWindowService = class AgentsVoiceWindowService extends Disposable {
|
|
50
|
-
get isOpen() {
|
|
51
|
-
return !!this._window;
|
|
52
|
-
}
|
|
53
|
-
constructor(
|
|
54
|
-
auxiliaryWindowService,
|
|
55
|
-
storageService,
|
|
56
|
-
configurationService,
|
|
57
|
-
hostService,
|
|
58
|
-
agentSessionsService,
|
|
59
|
-
agentTitleBarStatusService,
|
|
60
|
-
micCaptureService,
|
|
61
|
-
ttsPlaybackService,
|
|
62
|
-
voiceSessionController,
|
|
63
|
-
voicePlaybackService,
|
|
64
|
-
commandService,
|
|
65
|
-
chatService,
|
|
66
|
-
workspaceContextService,
|
|
67
|
-
environmentService,
|
|
68
|
-
themeService,
|
|
69
|
-
accessibilityService,
|
|
70
|
-
keybindingService,
|
|
71
|
-
instantiationService,
|
|
72
|
-
contextMenuService
|
|
73
|
-
) {
|
|
74
|
-
super();
|
|
75
|
-
this.auxiliaryWindowService = auxiliaryWindowService;
|
|
76
|
-
this.storageService = storageService;
|
|
77
|
-
this.configurationService = configurationService;
|
|
78
|
-
this.hostService = hostService;
|
|
79
|
-
this.agentSessionsService = agentSessionsService;
|
|
80
|
-
this.agentTitleBarStatusService = agentTitleBarStatusService;
|
|
81
|
-
this.micCaptureService = micCaptureService;
|
|
82
|
-
this.ttsPlaybackService = ttsPlaybackService;
|
|
83
|
-
this.voiceSessionController = voiceSessionController;
|
|
84
|
-
this.voicePlaybackService = voicePlaybackService;
|
|
85
|
-
this.commandService = commandService;
|
|
86
|
-
this.chatService = chatService;
|
|
87
|
-
this.workspaceContextService = workspaceContextService;
|
|
88
|
-
this.environmentService = environmentService;
|
|
89
|
-
this.themeService = themeService;
|
|
90
|
-
this.accessibilityService = accessibilityService;
|
|
91
|
-
this.keybindingService = keybindingService;
|
|
92
|
-
this.instantiationService = instantiationService;
|
|
93
|
-
this.contextMenuService = contextMenuService;
|
|
94
|
-
this._onDidChangeOpen = this._register(( new Emitter()));
|
|
95
|
-
this.onDidChangeOpen = this._onDidChangeOpen.event;
|
|
96
|
-
this._auxiliaryWindowRef = this._register(( new MutableDisposable()));
|
|
97
|
-
this._windowDisposables = this._register(( new DisposableStore()));
|
|
98
|
-
const ownershipChannel = ( new BroadcastChannel("agents-voice-ownership"));
|
|
99
|
-
ownershipChannel.onmessage = e => {
|
|
100
|
-
if (e.data?.type === "claim" && this._window) {
|
|
101
|
-
this.closeWindow();
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
this._register({
|
|
105
|
-
dispose: () => ownershipChannel.close()
|
|
106
|
-
});
|
|
107
|
-
this._ownershipChannel = ownershipChannel;
|
|
108
|
-
const onBeforeUnload = () => {
|
|
109
|
-
if (this._window) {
|
|
110
|
-
this.closeWindow();
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
mainWindow.addEventListener("beforeunload", onBeforeUnload);
|
|
114
|
-
this._register({
|
|
115
|
-
dispose: () => mainWindow.removeEventListener("beforeunload", onBeforeUnload)
|
|
116
|
-
});
|
|
117
|
-
const wasOpen = this.storageService.getBoolean(AgentsVoiceStorageKeys.WindowOpen, StorageScope.WORKSPACE, false);
|
|
118
|
-
if (wasOpen) {
|
|
119
|
-
this.storageService.store(
|
|
120
|
-
AgentsVoiceStorageKeys.WindowOpen,
|
|
121
|
-
false,
|
|
122
|
-
StorageScope.WORKSPACE,
|
|
123
|
-
StorageTarget.MACHINE
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
async openWindow() {
|
|
128
|
-
if (this._window) {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
const bounds = this.loadBounds();
|
|
132
|
-
const auxiliaryWindow = await this.auxiliaryWindowService.open({
|
|
133
|
-
bounds,
|
|
134
|
-
alwaysOnTop: true,
|
|
135
|
-
frameless: true,
|
|
136
|
-
transparent: false,
|
|
137
|
-
disableFullscreen: true,
|
|
138
|
-
nativeTitlebar: false,
|
|
139
|
-
noBackgroundThrottling: true,
|
|
140
|
-
backgroundColor: this.themeService.getColorTheme().getColor(editorBackground)?.toString() ?? "#1e1e1e"
|
|
141
|
-
});
|
|
142
|
-
this._window = auxiliaryWindow;
|
|
143
|
-
this._auxiliaryWindowRef.value = auxiliaryWindow;
|
|
144
|
-
const workspace = this.workspaceContextService.getWorkspace();
|
|
145
|
-
const projectName = workspace.folders.length > 0 ? workspace.folders[0].name : "";
|
|
146
|
-
auxiliaryWindow.window.document.title = projectName ? `Agents Voice — ${projectName}` : "Agents Voice";
|
|
147
|
-
auxiliaryWindow.container.style.overflow = "hidden";
|
|
148
|
-
auxiliaryWindow.window.document.body.style.setProperty("margin", "0", "important");
|
|
149
|
-
const theme = this.themeService.getColorTheme();
|
|
150
|
-
const bgColor = theme.getColor(editorBackground)?.toString() ?? "#1e1e1e";
|
|
151
|
-
const inputBg = theme.getColor(inputBackground)?.toString() ?? "#3C3C3C";
|
|
152
|
-
const inputBd = theme.getColor(inputBorder)?.toString() ?? theme.getColor(editorWidgetBorder)?.toString() ?? "transparent";
|
|
153
|
-
const shadow = theme.getColor(widgetShadow)?.toString() ?? "transparent";
|
|
154
|
-
auxiliaryWindow.container.style.setProperty("--vscode-agents-background", bgColor);
|
|
155
|
-
auxiliaryWindow.container.style.backgroundColor = inputBg;
|
|
156
|
-
auxiliaryWindow.container.style.border = `1px solid ${inputBd}`;
|
|
157
|
-
auxiliaryWindow.container.style.boxShadow = `0 2px 8px ${shadow}`;
|
|
158
|
-
auxiliaryWindow.container.style.boxSizing = "border-box";
|
|
159
|
-
auxiliaryWindow.window.document.body.style.setProperty("background-color", inputBg, "important");
|
|
160
|
-
this._windowDisposables.clear();
|
|
161
|
-
const widget = ( new AgentsVoiceWidget(auxiliaryWindow.container, {
|
|
162
|
-
copilotIconSrc: ( ( FileAccess.asBrowserUri("vs/sessions/browser/media/sessions-icon.svg")).toString(true)),
|
|
163
|
-
hideDisconnect: this.configurationService.getValue("agents.voice.handsFree") === true,
|
|
164
|
-
connect: () => {
|
|
165
|
-
this.storageService.store(
|
|
166
|
-
AgentsVoiceStorageKeys.OnboardingCompleted,
|
|
167
|
-
true,
|
|
168
|
-
StorageScope.PROFILE,
|
|
169
|
-
StorageTarget.USER
|
|
170
|
-
);
|
|
171
|
-
this.voiceSessionController.connect(mainWindow);
|
|
172
|
-
},
|
|
173
|
-
disconnect: () => this.voiceSessionController.disconnect("explicit"),
|
|
174
|
-
pttDown: () => {
|
|
175
|
-
if (!this.voiceSessionController.isConnected.get() && !this.voiceSessionController.isConnecting.get()) {
|
|
176
|
-
this.voiceSessionController.connect(mainWindow).then(() => {
|
|
177
|
-
if (this.voiceSessionController.isConnected.get()) {
|
|
178
|
-
this.voiceSessionController.pttDown();
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
this.voiceSessionController.pttDown();
|
|
184
|
-
},
|
|
185
|
-
pttUp: () => this.voiceSessionController.pttUp(),
|
|
186
|
-
toggleMute: () => this.voiceSessionController.setMuted(!this.voiceSessionController.isMuted.get()),
|
|
187
|
-
closeWindow: () => this.closeWindow(),
|
|
188
|
-
stopPlayback: () => this.ttsPlaybackService.stopPlayback(),
|
|
189
|
-
openSession: resource => {
|
|
190
|
-
this.commandService.executeCommand("_chat.voice.switchToSession", ( resource.toString()));
|
|
191
|
-
this.hostService.focus(mainWindow);
|
|
192
|
-
},
|
|
193
|
-
stopSession: resource => {
|
|
194
|
-
const model = this.chatService.getSession(resource);
|
|
195
|
-
if (model) {
|
|
196
|
-
const lastReq = model.getRequests().at(-1);
|
|
197
|
-
if (lastReq) {
|
|
198
|
-
this.voiceSessionController.markUserCancelled(( resource.toString()));
|
|
199
|
-
this.chatService.cancelCurrentRequestForSession(resource);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
cancelSession: resource => {
|
|
204
|
-
this.voiceSessionController.markUserCancelled(( resource.toString()));
|
|
205
|
-
this.chatService.cancelCurrentRequestForSession(resource);
|
|
206
|
-
},
|
|
207
|
-
selectTargetSession: resource => {
|
|
208
|
-
this.voiceSessionController.setTargetSession(resource);
|
|
209
|
-
if (resource) {
|
|
210
|
-
this.commandService.executeCommand("_chat.voice.switchToSession", ( resource.toString())).catch(() => {});
|
|
211
|
-
}
|
|
212
|
-
},
|
|
213
|
-
newSessionAsTarget: () => {
|
|
214
|
-
this.voiceSessionController.newSessionAsTarget();
|
|
215
|
-
},
|
|
216
|
-
getAnalyserNode: () => {
|
|
217
|
-
const state = this.voiceSessionController.voiceState.get();
|
|
218
|
-
return this.ttsPlaybackService.analyserNode ?? (state === "listening" ? this.micCaptureService.analyserNode : null) ?? null;
|
|
219
|
-
},
|
|
220
|
-
onResize: () => this._resizeWindow(auxiliaryWindow),
|
|
221
|
-
getGlowTheme: () => isDark(this.themeService.getColorTheme().type) ? "dark" : "light",
|
|
222
|
-
getGlowColors: () => resolveVoiceGlowColors(this.themeService.getColorTheme()),
|
|
223
|
-
isMotionReduced: () => this.accessibilityService.isMotionReduced(),
|
|
224
|
-
onDidChangeGlowTheme: Event.map(this.themeService.onDidColorThemeChange, () => undefined),
|
|
225
|
-
openPttKeySettings: () => this.commandService.executeCommand("workbench.action.openGlobalKeybindings", "agentsVoice.pushToTalk"),
|
|
226
|
-
showVoiceContextMenu: e => {
|
|
227
|
-
const anchor = ( new StandardMouseEvent(getWindow(e.target ?? auxiliaryWindow.container), e));
|
|
228
|
-
this.contextMenuService.showContextMenu({
|
|
229
|
-
getAnchor: () => anchor,
|
|
230
|
-
getActions: () => getVoiceModeContextMenuActions(
|
|
231
|
-
this.commandService,
|
|
232
|
-
this.configurationService,
|
|
233
|
-
this.keybindingService,
|
|
234
|
-
"agentsVoice.pushToTalk"
|
|
235
|
-
)
|
|
236
|
-
});
|
|
237
|
-
},
|
|
238
|
-
submitFeedback: text => this.voiceSessionController.submitFeedback(text),
|
|
239
|
-
showSessionsPicker: () => {
|
|
240
|
-
const picker = this.instantiationService.createInstance(
|
|
241
|
-
AgentsVoiceSessionsPicker,
|
|
242
|
-
resource => this.voiceSessionController.setTargetSession(resource)
|
|
243
|
-
);
|
|
244
|
-
picker.show();
|
|
245
|
-
}
|
|
246
|
-
}, {
|
|
247
|
-
defaultExpanded: false,
|
|
248
|
-
inputBoxLayout: true,
|
|
249
|
-
focusable: true
|
|
250
|
-
}));
|
|
251
|
-
this._windowDisposables.add(widget);
|
|
252
|
-
const getPttLabel = () => this.keybindingService.lookupKeybinding("agentsVoice.pushToTalk")?.getLabel() ?? undefined;
|
|
253
|
-
widget.setPttKeyLabel(getPttLabel());
|
|
254
|
-
this._windowDisposables.add(this.keybindingService.onDidUpdateKeybindings(() => {
|
|
255
|
-
widget.setPttKeyLabel(getPttLabel());
|
|
256
|
-
}));
|
|
257
|
-
this._windowDisposables.add(bindWidgetToController(widget, {
|
|
258
|
-
voiceSessionController: this.voiceSessionController,
|
|
259
|
-
agentSessionsService: this.agentSessionsService,
|
|
260
|
-
agentTitleBarStatusService: this.agentTitleBarStatusService,
|
|
261
|
-
voicePlaybackService: this.voicePlaybackService,
|
|
262
|
-
environmentService: this.environmentService,
|
|
263
|
-
chatService: this.chatService,
|
|
264
|
-
configurationService: this.configurationService
|
|
265
|
-
}));
|
|
266
|
-
this.agentSessionsService.model.resolve(undefined);
|
|
267
|
-
this._windowDisposables.add(disposableWindowInterval(auxiliaryWindow.window, () => {
|
|
268
|
-
this.agentSessionsService.model.resolve(undefined);
|
|
269
|
-
}, 3000));
|
|
270
|
-
Event.once(auxiliaryWindow.onUnload)(() => {
|
|
271
|
-
this.voiceSessionController.setTargetSession(undefined);
|
|
272
|
-
this.voiceSessionController.disconnect();
|
|
273
|
-
this._window = undefined;
|
|
274
|
-
this._windowDisposables.clear();
|
|
275
|
-
this._auxiliaryWindowRef.value = undefined;
|
|
276
|
-
this.storageService.store(
|
|
277
|
-
AgentsVoiceStorageKeys.WindowOpen,
|
|
278
|
-
false,
|
|
279
|
-
StorageScope.WORKSPACE,
|
|
280
|
-
StorageTarget.MACHINE
|
|
281
|
-
);
|
|
282
|
-
this._onDidChangeOpen.fire(false);
|
|
283
|
-
});
|
|
284
|
-
this.storageService.store(
|
|
285
|
-
AgentsVoiceStorageKeys.WindowOpen,
|
|
286
|
-
true,
|
|
287
|
-
StorageScope.WORKSPACE,
|
|
288
|
-
StorageTarget.MACHINE
|
|
289
|
-
);
|
|
290
|
-
this._onDidChangeOpen.fire(true);
|
|
291
|
-
}
|
|
292
|
-
closeWindow() {
|
|
293
|
-
if (!this._window) {
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
this.saveBounds(this._window);
|
|
297
|
-
this.voiceSessionController.setTargetSession(undefined);
|
|
298
|
-
this.storageService.store(
|
|
299
|
-
AgentsVoiceStorageKeys.WindowOpen,
|
|
300
|
-
false,
|
|
301
|
-
StorageScope.WORKSPACE,
|
|
302
|
-
StorageTarget.MACHINE
|
|
303
|
-
);
|
|
304
|
-
this._window = undefined;
|
|
305
|
-
this._windowDisposables.clear();
|
|
306
|
-
this._auxiliaryWindowRef.value = undefined;
|
|
307
|
-
this._onDidChangeOpen.fire(false);
|
|
308
|
-
}
|
|
309
|
-
async toggleWindow() {
|
|
310
|
-
if (this.isOpen) {
|
|
311
|
-
this.closeWindow();
|
|
312
|
-
} else {
|
|
313
|
-
this._ownershipChannel.postMessage({
|
|
314
|
-
type: "claim"
|
|
315
|
-
});
|
|
316
|
-
await this.openWindow();
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
_resizeWindow(auxiliaryWindow) {
|
|
320
|
-
if (this._resizeTimeout) {
|
|
321
|
-
clearTimeout(this._resizeTimeout);
|
|
322
|
-
}
|
|
323
|
-
this._resizeTimeout = setTimeout(() => {
|
|
324
|
-
this._resizeTimeout = undefined;
|
|
325
|
-
this._doResizeWindow(auxiliaryWindow);
|
|
326
|
-
}, 100);
|
|
327
|
-
}
|
|
328
|
-
_doResizeWindow(auxiliaryWindow) {
|
|
329
|
-
const pill = auxiliaryWindow.container.querySelector("div");
|
|
330
|
-
if (!pill) {
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
const pillWidth = pill.offsetWidth;
|
|
334
|
-
const pillHeight = pill.offsetHeight;
|
|
335
|
-
if (pillWidth <= 0 || pillHeight <= 0) {
|
|
336
|
-
return;
|
|
337
|
-
}
|
|
338
|
-
const currentWidth = auxiliaryWindow.window.outerWidth;
|
|
339
|
-
const currentHeight = auxiliaryWindow.window.outerHeight;
|
|
340
|
-
if (pillWidth !== currentWidth || pillHeight !== currentHeight) {
|
|
341
|
-
try {
|
|
342
|
-
const screenBottom = auxiliaryWindow.window.screen.availHeight;
|
|
343
|
-
const maxHeight = screenBottom - auxiliaryWindow.window.screenY;
|
|
344
|
-
const clampedHeight = Math.min(pillHeight, Math.max(maxHeight, AGENTS_VOICE_WINDOW_DEFAULT_HEIGHT));
|
|
345
|
-
auxiliaryWindow.window.resizeTo(pillWidth, clampedHeight);
|
|
346
|
-
} catch {}
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
_defaultBounds() {
|
|
350
|
-
const x = Math.round(
|
|
351
|
-
mainWindow.screenX + (mainWindow.outerWidth - AGENTS_VOICE_WINDOW_DEFAULT_WIDTH) / 2
|
|
352
|
-
);
|
|
353
|
-
const y = mainWindow.screenY + mainWindow.outerHeight - AGENTS_VOICE_WINDOW_DEFAULT_HEIGHT - 100;
|
|
354
|
-
return {
|
|
355
|
-
x,
|
|
356
|
-
y,
|
|
357
|
-
width: AGENTS_VOICE_WINDOW_DEFAULT_WIDTH,
|
|
358
|
-
height: AGENTS_VOICE_WINDOW_DEFAULT_HEIGHT
|
|
359
|
-
};
|
|
360
|
-
}
|
|
361
|
-
loadBounds() {
|
|
362
|
-
return this._defaultBounds();
|
|
363
|
-
}
|
|
364
|
-
saveBounds(_window) {}
|
|
365
|
-
};
|
|
366
|
-
AgentsVoiceWindowService = ( __decorate([( __param(0, IAuxiliaryWindowService)), ( __param(1, IStorageService)), ( __param(2, IConfigurationService)), ( __param(3, IHostService)), ( __param(4, IAgentSessionsService)), ( __param(5, IAgentTitleBarStatusService)), ( __param(6, IMicCaptureService)), ( __param(7, ITtsPlaybackService)), ( __param(8, IVoiceSessionController)), ( __param(9, IVoicePlaybackService)), ( __param(10, ICommandService)), ( __param(11, IChatService)), ( __param(12, IWorkspaceContextService)), ( __param(13, IWorkbenchEnvironmentService)), ( __param(14, IThemeService)), ( __param(15, IAccessibilityService)), ( __param(16, IKeybindingService)), ( __param(17, IInstantiationService)), ( __param(18, IContextMenuService))], AgentsVoiceWindowService));
|
|
367
|
-
|
|
368
|
-
export { AgentsVoiceWindowService };
|
package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { IPendingToolConfirmation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController";
|
|
2
|
-
export interface ToolConfirmationsProps {
|
|
3
|
-
readonly confirmations: readonly IPendingToolConfirmation[];
|
|
4
|
-
readonly onOpenSession: (resource: IPendingToolConfirmation["sessionResource"]) => void;
|
|
5
|
-
}
|
|
6
|
-
export interface ToolConfirmationsComponent {
|
|
7
|
-
readonly element: HTMLElement;
|
|
8
|
-
update(props: ToolConfirmationsProps): void;
|
|
9
|
-
}
|
|
10
|
-
export declare function createToolConfirmations(): ToolConfirmationsComponent;
|
package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { $, clearNode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
3
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
|
-
import { FONT_SIZE, FONT_WEIGHT } from './tokens.js';
|
|
5
|
-
|
|
6
|
-
function createConfirmationRow(tc, onOpenSession) {
|
|
7
|
-
const row = $("div");
|
|
8
|
-
row.style.cssText = "display:flex;flex-direction:column;gap:3px;";
|
|
9
|
-
const label = $("span");
|
|
10
|
-
label.style.cssText = `font-size:${FONT_SIZE.body};color:var(--vscode-editorWarning-foreground);font-weight:${FONT_WEIGHT.medium};`;
|
|
11
|
-
label.textContent = tc.sessionLabel;
|
|
12
|
-
const desc = $("span");
|
|
13
|
-
desc.style.cssText = `font-size:${FONT_SIZE.body};color:var(--vscode-descriptionForeground);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;`;
|
|
14
|
-
desc.textContent = tc.description;
|
|
15
|
-
const btnRow = $("div");
|
|
16
|
-
btnRow.style.cssText = "display:flex;gap:6px;";
|
|
17
|
-
const btnStyle = `-webkit-app-region:no-drag;border:none;color:var(--vscode-button-foreground);font-size:${FONT_SIZE.body};padding:2px 8px;border-radius:3px;cursor:pointer;`;
|
|
18
|
-
if (tc.type === "approval") {
|
|
19
|
-
const approveBtn = $("button");
|
|
20
|
-
approveBtn.style.cssText = `${btnStyle}background:var(--vscode-charts-green);`;
|
|
21
|
-
approveBtn.textContent = ( localize(8702, "Approve"));
|
|
22
|
-
approveBtn.addEventListener("click", () => tc.approve());
|
|
23
|
-
const denyBtn = $("button");
|
|
24
|
-
denyBtn.style.cssText = `${btnStyle}background:var(--vscode-editorError-foreground);`;
|
|
25
|
-
denyBtn.textContent = ( localize(8703, "Deny"));
|
|
26
|
-
denyBtn.addEventListener("click", () => tc.deny());
|
|
27
|
-
btnRow.append(approveBtn, denyBtn);
|
|
28
|
-
} else {
|
|
29
|
-
const openBtn = $("button");
|
|
30
|
-
openBtn.style.cssText = `${btnStyle}background:var(--vscode-button-background);`;
|
|
31
|
-
openBtn.textContent = ( localize(8704, "Open in VS Code"));
|
|
32
|
-
openBtn.addEventListener("click", () => onOpenSession(tc.sessionResource));
|
|
33
|
-
btnRow.append(openBtn);
|
|
34
|
-
}
|
|
35
|
-
row.append(label, desc, btnRow);
|
|
36
|
-
return row;
|
|
37
|
-
}
|
|
38
|
-
function createToolConfirmations() {
|
|
39
|
-
const container = $("div");
|
|
40
|
-
container.style.cssText = "display:flex;flex-direction:column;gap:4px;padding:6px 2px 2px;border-top:1px solid var(--vscode-editorWidget-background);margin-top:4px;";
|
|
41
|
-
return {
|
|
42
|
-
element: container,
|
|
43
|
-
update(props) {
|
|
44
|
-
clearNode(container);
|
|
45
|
-
if (props.confirmations.length === 0) {
|
|
46
|
-
container.style.display = "none";
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
container.style.display = "flex";
|
|
50
|
-
for (const tc of props.confirmations) {
|
|
51
|
-
container.append(createConfirmationRow(tc, props.onOpenSession));
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export { createToolConfirmations };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
export interface FeedbackDialogProps {
|
|
3
|
-
readonly onSubmit: (feedbackText: string) => void;
|
|
4
|
-
readonly onCancel: () => void;
|
|
5
|
-
}
|
|
6
|
-
export interface FeedbackDialogState {
|
|
7
|
-
readonly isSubmitting: boolean;
|
|
8
|
-
readonly error?: string;
|
|
9
|
-
readonly submitted: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface FeedbackDialogComponent {
|
|
12
|
-
readonly element: HTMLElement;
|
|
13
|
-
update(props: FeedbackDialogProps, state: FeedbackDialogState): void;
|
|
14
|
-
}
|
|
15
|
-
export declare function createFeedbackDialog(): FeedbackDialogComponent;
|
|
16
|
-
/**
|
|
17
|
-
* Mount the feedback dialog into a container, returning a controller to
|
|
18
|
-
* update state and unmount.
|
|
19
|
-
*/
|
|
20
|
-
export declare class FeedbackDialogController extends Disposable {
|
|
21
|
-
private readonly _container;
|
|
22
|
-
private readonly _onSubmit;
|
|
23
|
-
private readonly _onClose;
|
|
24
|
-
private _state;
|
|
25
|
-
private readonly _dialog;
|
|
26
|
-
constructor(_container: HTMLElement, _onSubmit: (feedbackText: string) => Promise<{
|
|
27
|
-
ok: boolean;
|
|
28
|
-
error?: string;
|
|
29
|
-
}>, _onClose: () => void);
|
|
30
|
-
private _render;
|
|
31
|
-
private _handleSubmit;
|
|
32
|
-
dispose(): void;
|
|
33
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { $, createElement } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
3
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
6
|
-
import { FONT_SIZE } from './tokens.js';
|
|
7
|
-
|
|
8
|
-
function createFeedbackDialog() {
|
|
9
|
-
const container = $("div");
|
|
10
|
-
container.style.cssText = "display:flex;flex-direction:column;gap:8px;padding:4px 0;";
|
|
11
|
-
const successView = $("div");
|
|
12
|
-
successView.style.cssText = "display:flex;flex-direction:column;align-items:center;justify-content:center;padding:12px 14px;gap:8px;flex:1;";
|
|
13
|
-
const successIcon = $("span.codicon.codicon-check");
|
|
14
|
-
successIcon.style.cssText = "font-size:20px;color:var(--vscode-charts-green);";
|
|
15
|
-
const successText = $("span");
|
|
16
|
-
successText.style.cssText = `font-size:${FONT_SIZE.body};color:var(--vscode-foreground);font-weight:500;text-align:center;`;
|
|
17
|
-
successText.textContent = ( localize(8705, "Thank you for your feedback!"));
|
|
18
|
-
successView.append(successIcon, successText);
|
|
19
|
-
const formView = $("div");
|
|
20
|
-
formView.style.cssText = "display:flex;flex-direction:column;gap:8px;padding:4px 0;";
|
|
21
|
-
const headerRow = $("div");
|
|
22
|
-
headerRow.style.cssText = "display:flex;align-items:center;gap:6px;";
|
|
23
|
-
const headerIcon = $("span.codicon.codicon-feedback");
|
|
24
|
-
headerIcon.style.fontSize = FONT_SIZE.iconSm;
|
|
25
|
-
headerIcon.style.color = "var(--vscode-foreground)";
|
|
26
|
-
const headerText = $("span");
|
|
27
|
-
headerText.style.cssText = `font-size:${FONT_SIZE.body};font-weight:600;color:var(--vscode-foreground);`;
|
|
28
|
-
headerText.textContent = ( localize(8706, "Send Feedback"));
|
|
29
|
-
headerRow.append(headerIcon, headerText);
|
|
30
|
-
const textarea = createElement("textarea");
|
|
31
|
-
textarea.rows = 3;
|
|
32
|
-
textarea.placeholder = ( localize(8707, "What could we improve?"));
|
|
33
|
-
textarea.style.cssText = `width:100%;box-sizing:border-box;background:var(--vscode-input-background);color:var(--vscode-input-foreground);border:1px solid var(--vscode-input-border, var(--vscode-editorWidget-border));border-radius:4px;padding:6px 8px;font-family:inherit;font-size:${FONT_SIZE.body};resize:vertical;min-height:48px;max-height:120px;outline:none;-webkit-app-region:no-drag;`;
|
|
34
|
-
textarea.addEventListener("focus", () => {
|
|
35
|
-
textarea.style.borderColor = "var(--vscode-focusBorder)";
|
|
36
|
-
});
|
|
37
|
-
textarea.addEventListener("blur", () => {
|
|
38
|
-
textarea.style.borderColor = "var(--vscode-input-border, var(--vscode-editorWidget-border))";
|
|
39
|
-
});
|
|
40
|
-
const consent = $("span");
|
|
41
|
-
consent.style.cssText = `font-size:${FONT_SIZE.micro};color:var(--vscode-descriptionForeground);line-height:1.3;`;
|
|
42
|
-
consent.textContent = ( localize(
|
|
43
|
-
8708,
|
|
44
|
-
"By submitting, you agree that your session logs and transcript history will be included with your feedback."
|
|
45
|
-
));
|
|
46
|
-
const errorEl = $("span");
|
|
47
|
-
errorEl.style.cssText = `font-size:${FONT_SIZE.micro};color:var(--vscode-errorForeground);`;
|
|
48
|
-
const buttonRow = $("div");
|
|
49
|
-
buttonRow.style.cssText = "display:flex;gap:6px;justify-content:flex-end;";
|
|
50
|
-
const cancelBtn = createElement("button");
|
|
51
|
-
cancelBtn.style.cssText = `-webkit-app-region:no-drag;background:transparent;border:1px solid var(--vscode-button-secondaryBackground, var(--vscode-editorWidget-border));color:var(--vscode-foreground);font-size:${FONT_SIZE.body};padding:3px 10px;border-radius:3px;cursor:pointer;`;
|
|
52
|
-
cancelBtn.textContent = ( localize(8709, "Cancel"));
|
|
53
|
-
const submitBtn = createElement("button");
|
|
54
|
-
submitBtn.style.cssText = `-webkit-app-region:no-drag;background:var(--vscode-button-background);border:none;color:var(--vscode-button-foreground);font-size:${FONT_SIZE.body};padding:3px 10px;border-radius:3px;cursor:pointer;font-weight:500;`;
|
|
55
|
-
submitBtn.addEventListener("mouseenter", () => {
|
|
56
|
-
if (!submitBtn.disabled) {
|
|
57
|
-
submitBtn.style.background = "var(--vscode-button-hoverBackground)";
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
submitBtn.addEventListener("mouseleave", () => {
|
|
61
|
-
submitBtn.style.background = "var(--vscode-button-background)";
|
|
62
|
-
});
|
|
63
|
-
buttonRow.append(cancelBtn, submitBtn);
|
|
64
|
-
formView.append(headerRow, textarea, consent, errorEl, buttonRow);
|
|
65
|
-
container.append(successView, formView);
|
|
66
|
-
return {
|
|
67
|
-
element: container,
|
|
68
|
-
update(props, state) {
|
|
69
|
-
if (state.submitted) {
|
|
70
|
-
successView.style.display = "flex";
|
|
71
|
-
formView.style.display = "none";
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
successView.style.display = "none";
|
|
75
|
-
formView.style.display = "flex";
|
|
76
|
-
const submitDisabled = state.isSubmitting;
|
|
77
|
-
textarea.disabled = submitDisabled;
|
|
78
|
-
cancelBtn.disabled = submitDisabled;
|
|
79
|
-
cancelBtn.onclick = () => props.onCancel();
|
|
80
|
-
submitBtn.disabled = submitDisabled;
|
|
81
|
-
submitBtn.textContent = state.isSubmitting ? ( localize(8710, "Submitting...")) : ( localize(8711, "Submit"));
|
|
82
|
-
submitBtn.onclick = () => {
|
|
83
|
-
const text = textarea.value.trim();
|
|
84
|
-
if (text) {
|
|
85
|
-
props.onSubmit(text);
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
if (state.error) {
|
|
89
|
-
errorEl.style.display = "";
|
|
90
|
-
errorEl.textContent = state.error;
|
|
91
|
-
} else {
|
|
92
|
-
errorEl.style.display = "none";
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export { createFeedbackDialog };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { VoiceState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController";
|
|
2
|
-
export interface HeaderProps {
|
|
3
|
-
readonly copilotIconSrc: string;
|
|
4
|
-
readonly showCopilotIcon: boolean;
|
|
5
|
-
readonly isConnected: boolean;
|
|
6
|
-
readonly isConnecting: boolean;
|
|
7
|
-
readonly isReconnecting: boolean;
|
|
8
|
-
readonly voiceState: VoiceState;
|
|
9
|
-
readonly pttKeyLabel: string | undefined;
|
|
10
|
-
readonly draggable: boolean;
|
|
11
|
-
readonly showClose: boolean;
|
|
12
|
-
readonly showPopout: boolean;
|
|
13
|
-
readonly hideDisconnect: boolean;
|
|
14
|
-
readonly centerConnectButton: boolean;
|
|
15
|
-
readonly isMuted: boolean;
|
|
16
|
-
readonly onMicDown: (e: MouseEvent) => void;
|
|
17
|
-
readonly onMicUp: () => void;
|
|
18
|
-
readonly onConnectClick: (e: MouseEvent) => void;
|
|
19
|
-
readonly onDisconnectClick: (e: MouseEvent) => void;
|
|
20
|
-
readonly onCloseClick: (e: MouseEvent) => void;
|
|
21
|
-
readonly onToggleClick: (e: MouseEvent) => void;
|
|
22
|
-
readonly onMicContextMenu: (e: MouseEvent) => void;
|
|
23
|
-
readonly onMuteClick: (e: MouseEvent) => void;
|
|
24
|
-
readonly onPopoutClick: (e: MouseEvent) => void;
|
|
25
|
-
readonly onFeedbackClick: (e: MouseEvent) => void;
|
|
26
|
-
readonly expanded: boolean;
|
|
27
|
-
}
|
|
28
|
-
export interface HeaderComponent {
|
|
29
|
-
readonly element: HTMLElement;
|
|
30
|
-
update(props: HeaderProps): void;
|
|
31
|
-
}
|
|
32
|
-
export declare function createHeader(): HeaderComponent;
|