LLM 후처리 명령어 선택 기능 추가

- Settings LLM 탭: "기본 후처리 명령어" 드롭다운 추가
  (없음/다듬기/번역/요약/문법교정/커스텀)
- VoiceModeService: defaultLLMAction='none'이면 LLM 스킵
  (이전: 'refine' 아니면 무조건 스킵 → 수정)
- 사용자가 Settings에서 후처리 방식을 선택하면 모든 녹음에 적용
This commit is contained in:
Yun Chan 2026-04-05 13:15:54 +09:00
parent 5596a52dcb
commit 4e23622c44
2 changed files with 34 additions and 4 deletions

View file

@ -440,10 +440,9 @@ class VoiceModeService extends EventEmitter {
this.emit('transcription-update', { text: result.text, isFinal: true }) this.emit('transcription-update', { text: result.text, isFinal: true })
// LLM 후처리 // LLM 후처리: none이면 스킵, 그 외에는 LLM 처리
const llmAction = configGet('defaultLLMAction') const llmAction = configGet('defaultLLMAction')
if (llmAction !== 'refine' || !getLocalLLMService().isAvailable()) { if (llmAction === 'none' || !getLocalLLMService().isAvailable()) {
// LLM 미가용이거나 기본 액션이면 원본 텍스트로 완료
this._completeSession(result.text) this._completeSession(result.text)
} else { } else {
await this._processWithLLM(result.text) await this._processWithLLM(result.text)

View file

@ -614,6 +614,10 @@ export function SettingsModal({ open, onClose }: SettingsModalProps): React.Reac
{/* ── LLM 탭 ──────────────────────────────── */} {/* ── LLM 탭 ──────────────────────────────── */}
<TabPanel value={activeTab} index={3}> <TabPanel value={activeTab} index={3}>
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}> <Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
<Typography variant="overline" sx={{ color: d3roPalette.text.label, letterSpacing: '1.5px' }}>
Ollama
</Typography>
<TextField <TextField
label="Ollama 서버 URL" label="Ollama 서버 URL"
value={config.ollamaServerUrl ?? 'http://localhost:11434'} value={config.ollamaServerUrl ?? 'http://localhost:11434'}
@ -621,10 +625,37 @@ export function SettingsModal({ open, onClose }: SettingsModalProps): React.Reac
fullWidth fullWidth
/> />
<Typography variant="body2" color="text.secondary"> <Typography variant="body2" sx={{ color: d3roPalette.text.inactive, fontSize: '11px' }}>
Ollama가 . Ollama가 .
Ollama에서 pull하세요 (: ollama pull qwen3:4b). Ollama에서 pull하세요 (: ollama pull qwen3:4b).
</Typography> </Typography>
<Divider sx={{ borderColor: d3roPalette.border.subtle }} />
<Typography variant="overline" sx={{ color: d3roPalette.text.label, letterSpacing: '1.5px' }}>
</Typography>
<FormControl size="small">
<InputLabel> </InputLabel>
<Select
label="기본 후처리 명령어"
value={config.defaultLLMAction ?? 'refine'}
onChange={(e) => updateConfig('defaultLLMAction', e.target.value)}
>
<MenuItem value="none"> ( )</MenuItem>
<MenuItem value="refine"> (+)</MenuItem>
<MenuItem value="translate"></MenuItem>
<MenuItem value="summarize"></MenuItem>
<MenuItem value="grammar"> </MenuItem>
<MenuItem value="custom"> </MenuItem>
</Select>
</FormControl>
<Typography variant="body2" sx={{ color: d3roPalette.text.inactive, fontSize: '11px' }}>
LLM .
Ollama가 .
</Typography>
</Box> </Box>
</TabPanel> </TabPanel>