Commit Graph

29 Commits

Author SHA1 Message Date
xintaofei
d9323d7399 refactor(workspace): migrate from per-folder windows to single-window workspace
Replace the legacy folder + welcome routes with a unified /workspace route
that hosts all folders, conversations, tabs, and terminals in one window.

- Persist opened tabs to the database (opened_tabs entity + migration)
  so tab layout survives restarts and deep-link bootstrap restores state
- Replace FolderContext shim with AppWorkspaceProvider, ActiveFolderProvider,
  and TabProvider; expose both opened (folders) and full DB (allFolders)
  listings via list_all_folder_details
- Return conversations across all non-deleted folders from list_all when
  no folder filter is given, so the sidebar can show every folder's history
- Add ConversationContextBar above the chat input with folder picker
  (auto-opens unopened folders on select), branch picker, and commit /
  push / merge / stash entries to restore BranchDropdown functionality
- Rework sidebar with stats header, search, flat / folder-grouped view
  modes (localStorage-persisted), reveal-in-sidebar event subscriber,
  and per-folder context menu (focus, close tabs, remove from workspace);
  indent conversations under folder headers in grouped mode
- Gate terminal creation on active folder and show folder context
- Remove deprecated BranchDropdown, FolderNameDropdown, welcome route,
  and per-folder window commands
- Localize all new strings across 10 locales
2026-04-20 21:22:36 +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
a763adaf36 feat: stream real-time progress for agent SDK install/upgrade/uninstall
Replace the spinner-only UX with live log output during agent SDK
operations, matching the existing OpenCode plugin install experience.

Backend: emit structured events (started/log/completed/failed) via
EventEmitter during npm install and binary download. npm commands now
run with piped stdio for line-by-line streaming; binary downloads
report chunked progress every 1 MB.

Frontend: subscribe to `app://agent-install` events through a new
`useAgentInstallStream` hook and render a theme-aware log terminal
below the preflight checks panel.

Also fixes the install log container in both agent settings and the
OpenCode plugins modal: auto-scroll no longer shifts the outer page,
and colours now follow the active light/dark theme.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 21:43:54 +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
b2d10fa008 optimize: terminal spawn lifecycle to eliminate output race condition
Move PTY spawn from context layer to view layer so event subscription
happens before spawn, preventing loss of initial terminal output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 13:55:38 +08:00
xintaofei
8d393b3b4f 优化web/server模式下的目录选择,现在支持目录树选择,而不是硬文本写入 2026-03-30 14:59:23 +08:00
xintaofei
6067d5f9c4 修复git未跟踪文件目录显示不全 2026-03-24 10:05:36 +08:00
xintaofei
017b598649 支持在git推送时选择远程源 2026-03-23 16:39:49 +08:00
xintaofei
b010ef071d 修复本地新创建的分支无法推送到远程 2026-03-23 16:09:18 +08:00
xintaofei
d9032f1c82 添加git推送窗口,显示待提交列表和查看文件差异 2026-03-21 20:37:19 +08:00
xintaofei
32d922a346 修复lint问题 2026-03-21 18:06:59 +08:00
xintaofei
450b081e88 重构git凭证托管,改为操作系统托管 2026-03-21 18:00:05 +08:00
itpkcn@gmail.com
aaad19adb5 支持实时处理Git凭证 2026-03-21 13:20:46 +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
acbdabe9e4 优化Agent Connect时的agent状态获取 2026-03-17 23:24: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
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
7a4cbcb73e 支持在会话输入框直接进行文件/图片的拖拽和粘贴 2026-03-08 10:54:06 +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