Phase 12~13 전체 구현: Pro+ 피처 6종 + 음성 대화 + RAG + OS 자동화
Phase 12: - FileTranscriptionService: ffmpeg PCM 변환 + 30초 청크 순차 STT - MeetingSummaryService: 자막 세션 → LLM 자동 요약 + DB summaryText - DictationTemplateService: 필드별 음성 입력 상태 머신 + 프리셋 3개 Phase 13.1: - VoiceConversationService: STT→Ollama /api/chat→TTS 대화 루프 (10턴) - TTSPlaybackService: Windows SAPI 문장 단위 큐 재생 - LocalLLMService.chatStream: Ollama /api/chat 스트리밍 Phase 13.2: - RAGService: Ollama 임베딩 + SQLite 벡터 + 코사인 유사도 검색 - KnowledgeBasePage: 문서 관리 + 질문/답변 UI - PDF 파서: zlib FlateDecode 해제 + BT/ET 텍스트 추출 Phase 13.3: - VoiceActionService: LLM JSON 액션 플랜 생성 + 실행 - 프리셋 6개 (크롬/메모장/탐색기/볼륨), 위험 명령 차단 공통: IPC ~70채널, 에러코드 780-878, i18n 100+키 버그픽스: 라이선스 로컬 키 우선, i18n featureLabel, DOM 중첩
This commit is contained in:
parent
a31f96bbb8
commit
eb83682269
38 changed files with 5678 additions and 19 deletions
|
|
@ -8,11 +8,13 @@ import ContentCopyIcon from '@mui/icons-material/ContentCopy'
|
|||
import DeleteIcon from '@mui/icons-material/Delete'
|
||||
import LocalOfferIcon from '@mui/icons-material/LocalOffer'
|
||||
import CloseIcon from '@mui/icons-material/Close'
|
||||
import SummarizeIcon from '@mui/icons-material/Summarize'
|
||||
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
|
||||
import { MetalCard, Led } from '../ds'
|
||||
import { d3roPalette, d3roFontMono, d3roTypo, d3roRadius } from '../../theme'
|
||||
import { useI18n } from '../../i18n'
|
||||
import { formatDuration } from '../../utils/formatters'
|
||||
import type { HistoryEntry, MemoTag } from '@shared/types'
|
||||
import type { HistoryEntry, MemoTag, MeetingSummaryResult } from '@shared/types'
|
||||
|
||||
interface HistoryEntryCardProps {
|
||||
entry: HistoryEntry
|
||||
|
|
@ -28,6 +30,10 @@ export function HistoryEntryCard({ entry, onCopy, onDelete, showTags = false, on
|
|||
const [tags, setTags] = useState<MemoTag[]>([])
|
||||
const [tagInput, setTagInput] = useState('')
|
||||
const [showTagInput, setShowTagInput] = useState(false)
|
||||
const [summaryExpanded, setSummaryExpanded] = useState(false)
|
||||
const [summary, setSummary] = useState<MeetingSummaryResult | null>(null)
|
||||
const [summaryLoading, setSummaryLoading] = useState(false)
|
||||
const hasSummary = !!entry.summaryText
|
||||
|
||||
const loadTags = useCallback(async () => {
|
||||
if (!showTags) return
|
||||
|
|
@ -60,6 +66,35 @@ export function HistoryEntryCard({ entry, onCopy, onDelete, showTags = false, on
|
|||
if (e.key === 'Escape') { setShowTagInput(false); setTagInput('') }
|
||||
}, [handleAddTag])
|
||||
|
||||
const handleToggleSummary = useCallback(async () => {
|
||||
if (summaryExpanded) {
|
||||
setSummaryExpanded(false)
|
||||
return
|
||||
}
|
||||
setSummaryExpanded(true)
|
||||
if (!summary) {
|
||||
setSummaryLoading(true)
|
||||
const result = await window.electronAPI.meetingSummary.getSummary({ historyId: entry.id })
|
||||
if (result.success && result.data) {
|
||||
setSummary(result.data)
|
||||
}
|
||||
setSummaryLoading(false)
|
||||
}
|
||||
}, [summaryExpanded, summary, entry.id])
|
||||
|
||||
const handleGenerateSummary = useCallback(async () => {
|
||||
setSummaryLoading(true)
|
||||
const result = await window.electronAPI.meetingSummary.summarize({ historyId: entry.id })
|
||||
if (result.success) {
|
||||
setSummary(result.data)
|
||||
}
|
||||
setSummaryLoading(false)
|
||||
}, [entry.id])
|
||||
|
||||
const handleExportSummary = useCallback(async () => {
|
||||
await window.electronAPI.meetingSummary.exportMarkdown({ historyId: entry.id })
|
||||
}, [entry.id])
|
||||
|
||||
return (
|
||||
<MetalCard>
|
||||
<Box sx={{ display: 'flex', alignItems: 'flex-start', gap: 2 }}>
|
||||
|
|
@ -94,6 +129,24 @@ export function HistoryEntryCard({ entry, onCopy, onDelete, showTags = false, on
|
|||
<span>{formatDuration(entry.duration)}</span>
|
||||
{entry.detectedLanguage && <span>{entry.detectedLanguage.toUpperCase()}</span>}
|
||||
<span>{entry.mode.toUpperCase()}</span>
|
||||
{hasSummary && (
|
||||
<Chip
|
||||
icon={<SummarizeIcon sx={{ fontSize: '12px !important' }} />}
|
||||
label={t('meetingSummary.title')}
|
||||
size="small"
|
||||
onClick={handleToggleSummary}
|
||||
sx={{
|
||||
height: 18,
|
||||
fontFamily: d3roFontMono,
|
||||
fontSize: d3roTypo.micro.size,
|
||||
bgcolor: d3roPalette.tag.greenBg,
|
||||
color: d3roPalette.tag.green,
|
||||
borderRadius: d3roRadius.small,
|
||||
cursor: 'pointer',
|
||||
'& .MuiChip-icon': { color: d3roPalette.tag.green },
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</Box>
|
||||
{/* 태그 영역 */}
|
||||
{showTags && (
|
||||
|
|
@ -180,6 +233,82 @@ export function HistoryEntryCard({ entry, onCopy, onDelete, showTags = false, on
|
|||
)}
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
{/* Phase 12.2: 회의록 요약 확장 뷰 */}
|
||||
{summaryExpanded && (
|
||||
<Box sx={{ mt: 2, pt: 2, borderTop: `1px solid ${d3roPalette.border.subtle}` }}>
|
||||
{summaryLoading ? (
|
||||
<PhosphorText variant="dim">{t('meetingSummary.generating')}</PhosphorText>
|
||||
) : summary ? (
|
||||
<Box sx={{ fontSize: d3roTypo.compact.size, color: d3roPalette.text.secondary, lineHeight: 1.6 }}>
|
||||
{summary.summary && (
|
||||
<Box sx={{ mb: 1.5 }}>
|
||||
<PhosphorText variant="label" sx={{ color: d3roPalette.text.dimLabel, mb: 0.5, display: 'block' }}>
|
||||
{t('meetingSummary.summary').toUpperCase()}
|
||||
</PhosphorText>
|
||||
<Box sx={{ whiteSpace: 'pre-wrap' }}>{summary.summary}</Box>
|
||||
</Box>
|
||||
)}
|
||||
{summary.decisions.length > 0 && (
|
||||
<Box sx={{ mb: 1.5 }}>
|
||||
<PhosphorText variant="label" sx={{ color: d3roPalette.text.dimLabel, mb: 0.5, display: 'block' }}>
|
||||
{t('meetingSummary.decisions').toUpperCase()}
|
||||
</PhosphorText>
|
||||
{summary.decisions.map((d, i) => (
|
||||
<Box key={i} sx={{ pl: 1.5 }}>• {d}</Box>
|
||||
))}
|
||||
</Box>
|
||||
)}
|
||||
{summary.actionItems.length > 0 && (
|
||||
<Box sx={{ mb: 1 }}>
|
||||
<PhosphorText variant="label" sx={{ color: d3roPalette.text.dimLabel, mb: 0.5, display: 'block' }}>
|
||||
{t('meetingSummary.actionItems').toUpperCase()}
|
||||
</PhosphorText>
|
||||
{summary.actionItems.map((a, i) => (
|
||||
<Box key={i} sx={{ pl: 1.5 }}>☐ {a}</Box>
|
||||
))}
|
||||
</Box>
|
||||
)}
|
||||
<Box sx={{ display: 'flex', gap: 1, mt: 1 }}>
|
||||
<Tooltip title={t('meetingSummary.exportMarkdown')} arrow>
|
||||
<IconButton size="small" onClick={handleExportSummary} sx={{ color: d3roPalette.text.inactive, '&:hover': { color: d3roPalette.accent.amber } }}>
|
||||
<SummarizeIcon sx={{ fontSize: 14 }} />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
</Box>
|
||||
</Box>
|
||||
) : (
|
||||
<Box sx={{ textAlign: 'center' }}>
|
||||
<PhosphorText variant="dim" sx={{ mb: 1 }}>{t('meetingSummary.noSummary')}</PhosphorText>
|
||||
{(entry.mode === 'caption' || entry.mode === 'file-transcription') && (
|
||||
<Chip
|
||||
label={t('meetingSummary.generate')}
|
||||
size="small"
|
||||
onClick={handleGenerateSummary}
|
||||
sx={{
|
||||
fontFamily: d3roFontMono,
|
||||
fontSize: d3roTypo.micro.size,
|
||||
bgcolor: d3roPalette.accent.amber,
|
||||
color: d3roPalette.bg.chassis,
|
||||
cursor: 'pointer',
|
||||
'&:hover': { opacity: 0.85 },
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
)}
|
||||
|
||||
{/* 요약 토글 버튼 (caption/file-transcription 모드만) */}
|
||||
{(entry.mode === 'caption' || entry.mode === 'file-transcription') && !summaryExpanded && !hasSummary && (
|
||||
<Box
|
||||
sx={{ mt: 1, textAlign: 'center', cursor: 'pointer', color: d3roPalette.text.muted, '&:hover': { color: d3roPalette.accent.amber } }}
|
||||
onClick={handleToggleSummary}
|
||||
>
|
||||
<ExpandMoreIcon sx={{ fontSize: 16 }} />
|
||||
</Box>
|
||||
)}
|
||||
</MetalCard>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue