Skip to content

feat: adapt Claude Opus 4.7 and add notification, custom models, backend improvements#184

Open
Today-ddr wants to merge 8 commits into
anyme123:mainfrom
Today-ddr:feat/opus-4.7-and-improvements
Open

feat: adapt Claude Opus 4.7 and add notification, custom models, backend improvements#184
Today-ddr wants to merge 8 commits into
anyme123:mainfrom
Today-ddr:feat/opus-4.7-and-improvements

Conversation

@Today-ddr
Copy link
Copy Markdown

Summary

This PR adapts the project to Claude Opus 4.7 and adds several productivity features along with backend stability improvements. Changes are split into4 logical commits for easier review.

Commits

1. feat: adapt Claude Opus 4.7 model support and pricing

  • Add Claude Opus 4.7 pricing (input $5, output $25/M tokens) and Fast Mode pricing
  • Add xhigh thinking effort level for Claude 4.7 Adaptive Thinking
  • Update model family detection priority to include Opus 4.7
  • Update CI workflow to use claude-opus-4-7
  • Fix partial_cmp().unwrap() panic risk in usage statistics sorting
  • Update i18n (en/zh/zh-TW) for new thinking effort level

2. feat: add desktop notification, custom model management and editor integration

  • Desktop notification when AI response completes and window is unfocused
  • Custom model manager dialog with /v1/models API fetching and manual entry
  • ModelSelector grouping (built-in vs custom) with action buttons
  • New open_path_in_editor command (JetBrains IDEs / VS Code / system editor)
  • New fetch_anthropic_models backend command
  • 10s cache for Codex / Gemini session listings to reduce IPC calls
  • Register tauri-plugin-notification and required capabilities

3. refactor: improve message rendering, session UI and tool widgets

  • Better streaming and subagent grouping in message components
  • Improved thinking block and tool call group display
  • Smart auto-scroll behavior for long conversations
  • Validate clipboard image base64 data before decoding
  • Token counter accuracy and prompt enhancement service improvements

4. fix: improve backend stability, session history and Codex execution modes

  • Single-pass session metadata extraction (significant perf improvement)
  • Codex default execution mode (sandbox with user prompts)
  • Better error handling for git operations across Codex/Gemini engines
  • Permission config validation and prompt tracker improvements

Verification

  • npm run build passes (TypeScript + Vite)
  • cargo check passes
  • cargo test 25/25 passing

dayto added 4 commits May 17, 2026 23:14
- Add Claude Opus 4.7 model pricing (input $5, output $25/M tokens)
- Add Opus 4.7 Fast Mode pricing (input $30, output $150/M tokens)
- Add xhigh thinking effort level for Claude 4.7 Adaptive Thinking
- Update model family detection to prioritize Opus 4.7
- Update CI workflow to use claude-opus-4-7 model
- Fix partial_cmp unwrap safety in usage statistics sorting
- Update i18n translations for new thinking effort level (en/zh/zh-TW)
…tegration

- Add desktop notification service for AI response completion when window unfocused
- Add custom model manager with API model fetching and manual entry support
- Refactor ModelSelector to group built-in and custom models with action buttons
- Add open_path_in_editor command supporting JetBrains IDEs, VS Code, and system editors
- Add fetch_anthropic_models backend command via /v1/models endpoint
- Add disable_auto_commit_after_response option to ClaudeExecutionConfig
- Add 10-second cache for Codex and Gemini session listings
- Register notification plugin and required Tauri capabilities
- Refactor message components for better streaming and subagent grouping
- Improve thinking block rendering and tool call group display
- Enhance settings panels and session list interactions
- Optimize smart auto-scroll behavior for long conversations
- Add validation for clipboard image base64 data in image handling
- Improve token counter accuracy and prompt enhancement service
- Update tool registry initialization with new widget definitions
- Adjust component styles for visual consistency
…odes

- Optimize session history extraction with single-pass metadata reading
- Refactor project store for better error handling and path resolution
- Add Codex 'default' execution mode (sandbox with user prompts)
- Improve git operations error handling for Codex and Gemini engines
- Add permission config validation and prompt tracker improvements
- Fix extensions command edge cases
@Today-ddr Today-ddr force-pushed the feat/opus-4.7-and-improvements branch from 85c1f88 to 00caed9 Compare May 17, 2026 16:37
dayto added 4 commits May 18, 2026 10:47
- useDisplayableMessages: tool_use_id 索引 + 单遍历合并 warmup 检测,O(n²) → O(n)
- progressiveTranslation: getStats 单 reduce 取代 5 次 filter;移除 sortQueue 重建 Map
- subagentGrouping: 抽出 isTaskOrAgentToolUse + 单次扫描返回 ids 与 details
- modelNameParser: 模块级 Map 缓存(256 上限 + LRU),并加版本守卫防止旧 init 消息固化陈旧名(Sonnet 4.5 → 4.6 自动更新)
- tokenCounter: normalizeModel 改预排序规则表,串行 includes 改为命中即返
- useSessionStream/usePromptExecution: rawJsonlOutput 加 2000 条环形缓冲,长会话不再 OOM
- registry.rs: std::thread::sleep → tokio::time::sleep,避免阻塞 tokio runtime
- registry.rs: live_output 加 4MB 上限 + 溢出丢弃最旧 50%,防止长任务 OOM
- cli_runner.rs: stdin 写入捕获 BrokenPipe,子进程提前退出不再传播为致命错误
- cli_runner.rs: 标注 3 处 Mutex 持锁跨 await 的 FIXME,待后续重构
模型适配(前后端 pricing 同步):
- Codex: 新增 GPT-5.5 / GPT-5 / GPT-5 Codex / GPT-5 Mini / GPT-5 Nano / o3 / o4-mini
- Gemini: 新增 Gemini 3.1 Flash-Lite、Gemini 3 Flash Preview
- pricing.ts 与 src-tauri/src/commands/usage.rs 同步新模型分级定价

会话渲染:
- ThinkingBlock: 折叠状态显示首行预览 + 字数 + token 估算 chip
- Codex: response.reasoning_summary_text.delta/done 事件转 thinking 块
- Gemini: 解析 candidates[].groundingMetadata 挂到消息上
- 新建 GroundingSourcesCard widget: Google 搜索来源卡(favicon + 系统浏览器打开)

UI:
- CustomModelManagerDialog: 手动添加区改紧凑行内布局,添加按钮内嵌输入框右侧
- 整体 section 间距由 space-y-6 收紧到 space-y-4,空状态压缩
@Today-ddr Today-ddr force-pushed the feat/opus-4.7-and-improvements branch from dc4ca39 to 2cabb94 Compare May 18, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant