@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.
Files changed (144) hide show
  1. package/common.js +0 -53
  2. package/index.js +0 -3
  3. package/package.json +5 -5
  4. package/session.js +0 -3
  5. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/missionControlAgentHostContribution.js +1 -1
  6. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostActions.js +1 -1
  7. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.js +1 -1
  8. package/vscode/src/vs/workbench/contrib/chat/browser/chat.shared.contribution.js +6 -6
  9. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionListController.d.ts +1 -1
  10. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionListController.js +1 -1
  11. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/editorCloudSandboxContribution.d.ts +1 -1
  12. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/editorCloudSandboxContribution.js +2 -2
  13. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentActions.js +1 -1
  14. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHost.contribution.js +7 -7
  15. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostChatContribution.js +4 -4
  16. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +1 -1
  17. package/vscode/src/vs/platform/agentHost/browser/webPubSubRelayTransport.d.ts +0 -135
  18. package/vscode/src/vs/platform/agentHost/browser/webPubSubRelayTransport.js +0 -510
  19. package/vscode/src/vs/platform/agentHost/common/agentModelNotices.d.ts +0 -22
  20. package/vscode/src/vs/platform/agentHost/common/agentModelNotices.js +0 -21
  21. package/vscode/src/vs/platform/agentHost/common/cloudSandboxAgentHost.d.ts +0 -273
  22. package/vscode/src/vs/platform/agentHost/common/cloudSandboxAgentHost.js +0 -61
  23. package/vscode/src/vs/platform/agentHost/common/meta/agentModelMeta.d.ts +0 -7
  24. package/vscode/src/vs/platform/agentHost/common/meta/agentModelMeta.js +0 -17
  25. package/vscode/src/vs/platform/agentHost/common/meta/copilotd/cloudSandboxProjectMeta.d.ts +0 -12
  26. package/vscode/src/vs/platform/agentHost/common/meta/copilotd/cloudSandboxProjectMeta.js +0 -48
  27. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelEnsembleMeta.d.ts +0 -8
  28. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelEnsembleMeta.js +0 -11
  29. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelPricing.d.ts +0 -114
  30. package/vscode/src/vs/platform/agentHost/common/meta/vscode/agentModelPricing.js +0 -141
  31. package/vscode/src/vs/platform/agentHost/common/taskEventReplay.d.ts +0 -48
  32. package/vscode/src/vs/platform/agentHost/common/taskEventReplay.js +0 -238
  33. package/vscode/src/vs/platform/agentHost/common/webPubSub/chunking.d.ts +0 -102
  34. package/vscode/src/vs/platform/agentHost/common/webPubSub/chunking.js +0 -260
  35. package/vscode/src/vs/platform/agentHost/common/webPubSub/framing.d.ts +0 -102
  36. package/vscode/src/vs/platform/agentHost/common/webPubSub/framing.js +0 -115
  37. package/vscode/src/vs/platform/agentHost/common/webPubSub/groups.d.ts +0 -46
  38. package/vscode/src/vs/platform/agentHost/common/webPubSub/groups.js +0 -92
  39. package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +0 -9
  40. package/vscode/src/vs/sessions/contrib/chat/browser/voiceBridge.contribution.d.ts +0 -14
  41. package/vscode/src/vs/sessions/contrib/chat/browser/voiceBridge.contribution.js +0 -385
  42. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudAutomationStore.d.ts +0 -67
  43. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudAutomationStore.js +0 -695
  44. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudSandboxSessionConfig.d.ts +0 -4
  45. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/cloudSandboxSessionConfig.js +0 -39
  46. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessions.contribution.d.ts +0 -1
  47. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessions.contribution.js +0 -59
  48. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsActions.d.ts +0 -1
  49. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsActions.js +0 -83
  50. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsChangesets.d.ts +0 -87
  51. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsChangesets.js +0 -176
  52. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.d.ts +0 -422
  53. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.js +0 -2444
  54. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/githubCloudAutomationStore.d.ts +0 -91
  55. package/vscode/src/vs/sessions/contrib/providers/copilotChatSessions/browser/githubCloudAutomationStore.js +0 -620
  56. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHost.contribution.d.ts +0 -1
  57. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHost.contribution.js +0 -5
  58. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHostContribution.d.ts +0 -46
  59. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxAgentHostContribution.js +0 -321
  60. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxSessionsProvider.d.ts +0 -104
  61. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/cloudSandboxSessionsProvider.js +0 -345
  62. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.d.ts +0 -2
  63. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoice.contribution.js +0 -611
  64. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.d.ts +0 -20
  65. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceSessionsPicker.js +0 -85
  66. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.d.ts +0 -200
  67. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidget.js +0 -981
  68. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.d.ts +0 -24
  69. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWidgetBinding.js +0 -206
  70. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.d.ts +0 -65
  71. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/agentsVoiceWindowService.js +0 -368
  72. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.d.ts +0 -10
  73. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/confirmationComponent.js +0 -57
  74. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.d.ts +0 -33
  75. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/feedbackDialog.js +0 -98
  76. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.d.ts +0 -32
  77. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/headerComponent.js +0 -186
  78. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.d.ts +0 -12
  79. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/onboardingComponent.js +0 -116
  80. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.d.ts +0 -32
  81. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/sessionListComponent.js +0 -226
  82. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.d.ts +0 -18
  83. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/statusRowsComponent.js +0 -138
  84. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.d.ts +0 -32
  85. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/tokens.js +0 -29
  86. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.d.ts +0 -13
  87. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/transcriptComponent.js +0 -108
  88. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.d.ts +0 -13
  89. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/components/voiceBarComponent.js +0 -63
  90. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/media/voiceModeOnboarding.css +0 -252
  91. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.d.ts +0 -1
  92. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscripts.contribution.js +0 -178
  93. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.d.ts +0 -47
  94. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/transcriptsView/voiceTranscriptsView.js +0 -322
  95. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.d.ts +0 -146
  96. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.js +0 -890
  97. package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.d.ts +0 -132
  98. package/vscode/src/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.js +0 -237
  99. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.d.ts +0 -120
  100. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.js +0 -234
  101. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +0 -36
  102. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +0 -164
  103. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/repositoryPicker.d.ts +0 -21
  104. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/repositoryPicker.js +0 -122
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupMicrosoftProbe.d.ts +0 -82
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupMicrosoftProbe.js +0 -213
  107. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxAgentHostService.d.ts +0 -40
  108. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxAgentHostService.js +0 -561
  109. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxApiService.d.ts +0 -133
  110. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxApiService.js +0 -1176
  111. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxConnectionCustomization.d.ts +0 -17
  112. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxConnectionCustomization.js +0 -76
  113. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxCredentialRefresh.d.ts +0 -54
  114. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxCredentialRefresh.js +0 -220
  115. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxHistoryCache.d.ts +0 -21
  116. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxHistoryCache.js +0 -184
  117. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxLegacySessionPreparation.d.ts +0 -8
  118. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxLegacySessionPreparation.js +0 -165
  119. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxModels.d.ts +0 -43
  120. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxModels.js +0 -162
  121. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxReadOnlySessionHandler.d.ts +0 -40
  122. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxReadOnlySessionHandler.js +0 -129
  123. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionContribution.d.ts +0 -166
  124. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionContribution.js +0 -838
  125. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionHandler.d.ts +0 -40
  126. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionHandler.js +0 -604
  127. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxTelemetry.d.ts +0 -289
  128. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxTelemetry.js +0 -497
  129. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlCredentialSealing.d.ts +0 -6
  130. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlCredentialSealing.js +0 -41
  131. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentService.d.ts +0 -73
  132. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentService.js +0 -398
  133. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlSharingService.d.ts +0 -45
  134. package/vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlSharingService.js +0 -296
  135. package/vscode/src/vs/workbench/contrib/chat/browser/speechToText/voiceCodeTranscriptionClient.d.ts +0 -63
  136. package/vscode/src/vs/workbench/contrib/chat/browser/speechToText/voiceCodeTranscriptionClient.js +0 -361
  137. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.d.ts +0 -34
  138. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.js +0 -198
  139. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.d.ts +0 -131
  140. package/vscode/src/vs/workbench/contrib/chat/browser/voiceClient/voiceClientService.js +0 -871
  141. package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.d.ts +0 -66
  142. package/vscode/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputMode.js +0 -297
  143. package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.d.ts +0 -31
  144. package/vscode/src/vs/workbench/contrib/chat/common/voicePlaybackService.js +0 -118
@@ -1,24 +0,0 @@
1
- import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
- import { IAgentSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service";
3
- import { IAgentTitleBarStatusService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusService.service";
4
- import { IVoicePlaybackService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/voicePlaybackService.service";
5
- import { IVoiceSessionController } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.service";
6
- import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";
7
- import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
8
- import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
9
- import { AgentsVoiceWidget } from "./agentsVoiceWidget.js";
10
- export interface IWidgetBindingServices {
11
- readonly voiceSessionController: IVoiceSessionController;
12
- readonly agentSessionsService: IAgentSessionsService;
13
- readonly agentTitleBarStatusService: IAgentTitleBarStatusService;
14
- readonly voicePlaybackService: IVoicePlaybackService;
15
- readonly environmentService: IWorkbenchEnvironmentService;
16
- readonly chatService?: IChatService;
17
- readonly configurationService?: IConfigurationService;
18
- }
19
- /**
20
- * Wire all controller observables and session/playback service events into the
21
- * widget. Used by both the floating agentsVoice window and the in-pane voice
22
- * bar so they stay in lock-step.
23
- */
24
- export declare function bindWidgetToController(widget: AgentsVoiceWidget, services: IWidgetBindingServices): IDisposable;
@@ -1,206 +0,0 @@
1
-
2
- import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
3
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
4
- import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
5
- import { getAgentChangesSummary } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel';
6
- import { getRepositoryName } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer';
7
- import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
8
- import { ChatSessionStatus } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
9
-
10
- function bindWidgetToController(widget, services) {
11
- const store = ( new DisposableStore());
12
- const {
13
- voiceSessionController: controller,
14
- agentSessionsService,
15
- agentTitleBarStatusService,
16
- voicePlaybackService,
17
- configurationService
18
- } = services;
19
- store.add(autorun(reader => {
20
- const state = controller.voiceState.read(reader);
21
- const connected = controller.isConnected.read(reader);
22
- const connecting = controller.isConnecting.read(reader);
23
- const reconnecting = controller.isReconnecting.read(reader);
24
- const muted = controller.isMuted.read(reader);
25
- const toolConfirmations = controller.pendingToolConfirmations.read(reader);
26
- const speakingSession = voicePlaybackService.speakingSession.read(reader);
27
- const statusText = controller.statusText.read(reader);
28
- const turns = controller.transcriptTurns.read(reader);
29
- const targetSession = controller.targetSession.read(reader);
30
- widget.setConnected(connected);
31
- widget.setConnecting(connecting);
32
- widget.setReconnecting(reconnecting);
33
- widget.setMuted(muted);
34
- widget.setVoiceState(state);
35
- widget.setPendingToolConfirmations(toolConfirmations);
36
- const showTranscript = configurationService?.getValue("agents.voice.showTranscript") !== false;
37
- widget.setTranscriptTurns(showTranscript ? turns : []);
38
- widget.setStatusText(statusText);
39
- widget.setSelectedTargetSession(targetSession);
40
- if (speakingSession) {
41
- const sessions = agentSessionsService.model.sessions;
42
- const match = sessions.find(s => ( s.resource.toString()) === ( speakingSession.toString()));
43
- widget.setSpeakingSession(speakingSession, match?.label);
44
- } else {
45
- widget.setSpeakingSession(undefined, undefined);
46
- }
47
- _updateSessionData(widget, services);
48
- }));
49
- const updateAll = () => {
50
- _updateStatusCounts(widget, services);
51
- _updateSessionData(widget, services);
52
- };
53
- store.add(agentSessionsService.model.onDidChangeSessions(updateAll));
54
- store.add(agentSessionsService.onDidChangeSessionArchivedState(updateAll));
55
- store.add(agentTitleBarStatusService.onDidChangeSessionInfo(updateAll));
56
- store.add(autorun(reader => {
57
- voicePlaybackService.speakingSession.read(reader);
58
- if (services.chatService) {
59
- for (const model of services.chatService.chatModels.read(reader)) {
60
- model.hasActiveRequest.read(reader);
61
- model.requestNeedsInput.read(reader);
62
- const lastReq = model.lastRequestObs.read(reader);
63
- if (lastReq?.response) {
64
- lastReq.response.isIncomplete.read(reader);
65
- lastReq.response.isPendingConfirmation.read(reader);
66
- }
67
- }
68
- }
69
- _updateSessionData(widget, services);
70
- }));
71
- _updateStatusCounts(widget, services);
72
- _updateSessionData(widget, services);
73
- return store;
74
- }
75
- function _updateStatusCounts(
76
- widget,
77
- {
78
- agentSessionsService
79
- }
80
- ) {
81
- const sessions = agentSessionsService.model.sessions.filter(s => !s.isArchived());
82
- const oneHourAgo = Date.now() - 60 * 60 * 1000;
83
- let working = 0;
84
- let needsInput = 0;
85
- let done = 0;
86
- for (const session of sessions) {
87
- switch (session.status) {
88
- case ChatSessionStatus.InProgress:
89
- working++;
90
- break;
91
- case ChatSessionStatus.NeedsInput:
92
- needsInput++;
93
- break;
94
- case ChatSessionStatus.Completed:
95
- {
96
- const endedAt = session.timing.lastRequestEnded ?? session.timing.created;
97
- if (endedAt && endedAt > oneHourAgo) {
98
- done++;
99
- }
100
- break;
101
- }
102
- }
103
- }
104
- widget.setStatusCounts(working, needsInput, done);
105
- }
106
- function _updateSessionData(widget, services) {
107
- const {
108
- agentSessionsService,
109
- voiceSessionController,
110
- voicePlaybackService,
111
- environmentService,
112
- chatService
113
- } = services;
114
- const sessions = agentSessionsService.model.sessions.filter(s => !s.isArchived());
115
- const toolConfirmations = voiceSessionController.pendingToolConfirmations.get();
116
- const speakingSession = voicePlaybackService.speakingSession.get();
117
- const statusOrder = s => s.status === ChatSessionStatus.NeedsInput ? 0 : s.status === ChatSessionStatus.InProgress ? 1 : 2;
118
- const lastActivity = s => s.timing.lastRequestEnded ?? s.timing.lastRequestStarted ?? s.timing.created ?? 0;
119
- const sorted = [...sessions].sort((a, b) => {
120
- const statusDiff = statusOrder(a) - statusOrder(b);
121
- if (statusDiff !== 0) {
122
- return statusDiff;
123
- }
124
- return lastActivity(b) - lastActivity(a);
125
- });
126
- const sessionRows = sorted.map(session => {
127
- const isSpeaking = speakingSession?.toString() === ( session.resource.toString());
128
- const changes = getAgentChangesSummary(session.changes);
129
- const tc = toolConfirmations.find(c => ( c.sessionResource.toString()) === ( session.resource.toString()));
130
- return {
131
- resource: session.resource,
132
- label: session.label || ( localize(8699, "Untitled session")),
133
- isActive: session.status === ChatSessionStatus.InProgress,
134
- needsInput: session.status === ChatSessionStatus.NeedsInput,
135
- isIdle: session.status === ChatSessionStatus.Completed,
136
- isSpeaking,
137
- insertions: changes?.insertions ?? 0,
138
- deletions: changes?.deletions ?? 0,
139
- toolConfirmation: tc
140
- };
141
- });
142
- if (chatService) {
143
- const agentResources = ( new Set(sessionRows.map(r => ( r.resource.toString()))));
144
- const chatModels = chatService.chatModels.get();
145
- for (const model of chatModels) {
146
- if (( agentResources.has(( model.sessionResource.toString())))) {
147
- continue;
148
- }
149
- const requests = model.getRequests();
150
- if (requests.length === 0) {
151
- continue;
152
- }
153
- const isActive = model.hasActiveRequest.get();
154
- const needsInput = !!model.requestNeedsInput.get();
155
- const tc = toolConfirmations.find(c => ( c.sessionResource.toString()) === ( model.sessionResource.toString()));
156
- sessionRows.push({
157
- resource: model.sessionResource,
158
- label: model.title || ( localize(8700, "Chat")),
159
- isActive: isActive && !needsInput,
160
- needsInput,
161
- isIdle: !isActive && !needsInput,
162
- isSpeaking: speakingSession?.toString() === ( model.sessionResource.toString()),
163
- insertions: 0,
164
- deletions: 0,
165
- toolConfirmation: tc
166
- });
167
- }
168
- }
169
- widget.setSessions(sessionRows);
170
- if (environmentService.isSessionsWindow) {
171
- const repoMap = ( new Map());
172
- const otherRows = [];
173
- for (let i = 0; i < sorted.length; i++) {
174
- const repoName = getRepositoryName(sorted[i]);
175
- const row = sessionRows[i];
176
- if (repoName) {
177
- let group = repoMap.get(repoName);
178
- if (!group) {
179
- group = [];
180
- repoMap.set(repoName, group);
181
- }
182
- group.push(row);
183
- } else {
184
- otherRows.push(row);
185
- }
186
- }
187
- const groups = [];
188
- for (const [label, rows] of repoMap) {
189
- groups.push({
190
- label,
191
- sessions: rows
192
- });
193
- }
194
- if (otherRows.length > 0) {
195
- groups.push({
196
- label: ( localize(8701, "Other")),
197
- sessions: otherRows
198
- });
199
- }
200
- widget.setSessionGroups(groups.length > 0 ? groups : undefined);
201
- } else {
202
- widget.setSessionGroups(undefined);
203
- }
204
- }
205
-
206
- export { bindWidgetToController };
@@ -1,65 +0,0 @@
1
- import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
- import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
3
- import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
4
- import { IAuxiliaryWindowService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.service";
5
- import { IAgentsVoiceWindowService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/agentsVoice/common/agentsVoice.service";
6
- import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
7
- import { IHostService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service";
8
- import { IAgentSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service";
9
- import { IAgentTitleBarStatusService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusService.service";
10
- import { IMicCaptureService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/micCaptureService.service";
11
- import { ITtsPlaybackService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/ttsPlaybackService.service";
12
- import { IVoiceSessionController } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/voiceClient/voiceSessionController.service";
13
- import { IVoicePlaybackService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/voicePlaybackService.service";
14
- import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
15
- import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
16
- import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
17
- import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
18
- import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";
19
- import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
20
- import { IAccessibilityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service";
21
- import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
22
- import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
23
- export declare class AgentsVoiceWindowService extends Disposable implements IAgentsVoiceWindowService {
24
- private readonly auxiliaryWindowService;
25
- private readonly storageService;
26
- private readonly configurationService;
27
- private readonly hostService;
28
- private readonly agentSessionsService;
29
- private readonly agentTitleBarStatusService;
30
- private readonly micCaptureService;
31
- private readonly ttsPlaybackService;
32
- private readonly voiceSessionController;
33
- private readonly voicePlaybackService;
34
- private readonly commandService;
35
- private readonly chatService;
36
- private readonly workspaceContextService;
37
- private readonly environmentService;
38
- private readonly themeService;
39
- private readonly accessibilityService;
40
- private readonly keybindingService;
41
- private readonly instantiationService;
42
- private readonly contextMenuService;
43
- readonly _serviceBrand: undefined;
44
- private readonly _onDidChangeOpen;
45
- readonly onDidChangeOpen: Event<boolean>;
46
- private readonly _auxiliaryWindowRef;
47
- private _window;
48
- private readonly _windowDisposables;
49
- private readonly _ownershipChannel;
50
- private _resizeTimeout;
51
- get isOpen(): boolean;
52
- /**
53
- * Calls setWindowAlwaysOnTop via a registered command (Electron only).
54
- * Avoids importing INativeHostService in the browser layer.
55
- */
56
- constructor(auxiliaryWindowService: IAuxiliaryWindowService, storageService: IStorageService, configurationService: IConfigurationService, hostService: IHostService, agentSessionsService: IAgentSessionsService, agentTitleBarStatusService: IAgentTitleBarStatusService, micCaptureService: IMicCaptureService, ttsPlaybackService: ITtsPlaybackService, voiceSessionController: IVoiceSessionController, voicePlaybackService: IVoicePlaybackService, commandService: ICommandService, chatService: IChatService, workspaceContextService: IWorkspaceContextService, environmentService: IWorkbenchEnvironmentService, themeService: IThemeService, accessibilityService: IAccessibilityService, keybindingService: IKeybindingService, instantiationService: IInstantiationService, contextMenuService: IContextMenuService);
57
- openWindow(): Promise<void>;
58
- closeWindow(): void;
59
- toggleWindow(): Promise<void>;
60
- private _resizeWindow;
61
- private _doResizeWindow;
62
- private _defaultBounds;
63
- private loadBounds;
64
- private saveBounds;
65
- }