feat: Add transcript engine API and connect ConversationHistory to real data
- Add transcript-engine service that parses Claude Code JSONL transcripts with session listing, message extraction, token/stats analysis, and caching - Add transcript REST routes (sessions list, latest, by session ID, section filtering) - Rewrite ConversationHistory to fetch from /api/transcript/* instead of mock data - Add session pills for switching between conversation sessions - Add stats bar footer with model, duration, tokens, and tool count - Add TranscriptSession/TranscriptMessage types, ChatInput, InputSettings, PromptBar updates, TranscriptCard, and useVoiceCapture composable
This commit is contained in:
@@ -20,6 +20,7 @@ import {
|
||||
handleAgentsPlugins, handleAgentsMcpJson,
|
||||
handleAgentsConfigPermissions, handleAgentsConfigHooks, handleAgentsConfigMcp
|
||||
} from './agents'
|
||||
import { handleTranscript, handleTranscriptSessions } from './transcript'
|
||||
|
||||
export async function handleRequest(req: Request): Promise<Response> {
|
||||
const url = new URL(req.url)
|
||||
@@ -277,6 +278,20 @@ export async function handleRequest(req: Request): Promise<Response> {
|
||||
return handleGitFile(url)
|
||||
}
|
||||
|
||||
// Transcript
|
||||
if (path === '/api/transcript/sessions' && req.method === 'GET') {
|
||||
return handleTranscriptSessions()
|
||||
}
|
||||
|
||||
if (path === '/api/transcript/latest' && req.method === 'GET') {
|
||||
return handleTranscript(req, url, 'latest')
|
||||
}
|
||||
|
||||
const transcriptMatch = path.match(/^\/api\/transcript\/([a-f0-9-]+)$/)
|
||||
if (transcriptMatch && req.method === 'GET') {
|
||||
return handleTranscript(req, url, transcriptMatch[1])
|
||||
}
|
||||
|
||||
// Agents
|
||||
if (path === '/api/agents' && req.method === 'GET') {
|
||||
return handleAgents(req)
|
||||
|
||||
Reference in New Issue
Block a user