d3ro-voice/apps/desktop
Yun Chan 99f06c253c fix(llm): stop leaking instruction prompts instead of processed text
Running a custom instruction (translate, summarise, rewrite, explain code,
free prompt) inserted the instruction's own wording instead of the result.
Two faults stacked:

The instruction was passed as the text to process, leaving the system-prompt
argument empty. `BASE_SYSTEM_PROMPTS` has no `custom` key, so resolution fell
back to `refine` without saying so, and the model dutifully polished the
instruction it had been handed. The transcript never reached it.

And only `{{text}}` was substituted, which none of the five built-in
instructions use — they carry `{{targetLanguage}}`, `{{userPrompt}}`, or no
placeholder at all. The substitution was a no-op from the day it was written:
the presets landed ten hours before the code that expected them.

- Instruction prompts now go to the system-prompt argument and the transcript
  to the text argument. Instructions that spell out `{{text}}` keep their old
  meaning, so hand-written ones still work.
- `renderInstructionPrompt` resolves `{{text}}`, `{{userPrompt}}` and
  `{{targetLanguage}}` in one place, and warns by name when a placeholder is
  left standing rather than letting it reach the model.
- `resolveSystemPrompt` no longer drops silently to `refine` for `custom`.
- Voice shortcuts no longer die at the `defaultLLMAction === 'none'` gate; an
  explicitly named instruction outranks the default. Without one, `none` still
  passes the transcript through untouched.
- `translate` receives its target language instead of relying on a default two
  call frames away. It is still always English — `AppConfig` has no key for it,
  and neither `language` (UI locale) nor `sttLanguage` (source language) can
  stand in. Choosing a target language needs a setting and is not in this fix.
- Chains ran instructions with placeholders intact; they share the same
  resolution now.
- The command screen's pipeline bench called `llm.generate`, which preload does
  not expose, so every run threw and the catch showed the input back as if it
  had succeeded. It uses `llm.process` now, over the same path production
  takes, and a failure reads as a failure.

Present since the feature shipped: the custom-instruction path has never
worked. Plain actions (refine, summarise, grammar, expand) were unaffected and
are now covered by tests so they stay that way.
2026-09-21 14:39:26 +09:00
..
build feat(icon)+fix(audio): 앱 아이콘 적용 + 트레이 아이콘 + 마이크 테스트 조기 종료 수정 2026-07-21 19:00:23 +09:00
resources feat(desktop): make local speech transcription work end to end 2026-09-18 00:48:47 +09:00
scripts feat(desktop): make local speech transcription work end to end 2026-09-18 00:48:47 +09:00
sidecar feat(desktop): make local speech transcription work end to end 2026-09-18 00:48:47 +09:00
src fix(llm): stop leaking instruction prompts instead of processed text 2026-09-21 14:39:26 +09:00
tests fix(llm): stop leaking instruction prompts instead of processed text 2026-09-21 14:39:26 +09:00
bypass3.js feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment 2026-08-20 11:12:05 +09:00
bypass4.js feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment 2026-08-20 11:12:05 +09:00
bypass5.js feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment 2026-08-20 11:12:05 +09:00
bypass6.js feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment 2026-08-20 11:12:05 +09:00
check_all_imports.cjs feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment 2026-08-20 11:12:05 +09:00
check_all_tokens.cjs feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment 2026-08-20 11:12:05 +09:00
dedup.cjs feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment 2026-08-20 11:12:05 +09:00
dedup.js feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment 2026-08-20 11:12:05 +09:00
electron-builder.yml fix(release): stop shipping native modules built for the wrong runtime 2026-09-18 15:45:03 +09:00
electron.vite.config.ts feat(release): prepare 1.1.0 candidate 2026-08-29 18:33:45 +09:00
fix_imports.cjs feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment 2026-08-20 11:12:05 +09:00
fix_imports.js feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment 2026-08-20 11:12:05 +09:00
package.json chore(release): v1.4.0 2026-09-21 13:41:59 +09:00
playwright.config.ts feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment 2026-08-20 11:12:05 +09:00
run_e2e_cdp.cjs feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment 2026-08-20 11:12:05 +09:00
run_e2e_full_suite.cjs feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment 2026-08-20 11:12:05 +09:00
tsconfig.check-node.json fix(desktop): surface configuration and provider failures instead of hiding them 2026-09-16 23:23:58 +09:00
tsconfig.check.json fix(desktop): surface configuration and provider failures instead of hiding them 2026-09-16 23:23:58 +09:00
tsconfig.json feat(V2-1a): Monorepo 구조 전환 — apps/desktop으로 V1 이동 2026-04-08 14:04:41 +09:00
tsconfig.node.json fix(desktop): surface configuration and provider failures instead of hiding them 2026-09-16 23:23:58 +09:00
tsconfig.web.json feat(V2-1d): packages/i18n 추출 — Electron 독립 i18n 엔진 2026-04-08 14:57:27 +09:00
vitest.config.ts feat(release): prepare 1.1.0 candidate 2026-08-29 18:33:45 +09:00