TTS: remove persona rewrite placeholder · openclaw/openclaw@f7c837b
barronlroth
·
2026-04-26
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -19189,32 +19189,6 @@ export const GENERATED_BASE_CONFIG_SCHEMA: BaseConfigSchemaResponse = {
|
19189 | 19189 | description: |
19190 | 19190 | "Provider-neutral persona prompt intent. Providers decide whether and how to map this into request instructions.", |
19191 | 19191 | }, |
19192 | | - rewrite: { |
19193 | | - type: "object", |
19194 | | - properties: { |
19195 | | - enabled: { |
19196 | | - type: "boolean", |
19197 | | - }, |
19198 | | - model: { |
19199 | | - type: "string", |
19200 | | - }, |
19201 | | - preserveMeaning: { |
19202 | | - type: "boolean", |
19203 | | - }, |
19204 | | - compressForSpeech: { |
19205 | | - type: "boolean", |
19206 | | - }, |
19207 | | - inCharacter: { |
19208 | | - type: "boolean", |
19209 | | - }, |
19210 | | - maxChars: { |
19211 | | - type: "integer", |
19212 | | - minimum: 1, |
19213 | | - maximum: 9007199254740991, |
19214 | | - }, |
19215 | | - }, |
19216 | | - additionalProperties: false, |
19217 | | - }, |
19218 | 19192 | providers: { |
19219 | 19193 | type: "object", |
19220 | 19194 | propertyNames: { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -37,23 +37,13 @@ export type TtsPersonaPromptConfig = {
|
37 | 37 | constraints?: string[]; |
38 | 38 | }; |
39 | 39 | |
40 | | -export type TtsPersonaRewriteConfig = { |
41 | | -enabled?: boolean; |
42 | | -model?: string; |
43 | | -preserveMeaning?: boolean; |
44 | | -compressForSpeech?: boolean; |
45 | | -inCharacter?: boolean; |
46 | | -maxChars?: number; |
47 | | -}; |
48 | | - |
49 | 40 | export type TtsPersonaConfig = { |
50 | 41 | label?: string; |
51 | 42 | description?: string; |
52 | 43 | /** Preferred provider for this persona. Explicit provider prefs still win. */ |
53 | 44 | provider?: TtsProvider; |
54 | 45 | fallbackPolicy?: TtsPersonaFallbackPolicy; |
55 | 46 | prompt?: TtsPersonaPromptConfig; |
56 | | -rewrite?: TtsPersonaRewriteConfig; |
57 | 47 | /** Provider-specific persona bindings keyed by speech provider id. */ |
58 | 48 | providers?: TtsProviderConfigMap; |
59 | 49 | }; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -508,16 +508,6 @@ const TtsPersonaPromptSchema = z
|
508 | 508 | constraints: z.array(z.string()).optional(), |
509 | 509 | }) |
510 | 510 | .strict(); |
511 | | -const TtsPersonaRewriteSchema = z |
512 | | -.object({ |
513 | | -enabled: z.boolean().optional(), |
514 | | -model: z.string().optional(), |
515 | | -preserveMeaning: z.boolean().optional(), |
516 | | -compressForSpeech: z.boolean().optional(), |
517 | | -inCharacter: z.boolean().optional(), |
518 | | -maxChars: z.number().int().min(1).optional(), |
519 | | -}) |
520 | | -.strict(); |
521 | 511 | const TtsPersonaSchema = z |
522 | 512 | .object({ |
523 | 513 | label: z.string().optional(), |
@@ -527,7 +517,6 @@ const TtsPersonaSchema = z
|
527 | 517 | .union([z.literal("preserve-persona"), z.literal("provider-defaults"), z.literal("fail")]) |
528 | 518 | .optional(), |
529 | 519 | prompt: TtsPersonaPromptSchema.optional(), |
530 | | -rewrite: TtsPersonaRewriteSchema.optional(), |
531 | 520 | providers: z.record(z.string(), TtsProviderConfigSchema).optional(), |
532 | 521 | }) |
533 | 522 | .strict(); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -59,12 +59,6 @@ describe("TtsConfigSchema openai speed and instructions", () => {
|
59 | 59 | pacing: "Measured.", |
60 | 60 | constraints: ["Do not read configuration values aloud."], |
61 | 61 | }, |
62 | | -rewrite: { |
63 | | -enabled: false, |
64 | | -preserveMeaning: true, |
65 | | -compressForSpeech: true, |
66 | | -maxChars: 1500, |
67 | | -}, |
68 | 62 | providers: { |
69 | 63 | google: { |
70 | 64 | model: "gemini-3.1-flash-tts-preview", |
@@ -82,4 +76,18 @@ describe("TtsConfigSchema openai speed and instructions", () => {
|
82 | 76 | }), |
83 | 77 | ).not.toThrow(); |
84 | 78 | }); |
| 79 | + |
| 80 | +it("rejects persona rewrite config until runtime behavior exists", () => { |
| 81 | +expect(() => |
| 82 | +TtsConfigSchema.parse({ |
| 83 | +personas: { |
| 84 | +alfred: { |
| 85 | +["rewrite"]: { |
| 86 | +enabled: true, |
| 87 | +}, |
| 88 | +}, |
| 89 | +}, |
| 90 | +}), |
| 91 | +).toThrow(); |
| 92 | +}); |
85 | 93 | }); |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -141,7 +141,6 @@ export type {
|
141 | 141 | TtsPersonaConfig, |
142 | 142 | TtsPersonaFallbackPolicy, |
143 | 143 | TtsPersonaPromptConfig, |
144 | | -TtsPersonaRewriteConfig, |
145 | 144 | TtsProvider, |
146 | 145 | } from "../config/types.js"; |
147 | 146 | export { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。