Commit Graph

49 Commits

Author SHA1 Message Date
xintaofei
d163e42457 feat(settings): add ChatGPT OAuth device code login for Codex CLI
Add OAuth device code flow for Codex CLI official subscription auth,
allowing users to log in with their ChatGPT account directly from the
agent settings page without using the terminal.

- Backend: two new endpoints (codex_request_device_code, codex_poll_device_code)
  that handle the OpenAI OAuth device code flow and return tokens to frontend
- Frontend: login UI with verification URL, copyable user code, polling status,
  15-minute timeout, and auto-save via existing persistEnv/persistConfig path
- Auth.json written in Codex CLI compatible format (nested tokens, account_id,
  last_refresh) so codex-acp can use OAuth tokens directly
- Show logged-in status and re-login option when tokens are present
- Remove auth.json textarea from Codex settings UI
- i18n: all 10 languages updated with new login-related keys
2026-04-16 00:29:01 +08:00
xintaofei
f3630ba48a feat(folder): add commit reset action in git log
Add a "Reset to Here" context action for git log commit items in the folder page.

Show a reset dialog with branch, target commit, commit message, and reset mode details for soft, mixed, hard, and keep.

Disable reset when viewing a non-current branch filter and keep the action ordering under commit diff.

Add git_reset support across Rust commands, Tauri invoke registration, web handlers/routes, and frontend API/type bindings.

Add localized reset labels, mode descriptions, and toast messages across all supported languages.
2026-04-15 11:14:37 +08:00
xintaofei
b5e8fd8acb feat(folder): unify workspace state streaming for tree and git panels
Introduce a shared workspace-state backend stream with snapshot/delta APIs for file tree and git changes.

Migrate both aux panels to a common frontend workspace store with lifecycle-safe stream handling.

Apply batched watch throttling, path-aware git refresh gating, no-op delta suppression, and bounded history compaction to improve runtime stability.
2026-04-14 22:26:36 +08:00
xintaofei
41b28001af fix(frontend,macos): reduce dark mode white flash on window open
Detect dark/light mode before React hydrates to eliminate the visible
white-to-dark flash when opening windows in dark mode.

Frontend:
- Inline script now reads next-themes localStorage key and applies
  .dark class, colorScheme, and backgroundColor on <html> before first
  paint
- Add CSS-only fallback via prefers-color-scheme media query in an
  inline <style> tag that fires before any JS executes

macOS backend:
- Detect system dark mode via `defaults read -g AppleInterfaceStyle`
  (cached with OnceLock) and set native window background color to
  match dark theme in apply_platform_window_style
- Persist user appearance mode preference (dark/light/system) to DB
  alongside zoom level so new windows use the correct background
- Add update_appearance_mode Tauri command; frontend syncs on mount,
  on settings change, and on cross-window storage events

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 11:15:13 +08:00
xintaofei
e05ae76453 fix(macos): persist zoom level to DB so traffic lights use correct position on launch
Previously the welcome window (or any startup window) always used the
default CURRENT_ZOOM of 100, ignoring the user's saved zoom preference
stored in frontend localStorage. Now update_traffic_light_position also
writes the zoom value to the app_metadata DB, and setup() reads it back
before creating any window.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 10:10:09 +08:00
xintaofei
843cf8df19 feat(macos): set traffic-light position via Tauri builder API and sync with zoom
Use Tauri's native `traffic_light_position()` builder method to position
macOS window controls instead of runtime objc2 calls. A global AtomicU32
tracks the current zoom level so newly created windows reflect the latest
zoom. The frontend syncs zoom changes to the backend via a new
`update_traffic_light_position` command.

- Add `traffic_light_position()` to `apply_platform_window_style` builder
- Add `CURRENT_ZOOM` atomic and `traffic_light_position()` helper
- Register `update_traffic_light_position` Tauri command
- Add `syncTrafficLightPosition` in appearance-provider to sync on zoom
  change, mount, and cross-tab storage events
- Consolidate `ensure_windows_undecorated` calls into `post_window_setup`
- Remove dead `on_window_resized` no-op and its Resized event listener

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 18:11:40 +08:00
xintaofei
996945223c feat(acp): add opencode plugin list/install/uninstall commands and routes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 10:21:04 +08:00
xintaofei
ade59f474c fix(chat): query expert skills via symlinks and use $ prefix for Codex
Expert skills in the chat session were derived by intersecting built-in
experts with ACP availableCommands, which caused Codex experts to never
appear since Codex does not advertise skills through ACP.

- Add `experts_list_for_agent` backend API that checks symlink status
  across all global skill dirs for the given agent type
- Replace availableCommands-based expert filtering with symlink-based
  query, making the settings page the single source of truth
- Use `$` prefix for Codex expert skills while keeping `/` for slash
  commands and other agents' experts
- Disable the expert button when no experts are linked for the agent
- Invalidate per-agent expert cache after link/unlink in settings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 00:13:42 +08:00
xintaofei
5b613daded feat(experts): add built-in expert skills with per-agent activation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 15:17:51 +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
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
8050e30a55 features: supports WeChat channel 2026-04-02 00:17:23 +08:00
xintaofei
05214d09de Merge remote-tracking branch 'origin/botwork' 2026-04-01 15:03:41 +08:00
xintaofei
b98f50340f Feature: Supports remote branch deletion 2026-04-01 12:41:15 +08:00
xintaofei
58611a6bc1 消息渠道支持会话相关指令 2026-04-01 10:08:20 +08:00
xintaofei
13c8deee84 修复node全局安装时的权限问题 2026-03-31 16:00:04 +08:00
xintaofei
f06360a59d 消息渠道的消息支持多语言 2026-03-31 13:49:16 +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
8d393b3b4f 优化web/server模式下的目录选择,现在支持目录树选择,而不是硬文本写入 2026-03-30 14:59:23 +08:00
xintaofei
080a16f26c 支持无GUI的Server运行模式 2026-03-29 18:36:30 +08:00
xintaofei
02266039cf 增强node环境检查 2026-03-28 22:17:50 +08:00
xintaofei
ea77c5b0e8 folder增加项目启动器入口,优化窗口跳转 2026-03-27 15:25:55 +08:00
xintaofei
3b080c801b 优化项目启动器的创建功能 2026-03-27 15:08:53 +08:00
xintaofei
7c89e150f9 初始化项目启动器代码 2026-03-27 13:05:27 +08:00
xintaofei
ac09d3db9e 初始化web服务功能 2026-03-25 14:26:26 +08:00
xintaofei
017b598649 支持在git推送时选择远程源 2026-03-23 16:39:49 +08:00
xintaofei
d9032f1c82 添加git推送窗口,显示待提交列表和查看文件差异 2026-03-21 20:37:19 +08:00
xintaofei
d0655066b6 发送系统通知时携带folder名 2026-03-21 19:14:38 +08:00
xintaofei
a9e0a742ac 集成系统通知,并在Agent响应完成后发出通知 2026-03-21 18:39:28 +08:00
xintaofei
450b081e88 重构git凭证托管,改为操作系统托管 2026-03-21 18:00:05 +08:00
xintaofei
51e9d15c8e 优化终端里的git操作 2026-03-21 16:29:36 +08:00
itpkcn@gmail.com
59327f6e02 增强git凭证处理 2026-03-21 12:01:40 +08:00
itpkcn@gmail.com
62fab2c3f2 设置界面支持版本控制和github账号管理 2026-03-21 11:33:48 +08:00
xintaofei
acbdabe9e4 优化Agent Connect时的agent状态获取 2026-03-17 23:24:07 +08:00
xintaofei
879d96f5a4 彻底删除支持不完整的Agent和相关代码,减轻维护工作量,等后续真正适配好了再加回来 2026-03-17 18:10:31 +08:00
xintaofei
d03be55c6b 增强git贮藏(stash)功能,支持可视化操作 2026-03-15 22:09:05 +08:00
xintaofei
f50484f08c 支持在历史会话中分叉出新会话 2026-03-15 11:44:01 +08:00
xintaofei
2b679b5ba8 优化代码冲突解决 2026-03-14 21:17:26 +08:00
xintaofei
4129f02985 支持git冲突时弹出窗口合并代码解决冲突 2026-03-14 20:55:15 +08:00
xintaofei
f4f70c438a 在文件树上支持右键添加文件和添加目录操作 2026-03-13 23:33:31 +08:00
xintaofei
767d43b0cf 初步支持远程Git管理 2026-03-13 22:55:55 +08:00
xintaofei
4e49e2f16a 修复agent执行命令可能会残留子进程 2026-03-12 09:50:27 +08:00
xintaofei
46b276443b 代码警告消除和优化 2026-03-09 10:05:22 +08:00
xintaofei
5b416bd3bf 修复folder窗口的大小状态未保持上次的位置和状态 2026-03-08 20:40:59 +08:00
xintaofei
7a4cbcb73e 支持在会话输入框直接进行文件/图片的拖拽和粘贴 2026-03-08 10:54:06 +08:00
xintaofei
6c48be023c 欢迎页面支持多语言 2026-03-07 12:17:57 +08:00
xintaofei
934f689b08 初步集成next-intl支持多语言 2026-03-07 10:08:05 +08:00
xggz
54d1097b41 Initial commit 2026-03-06 22:56:13 +08:00