d3ro-voice/docs
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
..
deployment fix(release): stop shipping native modules built for the wrong runtime 2026-09-18 15:45:03 +09:00
design feat(bootstrap): Whisper large-v3-turbo 기본 전환 + 온보딩 2단계 다운로드 진행률 2026-07-21 11:59:49 +09:00
design-refs 초기 프로젝트 설정: 하네스 시스템 + 설계서 + RE 노하우 2026-04-05 01:03:03 +09:00
map fix(llm): stop leaking instruction prompts instead of processed text 2026-09-21 14:39:26 +09:00
phases feat(desktop): LLM 기본 모델 qwen3:4b → gemma4:e4b 전면 전환 + think:false 안전장치 2026-04-12 09:47:08 +09:00
re-findings Phase 8: SSOT 리팩토링 + HotkeyRecordModal + Dashboard 재작성 2026-04-05 09:54:55 +09:00
tdd-red docs: record the 1.1.0 release and add the infrastructure map 2026-09-16 23:27:52 +09:00
v2 docs: record the 1.1.0 release and add the infrastructure map 2026-09-16 23:27:52 +09:00
v3 docs: record 1.2.0 and the state of the published 1.1.0 2026-09-16 23:50:01 +09:00
monetization-plan.md feat(release): prepare 1.1.0 candidate 2026-08-29 18:33:45 +09:00
REFACTOR_POLICY.md docs: refactor-wave Wave 1 정책·보고서·현황 (메타) 2026-07-22 02:01:26 +09:00
REFACTOR_WAVE1_REPORT.md docs: refactor-wave Wave 1 정책·보고서·현황 (메타) 2026-07-22 02:01:26 +09:00
REFACTOR_WAVE2_REPORT.md docs: refactor-wave Wave 2 보고서·현황 (메타) 2026-07-22 02:40:08 +09:00