Commit Graph
228 Commits
Author SHA1 Message Date
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 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
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
Chiron 2eed76306e fix: 修复模型注册表重复ID导致的唯一约束冲突
- 在 fetch_models_from_repo 中添加去重逻辑
- 使用 INSERT OR REPLACE 作为双重保险
- 优化 provider 类型映射和模型列表组件
2026-01-07 10:01:12 +08:00
cosoandClaude Opus 4.5 aec5550e14 feat: dynamic model loading for alias providers (Antigravity/Kiro)
## Backend Changes
- Add `get_provider_alias_config` and `get_all_alias_configs` Tauri commands
- Refactor AntigravityProvider to use fallback constants
- Export ANTIGRAVITY_MODELS_FALLBACK from providers module
- Update provider_pool_model to use shared model constant
- Add ProviderAliasConfig to model_registry

## Frontend Changes
- Modify ProviderModelSelector to handle alias providers independently
- Add aliasConfig state and loading logic
- Convert alias models to EnhancedModelMetadata format for display
- Add ModelAlias and ProviderAliasConfig TypeScript types
- Add getProviderAliasConfig/getAllAliasConfigs API functions

## Refactoring
- Remove routing components and commands (simplified architecture)
- Clean up unused router tests
- Update config observer pattern

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 07:23:58 +08:00
cosoandClaude Opus 4.5 096eedfecc fix: add debug logging for Kiro streaming and fix native agent
- Add detailed debug logging to AWS Event Stream parser
  - Log bytes received and buffer state
  - Log JSON parsing progress
  - Log event generation counts

- Fix missing provider_id parameter in native agent
  - chat_stream() now passes provider_id
  - chat_stream_continue() now passes provider_id

These changes will help diagnose streaming truncation issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 00:25:25 +08:00
cosoandClaude Opus 4.5 3b7055ed52 fix: improve streaming response stability for Windows
- Add proper HTTP client timeout configuration for ClaudeCustomProvider
  - connect_timeout: 30 seconds
  - timeout: 10 minutes (for long streaming responses)
  - tcp_keepalive: 60 seconds (keep connection alive)

- Enhance SSE streaming response headers:
  - Cache-Control: no-cache, no-store, must-revalidate
  - X-Accel-Buffering: no (disable nginx proxy buffering)
  - Transfer-Encoding: chunked

These changes should help resolve streaming truncation issues on Windows
when using Kiro OAuth credentials through aiclient2api proxy.

Fixes #68

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 00:14:51 +08:00
coso 25acd04798 Merge pull request #72 from aiclientproxy/perly6185-lab-main
feat: 添加 X-Provider-Id header 支持实现精确 Provider 路由
2026-01-06 23:58:56 +08:00
pengshiyuandClaude Opus 4.5 3a740969b9 feat: 添加 X-Provider-Id header 支持实现精确 Provider 路由
- 在 API 请求中添加 X-Provider-Id header 用于精确路由到指定 Provider
- 修复 Chat 专家模式使用 Deepseek 等自定义 Provider 时路由错误的问题
- 优化 toast 通知持续时间和去重机制
- 移除 App.tsx 中重复的 Toaster 组件

修改文件:
- api.rs: 解析 X-Provider-Id header 并支持 provider_id_hint 路由
- api_key_provider_service.rs: 添加 get_next_api_key_with_provider_info 方法
- protocols/mod.rs, openai.rs, anthropic.rs: Protocol trait 添加 provider_id 参数
- native_agent.rs, native_agent_cmd.rs: 传递 provider_id 到请求中
- useAgentChat.ts: 增加错误 toast 持续时间到 8 秒
- sonner.tsx: 默认 toast 持续时间从 3 秒增加到 5 秒

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 23:55:58 +08:00
735304a941 feat: improve toast notifications with deduplication and longer duration
- Remove duplicate Toaster component from App.tsx onboarding view
- Add toast id for deduplication to prevent stacking
- Extend error toast duration to 8 seconds for better readability
- Add console.error logging for debugging

Inspired by PR #71 from @perly6185-lab - thank you for the contribution!

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: perly6185-lab <perly6185-lab@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 23:49:02 +08:00
cosoandClaude Opus 4.5 d29efe737c chore: bump version to v0.32.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 22:25:46 +08:00
cosoandClaude Opus 4.5 717abfd732 chore: bump version to v0.31.0
- Fix ProviderType::from_str to support 'anthropic' and 'gemini_api_key' mappings
- Fix ChatNavbar provider selection to respect server default provider
- Fix duplicate KeyRound export in plugin-components

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 10:34:08 +08:00
coso 9bc6b457d4 feat: add ClaudeFormStandalone and icons to plugin-components
- Export ClaudeFormStandalone component
- Add Cookie, FileJson, KeyRound icons
2026-01-06 10:23:03 +08:00
coso a92b626ce1 feat: 添加 GeminiFormStandalone 组件并更新 gemini-provider 版本到 v0.4.0
- 新增 GeminiFormStandalone 组件支持 OAuth 和 API Key 认证
- 在 plugin-components 中导出 GeminiFormStandalone
- 添加 KeyRound 图标导出
- 更新 OAuthPluginTab 中 gemini-provider 版本配置
- 重构 ProviderModelList 将工具函数移到单独文件
2026-01-06 10:10:05 +08:00
coso 1de6e9a58d chore: 更新 claude-provider 和 gemini-provider 版本到 v0.3.0 2026-01-06 09:18:37 +08:00
coso 36fdc86e0d fix: 添加缺失的图标导出到 plugin-components 2026-01-06 09:15:10 +08:00
coso 04045c79a1 chore: 更新 antigravity-provider 版本到 v0.4.0 2026-01-06 09:10:13 +08:00
coso 4965f6d385 chore: bump version to v0.30.0 2026-01-06 00:26:16 +08:00
coso ef8ac824c6 chore: 移除废弃的 relay_api_keys 表
Connect API Key 现在保存到 API Key Provider 系统,不再需要独立的 relay_api_keys 表
2026-01-05 23:33:05 +08:00
coso 5827087780 fix: Connect API Key 保存到 API Key Provider 系统而非 Provider Pool
- 修改 save_relay_api_key 命令使用 ApiKeyProviderService
- 自动创建自定义 Provider(使用 connect- 前缀 + 中转商 ID)
- 更新前端 useDeepLink hook 适配新的返回类型 SaveApiKeyResult
- 修复 API Key 显示在错误的凭证池标签页问题
2026-01-05 23:14:47 +08:00