Commit Graph

54 Commits

Author SHA1 Message Date
xintaofei
a3d5335e7f feat(settings): protect model provider deletion and cascade credential updates
- Block deletion of a model provider when it is referenced by any agent,
  returning an error that lists the agent names so the user knows what to unlink first
- When a provider's api_url or api_key is updated, automatically propagate
  the new credentials to all dependent agents: updates env_json in the database
  and patches on-disk config files (Claude Code settings.json, Gemini settings.json,
  Codex auth.json + config.toml, OpenCode auth.json) using the same field names
  and structure as the agent settings UI
- Fix error message display in provider dialogs for both Tauri and web transports,
  which throw plain objects rather than Error instances

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 00:25:01 +08:00
xintaofei
4245df2f4a fix(settings): improve codex CLI auth mode switching to preserve auth.json keys
- Patch only `OPENAI_API_KEY` and `auth_mode` in auth.json when switching
  auth modes, instead of resetting the entire file
- Clean up `OPENAI_BASE_URL` from env when codex loads in official
  subscription mode
- Hide API URL and API Key inputs when model provider mode is selected

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 23:05:52 +08:00
xintaofei
b64976e4d6 feat(settings): refactor agent auth modes and add model provider authentication
- Split env vars and config file persistence into separate save operations
- Add model_provider_id field to agent_setting for tracking selected provider
- Add "Model Provider" auth mode for Claude Code, Codex CLI, and Gemini CLI
- Add "Custom Endpoint" auth mode for Claude Code (previously only official subscription)
- Unify auth mode labels across all three agents (official subscription / custom endpoint / model provider)
- When model provider is selected, fill api_url and api_key into env and config automatically
- Resolve model provider credentials at ACP connect time as a backend fallback
- Clear provider deletion cascades to agent_setting.model_provider_id
- Claude Code writes API credentials to config.env (ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN)
- Codex: switching auth modes patches config.toml instead of clearing it
- Add i18n keys for new auth modes in all 10 supported languages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:10:18 +08:00
xintaofei
d28c54a038 fix(settings): reorder nav menu to place model providers after skills
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 16:40:37 +08:00
xintaofei
ba19299696 feat(settings): add model provider management with full CRUD support
Add a new settings page for managing API model providers (name, API URL,
API key, applicable agent types). Includes database migration, SeaORM
entity, backend CRUD commands/handlers, frontend settings UI with agent
type filter, add/edit/delete dialogs, and i18n support for all 10 locales.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 16:35:14 +08:00
xintaofei
d0e0aad525 optimize: WeChat QR code auth flow and channel reliability
- Generate QR code server-side when iLink API returns SPA page URL
  (added qrcode + image crates for PNG generation)
- Strip bot_token from frontend response (new WeixinQrcodeStatusPublic type)
- Add request timeouts and shared HTTP client for QR code endpoints
- Fix TOCTOU race on reply_context double-lock (single lock scope)
- Extract do_send() helper to deduplicate sendmessage logic; resend now
  checks ret field for context expiry instead of HTTP status only
- Cap pending_messages buffer at 50 to prevent unbounded memory growth
- Generate stable X-WECHAT-UIN per backend instance instead of per request
- Extract ILINK_CHANNEL_VERSION constant (was hardcoded in 4 places)
- Add 5-minute client-side QR expiry timeout in frontend dialog
- Track consecutive polling errors and show warning after 3 failures
- Stabilise onAuthSuccess/onClose callback refs to prevent polling restarts
- Replace dead i18n key weixinOpenQrcode with weixinPollError

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 11:22:51 +08:00
xintaofei
8050e30a55 features: supports WeChat channel 2026-04-02 00:17:23 +08:00
xintaofei
d76dc716e4 optimize: Enhanced session command processing logic 2026-04-01 17:22:56 +08:00
xintaofei
58611a6bc1 消息渠道支持会话相关指令 2026-04-01 10:08:20 +08:00
xintaofei
967a16aeaa 支持配置cline的skills 2026-03-31 22:35:42 +08:00
xintaofei
296b0c7806 优化MCP管理,支持所有Agent 2026-03-31 22:15:48 +08:00
xintaofei
fafe970309 调整:web/server模式下,设置页面不显示“Web 服务”菜单项 2026-03-31 19:28:49 +08:00
xintaofei
a9f6ce9105 优化消息渠道的实现代码 2026-03-31 15:26:29 +08:00
xintaofei
f06360a59d 消息渠道的消息支持多语言 2026-03-31 13:49:16 +08:00
xintaofei
f2a53acc9d 修复错误警告 2026-03-31 13:11:08 +08:00
xintaofei
007b52c183 精简事件管理里的事件 2026-03-31 12:05:51 +08:00
xintaofei
edc12a0e39 支持渠道、指令(自定义前缀)和事件(启用/禁用)管理 2026-03-31 11:49:24 +08:00
xintaofei
d18cec33bf 初步集成消息通道,支持Telegram + Lark机器人 2026-03-30 22:51:49 +08:00
xintaofei
695c20b1c9 系统管理页面添加github信息 2026-03-29 20:24:22 +08:00
xintaofei
356d1fbd88 Cline所有Provicer都支持自定义API URL 2026-03-28 20:25:07 +08:00
xintaofei
be3f4986d7 支持Cline Agent 2026-03-28 20:14:48 +08:00
xintaofei
adba9c0279 修复lint问题 2026-03-27 22:20:24 +08:00
xintaofei
f50c85ce84 修复web服务页面未处理多语言 2026-03-27 20:49:56 +08:00
xintaofei
9141b9b71c Web服务设置页面里的访问地址、访问Token右边的按钮改为一直显示,不需要悬停 2026-03-26 23:07:49 +08:00
xintaofei
f61f9fb025 修复所有lint警告和错误 2026-03-26 21:47:13 +08:00
xintaofei
2d3d8d791f 优化web服务页面样式 2026-03-25 23:52:01 +08:00
xintaofei
8026af79a4 优化 Web 服务页面样式 2026-03-25 23:36:16 +08:00
xintaofei
d17148f3ba 设置 Web 页面标题 2026-03-25 23:29:12 +08:00
xintaofei
218055ab01 完善folder页面的web接口实现 2026-03-25 15:27:43 +08:00
xintaofei
ac09d3db9e 初始化web服务功能 2026-03-25 14:26:26 +08:00
xintaofei
ccff5ac7d9 修复lint问题 2026-03-23 18:18:04 +08:00
xintaofei
42e7e66997 优化系统管理的布局和操作交互 2026-03-23 17:55:53 +08:00
xintaofei
c8af3e07ac Agents管理里配置保存后通知里添加生效提示。 2026-03-23 15:25:57 +08:00
xintaofei
048b8a8480 修复警告和错误 2026-03-21 19:29:29 +08:00
xintaofei
32d922a346 修复lint问题 2026-03-21 18:06:59 +08:00
xintaofei
450b081e88 重构git凭证托管,改为操作系统托管 2026-03-21 18:00:05 +08:00
xintaofei
7fecc83d40 修复lint问题和错误 2026-03-21 15:14:35 +08:00
xintaofei
1a7d112c2c 简化版本控制里面git检测交互 2026-03-21 15:07:22 +08:00
itpkcn@gmail.com
9e21ac439b 支持快捷打开github凭据生成页面 2026-03-21 14:15:16 +08:00
itpkcn@gmail.com
24f0b580ce 后台设置里添加非github的git服务器管理 2026-03-21 13:57:11 +08:00
itpkcn@gmail.com
62fab2c3f2 设置界面支持版本控制和github账号管理 2026-03-21 11:33:48 +08:00
xintaofei
f6fd3da401 放开部分文件读/写限制 2026-03-19 21:33:07 +08:00
xintaofei
ff54505b6c Agent管理页面手动触发预检时,先删缓存再预检 2026-03-17 22:56:42 +08:00
xintaofei
879d96f5a4 彻底删除支持不完整的Agent和相关代码,减轻维护工作量,等后续真正适配好了再加回来 2026-03-17 18:10:31 +08:00
xintaofei
ca7f6ecd25 支持Codex CLI的官网订阅设置 2026-03-15 18:17:46 +08:00
xintaofei
d75e0cef48 支持自定义消息发送和消息换行快捷键 2026-03-12 08:53:47 +08:00
xintaofei
950040ace6 优化系统版本升级操作流程 2026-03-09 23:08:26 +08:00
xintaofei
08b33b5755 扩充多语言范围,新增7种多语言 2026-03-09 15:31:34 +08:00
xintaofei
ab31d3063e 优化更新失败时的提示语
修复检查更新按钮点击后有重影
2026-03-08 08:35:50 +08:00
xintaofei
aeecc4769c 优化设置页面代码 2026-03-07 11:43:49 +08:00