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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user