feat(hooks): add hook management and session timeline features

- Add hook quick templates component with configurable templates
- Refactor NativeSessionPanel to use new SessionTimeline component
- Add OpenCode session parser for parsing OpenCode CLI sessions
- Enhance API with session-related endpoints
- Add locale translations for hooks and native session features
- Update hook commands and routes for better hook management
This commit is contained in:
catlog22
2026-02-25 23:21:35 +08:00
parent 25f442b329
commit 519efe9783
15 changed files with 1543 additions and 435 deletions

View File

@@ -5,6 +5,7 @@
import { readFileSync, existsSync } from 'fs';
import { parseClaudeSession } from './claude-session-parser.js';
import { parseOpenCodeSession } from './opencode-session-parser.js';
// Standardized conversation turn
export interface ParsedTurn {
@@ -200,6 +201,8 @@ export function parseSessionFile(filePath: string, tool: string): ParsedSession
return parseCodexSession(content);
case 'claude':
return parseClaudeSession(filePath);
case 'opencode':
return parseOpenCodeSession(filePath);
default:
return null;
}