revisions

This commit is contained in:
2026-02-26 04:10:30 +10:00
parent ee048084b0
commit f9333626aa
14 changed files with 534 additions and 37 deletions

View File

@@ -34,3 +34,9 @@ export interface AIPayload {
conversationHistory: Array<{ role: 'user' | 'assistant'; content: string }>
userMessage: string
}
export interface RevisionMeta {
id: string
timestamp: number
wordCount: number
}

View File

@@ -1,4 +1,4 @@
import type { FileNode, AIPayload } from './editor'
import type { FileNode, AIPayload, RevisionMeta } from './editor'
declare global {
interface Window {
@@ -13,6 +13,10 @@ declare global {
removeAIListener: () => void
getProjectWordCount: () => Promise<number>
saveOrder: (order: Record<string, string[]>) => Promise<void>
saveRevision: (filePath: string, content: string) => Promise<void>
listRevisions: (filePath: string) => Promise<RevisionMeta[]>
loadRevision: (filePath: string, revisionId: string) => Promise<string>
deleteRevision: (filePath: string, revisionId: string) => Promise<void>
}
}
}