Add brain and chat workspace views
Expand the frontend with brain, graph, and chat workspace updates so the new backend orchestration and memory features have matching screens. These changes also wire the new APIs into routing and add focused view and routing tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,10 +9,26 @@ export interface Document {
|
||||
summary?: string
|
||||
chunk_count: number
|
||||
is_indexed: boolean
|
||||
ingestion_status?: 'uploaded' | 'parsing' | 'indexing' | 'ready' | 'warning' | 'failed'
|
||||
ingestion_error?: string | null
|
||||
indexed_at?: string | null
|
||||
parser_version?: string | null
|
||||
index_version?: string | null
|
||||
folder_id?: string | null
|
||||
created_at: string
|
||||
}
|
||||
|
||||
export interface DocumentChunk {
|
||||
id: string
|
||||
chunk_index: number
|
||||
content: string
|
||||
metadata_?: string | null
|
||||
}
|
||||
|
||||
export interface DocumentChunkUpdate {
|
||||
content: string
|
||||
}
|
||||
|
||||
export interface SearchResult {
|
||||
chunk_id: string
|
||||
document_id: string
|
||||
@@ -29,6 +45,9 @@ export interface UploadResponse {
|
||||
title: string
|
||||
chunk_count: number
|
||||
status: string
|
||||
ingestion_status?: 'uploaded' | 'parsing' | 'indexing' | 'ready' | 'warning' | 'failed'
|
||||
ingestion_error?: string | null
|
||||
indexed_at?: string | null
|
||||
}
|
||||
|
||||
export const documentApi = {
|
||||
@@ -54,7 +73,11 @@ export const documentApi = {
|
||||
},
|
||||
|
||||
getChunks(id: string) {
|
||||
return api.get<any[]>(`/api/documents/${id}/chunks`)
|
||||
return api.get<DocumentChunk[]>(`/api/documents/${id}/chunks`)
|
||||
},
|
||||
|
||||
updateChunk(documentId: string, chunkId: string, payload: DocumentChunkUpdate) {
|
||||
return api.put<DocumentChunk>(`/api/documents/${documentId}/chunks/${chunkId}`, payload)
|
||||
},
|
||||
|
||||
delete(id: string) {
|
||||
|
||||
Reference in New Issue
Block a user