feat: Add canvas snapshots to save and restore full canvas state

Implements save/restore system that captures HTML base, injected CSS,
executed scripts, and floating Vue windows with their full definitions.
Adds 4 MCP tools, backend CRUD API, Pinia store, and script logger.
This commit is contained in:
2026-02-14 23:08:33 -06:00
parent 5fd57ba70f
commit 3f15aa590b
13 changed files with 641 additions and 119 deletions

View File

@@ -10,6 +10,7 @@ import { handleTables, handleStats, handleTableSchema, handleTableData, handleQu
import { handleWhisperRoutes } from './whisper'
import { handleRecordingsRoutes } from './recordings'
import { handleClaudeStatus } from './claude-status'
import { handleSnapshots, handleSnapshotById } from './snapshots'
import { handleGitStatus, handleGitDiff, handleGitLog, handleGitLogCommit, handleGitCompare, handleGitBranches, handleGitCurrentBranch, handleGitTree, handleGitFile } from './git'
export async function handleRequest(req: Request): Promise<Response> {
@@ -145,6 +146,18 @@ export async function handleRequest(req: Request): Promise<Response> {
if (res) return res
}
// Snapshots
if (path === '/api/snapshots') {
const res = await handleSnapshots(req)
if (res) return res
}
if (path.startsWith('/api/snapshots/')) {
const id = path.split('/').pop()!
const res = await handleSnapshotById(req, id)
if (res) return res
}
// Gitea
if (path === '/api/gitea/repo' && req.method === 'POST') {
return handleGiteaRepo(req)