





















@@ -62,6 +62,35 @@ describe("voice-call config compatibility", () => {
6262expect(streaming?.sttModel).toBeUndefined();
6363});
646465+it("removes legacy realtime agentContext system prompt toggle", () => {
66+const normalized = normalizeVoiceCallLegacyConfigInput({
67+realtime: {
68+agentContext: {
69+enabled: true,
70+includeSystemPrompt: false,
71+includeWorkspaceFiles: true,
72+},
73+},
74+});
75+76+const agentContext = (
77+normalized.realtime as
78+| {
79+agentContext?: {
80+enabled?: boolean;
81+includeSystemPrompt?: unknown;
82+includeWorkspaceFiles?: boolean;
83+};
84+}
85+| undefined
86+)?.agentContext;
87+88+expect(agentContext).toEqual({
89+enabled: true,
90+includeWorkspaceFiles: true,
91+});
92+});
93+6594it("does not migrate non-finite legacy streaming numbers", () => {
6695const migration = migrateVoiceCallLegacyConfigInput({
6796value: {
@@ -104,6 +133,11 @@ describe("voice-call config compatibility", () => {
104133sttProvider: "openai",
105134openaiApiKey: "sk-test", // pragma: allowlist secret
106135},
136+realtime: {
137+agentContext: {
138+includeSystemPrompt: true,
139+},
140+},
107141};
108142109143expect(collectVoiceCallLegacyConfigIssues(raw)).toEqual([
@@ -127,6 +161,12 @@ describe("voice-call config compatibility", () => {
127161replacement: "streaming.providers.openai.apiKey",
128162message: "Move streaming.openaiApiKey to streaming.providers.openai.apiKey.",
129163},
164+{
165+path: "realtime.agentContext.includeSystemPrompt",
166+replacement: "realtime.agentContext",
167+message:
168+"Remove realtime.agentContext.includeSystemPrompt; realtime context now uses the generated agent prompt.",
169+},
130170]);
131171expect(
132172formatVoiceCallLegacyConfigWarnings({
@@ -140,6 +180,7 @@ describe("voice-call config compatibility", () => {
140180"[voice-call] plugins.entries.voice-call.config.twilio.from: Move twilio.from to fromNumber.",
141181"[voice-call] plugins.entries.voice-call.config.streaming.sttProvider: Move streaming.sttProvider to streaming.provider.",
142182"[voice-call] plugins.entries.voice-call.config.streaming.openaiApiKey: Move streaming.openaiApiKey to streaming.providers.openai.apiKey.",
183+"[voice-call] plugins.entries.voice-call.config.realtime.agentContext.includeSystemPrompt: Remove realtime.agentContext.includeSystemPrompt; realtime context now uses the generated agent prompt.",
143184]);
144185});
145186@@ -150,13 +191,19 @@ describe("voice-call config compatibility", () => {
150191streaming: {
151192sttProvider: "openai",
152193},
194+realtime: {
195+agentContext: {
196+includeSystemPrompt: true,
197+},
198+},
153199},
154200configPathPrefix: "plugins.entries.voice-call.config",
155201});
156202157203expect(migration.changes).toEqual([
158204'Moved plugins.entries.voice-call.config.provider "log" → "mock".',
159205"Moved plugins.entries.voice-call.config.streaming.sttProvider → plugins.entries.voice-call.config.streaming.provider.",
206+"Removed plugins.entries.voice-call.config.realtime.agentContext.includeSystemPrompt.",
160207]);
161208});
162209});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。