@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,186 +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 { FONT_SIZE, addKeyboardActivation, isSecondaryPointerGesture } from './tokens.js';
|
|
5
|
-
|
|
6
|
-
function hoverButton(className, ariaLabel, title) {
|
|
7
|
-
const el = $(`span.codicon.${className}`);
|
|
8
|
-
el.role = "button";
|
|
9
|
-
el.tabIndex = 0;
|
|
10
|
-
el.ariaLabel = ariaLabel;
|
|
11
|
-
el.title = title;
|
|
12
|
-
el.style.cssText = `font-size:${FONT_SIZE.iconSm};color:var(--vscode-descriptionForeground);cursor:pointer;-webkit-app-region:no-drag;padding:2px;`;
|
|
13
|
-
el.addEventListener("mouseenter", () => {
|
|
14
|
-
el.style.color = "var(--vscode-foreground)";
|
|
15
|
-
});
|
|
16
|
-
el.addEventListener("mouseleave", () => {
|
|
17
|
-
el.style.color = "var(--vscode-descriptionForeground)";
|
|
18
|
-
});
|
|
19
|
-
addKeyboardActivation(el);
|
|
20
|
-
return el;
|
|
21
|
-
}
|
|
22
|
-
function createHeader() {
|
|
23
|
-
const container = $("div");
|
|
24
|
-
container.style.cssText = "display:flex;align-items:center;gap:8px;height:30px;flex-shrink:0;";
|
|
25
|
-
const copilotIcon = createElement("img");
|
|
26
|
-
copilotIcon.style.cssText = "width:18px;height:18px;margin-right:4px;";
|
|
27
|
-
const micBtn = $("span.codicon.codicon-voice-mode");
|
|
28
|
-
micBtn.role = "button";
|
|
29
|
-
micBtn.tabIndex = 0;
|
|
30
|
-
micBtn.ariaLabel = ( localize(8712, "Push to talk (Space)"));
|
|
31
|
-
micBtn.title = ( localize(8712, "Push to talk (Space)"));
|
|
32
|
-
micBtn.style.cssText = `font-size:${FONT_SIZE.iconMd};cursor:pointer;-webkit-app-region:no-drag;border-radius:4px;padding:2px;`;
|
|
33
|
-
const connIndicator = $("span.voice-conn-indicator");
|
|
34
|
-
connIndicator.role = "button";
|
|
35
|
-
connIndicator.tabIndex = 0;
|
|
36
|
-
connIndicator.ariaLabel = ( localize(8713, "Disconnect"));
|
|
37
|
-
connIndicator.title = ( localize(8713, "Disconnect"));
|
|
38
|
-
connIndicator.style.cssText = "display:inline-flex;align-items:center;justify-content:center;cursor:pointer;-webkit-app-region:no-drag;flex-shrink:0;padding:2px;";
|
|
39
|
-
const connDot = $("span.voice-conn-dot.codicon.codicon-debug-connected");
|
|
40
|
-
connDot.title = ( localize(8713, "Disconnect"));
|
|
41
|
-
connDot.style.cssText = `font-size:${FONT_SIZE.iconSm};color:var(--vscode-charts-green);`;
|
|
42
|
-
const connDisc = $("span.voice-conn-disconnect.codicon.codicon-debug-disconnect");
|
|
43
|
-
connDisc.title = ( localize(8713, "Disconnect"));
|
|
44
|
-
connDisc.style.cssText = `font-size:${FONT_SIZE.iconSm};color:var(--vscode-descriptionForeground);display:none;`;
|
|
45
|
-
connIndicator.append(connDot, connDisc);
|
|
46
|
-
addKeyboardActivation(connIndicator);
|
|
47
|
-
const muteBtn = $("span.codicon.codicon-mic");
|
|
48
|
-
muteBtn.role = "button";
|
|
49
|
-
muteBtn.tabIndex = 0;
|
|
50
|
-
muteBtn.style.cssText = `font-size:${FONT_SIZE.iconSm};cursor:pointer;-webkit-app-region:no-drag;flex-shrink:0;border-radius:4px;padding:2px;`;
|
|
51
|
-
addKeyboardActivation(muteBtn);
|
|
52
|
-
const placeholderText = $("span.voice-placeholder-text");
|
|
53
|
-
placeholderText.role = "button";
|
|
54
|
-
placeholderText.tabIndex = 0;
|
|
55
|
-
placeholderText.style.cssText = `font-size:${FONT_SIZE.body};color:var(--vscode-input-placeholderForeground, var(--vscode-descriptionForeground));cursor:pointer;-webkit-app-region:no-drag;user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;`;
|
|
56
|
-
placeholderText.addEventListener("mouseenter", () => {
|
|
57
|
-
placeholderText.style.color = "var(--vscode-foreground)";
|
|
58
|
-
});
|
|
59
|
-
placeholderText.addEventListener("mouseleave", () => {
|
|
60
|
-
placeholderText.style.color = "var(--vscode-input-placeholderForeground, var(--vscode-descriptionForeground))";
|
|
61
|
-
});
|
|
62
|
-
addKeyboardActivation(placeholderText);
|
|
63
|
-
const spacer = $("span");
|
|
64
|
-
spacer.style.flex = "1";
|
|
65
|
-
const feedbackBtn = hoverButton("codicon-feedback", ( localize(8714, "Send feedback")), ( localize(8714, "Send feedback")));
|
|
66
|
-
const popoutBtn = hoverButton("codicon-open-in-window", ( localize(8715, "Open mini-view")), ( localize(8715, "Open mini-view")));
|
|
67
|
-
const closeBtn = hoverButton("codicon-chrome-minimize", ( localize(8716, "Minimize")), ( localize(8716, "Minimize")));
|
|
68
|
-
const connStyle = $("style");
|
|
69
|
-
connStyle.textContent = `
|
|
70
|
-
.voice-conn-indicator:hover .voice-conn-dot { display: none !important; }
|
|
71
|
-
.voice-conn-indicator:hover .voice-conn-disconnect { display: inline-block !important; color: var(--vscode-errorForeground, #f44) !important; }
|
|
72
|
-
@keyframes agents-voice-icon-pulse {
|
|
73
|
-
0%, 100% { box-shadow: 0 0 4px rgba(var(--agents-voice-icon-rgb, 88,166,255), 0.45); }
|
|
74
|
-
50% { box-shadow: 0 0 10px rgba(var(--agents-voice-icon-rgb, 88,166,255), 0.7); }
|
|
75
|
-
}
|
|
76
|
-
.monaco-workbench.monaco-enable-motion .agents-voice-mode-active {
|
|
77
|
-
animation: agents-voice-icon-pulse 1.4s ease-in-out infinite;
|
|
78
|
-
}
|
|
79
|
-
`;
|
|
80
|
-
container.append(
|
|
81
|
-
copilotIcon,
|
|
82
|
-
micBtn,
|
|
83
|
-
placeholderText,
|
|
84
|
-
connIndicator,
|
|
85
|
-
muteBtn,
|
|
86
|
-
spacer,
|
|
87
|
-
popoutBtn,
|
|
88
|
-
closeBtn,
|
|
89
|
-
connStyle
|
|
90
|
-
);
|
|
91
|
-
return {
|
|
92
|
-
element: container,
|
|
93
|
-
update(props) {
|
|
94
|
-
container.style.cssText = `display:flex;align-items:center;gap:8px;height:30px;flex-shrink:0;${props.draggable ? "-webkit-app-region:drag;" : ""}`;
|
|
95
|
-
copilotIcon.style.display = props.showCopilotIcon ? "" : "none";
|
|
96
|
-
copilotIcon.src = props.copilotIconSrc;
|
|
97
|
-
const showConnected = props.isConnected || props.isReconnecting;
|
|
98
|
-
micBtn.style.display = showConnected ? "" : "none";
|
|
99
|
-
const micColor = props.voiceState === "error" ? "var(--vscode-editorError-foreground)" : props.voiceState === "listening" ? "var(--vscode-editorInfo-foreground)" : props.voiceState === "speaking" ? "var(--vscode-agentsVoice-speakingForeground)" : "var(--vscode-descriptionForeground)";
|
|
100
|
-
micBtn.style.color = micColor;
|
|
101
|
-
const micIsActive = props.voiceState === "listening" || props.voiceState === "speaking";
|
|
102
|
-
micBtn.classList.toggle("agents-voice-mode-active", micIsActive);
|
|
103
|
-
micBtn.style.setProperty(
|
|
104
|
-
"--agents-voice-icon-rgb",
|
|
105
|
-
props.voiceState === "speaking" ? "163,113,247" : "88,166,255"
|
|
106
|
-
);
|
|
107
|
-
micBtn.style.borderRadius = "50%";
|
|
108
|
-
if (!micIsActive) {
|
|
109
|
-
micBtn.style.boxShadow = "none";
|
|
110
|
-
}
|
|
111
|
-
micBtn.onmouseenter = () => {
|
|
112
|
-
micBtn.style.color = "var(--vscode-foreground)";
|
|
113
|
-
};
|
|
114
|
-
micBtn.onmouseleave = () => {
|
|
115
|
-
micBtn.style.color = micColor;
|
|
116
|
-
};
|
|
117
|
-
micBtn.onmousedown = e => {
|
|
118
|
-
if (isSecondaryPointerGesture(e)) {
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
props.onMicDown(e);
|
|
122
|
-
};
|
|
123
|
-
micBtn.onmouseup = e => {
|
|
124
|
-
if (isSecondaryPointerGesture(e)) {
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
props.onMicUp();
|
|
128
|
-
};
|
|
129
|
-
micBtn.oncontextmenu = e => {
|
|
130
|
-
e.preventDefault();
|
|
131
|
-
e.stopPropagation();
|
|
132
|
-
props.onMicContextMenu(e);
|
|
133
|
-
};
|
|
134
|
-
placeholderText.style.display = showConnected ? "none" : "";
|
|
135
|
-
const keyLabel = props.pttKeyLabel;
|
|
136
|
-
const holdText = keyLabel ? ( localize(8717, "Hold {0} to talk", keyLabel)) : ( localize(8718, "Click voice mode to talk"));
|
|
137
|
-
placeholderText.textContent = holdText;
|
|
138
|
-
placeholderText.ariaLabel = holdText;
|
|
139
|
-
placeholderText.onclick = props.onConnectClick;
|
|
140
|
-
connIndicator.style.display = showConnected && !props.hideDisconnect ? "inline-flex" : "none";
|
|
141
|
-
connIndicator.onclick = props.onDisconnectClick;
|
|
142
|
-
muteBtn.style.display = showConnected ? "" : "none";
|
|
143
|
-
muteBtn.classList.toggle("codicon-mic-off", props.isMuted);
|
|
144
|
-
muteBtn.classList.toggle("codicon-mic", !props.isMuted);
|
|
145
|
-
const muteColor = "var(--vscode-descriptionForeground)";
|
|
146
|
-
muteBtn.style.color = muteColor;
|
|
147
|
-
const muteLabel = props.isMuted ? ( localize(8719, "Unmute Microphone")) : ( localize(8720, "Mute Microphone"));
|
|
148
|
-
muteBtn.ariaLabel = muteLabel;
|
|
149
|
-
muteBtn.title = muteLabel;
|
|
150
|
-
muteBtn.setAttribute("aria-pressed", props.isMuted ? "true" : "false");
|
|
151
|
-
muteBtn.onmouseenter = () => {
|
|
152
|
-
muteBtn.style.color = "var(--vscode-foreground)";
|
|
153
|
-
};
|
|
154
|
-
muteBtn.onmouseleave = () => {
|
|
155
|
-
muteBtn.style.color = muteColor;
|
|
156
|
-
};
|
|
157
|
-
muteBtn.onclick = e => {
|
|
158
|
-
e.preventDefault();
|
|
159
|
-
e.stopPropagation();
|
|
160
|
-
props.onMuteClick(e);
|
|
161
|
-
};
|
|
162
|
-
const showConnBtnCenter = !showConnected && props.centerConnectButton;
|
|
163
|
-
spacer.style.cssText = "flex:1;";
|
|
164
|
-
if (showConnBtnCenter) {
|
|
165
|
-
spacer.style.cssText = "flex:1;display:flex;justify-content:center;gap:8px;";
|
|
166
|
-
if (props.showPopout) {
|
|
167
|
-
spacer.append(popoutBtn);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
feedbackBtn.onclick = props.onFeedbackClick;
|
|
171
|
-
if (showConnBtnCenter) {
|
|
172
|
-
popoutBtn.style.display = props.showPopout ? "" : "none";
|
|
173
|
-
} else {
|
|
174
|
-
if (popoutBtn.parentElement === spacer) {
|
|
175
|
-
closeBtn.before(popoutBtn);
|
|
176
|
-
}
|
|
177
|
-
popoutBtn.style.display = props.showPopout ? "" : "none";
|
|
178
|
-
}
|
|
179
|
-
popoutBtn.onclick = props.onPopoutClick;
|
|
180
|
-
closeBtn.style.display = props.showClose ? "" : "none";
|
|
181
|
-
closeBtn.onclick = props.onCloseClick;
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export { createHeader };
|
package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface OnboardingProps {
|
|
2
|
-
readonly pttKeyLabel: string | undefined;
|
|
3
|
-
readonly isConnecting: boolean;
|
|
4
|
-
readonly onGetStarted: (e: MouseEvent) => void;
|
|
5
|
-
readonly onOpenPttKeySettings: (e: MouseEvent) => void;
|
|
6
|
-
readonly onOpenPopout: ((e: MouseEvent) => void) | undefined;
|
|
7
|
-
}
|
|
8
|
-
export interface OnboardingComponent {
|
|
9
|
-
readonly element: HTMLElement;
|
|
10
|
-
update(props: OnboardingProps): void;
|
|
11
|
-
}
|
|
12
|
-
export declare function createOnboarding(): OnboardingComponent;
|
package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { $, createTextNode, createElement } 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, addKeyboardActivation } from './tokens.js';
|
|
5
|
-
|
|
6
|
-
const ONBOARDING_FONT = "13px";
|
|
7
|
-
const ONBOARDING_ICON_LG = "18px";
|
|
8
|
-
function createOnboarding() {
|
|
9
|
-
const container = $("div");
|
|
10
|
-
container.style.cssText = "display:flex;flex-direction:column;gap:12px;padding:8px 0;";
|
|
11
|
-
const title = $("span");
|
|
12
|
-
title.style.cssText = "font-size:14px;font-weight:600;color:var(--vscode-foreground);";
|
|
13
|
-
title.textContent = ( localize(8721, "Welcome to Voice Chat"));
|
|
14
|
-
const descSection = $("div");
|
|
15
|
-
descSection.style.cssText = `display:flex;flex-direction:column;gap:10px;font-size:${ONBOARDING_FONT};color:var(--vscode-foreground);line-height:1.5;`;
|
|
16
|
-
const welcomeRow = $("div");
|
|
17
|
-
welcomeRow.style.cssText = "display:flex;gap:10px;align-items:center;";
|
|
18
|
-
const welcomeIconWrap = $("span");
|
|
19
|
-
welcomeIconWrap.style.cssText = "display:flex;justify-content:center;align-items:center;width:24px;flex-shrink:0;";
|
|
20
|
-
const welcomeIcon = $("span.codicon.codicon-sparkle");
|
|
21
|
-
welcomeIcon.style.fontSize = "20px";
|
|
22
|
-
welcomeIconWrap.append(welcomeIcon);
|
|
23
|
-
const welcomeText = $("span");
|
|
24
|
-
welcomeText.textContent = ( localize(
|
|
25
|
-
8722,
|
|
26
|
-
"Speak to an assistant that controls multiple coding agents at once. Get notified when work is done or input is needed."
|
|
27
|
-
));
|
|
28
|
-
welcomeRow.append(welcomeIconWrap, welcomeText);
|
|
29
|
-
const pttRow = $("div");
|
|
30
|
-
pttRow.style.cssText = "display:flex;gap:10px;align-items:center;";
|
|
31
|
-
const pttIconWrap = $("span");
|
|
32
|
-
pttIconWrap.style.cssText = "display:flex;justify-content:center;align-items:center;width:24px;flex-shrink:0;";
|
|
33
|
-
const pttKeyChip = $("span");
|
|
34
|
-
pttKeyChip.role = "button";
|
|
35
|
-
pttKeyChip.tabIndex = 0;
|
|
36
|
-
pttKeyChip.ariaLabel = ( localize(8723, "Change push-to-talk key"));
|
|
37
|
-
pttKeyChip.style.cssText = `font-size:${FONT_SIZE.micro};padding:1px 4px;border:1px solid var(--vscode-descriptionForeground);border-radius:3px;line-height:1;color:var(--vscode-descriptionForeground);cursor:pointer;-webkit-app-region:no-drag;`;
|
|
38
|
-
addKeyboardActivation(pttKeyChip);
|
|
39
|
-
pttIconWrap.append(pttKeyChip);
|
|
40
|
-
const pttTextSpan = $("span");
|
|
41
|
-
const pttStrong = $("strong");
|
|
42
|
-
pttStrong.textContent = ( localize(8724, "Push-to-talk"));
|
|
43
|
-
const pttHold = createTextNode(" " + ( localize(8725, "— hold the key while speaking, release when done.")) + " ");
|
|
44
|
-
const pttLink = createElement("a");
|
|
45
|
-
pttLink.href = "#";
|
|
46
|
-
pttLink.style.cssText = "color:var(--vscode-textLink-foreground);cursor:pointer;text-decoration:none;";
|
|
47
|
-
pttLink.textContent = ( localize(8726, "Configure a keybinding"));
|
|
48
|
-
const pttSuffix = createTextNode(" " + ( localize(8727, "to use it from any app.")));
|
|
49
|
-
pttTextSpan.append(pttStrong, pttHold, pttLink, pttSuffix);
|
|
50
|
-
pttRow.append(pttIconWrap, pttTextSpan);
|
|
51
|
-
const feedbackRow = $("div");
|
|
52
|
-
feedbackRow.style.cssText = "display:flex;gap:10px;align-items:center;";
|
|
53
|
-
const feedbackIconWrap = $("span");
|
|
54
|
-
feedbackIconWrap.style.cssText = "display:flex;justify-content:center;align-items:center;width:24px;flex-shrink:0;";
|
|
55
|
-
const feedbackIcon = $("span.codicon.codicon-feedback");
|
|
56
|
-
feedbackIcon.style.fontSize = ONBOARDING_ICON_LG;
|
|
57
|
-
feedbackIconWrap.append(feedbackIcon);
|
|
58
|
-
const feedbackText = $("span");
|
|
59
|
-
feedbackText.textContent = ( localize(8728, "Use the feedback icon to help us improve your experience."));
|
|
60
|
-
feedbackRow.append(feedbackIconWrap, feedbackText);
|
|
61
|
-
const miniViewRow = $("div");
|
|
62
|
-
miniViewRow.style.cssText = "display:flex;gap:10px;align-items:center;";
|
|
63
|
-
const miniViewIconWrap = $("span");
|
|
64
|
-
miniViewIconWrap.style.cssText = "display:flex;justify-content:center;align-items:center;width:24px;flex-shrink:0;";
|
|
65
|
-
const miniViewIcon = $("span.codicon.codicon-link-external");
|
|
66
|
-
miniViewIcon.style.fontSize = FONT_SIZE.iconSm;
|
|
67
|
-
miniViewIconWrap.append(miniViewIcon);
|
|
68
|
-
const miniViewTextSpan = $("span");
|
|
69
|
-
const miniViewLink = createElement("a");
|
|
70
|
-
miniViewLink.href = "#";
|
|
71
|
-
miniViewLink.style.cssText = "color:var(--vscode-textLink-foreground);cursor:pointer;text-decoration:none;";
|
|
72
|
-
miniViewLink.textContent = ( localize(8729, "Open the mini-view"));
|
|
73
|
-
const miniViewSuffix = createTextNode(" " + ( localize(8730, "to multitask while VS Code is not in the foreground.")));
|
|
74
|
-
miniViewTextSpan.append(miniViewLink, miniViewSuffix);
|
|
75
|
-
miniViewRow.append(miniViewIconWrap, miniViewTextSpan);
|
|
76
|
-
descSection.append(welcomeRow, pttRow, feedbackRow, miniViewRow);
|
|
77
|
-
const button = createElement("button");
|
|
78
|
-
button.style.cssText = `-webkit-app-region:no-drag;background:var(--vscode-button-background);border:none;color:var(--vscode-button-foreground);font-size:${ONBOARDING_FONT};padding:6px 14px;border-radius:3px;font-weight:500;align-self:stretch;margin-top:2px;`;
|
|
79
|
-
button.addEventListener("mouseenter", () => {
|
|
80
|
-
if (!button.disabled) {
|
|
81
|
-
button.style.background = "var(--vscode-button-hoverBackground)";
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
button.addEventListener("mouseleave", () => {
|
|
85
|
-
button.style.background = "var(--vscode-button-background)";
|
|
86
|
-
});
|
|
87
|
-
container.append(title, descSection, button);
|
|
88
|
-
return {
|
|
89
|
-
element: container,
|
|
90
|
-
update(props) {
|
|
91
|
-
pttKeyChip.textContent = props.pttKeyLabel ?? "Space";
|
|
92
|
-
pttKeyChip.onclick = e => {
|
|
93
|
-
e.preventDefault();
|
|
94
|
-
props.onOpenPttKeySettings(e);
|
|
95
|
-
};
|
|
96
|
-
pttLink.onclick = e => {
|
|
97
|
-
e.preventDefault();
|
|
98
|
-
props.onOpenPttKeySettings(e);
|
|
99
|
-
};
|
|
100
|
-
miniViewRow.style.display = props.onOpenPopout ? "flex" : "none";
|
|
101
|
-
if (props.onOpenPopout) {
|
|
102
|
-
miniViewLink.onclick = e => {
|
|
103
|
-
e.preventDefault();
|
|
104
|
-
props.onOpenPopout(e);
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
button.disabled = props.isConnecting;
|
|
108
|
-
button.style.cursor = props.isConnecting ? "default" : "pointer";
|
|
109
|
-
button.style.opacity = props.isConnecting ? "0.7" : "1";
|
|
110
|
-
button.textContent = props.isConnecting ? ( localize(8731, "Connecting…")) : ( localize(8732, "Get Started"));
|
|
111
|
-
button.onclick = props.onGetStarted;
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export { createOnboarding };
|
package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
-
import type { IPendingToolConfirmation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController";
|
|
3
|
-
export interface SessionRowData {
|
|
4
|
-
readonly resource: URI;
|
|
5
|
-
readonly label: string;
|
|
6
|
-
readonly isActive: boolean;
|
|
7
|
-
readonly needsInput: boolean;
|
|
8
|
-
readonly isIdle: boolean;
|
|
9
|
-
readonly isSpeaking: boolean;
|
|
10
|
-
readonly insertions: number;
|
|
11
|
-
readonly deletions: number;
|
|
12
|
-
readonly toolConfirmation: IPendingToolConfirmation | undefined;
|
|
13
|
-
}
|
|
14
|
-
export interface SessionGroupData {
|
|
15
|
-
readonly label: string;
|
|
16
|
-
readonly sessions: readonly SessionRowData[];
|
|
17
|
-
}
|
|
18
|
-
export interface SessionListProps {
|
|
19
|
-
readonly sessions: readonly SessionRowData[];
|
|
20
|
-
readonly groups?: readonly SessionGroupData[];
|
|
21
|
-
readonly selectedTarget?: URI;
|
|
22
|
-
readonly onOpenSession: (resource: URI) => void;
|
|
23
|
-
readonly onStopSession: (resource: URI) => void;
|
|
24
|
-
readonly onCancelSession: (resource: URI) => void;
|
|
25
|
-
readonly onSelectTarget: (resource: URI | undefined) => void;
|
|
26
|
-
readonly onNewSession: () => void;
|
|
27
|
-
}
|
|
28
|
-
export interface SessionListComponent {
|
|
29
|
-
readonly element: HTMLElement;
|
|
30
|
-
update(props: SessionListProps): void;
|
|
31
|
-
}
|
|
32
|
-
export declare function createSessionList(): SessionListComponent;
|
package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js
DELETED
|
@@ -1,226 +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, addKeyboardActivation } from './tokens.js';
|
|
5
|
-
|
|
6
|
-
function hoverIcon(className, ariaLabel) {
|
|
7
|
-
const el = $(`span.codicon.${className}`);
|
|
8
|
-
el.role = "button";
|
|
9
|
-
el.tabIndex = 0;
|
|
10
|
-
el.ariaLabel = ariaLabel;
|
|
11
|
-
el.style.cssText = `font-size:${FONT_SIZE.iconSm};color:var(--vscode-descriptionForeground);cursor:pointer;-webkit-app-region:no-drag;padding:1px;`;
|
|
12
|
-
el.addEventListener("mouseenter", () => {
|
|
13
|
-
el.style.color = "var(--vscode-foreground)";
|
|
14
|
-
});
|
|
15
|
-
el.addEventListener("mouseleave", () => {
|
|
16
|
-
el.style.color = "var(--vscode-descriptionForeground)";
|
|
17
|
-
});
|
|
18
|
-
addKeyboardActivation(el);
|
|
19
|
-
return el;
|
|
20
|
-
}
|
|
21
|
-
function createSessionRow(session, props) {
|
|
22
|
-
const isSelected = props.selectedTarget?.toString() === ( session.resource.toString());
|
|
23
|
-
const dotColor = session.needsInput ? "var(--vscode-editorWarning-foreground)" : session.isActive ? "var(--vscode-charts-green)" : "var(--vscode-editorWhitespace-foreground)";
|
|
24
|
-
const effectiveDotColor = session.isSpeaking ? "var(--vscode-agentsVoice-speakingForeground)" : dotColor;
|
|
25
|
-
const shouldPulse = session.isActive || session.isSpeaking;
|
|
26
|
-
const labelColor = session.isSpeaking ? "var(--vscode-agentsVoice-speakingForeground)" : session.isIdle ? "var(--vscode-descriptionForeground)" : "var(--vscode-foreground)";
|
|
27
|
-
const labelWeight = session.isSpeaking ? "500" : "normal";
|
|
28
|
-
const rowBg = isSelected ? "background:var(--vscode-list-activeSelectionBackground);border-radius:4px;" : "";
|
|
29
|
-
const rowLabelColor = isSelected ? "var(--vscode-list-activeSelectionForeground)" : labelColor;
|
|
30
|
-
const row = $("div");
|
|
31
|
-
row.role = "option";
|
|
32
|
-
row.tabIndex = 0;
|
|
33
|
-
row.ariaLabel = session.label || "Untitled session";
|
|
34
|
-
row.setAttribute("aria-selected", String(isSelected));
|
|
35
|
-
row.style.cssText = `display:flex;align-items:center;gap:6px;height:28px;padding:0 4px;border-bottom:1px solid var(--vscode-editorGroup-border);flex-shrink:0;cursor:pointer;${rowBg}`;
|
|
36
|
-
row.addEventListener("click", e => {
|
|
37
|
-
e.preventDefault();
|
|
38
|
-
e.stopPropagation();
|
|
39
|
-
if (isSelected) {
|
|
40
|
-
props.onSelectTarget(undefined);
|
|
41
|
-
} else {
|
|
42
|
-
props.onSelectTarget(session.resource);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
row.addEventListener("keydown", e => {
|
|
46
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
47
|
-
e.preventDefault();
|
|
48
|
-
row.click();
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
const showActions = () => {
|
|
52
|
-
if (stats) {
|
|
53
|
-
stats.style.display = "none";
|
|
54
|
-
}
|
|
55
|
-
if (actions) {
|
|
56
|
-
actions.style.display = "flex";
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
const hideActions = () => {
|
|
60
|
-
if (stats) {
|
|
61
|
-
stats.style.display = "flex";
|
|
62
|
-
}
|
|
63
|
-
if (actions) {
|
|
64
|
-
actions.style.display = "none";
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
row.addEventListener("mouseenter", showActions);
|
|
68
|
-
row.addEventListener("mouseleave", hideActions);
|
|
69
|
-
row.addEventListener("focusin", showActions);
|
|
70
|
-
row.addEventListener("focusout", e => {
|
|
71
|
-
if (!row.contains(e.relatedTarget)) {
|
|
72
|
-
hideActions();
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
if (isSelected) {
|
|
76
|
-
const check = $("span.codicon.codicon-check");
|
|
77
|
-
check.style.cssText = `font-size:10px;color:${rowLabelColor};flex-shrink:0;`;
|
|
78
|
-
row.append(check);
|
|
79
|
-
} else {
|
|
80
|
-
const dot = $("span");
|
|
81
|
-
dot.style.cssText = `width:7px;height:7px;border-radius:50%;background:${effectiveDotColor};flex-shrink:0;${shouldPulse ? "animation:agents-voice-pulse 1.4s ease-in-out infinite;" : ""}`;
|
|
82
|
-
row.append(dot);
|
|
83
|
-
}
|
|
84
|
-
const label = $("span");
|
|
85
|
-
label.style.cssText = `font-size:${FONT_SIZE.body};flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:${rowLabelColor};font-weight:${labelWeight};`;
|
|
86
|
-
label.textContent = session.label || "Untitled session";
|
|
87
|
-
row.append(label);
|
|
88
|
-
const actionsContainer = $("div");
|
|
89
|
-
actionsContainer.style.cssText = "display:flex;align-items:center;gap:4px;flex-shrink:0;";
|
|
90
|
-
const stats = $("span");
|
|
91
|
-
stats.setAttribute("data-role", "stats");
|
|
92
|
-
stats.style.cssText = `display:flex;gap:4px;font-size:${FONT_SIZE.body};`;
|
|
93
|
-
if (session.insertions > 0) {
|
|
94
|
-
const ins = $("span");
|
|
95
|
-
ins.style.color = "var(--vscode-charts-green)";
|
|
96
|
-
ins.textContent = `+${session.insertions}`;
|
|
97
|
-
stats.append(ins);
|
|
98
|
-
}
|
|
99
|
-
if (session.deletions > 0) {
|
|
100
|
-
const del = $("span");
|
|
101
|
-
del.style.color = "var(--vscode-editorError-foreground)";
|
|
102
|
-
del.textContent = `-${session.deletions}`;
|
|
103
|
-
stats.append(del);
|
|
104
|
-
}
|
|
105
|
-
const actions = $("span");
|
|
106
|
-
actions.setAttribute("data-role", "actions");
|
|
107
|
-
actions.style.cssText = "display:none;gap:4px;align-items:center;";
|
|
108
|
-
if (!session.isIdle) {
|
|
109
|
-
const stopBtn = hoverIcon("codicon-debug-stop", ( localize(8733, "Stop session")));
|
|
110
|
-
stopBtn.addEventListener("mouseenter", () => {
|
|
111
|
-
stopBtn.style.color = "var(--vscode-editorError-foreground)";
|
|
112
|
-
});
|
|
113
|
-
stopBtn.addEventListener("mouseleave", () => {
|
|
114
|
-
stopBtn.style.color = "var(--vscode-descriptionForeground)";
|
|
115
|
-
});
|
|
116
|
-
stopBtn.addEventListener("click", e => {
|
|
117
|
-
e.preventDefault();
|
|
118
|
-
e.stopPropagation();
|
|
119
|
-
props.onStopSession(session.resource);
|
|
120
|
-
});
|
|
121
|
-
actions.append(stopBtn);
|
|
122
|
-
}
|
|
123
|
-
actionsContainer.append(stats, actions);
|
|
124
|
-
row.append(actionsContainer);
|
|
125
|
-
const wrapper = $("div");
|
|
126
|
-
wrapper.append(row);
|
|
127
|
-
if (session.toolConfirmation) {
|
|
128
|
-
const tc = session.toolConfirmation;
|
|
129
|
-
const confRow = $("div");
|
|
130
|
-
confRow.style.cssText = "display:flex;flex-direction:column;gap:3px;padding:2px 2px 6px 15px;border-bottom:1px solid var(--vscode-panel-border);";
|
|
131
|
-
const confDesc = $("span");
|
|
132
|
-
confDesc.style.cssText = `font-size:${FONT_SIZE.body};color:var(--vscode-editorWarning-foreground);`;
|
|
133
|
-
confDesc.textContent = tc.description;
|
|
134
|
-
const confBtns = $("div");
|
|
135
|
-
confBtns.style.cssText = "display:flex;gap:6px;";
|
|
136
|
-
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;`;
|
|
137
|
-
if (tc.type === "approval") {
|
|
138
|
-
const approveBtn = $("button");
|
|
139
|
-
approveBtn.style.cssText = `${btnStyle}background:var(--vscode-charts-green);`;
|
|
140
|
-
approveBtn.textContent = ( localize(8734, "Approve"));
|
|
141
|
-
approveBtn.addEventListener("click", () => tc.approve());
|
|
142
|
-
const denyBtn = $("button");
|
|
143
|
-
denyBtn.style.cssText = `${btnStyle}background:var(--vscode-button-secondaryBackground);color:var(--vscode-foreground);`;
|
|
144
|
-
denyBtn.textContent = ( localize(8735, "Deny"));
|
|
145
|
-
denyBtn.addEventListener("click", () => tc.deny());
|
|
146
|
-
const stopBtn = $("button");
|
|
147
|
-
stopBtn.style.cssText = `${btnStyle}background:var(--vscode-button-secondaryBackground);color:var(--vscode-foreground);`;
|
|
148
|
-
stopBtn.textContent = ( localize(8736, "Stop"));
|
|
149
|
-
stopBtn.addEventListener("click", () => props.onCancelSession(session.resource));
|
|
150
|
-
confBtns.append(approveBtn, denyBtn, stopBtn);
|
|
151
|
-
} else {
|
|
152
|
-
const openInVSCode = $("button");
|
|
153
|
-
openInVSCode.style.cssText = `${btnStyle}background:var(--vscode-button-background);`;
|
|
154
|
-
openInVSCode.textContent = ( localize(8737, "Open in VS Code"));
|
|
155
|
-
openInVSCode.addEventListener("click", () => props.onOpenSession(session.resource));
|
|
156
|
-
confBtns.append(openInVSCode);
|
|
157
|
-
}
|
|
158
|
-
confRow.append(confDesc, confBtns);
|
|
159
|
-
wrapper.append(confRow);
|
|
160
|
-
}
|
|
161
|
-
return wrapper;
|
|
162
|
-
}
|
|
163
|
-
function createSessionList() {
|
|
164
|
-
const container = $("div.voice-session-list");
|
|
165
|
-
container.style.cssText = "display:flex;flex-direction:column;min-height:84px;max-height:320px;overflow-y:auto;margin:0 -14px 0 0;padding-right:8px;";
|
|
166
|
-
const style = $("style");
|
|
167
|
-
style.textContent = `
|
|
168
|
-
@keyframes agents-voice-pulse{0%,100%{opacity:1}50%{opacity:0.4}}
|
|
169
|
-
.voice-session-list::-webkit-scrollbar{width:6px;background:transparent;}
|
|
170
|
-
.voice-session-list::-webkit-scrollbar-thumb{background:var(--vscode-scrollbarSlider-activeBackground);border-radius:3px;}
|
|
171
|
-
.voice-session-list::-webkit-scrollbar-thumb:hover{background:var(--vscode-scrollbarSlider-activeBackground);}
|
|
172
|
-
.voice-session-list > div:last-of-type{border-bottom:none !important;}
|
|
173
|
-
`;
|
|
174
|
-
return {
|
|
175
|
-
element: container,
|
|
176
|
-
update(props) {
|
|
177
|
-
clearNode(container);
|
|
178
|
-
const hasGroups = props.groups && props.groups.length > 0;
|
|
179
|
-
const hasSessions = props.sessions.length > 0;
|
|
180
|
-
const headerRow = $("div");
|
|
181
|
-
headerRow.style.cssText = "display:flex;align-items:center;justify-content:space-between;padding:2px 2px 4px;border-bottom:1px solid var(--vscode-editorGroup-border);";
|
|
182
|
-
const headerLabel = $("span");
|
|
183
|
-
headerLabel.style.cssText = `font-size:${FONT_SIZE.micro};color:var(--vscode-disabledForeground);text-transform:uppercase;letter-spacing:0.5px;font-weight:500;`;
|
|
184
|
-
headerLabel.textContent = props.selectedTarget ? ( localize(8738, "Send to")) : ( localize(8739, "Send to (active)"));
|
|
185
|
-
const addBtn = hoverIcon("codicon-add", ( localize(8740, "New session")));
|
|
186
|
-
addBtn.title = ( localize(8740, "New session"));
|
|
187
|
-
addBtn.style.cssText += "padding:1px 2px;";
|
|
188
|
-
addBtn.addEventListener("click", e => {
|
|
189
|
-
e.preventDefault();
|
|
190
|
-
e.stopPropagation();
|
|
191
|
-
props.onNewSession();
|
|
192
|
-
});
|
|
193
|
-
headerRow.append(headerLabel, addBtn);
|
|
194
|
-
container.append(headerRow);
|
|
195
|
-
if (!hasGroups && !hasSessions) {
|
|
196
|
-
const empty = $("div");
|
|
197
|
-
empty.style.cssText = "display:flex;align-items:center;justify-content:center;height:60px;";
|
|
198
|
-
const emptyText = $("span");
|
|
199
|
-
emptyText.style.cssText = `font-size:${FONT_SIZE.body};color:var(--vscode-foreground);`;
|
|
200
|
-
emptyText.textContent = ( localize(8741, "No active sessions"));
|
|
201
|
-
empty.append(emptyText);
|
|
202
|
-
container.append(empty);
|
|
203
|
-
} else if (hasGroups) {
|
|
204
|
-
for (const group of props.groups) {
|
|
205
|
-
const groupHeader = $("div");
|
|
206
|
-
groupHeader.style.cssText = "padding:4px 2px 2px;";
|
|
207
|
-
const groupLabel = $("span");
|
|
208
|
-
groupLabel.style.cssText = `font-size:${FONT_SIZE.micro};color:var(--vscode-disabledForeground);text-transform:uppercase;letter-spacing:0.5px;font-weight:500;`;
|
|
209
|
-
groupLabel.textContent = group.label;
|
|
210
|
-
groupHeader.append(groupLabel);
|
|
211
|
-
container.append(groupHeader);
|
|
212
|
-
for (const session of group.sessions) {
|
|
213
|
-
container.append(createSessionRow(session, props));
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
} else {
|
|
217
|
-
for (const session of props.sessions) {
|
|
218
|
-
container.append(createSessionRow(session, props));
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
container.append(style);
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
export { createSessionList };
|
package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { IPendingToolConfirmation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController";
|
|
2
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
-
export interface StatusRowsProps {
|
|
4
|
-
readonly workingCount: number;
|
|
5
|
-
readonly needsInputCount: number;
|
|
6
|
-
readonly doneCount: number;
|
|
7
|
-
readonly speakingSessionLabel: string | undefined;
|
|
8
|
-
readonly speakingSessionResource: URI | undefined;
|
|
9
|
-
readonly pendingToolConfirmations: readonly IPendingToolConfirmation[];
|
|
10
|
-
readonly onOpenSession: (resource: URI) => void;
|
|
11
|
-
/** When false, hide the counter rows and the "No active sessions" placeholder. */
|
|
12
|
-
readonly showCounters?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export interface StatusRowsComponent {
|
|
15
|
-
readonly element: HTMLElement;
|
|
16
|
-
update(props: StatusRowsProps): void;
|
|
17
|
-
}
|
|
18
|
-
export declare function createStatusRows(): StatusRowsComponent;
|