Skip to content

Commit 3f45ca8

Browse files
committed
Overlay branch overlay/voice-cleanup-json on top of origin/main via Merge
• 729aab4d6c Overlay branch overlay/voice-cleanup-json on top of origin/main via Merge |\ | • 334e22c Overlay branch overlay/voice-cleanup-json on top of origin/main via Merge | |\ | | • a3a3340 fix(voice): the dictation cleanup prompt now asks for the JSON its parser requires | |/ • | e455200 fix: side chats start with the parent's permission mode and reasoning level (pingdotgg#32315) • | 97d04c3 fix(forgejo): tea's `pull` and `m` aliases count as shell merges (pingdotgg#32401) • | a601caa fix(gitlab): `glab mr accept` counts as a shell merge (pingdotgg#32400) • | 917ce99 fix(web): agent sign-in defaults to Auto access (pingdotgg#32186) • | 4c3a9d5 fix(cursor): use the SDK account for usage data (pingdotgg#32448)
2 parents e455200 + 334e22c commit 3f45ca8

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎apps/server/src/textGeneration/TranscriptionPostProcessing.test.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,10 @@ describe("buildTranscriptionPostProcessingPrompt", () => {
1212
expect(cued).toContain('Correction cue: "so\\"rry".');
1313
expect(cued.indexOf("Correction cue")).toBeLessThan(cued.indexOf("<transcript>"));
1414
});
15+
16+
it("asks for the JSON object the reply parser requires", () => {
17+
const draft = { text: "Make it 42.", selection: { start: 11, end: 11 } };
18+
const prompt = buildTranscriptionPostProcessingPrompt("Clean.", "sorry 24", draft);
19+
expect(prompt).toContain("JSON object with key: transcription");
20+
});
1521
});

‎apps/server/src/textGeneration/TranscriptionPostProcessing.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function buildTranscriptionPostProcessingPrompt(
2929
${transcript}
3030
</transcript>
3131
32-
${placement} Use the composer draft and insertion position to resolve ambiguity and correct likely recognition errors in the transcript. The draft can clarify the topic, references, terminology, and how the new speech fits with nearby text. Prefer an interpretation supported by the draft when the speech plausibly matches it. Do not invent content, change clear speech, or include existing composer text in the result. Return only the cleaned transcript.
32+
${placement} Use the composer draft and insertion position to resolve ambiguity and correct likely recognition errors in the transcript. The draft can clarify the topic, references, terminology, and how the new speech fits with nearby text. Prefer an interpretation supported by the draft when the speech plausibly matches it. Do not invent content, change clear speech, or include existing composer text in the result. Return only the cleaned transcript as a JSON object with key: transcription.
3333
<composer_before>
3434
${draft.text.slice(0, cursor)}
3535
</composer_before>${selectionBlock}

0 commit comments

Comments
 (0)