Commit Graph

5 Commits

Author SHA1 Message Date
小海
2933df2697 fix: improve truncation recovery and diagnostics for v2.7.7
- mark degraded requests in logs and viewer when execution quality drops
- record Anthropic toolCallsDetected correctly in summaries
- continue semantically incomplete long Write/Edit tool payloads
- restore truncated OpenAI stream long Write tool_calls
- update release docs, sample config, docker notes, and README guidance
2026-03-23 11:39:00 +08:00
huangzhenting
a153dad4de feat: record and display real Cursor API token usage
Capture the actual input/output token counts from Cursor API's finish
event (messageMetadata.usage) and use them in place of tiktoken
estimates where available. Fall back to tiktoken if not present.

- src/types.ts: extend CursorSSEEvent with finishReason/messageMetadata
- src/handler.ts: capture finish event usage in streaming paths, pass
  real counts to updateSummary with tiktoken fallback
- src/logger.ts: add inputTokens/outputTokens fields to RequestSummary
- vue-ui: show ↑/↓ Cursor tokens in RequestList, DetailPanel, PayloadView
- public/logs.js: show ↑/↓ Cursor tokens in scard and prompts summary
2026-03-21 18:42:12 +08:00
majorcheng
310fd8672d fix: complete OpenAI logs and default persisted logs to summary 2026-03-20 14:06:46 +08:00
小海
8a5117bbb1 v2.7.4: 截断安全 + 代理续写禁用 + 日志提示词对比视图
- 截断时跳过工具解析,防止损坏的工具调用(写入半截文件)
- maxAutoContinue 默认 0,交由 Claude Code 原生续写
- 系统提示词身份声明清除(防 prompt injection 拒绝)
- 流式热身窗口 96→300 chars(拒绝检测前不释放文本)
- 日志查看器「提示词对比」视图:原始 vs Cursor 转换后
- 转换摘要面板:工具数/消息数/上下文大小一目了然
- 标题提取增强:通用 XML 标签清除 + 更多引导语过滤
2026-03-18 11:56:26 +08:00
小海
d388fefa21 feat(log-viewer): 日夜主题切换 + 标题提取修复
- 新增日/夜主题切换按钮(☀️/🌙),支持 localStorage 持久化,首次自动检测系统偏好
- 完整暗色主题 CSS 变量覆盖,所有 UI 元素适配
- 修复标题提取:过滤 <system-reminder> 注入内容和 Claude Code 引导语
- 日志页面前端重构为独立 HTML/CSS/JS 静态文件
- 登录页面样式同步更新为现代玻璃态主题
- Express 静态文件服务配置修复(兼容 v5 path-to-regexp)
2026-03-17 09:33:00 +08:00