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

@@ -112,6 +112,10 @@
"session-end-summary": {
"name": "Session End Summary",
"description": "Send session summary to dashboard on session end"
},
"project-state-inject": {
"name": "Project State Inject",
"description": "Inject project guidelines and recent dev history at session start"
}
},
"actions": {

View File

@@ -6,6 +6,20 @@
"output": "Output tokens",
"cached": "Cached tokens"
},
"timeline": {
"turnNumber": "Turn #{number}",
"tokens": {
"input": "Input: {count}",
"output": "Output: {count}",
"cached": "Cached: {count}"
},
"toolCall": {
"completed": "completed",
"running": "running",
"error": "error",
"noData": "No data available"
}
},
"turn": {
"latest": "Latest",
"thoughts": "Thoughts",

View File

@@ -112,6 +112,10 @@
"session-end-summary": {
"name": "会话结束摘要",
"description": "会话结束时发送摘要到仪表盘"
},
"project-state-inject": {
"name": "项目状态注入",
"description": "会话启动时注入项目约束和最近开发历史"
}
},
"actions": {

View File

@@ -6,6 +6,20 @@
"output": "输出 Token",
"cached": "缓存 Token"
},
"timeline": {
"turnNumber": "第 {number} 轮",
"tokens": {
"input": "输入: {count}",
"output": "输出: {count}",
"cached": "缓存: {count}"
},
"toolCall": {
"completed": "已完成",
"running": "运行中",
"error": "错误",
"noData": "无数据"
}
},
"turn": {
"latest": "最新",
"thoughts": "思考过程",