Commit Graph
245 Commits
Author SHA1 Message Date
Chiron 3ca4bfe7f6 fix: 修复 Flow Monitor 响应内容显示和提供商显示问题 (#75)
- 修复凭证池模式下非流式响应的 content 和 body 字段未保存问题
- 从响应 JSON 中提取 content、tool_calls 和 usage 信息
- 添加 provider_id 字段用于显示实际的提供商名称
- 优化清理完成弹窗样式,使用自定义 Modal 组件
- 美化排序下拉框,使用 Radix UI Select 组件
- 添加详细的调试日志用于追踪 Flow 显示问题
- 修复所有测试代码中缺少 provider_id 字段的问题
2026-01-10 22:27:06 +08:00
Chiron 85bfc56037 debug: 添加 Flow Monitor 响应内容调试日志
- 在 ResponseTab 组件中添加 console.log
- 输出 response 对象、content 内容和长度
- 输出 expandedSections 状态
- 创建 issue-75 调查文档

相关 Issue: #75
2026-01-10 21:09:31 +08:00
Chiron 1c916ec050 chore: 添加 .issues 目录到 .gitignore
- 创建 .issues 目录用于存放 issue 相关文档
- 此目录不提交到版本库,仅用于本地开发
- 包含 bug 修复文档、测试指南和辅助脚本
2026-01-10 15:57:03 +08:00
Chiron 30ab7cba8f Merge branch 'aiclientproxy:main' into main 2026-01-10 15:47:45 +08:00
cosoandClaude Opus 4.5 b2289e4f16 chore: bump version to 0.39.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 13:13:10 +08:00
coso cb1c478920 Merge pull request #94 from Chiron-Brahm/fix/iflow-openai-support-new
fix: 添加 IFlow provider 对 OpenAI 格式的支持
2026-01-10 13:07:44 +08:00
coso 8f8bcd0a09 Merge pull request #93 from Chiron-Brahm/feat/api-server-network-binding
feat: 添加 API Server 网络监听地址配置功能
2026-01-10 13:07:31 +08:00
coso 24a0ff4e77 Merge pull request #92 from Chiron-Brahm/fix/input-lag-and-terminal-ai-models
fix: 修复全局输入卡顿和终端 AI 模型列表问题
2026-01-10 13:07:11 +08:00
coso 9620bb4055 Merge pull request #91 from Chiron-Brahm/fix/terminal-state-persistence
fix: 终端和页面切换时保持状态
2026-01-10 13:06:49 +08:00
Chiron 44054f0f52 fix: 添加 IFlow provider 对 OpenAI 格式的支持
- 在 provider_calls.rs 中实现 IFlowOAuth 和 IFlowCookie 的处理逻辑
- 修复 deepseek-chat 模型请求返回 400 Bad Request 的问题
- 支持 IFlow 的 token 缓存和自动刷新机制
2026-01-10 11:21:26 +08:00
Chiron d82b07c1fb fix: 修复全局输入卡顿和终端 AI 模型列表问题
- 优化 i18n MutationObserver 性能
  - 添加输入框变化过滤(INPUT、TEXTAREA)
  - 添加 300ms 防抖避免频繁触发
  - 跳过已打补丁的节点
  - 跳过可编辑元素

- 优化 DOM 文本替换性能
  - 跳过输入框和文本域
  - 跳过 contentEditable 元素

- 优化终端 AI 输入组件
  - 添加防抖函数(16ms ~60fps)
  - 使用 useMemo 缓存防抖函数

- 修复终端 AI 模型列表问题
  - 添加 extractSupportedModels 函数
  - 优先使用凭证池中的模型列表
  - 特殊处理 DeepSeek(显示 deepseek-chat/reasoner)
  - 修复 iFlow provider ID 映射(openai -> iflowcn)
  - 降级到 model registry(如果凭证模型为空)

修复后:
- 所有输入框流畅无卡顿
- 终端 AI 显示正确的提供商模型列表
2026-01-10 11:19:11 +08:00
Chiron b222912981 fix: 终端和页面切换时保持状态
问题:
1. 终端内标签页切换时状态会重置
2. 切换到其他功能页面再切回终端时状态丢失

解决方案:
1. 终端内标签页: 多容器架构,每个标签页独立容器和 TermWrap 实例
2. 应用页面切换: 所有页面保持挂载,使用 CSS display 控制显示

改动:
- TerminalPage.tsx: 多容器架构,保持 TermWrap 实例
- terminal.css: 添加多容器样式支持
- App.tsx: 所有页面保持挂载,CSS 控制显示
2026-01-10 11:19:02 +08:00
Chiron d5e7772c0e feat: 添加 API Server 网络监听地址配置功能
- 后端改进:
  - 改进网络 IP 获取逻辑,使用 if-addrs 获取所有网络接口
  - 智能过滤 VPN 和虚拟网卡地址(如 198.18.0.0/15)
  - 允许绑定到私有网络地址(10.x.x.x, 172.16-31.x.x, 192.168.x.x)
  - 更新地址验证逻辑,支持局域网 IP 绑定

- 前端改进:
  - 使用 Radix UI Select 组件美化监听地址选择器
  - 支持选择 127.0.0.1(仅本机)、0.0.0.0(所有接口)或具体局域网 IP
  - 动态显示真实的局域网 IP 地址
  - 添加安全提示:局域网访问需要非默认 API Key
  - 优化界面布局,状态信息移至标题旁边

- 依赖更新:
  - 添加 if-addrs = "0.13" 用于获取网络接口信息
2026-01-10 11:19:01 +08:00
Chiron f36bc02124 fix: 添加 IFlow provider 对 OpenAI 格式的支持
- 在 provider_calls.rs 中实现 IFlowOAuth 和 IFlowCookie 的处理逻辑
- 修复 deepseek-chat 模型请求返回 400 Bad Request 的问题
- 支持 IFlow 的 token 缓存和自动刷新机制
2026-01-10 11:19:01 +08:00
Chiron 06017f200c Merge pull request #1 from Chiron-Brahm/fix/input-lag-and-terminal-ai-models
fix: 修复全局输入卡顿和终端 AI 模型列表问题
2026-01-09 21:28:36 +08:00
Chiron 162df3f8fc fix: 修复全局输入卡顿和终端 AI 模型列表问题
- 优化 i18n MutationObserver 性能
  - 添加输入框变化过滤(INPUT、TEXTAREA)
  - 添加 300ms 防抖避免频繁触发
  - 跳过已打补丁的节点
  - 跳过可编辑元素

- 优化 DOM 文本替换性能
  - 跳过输入框和文本域
  - 跳过 contentEditable 元素

- 优化终端 AI 输入组件
  - 添加防抖函数(16ms ~60fps)
  - 使用 useMemo 缓存防抖函数

- 修复终端 AI 模型列表问题
  - 添加 extractSupportedModels 函数
  - 优先使用凭证池中的模型列表
  - 特殊处理 DeepSeek(显示 deepseek-chat/reasoner)
  - 修复 iFlow provider ID 映射(openai -> iflowcn)
  - 降级到 model registry(如果凭证模型为空)

修复后:
- 所有输入框流畅无卡顿
- 终端 AI 显示正确的提供商模型列表
2026-01-09 21:19:07 +08:00
Chiron f3c91d81db Merge branch 'feat/api-server-network-binding' 2026-01-09 20:51:44 +08:00
Chiron c234096017 Merge branch 'fix/iflow-provider-support' 2026-01-09 20:51:38 +08:00
Chiron 488cdf90ae fix: 终端和页面切换时保持状态
问题:
1. 终端内标签页切换时状态会重置
2. 切换到其他功能页面再切回终端时状态丢失

解决方案:
1. 终端内标签页: 多容器架构,每个标签页独立容器和 TermWrap 实例
2. 应用页面切换: 所有页面保持挂载,使用 CSS display 控制显示

改动:
- TerminalPage.tsx: 多容器架构,保持 TermWrap 实例
- terminal.css: 添加多容器样式支持
- App.tsx: 所有页面保持挂载,CSS 控制显示
2026-01-09 20:49:22 +08:00
Chiron c18fcb5ebd feat: 添加 API Server 网络监听地址配置功能
- 后端改进:
  - 改进网络 IP 获取逻辑,使用 if-addrs 获取所有网络接口
  - 智能过滤 VPN 和虚拟网卡地址(如 198.18.0.0/15)
  - 允许绑定到私有网络地址(10.x.x.x, 172.16-31.x.x, 192.168.x.x)
  - 更新地址验证逻辑,支持局域网 IP 绑定

- 前端改进:
  - 使用 Radix UI Select 组件美化监听地址选择器
  - 支持选择 127.0.0.1(仅本机)、0.0.0.0(所有接口)或具体局域网 IP
  - 动态显示真实的局域网 IP 地址
  - 添加安全提示:局域网访问需要非默认 API Key
  - 优化界面布局,状态信息移至标题旁边

- 依赖更新:
  - 添加 if-addrs = "0.13" 用于获取网络接口信息
2026-01-09 20:30:08 +08:00
Chiron c691d9224f fix: 添加 IFlow provider 对 OpenAI 格式的支持
- 在 provider_calls.rs 中实现 IFlowOAuth 和 IFlowCookie 的处理逻辑
- 修复 deepseek-chat 模型请求返回 400 Bad Request 的问题
- 支持 IFlow 的 token 缓存和自动刷新机制
2026-01-09 19:47:22 +08:00
coso d67ca77a5f v0.38.0: 修复自定义 Provider 添加 API Key 问题,OAuth 插件标记为实验功能 2026-01-09 18:43:52 +08:00
coso 47df08639d feat: 添加 Homebrew 安装方式和自动更新 workflow 2026-01-09 11:50:20 +08:00
cosoandClaude Opus 4.5 3954a6224a chore: update lock files for @tauri-apps/plugin-global-shortcut
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 10:11:41 +08:00
cosoandClaude Opus 4.5 db8e916e90 feat: v0.37.0 - Terminal AI integration and Screenshot Chat
## Terminal AI Features
- Add Terminal AI panel with command execution support
- Add term_get_scrollback tool for reading terminal output history
- Add terminal tool with command approval workflow
- Add auto-execute mode for trusted commands
- Add duplicate command detection to prevent AI loops
- Improve command response format with clear success markers

## Screenshot Chat (Experimental)
- Add screenshot chat window for quick AI conversations
- Add global shortcut support for screenshot capture
- Add experimental settings page

## Code Quality
- Fix all compiler warnings with proper analysis
- Remove unused imports and dead code
- Add #[allow(dead_code)] for reserved/planned features
- Remove deprecated terminal-plugin from recommendations

## Other Changes
- Update model registry with new capabilities
- Improve config observer system
- Add webview panel position fields (reserved)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 10:05:54 +08:00
cosoandClaude Opus 4.5 9dbab22624 fix: allow 0.0.0.0 binding for LAN access (fixes #63)
Allow binding to 0.0.0.0 or :: to enable LAN access, with security
requirements:

1. Add is_valid_bind_host() and is_non_local_bind() helper functions
2. Allow 0.0.0.0 and :: as valid bind addresses
3. Require non-default API key when binding to all interfaces
4. Update validation in:
   - save_config command
   - hot_reload validation
   - bootstrap validation

Security: When using 0.0.0.0 or ::, users must set a custom API key
(not the default "proxy_cast") to prevent unauthorized access.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 21:29:42 +08:00
cosoandClaude Opus 4.5 c034c97be1 fix: Kiro Opus streaming response interruption (fixes #65)
Improve AWS Event Stream parsing to fix streaming response interruption:

1. Change JSON start detection to search for specific patterns instead of
   simple '{' character. AWS Event Stream contains binary headers that may
   have '{' in unexpected positions. Now searches for valid JSON patterns:
   - {"content": - text content
   - {"name": - tool call start
   - {"toolUseId": - tool use event
   - {"input": - tool input continuation
   - {"stop": - stop event
   - {"usage": - usage info
   - {"contextUsagePercentage": - context usage

2. Handle standalone {"input":...} events for tool call input continuation.
   Kiro may send tool calls in multiple events:
   - {"name":"xxx","toolUseId":"xxx"} - start
   - {"input":"..."} - input data (may be multiple)
   - {"stop":true} - end

3. Handle standalone {"stop":true} events that close active tool calls.

This mirrors the fix from AIClient-2-API project.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 19:48:24 +08:00
cosoandClaude Opus 4.5 f0b8c74a98 fix: add image support for Kiro channel (fixes #60)
Add image handling for both Anthropic and OpenAI request translators
when converting to CodeWhisperer format.

Changes:
- Anthropic translator: Parse image blocks from message content and
  convert to CWImage format (format + base64 data)
- OpenAI translator: Add get_images() method to ChatMessage to extract
  images from data URLs in image_url content parts
- Both translators now pass images through ProcessedMessage to
  UserInputMessage for current message and history
- Fix unused imports in frontend files

Image format: { format: "jpeg", source: { bytes: "base64_data" } }

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 19:13:09 +08:00
coso d8a9bf5a0d fix: 采用静态 UUID 方案生成 Machine ID(与 AIClient-2-API 保持一致)
- 移除时间变化因子,Machine ID 保持静态
- 统一优先级:uuid > profileArn > clientId > 默认值
- 新增 generate_machine_id_from_credentials_with_uuid 函数
- 更新版本号至 v0.36.1
2026-01-08 18:43:36 +08:00
cosoandClaude Opus 4.5 2e9a1d6e0e fix: use parking_lot::Mutex instead of std::sync::Mutex in wsl_connection
The WSLShellProc struct uses parking_lot::Mutex, so we need to use
the same type when creating writer and master instances.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 16:45:04 +08:00
cosoandClaude Opus 4.5 64ba28a10c fix: Windows platform compilation errors
- Add conditional compilation for Unix-specific code in file_browser_service.rs
- Add missing imports for Windows-specific code in wsl_connection.rs
  - std::io::{Read, Write}
  - std::sync::Mutex
  - TerminalOutputEvent, TerminalStatusEvent, SessionStatus
  - BASE64 encoder

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 16:25:09 +08:00
cosoandClaude Opus 4.5 73c7906768 chore: bump version to v0.36.0
- Update version in package.json, Cargo.toml, and tauri.conf.json
- Fix ESLint errors: add missing React imports
- Fix unused variable warnings
- Fix react-hooks/exhaustive-deps issues
- Fix process.env for Vite environment
- Suppress react-refresh/only-export-components warnings
- Fix missing 'language' field in Config tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 14:19:33 +08:00
coso 2cefb81b7e Merge pull request #76 from sicyuan404/feat/component-debug-overlay
feat: 增强组件视图调试工具 - 选中高亮、性能优化、代码质量改进
2026-01-08 08:41:51 +08:00
coso 843a6b7d8d Merge branch 'main' into feat/component-debug-overlay 2026-01-08 08:41:32 +08:00
coso fb5126f794 Merge pull request #77 from tjengbudi/main
Added: English translation
2026-01-08 08:40:18 +08:00
cosoandClaude Opus 4.5 b7d6dde8a6 chore: bump version to v0.35.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 08:32:10 +08:00
justMe 13e5b84616 Merge branch 'main' into main 2026-01-08 04:36:09 +07:00
budi 157db3fd78 fix: improve i18n translations and fix DOM replacement order
- Fixed 20 translation entries with concatenated words and incorrect formatting
- Fixed critical bug in DOM replacer that caused partial translations
- Sort translation patches by length (longest first) to prevent substring replacement issues
- Fixed TypeScript and ESLint errors
- Added comprehensive documentation of fixes
2026-01-08 04:32:05 +07:00
mxrain 8ffe9d446d feat: 增强组件调试覆盖层功能 2026-01-07 23:45:41 +08:00
coso d321c621e1 chore: bump version to v0.34.0 and fix lint errors 2026-01-07 21:14:48 +08:00
mxrain e696d800cc fix: 改进组件调试 Fiber 遍历逻辑,优先显示用户组件 2026-01-07 21:11:52 +08:00
mxrain 61d9c574a2 fix: 改进组件调试文件路径提示,说明仅开发模式可用 2026-01-07 21:02:41 +08:00
mxrain 2b2122918c feat: 添加开发者设置页面和组件视图调试功能 2026-01-07 20:52:33 +08:00
coso e7004ea194 Merge pull request #74 from Chiron-Brahm/main
fix: 修复模型注册表重复ID导致的唯一约束冲突
2026-01-07 11:00:19 +08:00
coso 0f79a8d618 Merge branch 'main' into main 2026-01-07 11:00:12 +08:00
coso b9590bf00d ci: 移除 GitHub Actions 中的 models 下载步骤
models 资源已直接提交到仓库,无需在构建时下载
2026-01-07 10:36:53 +08:00
coso ed651be952 fix: 修复模型资源路径问题,添加 models 资源文件
- 修复 model_registry_service.rs 中资源路径 (models -> resources/models)
- 从 .gitignore 移除 models 目录忽略规则
- 添加 75 个 provider 模型配置文件
- 添加 kiro 和 antigravity 别名配置
2026-01-07 10:31:07 +08:00
Chiron c4c32f65ed Merge remote-tracking branch 'origin/main' into main 2026-01-07 10:28:20 +08:00
coso c905c2c4a9 chore: bump version to v0.33.0 2026-01-07 10:14:33 +08:00
Chiron 4884bee7f4 Merge branch 'main' into fix/model-registry-dedup 2026-01-07 10:03:16 +08:00