@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,132 +0,0 @@
|
|
|
1
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
3
|
-
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
4
|
-
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
5
|
-
import { IUserDataProfilesService } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service";
|
|
6
|
-
import { ILifecycleService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service";
|
|
7
|
-
import { IVoiceTranscriptStore } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/agentsVoice/common/voiceTranscriptStore.service";
|
|
8
|
-
/**
|
|
9
|
-
* Discriminates what produced this entry. Only ``user_voice`` and
|
|
10
|
-
* ``agent_voice`` are rendered in the transcripts UI; ``agent_tool_call`` and
|
|
11
|
-
* ``coding_event`` are persisted so we can replay them as cross-session
|
|
12
|
-
* context to the backend without polluting the visible transcript.
|
|
13
|
-
*
|
|
14
|
-
* user_voice — what the user said (ASR-committed)
|
|
15
|
-
* agent_voice — what the voice agent spoke back (TTS text)
|
|
16
|
-
* agent_tool_call — a tool the voice agent dispatched (send_to_chat, etc.)
|
|
17
|
-
* coding_event — a status transition on a Copilot coding session
|
|
18
|
-
* (started, finished, needs-input, errored)
|
|
19
|
-
*/
|
|
20
|
-
export type VoiceTranscriptKind = "user_voice" | "agent_voice" | "agent_tool_call" | "coding_event";
|
|
21
|
-
/**
|
|
22
|
-
* Free-form metadata for non-voice entries. Field meaning depends on ``kind``:
|
|
23
|
-
* agent_tool_call: { toolName, toolArgs? }
|
|
24
|
-
* coding_event: { codingSessionId, codingStatus, codingSessionLabel? }
|
|
25
|
-
*/
|
|
26
|
-
export interface IVoiceTranscriptEntryMetadata {
|
|
27
|
-
readonly toolName?: string;
|
|
28
|
-
readonly toolArgs?: Record<string, unknown>;
|
|
29
|
-
readonly codingSessionId?: string;
|
|
30
|
-
readonly codingStatus?: string;
|
|
31
|
-
readonly codingSessionLabel?: string;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* One committed entry in a voice conversation timeline. Persisted as a single
|
|
35
|
-
* JSON line in the user's transcript JSONL file.
|
|
36
|
-
*
|
|
37
|
-
* Local-only — voice_code's backend does not have persistent conversation
|
|
38
|
-
* memory today. Entry IDs are generated client-side; ``ancestorIds`` chains
|
|
39
|
-
* the entries we have written so far.
|
|
40
|
-
*
|
|
41
|
-
* Backwards-compat note: older builds wrote entries without ``kind`` /
|
|
42
|
-
* ``metadata`` and only with ``role``. The store auto-wipes any such file on
|
|
43
|
-
* first read so we never have to read mixed-schema data in memory.
|
|
44
|
-
*/
|
|
45
|
-
export interface IVoiceTranscriptTurn {
|
|
46
|
-
/** Locally-generated entry id. */
|
|
47
|
-
readonly turnId: string;
|
|
48
|
-
/** Local ancestor entry ids, root → parent (the previous entry's turnId, or empty for the first entry). */
|
|
49
|
-
readonly ancestorIds: readonly string[];
|
|
50
|
-
/** What produced this entry. */
|
|
51
|
-
readonly kind: VoiceTranscriptKind;
|
|
52
|
-
/**
|
|
53
|
-
* Legacy/display role. Kept so the existing transcripts ViewPane can
|
|
54
|
-
* label rows without inspecting ``kind``. For non-voice kinds this is set
|
|
55
|
-
* to ``'assistant'`` (the entry is something the agent did).
|
|
56
|
-
*/
|
|
57
|
-
readonly role: "user" | "assistant";
|
|
58
|
-
/**
|
|
59
|
-
* Human-readable text for this entry. For voice kinds this is the spoken
|
|
60
|
-
* sentence. For tool-call / coding-event kinds it is a one-line summary
|
|
61
|
-
* suitable for context replay (e.g. ``"called send_to_chat(text=...)"``).
|
|
62
|
-
*/
|
|
63
|
-
readonly text: string;
|
|
64
|
-
/** Wall-clock time at the moment of persistence. ISO 8601 string. */
|
|
65
|
-
readonly timestamp: string;
|
|
66
|
-
/** Optional kind-specific structured fields. */
|
|
67
|
-
readonly metadata?: IVoiceTranscriptEntryMetadata;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Index of all transcripts known on this machine. Persisted via
|
|
71
|
-
* ``IStorageService`` (scope PROFILE, target MACHINE). One entry per
|
|
72
|
-
* GitHub login that has ever spoken on this machine.
|
|
73
|
-
*/
|
|
74
|
-
export interface IVoiceTranscriptIndex {
|
|
75
|
-
readonly entries: {
|
|
76
|
-
[userId: string]: IVoiceTranscriptIndexEntry;
|
|
77
|
-
};
|
|
78
|
-
readonly version: 1;
|
|
79
|
-
}
|
|
80
|
-
export interface IVoiceTranscriptIndexEntry {
|
|
81
|
-
/** GitHub login — partition key, doubles as filename stem. */
|
|
82
|
-
readonly userId: string;
|
|
83
|
-
/** ISO timestamp of first ever turn for this user. */
|
|
84
|
-
readonly createdAt: string;
|
|
85
|
-
/** ISO timestamp of most recent appended turn. */
|
|
86
|
-
readonly lastUpdatedAt: string;
|
|
87
|
-
/** Total turn count for this user. */
|
|
88
|
-
readonly turnCount: number;
|
|
89
|
-
/** Optional archive cutoff. Turns with timestamp < archivedBefore are hidden in the UI by default. */
|
|
90
|
-
readonly archivedBefore?: string;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Local on-disk transcript store for the Agents Voice feature.
|
|
94
|
-
*
|
|
95
|
-
* Layout (mirrors the chatSessionStore precedent, adapted for the per-user
|
|
96
|
-
* single-conversation model used by voice):
|
|
97
|
-
*
|
|
98
|
-
* <globalStorageHome>/voiceTranscripts/<githubLogin>.jsonl (append-only)
|
|
99
|
-
* IStorageService[AgentsVoiceStorageKeys.TranscriptIndex] (PROFILE/MACHINE)
|
|
100
|
-
*
|
|
101
|
-
* Writes are serialized via a ``Sequencer`` so simultaneous appendTurn calls
|
|
102
|
-
* preserve line ordering. A shutdown flush is registered so a final append
|
|
103
|
-
* completes before the window closes.
|
|
104
|
-
*/
|
|
105
|
-
export declare class VoiceTranscriptStore extends Disposable implements IVoiceTranscriptStore {
|
|
106
|
-
private readonly fileService;
|
|
107
|
-
private readonly storageService;
|
|
108
|
-
private readonly lifecycleService;
|
|
109
|
-
private readonly logService;
|
|
110
|
-
readonly _serviceBrand: undefined;
|
|
111
|
-
private readonly storageRoot;
|
|
112
|
-
private readonly writeQueue;
|
|
113
|
-
/** Cached snapshot of the index; we read once at startup and write through. */
|
|
114
|
-
private indexCache;
|
|
115
|
-
private pendingWrite;
|
|
116
|
-
private shuttingDown;
|
|
117
|
-
constructor(fileService: IFileService, storageService: IStorageService, userDataProfilesService: IUserDataProfilesService, lifecycleService: ILifecycleService, logService: ILogService);
|
|
118
|
-
appendTurn(userId: string, turn: IVoiceTranscriptTurn): Promise<void>;
|
|
119
|
-
loadTurns(userId: string, opts?: {
|
|
120
|
-
since?: string;
|
|
121
|
-
limit?: number;
|
|
122
|
-
}): Promise<IVoiceTranscriptTurn[]>;
|
|
123
|
-
getIndexEntry(userId: string): IVoiceTranscriptIndexEntry | undefined;
|
|
124
|
-
archiveUpTo(userId: string, cutoff: string): Promise<void>;
|
|
125
|
-
unarchive(userId: string): Promise<void>;
|
|
126
|
-
deleteAll(userId: string): Promise<void>;
|
|
127
|
-
private fileFor;
|
|
128
|
-
private doAppendTurn;
|
|
129
|
-
private updateIndexEntry;
|
|
130
|
-
private flushIndex;
|
|
131
|
-
private readIndexFromStorage;
|
|
132
|
-
}
|
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { Sequencer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
4
|
-
import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
5
|
-
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
-
import { joinPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
7
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
8
|
-
import { toFileOperationResult, FileOperationResult } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
9
|
-
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
10
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
11
|
-
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
12
|
-
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
13
|
-
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
14
|
-
import { IUserDataProfilesService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
15
|
-
import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
16
|
-
import { AgentsVoiceStorageKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/agentsVoice/common/agentsVoice';
|
|
17
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
18
|
-
|
|
19
|
-
let VoiceTranscriptStore = class VoiceTranscriptStore extends Disposable {
|
|
20
|
-
constructor(
|
|
21
|
-
fileService,
|
|
22
|
-
storageService,
|
|
23
|
-
userDataProfilesService,
|
|
24
|
-
lifecycleService,
|
|
25
|
-
logService
|
|
26
|
-
) {
|
|
27
|
-
super();
|
|
28
|
-
this.fileService = fileService;
|
|
29
|
-
this.storageService = storageService;
|
|
30
|
-
this.lifecycleService = lifecycleService;
|
|
31
|
-
this.logService = logService;
|
|
32
|
-
this.writeQueue = ( new Sequencer());
|
|
33
|
-
this.shuttingDown = false;
|
|
34
|
-
this.storageRoot = joinPath(
|
|
35
|
-
userDataProfilesService.defaultProfile.globalStorageHome,
|
|
36
|
-
"voiceTranscripts"
|
|
37
|
-
);
|
|
38
|
-
this.indexCache = this.readIndexFromStorage();
|
|
39
|
-
this._register(this.lifecycleService.onWillShutdown(e => {
|
|
40
|
-
this.shuttingDown = true;
|
|
41
|
-
if (!this.pendingWrite) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
e.join(this.pendingWrite, {
|
|
45
|
-
id: "join.voiceTranscriptStore",
|
|
46
|
-
label: ( localize(8800, "Saving voice transcript"))
|
|
47
|
-
});
|
|
48
|
-
}));
|
|
49
|
-
}
|
|
50
|
-
async appendTurn(userId, turn) {
|
|
51
|
-
if (this.shuttingDown) {
|
|
52
|
-
this.logService.warn(`VoiceTranscriptStore: ignoring appendTurn for ${userId} (shutting down)`);
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
const work = this.writeQueue.queue(() => this.doAppendTurn(userId, turn));
|
|
56
|
-
this.pendingWrite = work;
|
|
57
|
-
try {
|
|
58
|
-
await work;
|
|
59
|
-
} finally {
|
|
60
|
-
if (this.pendingWrite === work) {
|
|
61
|
-
this.pendingWrite = undefined;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
async loadTurns(userId, opts) {
|
|
66
|
-
const file = this.fileFor(userId);
|
|
67
|
-
let raw;
|
|
68
|
-
try {
|
|
69
|
-
const content = await this.fileService.readFile(file);
|
|
70
|
-
raw = ( content.value.toString());
|
|
71
|
-
} catch (e) {
|
|
72
|
-
if (toFileOperationResult(e) === FileOperationResult.FILE_NOT_FOUND) {
|
|
73
|
-
return [];
|
|
74
|
-
}
|
|
75
|
-
this.logService.error(`VoiceTranscriptStore: failed to read transcript for ${userId}`, e);
|
|
76
|
-
return [];
|
|
77
|
-
}
|
|
78
|
-
const turns = [];
|
|
79
|
-
let sawLegacyEntry = false;
|
|
80
|
-
for (const line of raw.split("\n")) {
|
|
81
|
-
const trimmed = line.trim();
|
|
82
|
-
if (!trimmed) {
|
|
83
|
-
continue;
|
|
84
|
-
}
|
|
85
|
-
try {
|
|
86
|
-
const parsed = JSON.parse(trimmed);
|
|
87
|
-
if (!parsed.kind) {
|
|
88
|
-
sawLegacyEntry = true;
|
|
89
|
-
break;
|
|
90
|
-
}
|
|
91
|
-
if (opts?.since && parsed.timestamp && parsed.timestamp < opts.since) {
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
turns.push(parsed);
|
|
95
|
-
} catch (e) {
|
|
96
|
-
this.logService.warn(
|
|
97
|
-
`VoiceTranscriptStore: skipping malformed line in ${userId}.jsonl: ${e.message}`
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
if (sawLegacyEntry) {
|
|
102
|
-
this.logService.info(
|
|
103
|
-
`VoiceTranscriptStore: detected pre-timeline transcript for ${userId}, wiping for new schema`
|
|
104
|
-
);
|
|
105
|
-
await this.deleteAll(userId);
|
|
106
|
-
return [];
|
|
107
|
-
}
|
|
108
|
-
if (opts?.limit !== undefined && turns.length > opts.limit) {
|
|
109
|
-
return turns.slice(turns.length - opts.limit);
|
|
110
|
-
}
|
|
111
|
-
return turns;
|
|
112
|
-
}
|
|
113
|
-
getIndexEntry(userId) {
|
|
114
|
-
return this.indexCache.entries[userId];
|
|
115
|
-
}
|
|
116
|
-
async archiveUpTo(userId, cutoff) {
|
|
117
|
-
const existing = this.indexCache.entries[userId];
|
|
118
|
-
if (!existing) {
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
this.updateIndexEntry(userId, {
|
|
122
|
-
...existing,
|
|
123
|
-
archivedBefore: cutoff
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
async unarchive(userId) {
|
|
127
|
-
const existing = this.indexCache.entries[userId];
|
|
128
|
-
if (!existing) {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
const {
|
|
132
|
-
archivedBefore: _unused,
|
|
133
|
-
...rest
|
|
134
|
-
} = existing;
|
|
135
|
-
this.updateIndexEntry(userId, rest);
|
|
136
|
-
}
|
|
137
|
-
async deleteAll(userId) {
|
|
138
|
-
const file = this.fileFor(userId);
|
|
139
|
-
try {
|
|
140
|
-
await this.fileService.del(file);
|
|
141
|
-
} catch (e) {
|
|
142
|
-
if (toFileOperationResult(e) !== FileOperationResult.FILE_NOT_FOUND) {
|
|
143
|
-
this.logService.error(`VoiceTranscriptStore: failed to delete transcript for ${userId}`, e);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
const next = {
|
|
147
|
-
...this.indexCache.entries
|
|
148
|
-
};
|
|
149
|
-
delete next[userId];
|
|
150
|
-
this.indexCache = {
|
|
151
|
-
...this.indexCache,
|
|
152
|
-
entries: next
|
|
153
|
-
};
|
|
154
|
-
this.flushIndex();
|
|
155
|
-
}
|
|
156
|
-
fileFor(userId) {
|
|
157
|
-
const safe = userId.replace(/[^A-Za-z0-9-]/g, "_");
|
|
158
|
-
if (!safe) {
|
|
159
|
-
throw ( new Error("Invalid userId for transcript storage"));
|
|
160
|
-
}
|
|
161
|
-
return joinPath(this.storageRoot, `${safe}.jsonl`);
|
|
162
|
-
}
|
|
163
|
-
async doAppendTurn(userId, turn) {
|
|
164
|
-
const file = this.fileFor(userId);
|
|
165
|
-
const line = JSON.stringify(turn) + "\n";
|
|
166
|
-
try {
|
|
167
|
-
try {
|
|
168
|
-
await this.fileService.createFolder(this.storageRoot);
|
|
169
|
-
} catch {}
|
|
170
|
-
await this.fileService.writeFile(file, VSBuffer.fromString(line), {
|
|
171
|
-
append: true
|
|
172
|
-
});
|
|
173
|
-
} catch (e) {
|
|
174
|
-
this.logService.error(`VoiceTranscriptStore: failed to append turn for ${userId}`, e);
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
const existing = this.indexCache.entries[userId];
|
|
178
|
-
const next = existing ? {
|
|
179
|
-
...existing,
|
|
180
|
-
lastUpdatedAt: turn.timestamp,
|
|
181
|
-
turnCount: existing.turnCount + 1
|
|
182
|
-
} : {
|
|
183
|
-
userId,
|
|
184
|
-
createdAt: turn.timestamp,
|
|
185
|
-
lastUpdatedAt: turn.timestamp,
|
|
186
|
-
turnCount: 1
|
|
187
|
-
};
|
|
188
|
-
this.updateIndexEntry(userId, next);
|
|
189
|
-
}
|
|
190
|
-
updateIndexEntry(userId, entry) {
|
|
191
|
-
this.indexCache = {
|
|
192
|
-
...this.indexCache,
|
|
193
|
-
entries: {
|
|
194
|
-
...this.indexCache.entries,
|
|
195
|
-
[userId]: entry
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
this.flushIndex();
|
|
199
|
-
}
|
|
200
|
-
flushIndex() {
|
|
201
|
-
try {
|
|
202
|
-
this.storageService.store(
|
|
203
|
-
AgentsVoiceStorageKeys.TranscriptIndex,
|
|
204
|
-
JSON.stringify(this.indexCache),
|
|
205
|
-
StorageScope.PROFILE,
|
|
206
|
-
StorageTarget.MACHINE
|
|
207
|
-
);
|
|
208
|
-
} catch (e) {
|
|
209
|
-
this.logService.error(`VoiceTranscriptStore: failed to flush transcript index`, e);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
readIndexFromStorage() {
|
|
213
|
-
const raw = this.storageService.get(AgentsVoiceStorageKeys.TranscriptIndex, StorageScope.PROFILE);
|
|
214
|
-
if (!raw) {
|
|
215
|
-
return {
|
|
216
|
-
entries: {},
|
|
217
|
-
version: 1
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
try {
|
|
221
|
-
const parsed = JSON.parse(raw);
|
|
222
|
-
if (parsed && typeof parsed === "object" && parsed.entries && parsed.version === 1) {
|
|
223
|
-
return parsed;
|
|
224
|
-
}
|
|
225
|
-
this.logService.warn("VoiceTranscriptStore: ignoring index with unknown shape, starting fresh");
|
|
226
|
-
} catch (e) {
|
|
227
|
-
this.logService.warn("VoiceTranscriptStore: failed to parse stored index, starting fresh", e);
|
|
228
|
-
}
|
|
229
|
-
return {
|
|
230
|
-
entries: {},
|
|
231
|
-
version: 1
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
VoiceTranscriptStore = ( __decorate([( __param(0, IFileService)), ( __param(1, IStorageService)), ( __param(2, IUserDataProfilesService)), ( __param(3, ILifecycleService)), ( __param(4, ILogService))], VoiceTranscriptStore));
|
|
236
|
-
|
|
237
|
-
export { VoiceTranscriptStore };
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
-
import { SessionModelInfo } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState";
|
|
4
|
-
import { ILanguageModelChatMetadataAndIdentifier, ILanguageModelChatProvider } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels";
|
|
5
|
-
import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether an agent host provider exposes a synthetic "Auto" model to
|
|
8
|
-
* fall back to.
|
|
9
|
-
*
|
|
10
|
-
* Today only the Copilot CLI harness exposes an Auto selection and can run
|
|
11
|
-
* without an explicit model, so it shows "Auto" rather than a "No models
|
|
12
|
-
* available" state when no models are listed. Other harnesses (Claude,
|
|
13
|
-
* Codex, …) require an explicit model.
|
|
14
|
-
*
|
|
15
|
-
* `provider` is the underlying agent provider id (e.g. `'copilotcli'`,
|
|
16
|
-
* `'claude'`, `'codex'`), not the `agent-host-<provider>` session type.
|
|
17
|
-
*
|
|
18
|
-
* TODO: hoist this capability onto the agent host protocol (e.g. a
|
|
19
|
-
* `supportsAutoModel?: boolean` on `IAgentDescriptor` / `AgentInfo`) so each
|
|
20
|
-
* agent declares its own value instead of this allow-list living in core.
|
|
21
|
-
*/
|
|
22
|
-
export declare function agentHostProviderSupportsAutoModel(provider: string): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Read-only view of the workbench model catalogue an agent host's models are enriched from.
|
|
25
|
-
*
|
|
26
|
-
* Narrowed to the reads {@link AgentHostLanguageModelProvider} performs (all plain lookups into
|
|
27
|
-
* already-registered models, so none of them re-enter a provider) plus the change signal, both so
|
|
28
|
-
* the dependency stays obviously side-effect free and so tests can supply a small fake.
|
|
29
|
-
*/
|
|
30
|
-
export type IAgentHostModelCatalogue = Pick<ILanguageModelsService, "getLanguageModelIds" | "lookupLanguageModel" | "onDidChangeLanguageModels">;
|
|
31
|
-
/**
|
|
32
|
-
* Exposes models available from the agent host process as selectable
|
|
33
|
-
* language models in the chat model picker. Models are provided from
|
|
34
|
-
* root state (via {@link AgentInfo.models}) rather than via RPC.
|
|
35
|
-
*/
|
|
36
|
-
export declare class AgentHostLanguageModelProvider extends Disposable implements ILanguageModelChatProvider {
|
|
37
|
-
private readonly _sessionType;
|
|
38
|
-
private readonly _vendor;
|
|
39
|
-
private readonly _catalogue?;
|
|
40
|
-
private readonly _onDidChange;
|
|
41
|
-
readonly onDidChange: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
42
|
-
private _models;
|
|
43
|
-
private _additionalModels;
|
|
44
|
-
constructor(_sessionType: string, _vendor: string, _catalogue?: IAgentHostModelCatalogue | undefined);
|
|
45
|
-
/**
|
|
46
|
-
* Called by {@link AgentHostContribution} when models change in root state.
|
|
47
|
-
*/
|
|
48
|
-
updateModels(models: readonly SessionModelInfo[]): void;
|
|
49
|
-
/** Adds service-discovered models without overriding metadata or policy published by the host. */
|
|
50
|
-
updateAdditionalModels(models: readonly SessionModelInfo[]): void;
|
|
51
|
-
provideLanguageModelChatInfo(_options: unknown, _token: CancellationToken): Promise<ILanguageModelChatMetadataAndIdentifier[]>;
|
|
52
|
-
/**
|
|
53
|
-
* The picker detail and description of a model that routes across others: Auto advertises its
|
|
54
|
-
* discount, HydraFusion that it is a research preview. Other models have neither.
|
|
55
|
-
*/
|
|
56
|
-
private _routingPresentationFor;
|
|
57
|
-
/**
|
|
58
|
-
* The workbench catalogue entry describing the same model, when one is known.
|
|
59
|
-
*
|
|
60
|
-
* A host driving the Copilot SDK advertises no billing and, where the SDK omits them, no token
|
|
61
|
-
* limits — so the CAPI-backed Copilot catalogue fills the gaps.
|
|
62
|
-
*
|
|
63
|
-
* Matching by raw model id does not prove the two describe the same offering — they can differ
|
|
64
|
-
* by entitlement, policy, rollout or billing route — so this is restricted to models billed
|
|
65
|
-
* through Copilot and only ever fills fields the host left absent.
|
|
66
|
-
*
|
|
67
|
-
* The token-limit half is a shim: those are native protocol fields, and a host that populates
|
|
68
|
-
* them makes the fallback dead. The billing half is not. Pricing is deliberately kept off the
|
|
69
|
-
* agent host protocol as operator-sensitive, so a client that wants to show it has to source it
|
|
70
|
-
* itself. Removing this join therefore means dropping pricing for these models, which is a
|
|
71
|
-
* product decision rather than a cleanup.
|
|
72
|
-
*/
|
|
73
|
-
private _catalogueEntryFor;
|
|
74
|
-
/**
|
|
75
|
-
* Translate a host's model {@link ConfigSchema} into the picker's schema shape.
|
|
76
|
-
*
|
|
77
|
-
* Values and display text belong to the producer; the workbench only picks the group
|
|
78
|
-
* ({@link _groupForConfigKey}). The one exception is a reasoning-effort enum with no display
|
|
79
|
-
* text at all, labelled locally rather than rendering raw values like `xhigh`.
|
|
80
|
-
*
|
|
81
|
-
* A property is never dropped for want of local enrichment: a host advertises one because it
|
|
82
|
-
* will honour it, and a new model, a staged rollout and an unresolved catalogue all look
|
|
83
|
-
* identical from here.
|
|
84
|
-
*/
|
|
85
|
-
private _toLanguageModelConfigurationSchema;
|
|
86
|
-
/** Config keys whose enum values are reasoning-effort levels, whatever the producer named them. */
|
|
87
|
-
private static readonly _reasoningEffortKeys;
|
|
88
|
-
/**
|
|
89
|
-
* Localized labels and descriptions for a reasoning-effort enum whose producer supplied none.
|
|
90
|
-
*
|
|
91
|
-
* A host that derives its schema from an upstream SDK advertises the accepted effort values
|
|
92
|
-
* without display text, because it has none the SDK did not give it — the Copilot agent host
|
|
93
|
-
* inside a cloud sandbox does exactly that. Deriving the text here keeps the picker from
|
|
94
|
-
* rendering raw values like `xhigh`, and matches what the agents that build their schema
|
|
95
|
-
* locally already emit.
|
|
96
|
-
*
|
|
97
|
-
* Only synthesized when every enum value is a string, since labels align with `enum` by index
|
|
98
|
-
* and a partial list would mislabel the rest.
|
|
99
|
-
*
|
|
100
|
-
* No `default` is synthesized: schema defaults are merged into the configuration that is sent
|
|
101
|
-
* (see `resolveModelConfiguration`), so inventing one would send an explicit effort where the
|
|
102
|
-
* host expects the value omitted and the backend to choose.
|
|
103
|
-
*/
|
|
104
|
-
private static _reasoningEffortDisplay;
|
|
105
|
-
private static _groupForConfigKey;
|
|
106
|
-
/**
|
|
107
|
-
* Derives the picker group id for a model — the vendor its models are bucketed
|
|
108
|
-
* under. A producer may pin the group id explicitly in `_meta` (e.g. Claude
|
|
109
|
-
* stamps its transport vendor — `copilot`/`anthropic` — there while keeping
|
|
110
|
-
* `provider` as the `claude` routing owner); that wins. Otherwise BYOK models
|
|
111
|
-
* are surfaced by the agent host under the `vendor/[group/]id` selection id (see
|
|
112
|
-
* `synthesizeByokSessionConfig`), so their upstream vendor is the id prefix; native
|
|
113
|
-
* harness models have no prefix and group under their `provider` (the harness,
|
|
114
|
-
* e.g. `copilotcli`). The picker resolves the display name from the vendor
|
|
115
|
-
* registry — no name mapping lives here.
|
|
116
|
-
*/
|
|
117
|
-
private _modelGroupFor;
|
|
118
|
-
sendChatRequest(): Promise<never>;
|
|
119
|
-
provideTokenCount(): Promise<number>;
|
|
120
|
-
}
|