feat(frontend): add TipTap editor and Reasoning panel

Phase 2 implementation:
- Add TipTap editor with bold, italic, headings, lists, code blocks
- Add Reasoning panel with editable reasoning_type, confidence, steps
- Add Markdown to TipTap conversion on document load
- Add PUT /documents/{id}/content endpoint integration
- Add PATCH /documents/{id}/reasoning endpoint integration
- New types: ReasoningStep, ReasoningPanelData, TipTapContentResponse
- New store methods: updateReasoning, addReasoningStep, deleteReasoningStep
- New components: TipTapEditor.vue, ReasoningPanel.vue
This commit is contained in:
Hiro
2026-03-30 23:06:46 +00:00
parent b2153ceb4b
commit b733306773
7 changed files with 2023 additions and 67 deletions

View File

@@ -40,17 +40,36 @@ export interface Tag {
color: string
}
export interface ReasoningStep {
step: number
thought: string
conclusion: string | null
}
export interface DocumentReasoning {
reasoning_type: 'chain' | 'idea' | 'context' | 'reflection'
reasoning_type: 'chain' | 'idea' | 'context' | 'reflection' | null
confidence: number | null
reasoning_steps: Array<{
step: number
thought: string
conclusion: string | null
}>
reasoning_steps: ReasoningStep[]
model_source: string | null
}
export interface ReasoningPanelData {
document_id: string
has_reasoning: boolean
reasoning: DocumentReasoning | null
editable: boolean
}
export interface TipTapContentResponse {
content: Record<string, unknown>
format: 'tiptap'
}
export interface ContentUpdateRequest {
content: Record<string, unknown>
format: 'tiptap' | 'markdown'
}
export interface Document {
id: string
title: string
@@ -60,6 +79,7 @@ export interface Document {
path: string
tags: Tag[]
reasoning: DocumentReasoning | null
tiptap_content: Record<string, unknown> | null
created_at: string
updated_at: string
}