Commit Graph
296 Commits
Author SHA1 Message Date
coso b32bf2987e fix: 将 aster 依赖改为 git 仓库 2026-01-15 18:42:27 +08:00
coso 2e1d9c7cb9 chore: 移除 Qwen 和 iFlow 凭证管理,升级到 v0.47.0 2026-01-15 18:26:23 +08:00
coso 1f489126d8 chore: bump version to 0.46.0
- 修复 reasoning_content 字段缺失的编译错误
- 精简 README 为 AI Agent 创作工具平台
- 修复 lint 和格式错误
2026-01-15 02:13:58 +08:00
Chiron 91fea5dd8c Merge pull request #121 from Chiron-Brahm/fix/custom-models-selector-118
fix(ui): 修复自定义模型无法在模型选择器中显示的问题
2026-01-13 23:06:42 +08:00
Chiron 630109ab7e fix(ui): 修复自定义模型无法在模型选择器中显示的问题 (#118)
- 修改 ApiServerPage.tsx 中的 loadModels 函数,使用 provider.id 作为 registryId
- 优先显示自定义模型,然后显示模型注册表中的模型
- 如果 registryId 没有模型,回退到使用 type 映射的 fallbackRegistryId
- 删除不再使用的 getModelProviderIds 函数
- 修复 DeepSeek 等自定义 Provider 显示不相关模型的问题

Closes #118
2026-01-13 22:49:24 +08:00
Chiron b24fbfca61 Merge pull request #120 from Chiron-Brahm/fix/issue-110-lan-listen-address
fix(server): 修复监听地址配置不生效的问题 (#110)
2026-01-13 20:04:41 +08:00
Chiron c2bbe89c30 fix(server): 修复监听地址配置不生效的问题 (#110)
## 问题描述
用户在 UI 中选择 127.0.0.1 或 0.0.0.0 作为监听地址,但服务器实际绑定到局域网 IP

## 修复内容
1. 移除 server/mod.rs 中的自动地址替换逻辑
2. 移除监听 0.0.0.0 时必须使用非默认 API Key 的限制
3. 修复 VPN 地址被错误显示在路由端点的问题
4. 前端选择监听地址后自动保存配置
5. 移除前端的安全提示信息
2026-01-13 20:02:00 +08:00
coso 20df0d2cd8 feat: v0.45.2 - 优化机器码历史记录和插件加载
- 机器码历史记录改为倒序显示(最新在前)
- 修复插件加载器全局变量名推断,自动添加 Plugin 后缀
- 添加更多插件的全局变量名映射
2026-01-13 13:47:17 +08:00
cosoandClaude Opus 4.5 9363bd9ba3 fix: 修复 provider_pool_credentials 表缺少 supported_models 列的问题
- 在 migrate_add_proxy_url_column 函数重建表时添加 supported_models 列
- 将 supported_models 的 ALTER TABLE 迁移移到 migrate_add_proxy_url_column 之后执行
- 更新版本号到 0.45.1

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 08:57:09 +08:00
coso 0cf5cd5c5d chore: bump version to 0.45.0 2026-01-13 02:29:07 +08:00
coso 326695f860 Merge pull request #111 from tjengbudi/main
feat(i18n): add additional disctionary for english language
2026-01-13 02:13:13 +08:00
cosoandClaude Opus 4.5 66fa3f28f5 feat: add session management module
Add comprehensive session management capabilities:
- Stable SessionId generation based on request content hash
- Global thoughtSignature caching
- Sticky session management (session-to-account mapping)
- Scheduling mode configuration
- Enhanced rate limiting with duration parsing and exponential backoff

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 22:23:56 +08:00
budi df017c0c7f feat(i18n): add comprehensive multi-language support
- Add dynamic translation system with template placeholders
- Add 60+ template keys for dynamic text with variables
- Update ReplayDialog to use dynamic translations
- Create comprehensive i18n documentation (README.md)
- Export missing types from I18nPatchProvider
- Coverage: ~99.5% of all UI text (static + dynamic)

Files modified:
- src/i18n/dynamic-translation.ts (new)
- src/i18n/index.ts (new)
- src/i18n/README.md (new)
- src/i18n/I18nPatchProvider.tsx (export types)
- src/i18n/patches/en.json (+72 translations)
- src/i18n/patches/zh.json (+72 translations)
- src/components/flow-monitor/ReplayDialog.tsx (use dynamic t())

Tests: 27/27 passed
2026-01-12 20:44:52 +07:00
cosoandClaude Opus 4.5 86e2a0db33 feat: add anthropic-compatible provider type
Add a new provider type "anthropic-compatible" to support Anthropic API
variants that use array format for the system field instead of string.

Changes:
- Add AnthropicCompatible to ApiProviderType enum (backend)
- Add AnthropicCompatible to Agent ProviderType enum
- Modify AnthropicProtocol to support array system format
- Add provider type selector in ProviderConfigForm for custom providers
- Update icon mappings to show Claude icon for anthropic-compatible
- Update model registry mappings to show Anthropic models

This allows users to connect to Anthropic-compatible proxies (like One API)
that expect the system field in array format:
  {"system": [{"type": "text", "text": "..."}]}

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 20:06:08 +08:00
cosoandClaude Opus 4.5 2b32211e85 chore: update model configurations and pricing data
Update model definitions across all providers with latest pricing,
capabilities, and release information.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 19:09:52 +08:00
cosoandClaude Opus 4.5 816394fade fix: stabilize Select dropdown position with popper mode
- Add position="popper" to Select.Content for stable positioning
- Add side="bottom" and align="start" for consistent dropdown direction
- Use CSS variable for min-width to match trigger width
- Remove relative positioning that caused layout issues

This fixes the dropdown jumping between top and bottom positions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 16:54:49 +08:00
cosoandClaude Opus 4.5 9789e7d8a8 feat: add provider environment variable sync and UI improvements
- Add updateProviderEnvVars function to sync Claude Code env vars
- Improve API Server page with provider selection and env var updates
- Update codex provider with better error handling
- Fix provider pool service credential lookup
- Format UI components with Prettier
- Fix test files for custom_models field

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 16:19:22 +08:00
cosoandClaude Opus 4.5 a52ec0123e fix: enable automatic decompression for HTTP responses
- Add gzip, brotli, deflate features to reqwest in Cargo.toml
- Enable automatic decompression in ClaudeCustomProvider HTTP client
- Enable automatic decompression in OpenAICustomProvider HTTP client
- Add update_provider_env_vars command for Claude Code environment setup

This fixes garbled response issue when upstream providers return
compressed responses (e.g., anyrouter.top returning gzip-compressed data).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 16:10:38 +08:00
Chiron e2651861b5 Merge pull request #109 from Chiron-Brahm/main
fix: 修复凭证代理设置无法清空的问题
2026-01-12 13:54:04 +08:00
Chiron f55bdd5b80 fix: 修复凭证代理设置无法清空的问题 (#107)
问题:将代理设置留空后点击保存,代理设置仍然存在

原因:EditCredentialModal.tsx 中 proxyUrl.trim() || undefined
在空字符串时返回 undefined,但后端期望空字符串来表示清除代理

修复:将 proxyUrl.trim() || undefined 改为 proxyUrl.trim()
这样空字符串会被正确传递给后端,后端会将其解释为清除代理设置
2026-01-12 13:42:24 +08:00
Chiron 55f445f837 Merge pull request #108 from Chiron-Brahm/main
feat: 动态检测 IP 地址变化并自动更新
2026-01-12 13:39:09 +08:00
Chiron 8564c9007e feat: 修复智谱 API 路径问题并支持自定义模型列表
修复:
1. 修复 OpenAI Custom Provider 的 URL 路径拼接问题
   - 支持检测 /v1, /v2, /v3, /v4 等版本号路径
   - 避免重复拼接导致 /v4/v1/chat/completions 错误

新功能:
1. API Key Provider 支持自定义模型列表
   - 数据库添加 custom_models 字段
   - 前端 Provider 配置表单添加自定义模型输入
   - 用于不支持 /models 接口的 Provider(如智谱)

2. API Server 测试页面使用自定义模型
   - 自动使用当前 Provider 的自定义模型进行测试
   - 为多个自定义模型生成独立测试端点
2026-01-12 13:36:27 +08:00
Chiron bd9748fe18 feat: 动态检测 IP 地址变化并自动更新
主要改进:
1. 服务器启动时检查配置的 IP 是否有效,无效时自动切换到当前局域网 IP
2. 前端定期刷新网络信息,实时检测 IP 变化
3. 路由端点和 API 测试地址动态更新
4. 优先选择 192.168.x.x 或 10.x.x.x 的局域网 IP

修复 Antigravity API:
1. 修正 API 端点为 cloudcode-pa.googleapis.com
2. 透传上游错误状态码

新增功能:
1. 添加 model_service 和 model_cmd 模块
2026-01-12 11:40:29 +08:00
cosoandClaude Opus 4.5 21ec0007a8 fix: use --no-frozen-lockfile flag for pnpm in CI
pnpm defaults to frozen-lockfile in CI environments,
explicitly disable it to allow lockfile updates.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 08:30:16 +08:00
cosoandClaude Opus 4.5 06b9a070ca fix: use pnpm install without frozen-lockfile in CI
The lockfile may have minor differences across pnpm versions,
using regular install allows CI to proceed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 08:27:53 +08:00
cosoandClaude Opus 4.5 4b2a9e0873 chore: update CI to use pnpm and minor fixes
- Update GitHub Actions release workflow to use pnpm instead of npm
- Add pnpm/action-setup@v4 for pnpm installation
- Use pnpm install --frozen-lockfile for CI builds

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 08:20:14 +08:00
coso 862ce44172 fix: resolve eslint warnings in agent chat 2026-01-12 02:13:00 +08:00
coso ae30af743f chore: bump version to 0.44.0 2026-01-12 01:33:45 +08:00
coso bb858c812f Merge pull request #105 from lwmacct/dev/260111-2255
feat: 添加开发模式 HTTP 桥接,支持浏览器 dev server 与 Tauri 后端通信
2026-01-12 00:06:43 +08:00
coso 7144cf771a chore: bump version to 0.43.0 2026-01-12 00:00:11 +08:00
lwmacct e77bb2a5ec fix: 将 HTTP 桥接改为独立的开发服务器(端口 3030)
## 问题

之前将 dev_bridge 路由合并到主应用服务器(端口 8999),
但用户需要一个独立的开发桥接端口,并且服务器启动后会立即关闭。

## 变更

- 重构 dev_bridge.rs 为独立的服务器实现
- 服务器在后台持续运行(不使用 graceful_shutdown)
- 在服务器启动时同步启动 dev bridge 服务器
- 添加 get_network_info 命令支持
- 修复 get_default_provider 返回格式(返回字符串而非对象)

## 架构

- 端口 8999: 主应用 API(生产/通用)
- 端口 3030: 专用开发桥接(仅 dev 模式)

## 验证

- [DevBridge] HTTP 桥接成功: get_server_status
- [DevBridge] HTTP 桥接成功: get_config
- [DevBridge] HTTP 桥接成功: get_default_provider
- [DevBridge] HTTP 桥接成功: get_network_info
2026-01-11 23:54:33 +08:00
lwmacct 329c699ae8 feat: 实现 HTTP 桥接层,支持浏览器 dev server 与 Tauri 后端通信
## 变更概述

实现了开发模式下的 HTTP 桥接层,使浏览器中的前端可以通过 HTTP
与运行中的 Tauri 后端通信,替代原有的纯 mock 方案。

## 后端变更

- 新增 `src-tauri/src/dev_bridge.rs` - HTTP 桥接主模块
- 新增 `src-tauri/src/dev_bridge/dispatcher.rs` - 命令分发器
- 集成 dev_bridge 路由到 Axum 服务器
- 添加 CORS 支持(仅允许 localhost:1420)

## 前端变更

- 新增 `src/lib/dev-bridge/` 模块 - HTTP 客户端
- 更新 `safeInvoke` 支持三层降级策略:
  1. Tauri IPC(生产环境)
  2. HTTP Bridge(开发环境)
  3. Mock(离线开发)

## 特性

- 仅在 debug 模式编译(`#[cfg(debug_assertions)]`)
- 支持命令:get_config, save_config, get_server_status,
  get_logs, get_provider_pool_overview 等
- 自动回退到 mock 当后端不可用
2026-01-11 23:17:55 +08:00
coso 8bc8e56c98 Merge pull request #104 from lwmacct/dev/260111-2113
feat: 添加 Vite web 开发模式 mock 系统
2026-01-11 22:46:14 +08:00
lwmacct 9c59f9b2b1 feat: 添加 Vite web 开发模式 mock 系统
通过 Vite alias 拦截 @tauri-apps/* 导入,使用 mock 模块替代真实的 Tauri API,
使得 pnpm run dev 可以在浏览器中独立运行,无需启动 Tauri 后端。

主要变更:
- 新增 src/lib/tauri-mock/ 模块化 mock 系统
- 修复 vite.config.ts 的 ES 模块 __dirname 兼容性
- 移除旧的 src/lib/tauri-mock.ts 文件
- 更新 useTauri.ts 使用静态导入
- 添加 200+ Tauri 命令的 mock 实现
2026-01-11 22:40:20 +08:00
lwmacct ab9d802578 feat: 添加 Tauri Headless 模式支持
- 新增 src-tauri/tauri.conf.headless.json 配置文件
- 添加 pnpm run tauri:dev (GUI 模式)
- 添加 pnpm run tauri:dev:headless (Headless 模式)

Headless 模式下后端完全运行,但不显示 GUI 窗口,
前端可通过浏览器访问 http://localhost:1420
2026-01-11 22:05:31 +08:00
coso ab68e34a9a Merge pull request #103 from lwmacct/dev/260111-1931
fix: 消除跨平台编译警告
2026-01-11 21:09:42 +08:00
lwmacct 76d623f85b fix: 消除跨平台编译警告
修复 macOS 和 Linux 平台上的 Rust 编译警告,实现零警告编译。

主要更改:
- 在 lib.rs 添加全局 #![allow(unexpected_cfgs)] 抑制 objc 宏的 cfg 警告
- 修复 runner.rs 中 macOS 特定的 Emitter/Listener trait 导入
- 修复 capture.rs 中 warn 宏的条件导入
- 修复 window.rs 和 update_window.rs 中的变量命名和 lint 属性
- 修复 provider_pool_cmd.rs 中的 home 变量命名

技术细节:
- 使用 #[cfg(target_os = "macos")] 条件导入平台特定模块
- 使用 #[cfg_attr] 条件属性抑制非目标平台的未使用变量警告
- 在 crate 根级别抑制外部依赖(cocoa/objc)的内部警告

验证:
- macOS: cargo check --no-default-features 零警告
- Linux: cargo check --no-default-features 零警告
2026-01-11 21:03:37 +08:00
Chiron a6a977ce11 Merge pull request #102 from lwmacct/dev/260111-1530
chore: 修复编译警告和错误
2026-01-11 18:54:05 +08:00
lwmacct 933b660332 chore: 修复编译警告和错误
- 修复 Tauri v2 API 兼容性问题(注释掉使用旧 API 的通知功能)
- 清理未使用的导入(18 个)和变量
- 为预留的结构体/trait 添加 #[allow(dead_code)] 属性
- 为测试模块添加模块级别 #![allow(dead_code)] 以保留 proptest 辅助函数
- 修复 proptest 宏外部的文档注释(改为普通注释)
- 删除未使用的测试辅助函数 arb_tool_call_count
- 处理未使用的 Result 返回值(添加 let _ = 前缀)

cargo check --all-targets --all-features 现已通过,无警告
2026-01-11 16:49:43 +08:00
coso 98a04d26da Merge pull request #101 from lwmacct/dev/260111-1454
chore: 清理项目配置并更新 .gitignore
2026-01-11 15:10:36 +08:00
lwmacct 5250527e80 chore: 清理项目配置并更新 .gitignore 2026-01-11 15:06:53 +08:00
coso 6e2033615c feat: 添加音效功能 (v0.42.0)
- 添加工具调用音效 (tool-call.mp3)
- 添加打字机音效 (typing.mp3)
- 在设置页面添加音效开关
- 创建 useSound hook 和 SoundProvider
2026-01-11 14:11:29 +08:00
coso 7d7f156234 chore: bump version to v0.41.0 2026-01-11 05:01:59 +08:00
cosoandClaude Opus 4.5 392f0e2d2c feat: add content creator workflow and chat components
- Add content creator backend services (Rust)
- Add TaskFiles components for agent chat
- Add new chat page components with streaming support
- Add A2UI parser and components
- Add document canvas with multi-platform support
- Add form components and layout transition utilities
- Add content creator hooks and workflow management

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 01:30:44 +08:00
cosoandClaude Opus 4.5 83c36747db chore: bump version to 0.40.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 01:24:47 +08:00
Chiron c304512c57 Merge pull request #98 from Chiron-Brahm/fix/api-test-url-selection
fix: 优化 API 测试页面 URL 选择和状态管理
2026-01-10 23:25:18 +08:00
Chiron 1fc88995da fix: 优化 API 测试页面 URL 选择和状态管理
- 根据监听地址智能选择测试 URL(127.0.0.1/0.0.0.0/局域网IP)
- 实时更新测试 URL,切换监听地址时立即反映
- 优化测试状态管理,切换 Tab 时才重置测试结果
- 允许用户对比不同 Provider 的测试结果
2026-01-10 23:18:32 +08:00
Chiron 2208b6c124 Merge pull request #97 from Chiron-Brahm/main
fix: 修复 Flow Monitor 响应内容显示和提供商显示问题 (#75)
2026-01-10 22:33:37 +08:00
Chiron 665f61a9a6 Merge branch 'fix/issue-75-flow-monitor-response' 2026-01-10 22:27:47 +08:00
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