diff --git a/frontend/src/routes/documents/[id]/+page.svelte b/frontend/src/routes/documents/[id]/+page.svelte index 1016377..e6f8746 100644 --- a/frontend/src/routes/documents/[id]/+page.svelte +++ b/frontend/src/routes/documents/[id]/+page.svelte @@ -1,19 +1,17 @@ -
+ +{#snippet treeNav()} +
+
+ 절 구조 + {sections.length}절 +
+ +
+ 정의 + 절차 + 요건 +
+ + {#if quality} +
+ 추출 품질 + {#if quality.headings != null}· 제목 {quality.headings}{/if} + {#if quality.tables != null}· 표 {quality.tables}{/if} + {#if quality.images != null}· 이미지 {quality.images}{/if} +
+ {/if} +
+{/snippet} + + +{#snippet rail()} +
+ + {#if doc.ai_tldr || doc.ai_summary} +
+
TL;DR
+

{doc.ai_tldr || doc.ai_summary}

+
+ {/if} + + {#if doc.ai_bullets && doc.ai_bullets.length} +
+
핵심점
+
    + {#each doc.ai_bullets as b} +
  • ·{b}
  • + {/each} +
+
+ {/if} + + {#if doc.ai_detail_summary} +
+
+ 심층 + {#if doc.ai_analysis_tier === 'deep'}DEEP{/if} +
+

{doc.ai_detail_summary}

+
+ {/if} + + {#if doc.ai_inconsistencies && doc.ai_inconsistencies.length} +
+
불일치 {doc.ai_inconsistencies.length}
+
    + {#each doc.ai_inconsistencies as inc} +
  • · {typeof inc === 'string' ? inc : inc.desc || inc.kind}
  • + {/each} +
+
+ {/if} + + {#if doc.ai_domain} +
+
분류
+
+ {domainLabel(doc.ai_domain)}{#if doc.ai_sub_group} · {doc.ai_sub_group}{/if} +
+ {#if doc.ai_confidence != null}신뢰도 {doc.ai_confidence.toFixed(2)}{/if} + {#if doc.ai_analysis_tier}{doc.ai_analysis_tier}{/if} +
+
+
+ {/if} + + {#if doc.ai_tags && doc.ai_tags.length} +
+
태그
+
+ {#each doc.ai_tags as t}{t}{/each} +
+
+ {/if} + +
+
관련 문서
+

벡터 유사도 기반 — 준비 중

+
+ +
+ + 문서 정보 + +
+ {#if doc.category === 'library'}{/if} + + +
+
+ +
+ + 관리 · 분류 편집 + +
+ + + + + +
+
+
+
+{/snippet} + +
문서 @@ -244,320 +330,191 @@
{#if loading} -
- -
+ {:else if error === 'not_found'} - + {:else if error === 'network'} - + {:else if doc} -
- {#if hasSections} - - - {/if} - - -
- {#if hasSections} - -
- 절 목차 ({sections.length}) - -
- {/if} - -
- {#if doc.edit_url} - - {/if} - - {#if doc.preview_status === 'ready'} - - {/if} - + +
+
+
+
+ {#if doc.ai_domain} + + {domainLabel(doc.ai_domain)} + + {/if} + {#if doc.ai_sub_group}{doc.ai_sub_group}{/if} + {doc.file_format}{#if canShowMarkdown}→MD{/if} + {#if doc.ai_analysis_tier === 'deep'}tier DEEP{/if} + {#if doc.ai_confidence != null}신뢰도 {doc.ai_confidence.toFixed(2)}{/if} +
+

{doc.title}

+
+
+ {#if doc.edit_url}{/if} + + {#if doc.category === 'library'} - + + {/if} +
+
+
+ + {#if useSectionView} + + +
+ 절 구조 ({sections.length}절) +
{@render treeNav()}
+
+ +
+ + + + +
+ {#if selectedSection} + {@const tm = typeMeta(selectedSection.section_type)} + +
+ {doc.title} + {#each pathSegments(selectedSection.heading_path) as seg}/{seg}{/each} +
+ +
+

{secTitle(selectedSection)}

+ {#if tm.label}{tm.label}{/if} +
+ + {#if selectedSection.confidence != null} +
+ 신뢰도 + + + + {selectedSection.confidence.toFixed(2)} +
+ {/if} + + {#if isLowConf(selectedSection.confidence)} +
+ ! + 저신뢰 절 — 표·수식 추출이 불완전할 수 있습니다. 정확한 내용은 원본을 확인하세요. +
+ {/if} + + {#if selectedSection.summary} +
+
절 요약
+

{selectedSection.summary}

+
+ {/if} + + {#if selectedBodyHtml} +
{@html selectedBodyHtml}
+ {:else} +

이 절의 본문은 추출되지 않았습니다. 헤더의 '원본'에서 확인하세요.

+ {/if} + +
+ + {selIdx + 1} / {sections.length} + +
{/if}
- - + + +
+ {:else} + +
+
+ {#if !hasSections && canShowMarkdown} +

이 문서는 절 분석이 없습니다 (짧은 문서이거나 분석 전) — 전체 본문으로 표시합니다.

+ {/if} {#if viewerType === 'markdown' || viewerType === 'hwp-markdown'} - + {:else if viewerType === 'pdf'}
- + {#if canShowMarkdown} - - + + {/if}
{#if pdfViewMode === 'markdown' && canShowMarkdown} - + {:else} - + {/if} {:else if viewerType === 'image'} - {doc.title} + {doc.title} {:else if viewerType === 'synology'} - - + + {:else if viewerType === 'article'} -
-

{doc.title}

-
- 출처: {doc.source_channel} - · - - {new Date(doc.created_at).toLocaleDateString('ko-KR', { - year: 'numeric', - month: 'short', - day: 'numeric', - })} - -
- {#if doc.md_content || doc.extracted_text} - - - {/if} - {#if doc.edit_url} - - {/if} -
+ {#if doc.md_content || doc.extracted_text} + + {/if} + {#if doc.edit_url}
{/if} {:else} - + {/if} - - - - {#if noteOpen && doc.category === 'library' && noteLoaded} - -
- saveNote(strokes)} - /> -
-
- {/if} +
+
+ {/if} - - -
- - + {#if doc.category === 'library'}
- - - + - - +
-
{/if} {/if}