Commit Graph

144 Commits

Author SHA1 Message Date
3c0d98f4cc add: 增加任务完成的提示音 2026-04-26 13:10:14 +08:00
xintaofei
f0bd2a28a2 feat(settings): add Windows toggle to disable WebView2 hardware acceleration 2026-04-25 11:57:35 +08:00
xintaofei
230539233a fix(sidebar): clarify empty state when completed conversations are hidden 2026-04-24 22:42:30 +08:00
xintaofei
0e09711e56 feat(codex-skills): surface built-in .system skills as read-only
Scan ~/.codex/skills/.system so Codex CLI's bundled skills (imagegen,
skill-creator, etc.) appear in the $ autocomplete and Skills settings.
Mark them read_only on the API; the save/delete handlers refuse writes
to that path, and the UI shows a system badge with a tooltip and
disables edit/delete/save for those entries.
2026-04-24 14:18:36 +08:00
xintaofei
7caf730369 feat(message-input): turn plus button into menu with attach files and quick messages 2026-04-24 11:07:56 +08:00
xintaofei
61778f152b feat(settings): add quick messages management with drag-and-drop sorting
Adds a new "Quick Messages" settings page below Experts for managing reusable title/content snippets, backed by SQLite via SeaORM and exposed through both Tauri commands and the Axum web router. The list supports drag-to-reorder using the same motion/react Reorder pattern as the agent list, with translations provided across all 10 supported locales.
2026-04-24 10:46:33 +08:00
xintaofei
1eeb5041a8 feat(sidebar): add per-folder color swatch with picker and neutral conversation rail
- Add `color` column to folder table with migration backfill and hash-based assignment on folder creation
- Expose `update_folder_color` via Tauri command and `/update_folder_color` HTTP route
- Render a color swatch before each folder name in the sidebar header; offer a 10-color palette (9 hues plus a theme-aware foreground sentinel) through the folder context menu
- Show the folder header "new conversation" button only on hover
- Drop the expanded-state tint on folder name and count badge; use a fixed neutral rail color for conversation items
2026-04-23 23:02:58 +08:00
xintaofei
1dd40d0baf feat(conversation-context-bar): show descriptive tooltips for folder and branch selectors 2026-04-23 15:21:18 +08:00
xintaofei
ba7f3c598b fix(branch-dropdown): show "No branch" label when folder is not a git repository 2026-04-23 15:12:46 +08:00
xintaofei
7aec93e922 feat(search-dialog): show active folder in search popup header 2026-04-23 14:11:54 +08:00
xintaofei
50c5b12d53 refactor(branch-dropdown): drop worktree parent-branch merge shortcut
Remove the parent-branch button shown beside the branch selector along
with its supporting API, command, service, model, and i18n strings.
Add migration m20260423 to drop the now-unused folder.parent_branch
column.
2026-04-23 14:02:46 +08:00
xintaofei
f1ce7179ea feat(sidebar): reorder folder groups by drag and persist sort order 2026-04-23 00:42:58 +08:00
xintaofei
5ac9cee2ff feat(sidebar): add conversation sort mode toggle with created-time default 2026-04-22 22:34:23 +08:00
xintaofei
4440249678 refactor(conversation-context-bar): slim folder and branch pickers to selection only
- Match popover corner styling of folder picker with branch picker
- Drop 'open folder from disk' entry from folder picker
- Drop 'new branch' entry and dialog from branch picker
2026-04-22 19:30:58 +08:00
xintaofei
c691fb0c07 feat(workspace): add no-folder empty states and gate folder-only actions
- Sidebar: replace the "no conversations" placeholder with Open Folder, Clone Repository, and Project Boot buttons when the workspace has no open folders.
- Title bar: disable the terminal and auxiliary-panel toggle buttons while no folder is active.
- Aux panel: show a shared localized "no folder open" prompt in the file tree, git changes, and git log tabs when no folder is active.
- Add auxPanel.noFolderTitle / noFolderHint translations across all ten supported locales.
2026-04-22 10:36:27 +08:00
xintaofei
14fb231dcc feat(sidebar): add conversation management dialog with filtering and bulk actions 2026-04-22 09:31:38 +08:00
xintaofei
ae88b2256f refactor(sidebar): scope folder-header menu to per-folder new/import, drop import from card and blank-area menus 2026-04-22 08:16:39 +08:00
xintaofei
f3bdf94723 feat(title-bar): add folder-actions menu and branch dropdown with git operations 2026-04-22 00:23:27 +08:00
xintaofei
08fb508736 refactor(branch-picker): fix popover corner radius, remove local branch delete, move new-branch to top 2026-04-21 23:14:57 +08:00
xintaofei
67c837901d refactor(workspace): remove welcome page and render conversation panel directly 2026-04-21 22:52:07 +08:00
xintaofei
dd2b542df9 refactor(tabs): remove close-folder-tabs and reveal-in-sidebar menu items 2026-04-21 22:14:19 +08:00
xintaofei
f0d530e1cb refactor(sidebar): streamline conversation list with completed filter and expand toggle
Replace flat/grouped view toggle with a show-completed filter dropdown,
add expand/collapse-all control, extract status icon component, and
simplify the sidebar header.
2026-04-21 17:07:40 +08:00
xintaofei
58b48e2bfe Merge branch 'main' into one-folder 2026-04-21 09:27:55 +08:00
xintaofei
98792a696c feat(message-input): add search box to slash-command popups
Both the inline autocomplete (triggered by `/` in the textarea) and the
dropdown popup (triggered by the slash-command button) now show a search
field at the top. Matching uses substring on name and description, and
ranks name matches above description/id-only matches.
2026-04-21 00:26:00 +08:00
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
b2ca2c2eb1 refactor(git-error): drop locale-specific not-a-repo patterns
Child processes now have LANG/LC_ALL pinned to C.UTF-8 on every
platform, so git stderr is always English when it leaks past the
typed not_a_git_repository preflight. The 8 non-English regex
fallbacks were dead code; keep only the English pattern as a
belt-and-suspenders fallback for un-preflighted commands.
2026-04-19 06:53:20 +08:00
xintaofei
cc79d62b27 fix(git): surface non-git-repo as a typed error and align all panels via workspace state
Consolidate `.git` presence detection into a shared `git_repo` module used by both the workspace state watcher and the command preflight helper, replacing duplicated local definitions.

Introduce `AppErrorCode::NotAGitRepository` (HTTP 422) and preflight eleven frontend-callable git commands (log, status, list-branches, diff, diff-with-branch, show-diff, show-file, push-info, list-remotes, list-all-branches, commit-branches) so non-git folders short-circuit with a structured error instead of leaking locale-dependent git stderr.

Frontend `isNotAGitRepoError` checks the error code first and falls back to a multi-language regex list centralized in `src/i18n/git-error-patterns.ts`, covering the nine languages git actually translates into.

Wire the git log panel to `workspaceState.isGitRepo` rather than a local cached flag, so running `git init` or deleting `.git` externally propagates through the watcher and refreshes the panel automatically.
2026-04-18 23:07:13 +08:00
xintaofei
07ef376438 refactor(message): shrink agent card max height and localize running indicator with spinner 2026-04-18 18:43:04 +08:00
xintaofei
7ef8d84d44 fix(workspace-state): stop resync loop on non-git folders and allow retry for degraded watcher
Gate git refresh on .git presence so file churn in non-git workspaces no longer produces endless resync_hint events, and silently log tree/git refresh errors during watch flushing instead of flagging requires_resync, which turned transient failures into self-reinforcing loops.

Degrade gracefully when the filesystem watcher fails to attach (e.g. permission denied, inotify quota): keep the initial snapshot, surface a degraded flag, and expose a store-level restart that the banner uses to retry attachment after the root cause is fixed.

Propagate is_git_repo through the snapshot so the git log and changes tabs render a dedicated "Not a Git repository" empty state instead of raw git stderr with a useless retry button.

Stop polling get_git_branch from the title bar once it returns null and re-arm on visibility change.

Add translations for the new banner, empty-state, and retry keys across all ten locales.
2026-04-18 17:18:11 +08:00
xintaofei
fd10494128 feat(web-service): allow custom access token with persisted port and localized start errors
- Persist user-supplied access token and last-used port in app_metadata, falling back to defaults when unset
- Atomically guard concurrent starts via compare_exchange with RAII rollback of the running flag
- Wrap token and port persistence in a single SeaORM transaction to prevent partial writes
- Classify bind errors (port in use, permission denied, address unavailable, invalid address) into stable i18n keys
- Localize start-failure messages across all 10 supported languages
2026-04-18 10:18:34 +08:00
xintaofei
32b4c88582 feat(conversation): add copy text context menu action with preserved selection 2026-04-17 23:20:01 +08:00
xintaofei
5bb4c1cb1e feat(chat-channel): annotate Weixin channel badge with iLink reconnect hint tooltip 2026-04-17 21:52:43 +08:00
xintaofei
4f41a217c4 feat(settings): add xhigh reasoning effort level and update Claude Code model placeholders to claude-opus-4.7 2026-04-17 08:31:38 +08:00
xintaofei
9f82fdf350 feat(ui): add dedicated Agent subagent rendering with nested tool call display
Render Agent/Explore/Plan tool calls in a visually distinct collapsible
container with colored left border, replacing the generic tool card. Parse
subagent JSONL transcripts from {sessionId}/subagents/ to extract and
display the actual tool calls (Bash, Read, Grep, etc.) the subagent
executed, reusing the existing ToolCallPart for consistent appearance.

- Add AgentToolCallPart component with collapsible body, prompt section,
  execution stats, and nested tool call list via render prop injection
- Add AgentExecutionStats and AgentToolCall types (Rust + TypeScript)
- Parse toolUseResult.agentId to locate and read subagent JSONL files
- Validate agentId against path traversal before filesystem access
- Pass agentStats through adapter for both ID-matched and positional
  tool result pairing
- Strip agentStats in nested render to prevent recursive Agent expansion
- Add i18n keys for agent UI labels across all 10 languages
2026-04-16 21:32:25 +08:00
xintaofei
4abc198f44 Merge remote-tracking branch 'origin/main' 2026-04-16 09:40:31 +08:00
xintaofei
04eff14c0d fix(settings): remove ineffective max reasoning effort level for Claude Code
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 09:39:47 +08:00
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
2da2378ae3 feat(settings): add reasoning effort level for Claude Code
Add an Effort Level dropdown under the Claude Code model inputs with
options Low / Medium / High / Max (Opus only). The selection writes an
"effortLevel" key at the root of the Claude Code config JSON, and is
removed when the default is chosen. Manual edits to the native JSON
textarea stay in sync with the dropdown.
2026-04-15 16:38:39 +08:00
xintaofei
b46db2f1a1 feat(settings): add Enable Fast toggle for Codex service tier 2026-04-15 15:29:17 +08:00
xintaofei
a6f80088d0 feat(skills): support folder-scoped skills in agent sessions
- Thread workspace path through useAgentSkills so Codex $-autocomplete
  surfaces folder-local skills in addition to global ones; cache keyed
  by agent + workspace and invalidated per key on focus.
- Add Global/Folder scope tabs and a folder picker (sourced from the
  folder table via loadFolderHistory) to the Skills settings page.
  CRUD for skills now operates against the selected scope and folder.
- Default the settings right panel to a placeholder hint; the new-skill
  form only appears after clicking "New Skill" or selecting an existing
  skill. Search input is hidden in folder scope.
- Disable "New Skill" when folder scope has no folder chosen; show a
  pick-folder hint in the path preview for that state.
- Add scope/noSelectionHint/pickFolderHint strings across 10 locales.
2026-04-15 14:56:53 +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
66549ce2f7 feat(folder): add Add to session actions in changes menus
Add the Add to session context action for tracked and untracked nodes in the Changes panel, including root, directory, and file entries.

Reorder Changes context actions so Add to session is placed below View diff, and Rollback is placed below Add to VCS.

Update attachToCurrentSession translations to the Add to session wording across all supported locales.
2026-04-15 09:54:07 +08:00
xintaofei
f9923df1fe feat(acp): surface Claude API retry state in chat input
Enable raw Claude SDK forwarding for ACP sessions and emit only system/api_retry events to the frontend.

Show a localized single-line retry banner with loading under the conversation input, including error details and retry progress.
2026-04-14 14:59:32 +08:00
xintaofei
0a39e1daf4 fix(windows): normalize Windows file paths with leading slash and add i18n to link safety dialog
Strip spurious leading slash from Windows drive-letter paths (/D:/foo → D:/foo) in parseLocalFileTarget so that workspace-relative comparison succeeds and local files can be opened correctly. Display the normalized path in the confirmation dialog. Internationalize all link safety dialog and toast strings across 10 locales.
2026-04-13 22:47:14 +08:00
xintaofei
6ebfa2b744 fix(i18n): add ellipsis to reasoning thinking label across all locales
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 12:08:51 +08:00
xintaofei
1554425b03 feat: show real-time download progress bar for app updates
Leverage the Tauri updater plugin's DownloadEvent callback to display
a progress bar with downloaded/total bytes during app updates, replacing
the previous spinner-only feedback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 22:01:46 +08:00
xintaofei
023e4c5514 fix(acp): pin @latest for all plugins and enable button when only floating versions exist
- install_missing_plugins now pins ALL @latest specs (not just newly installed)
- When nothing is missing but @latest exists, the pin-only path runs
- Modal button switches to 'Pin @latest Versions' when no missing plugins
- Added pinVersions i18n key for 10 languages
2026-04-12 11:56:55 +08:00
xintaofei
6d035101c6 feat(i18n): add opencode plugin management translations for 10 languages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 10:53:44 +08:00
xintaofei
6da3a6cc34 feat(frontend): add OpencodePluginsModal component
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 10:40:50 +08:00
xintaofei
1c1738298b fix(acp): harden session-page connection and localize backend errors
- Session-page connect never triggers download/install; returns
  SdkNotInstalled immediately and prompts the user to install from
  Agent Settings instead
- Binary agents now accept any cached version via
  find_best_cached_binary_for_agent so stale caches still connect
- Bound Initialize handshake with a 60s timeout and convert it to
  AcpError::InitializeTimeout via a sentinel in run_connection
- Spawn background task owns ConnectionManager map insertion and
  removes the entry on exit through an RAII guard that survives
  panics, preventing leaked stale entries
- AcpError gains SdkNotInstalled and InitializeTimeout variants plus
  a stable code() identifier; AcpEvent::Error carries code so the
  frontend can render localized messages by key
- Frontend preflight now runs for all connect sources; error event
  handler switches on code to show translated text for
  initialize_timeout, sdk_not_installed, platform_not_supported,
  process_exited, spawn_failed and download_failed
- Remove ConnectionStatus::Downloading enum variant, all frontend
  branches, and i18n strings; drop obsolete autoLinkFailedTitle,
  autoLinkPreflightFailed, preflightCheckFailedDefault and
  preflightFailedTitle keys across 10 locales
- Add backendErrors.* translations in 10 languages
- Diagnostic logging: always log agent stderr plus binary
  path/size/args/env keys and Initialize timing; gate stdin/stdout
  JSON-RPC tracing behind CODEG_ACP_DEBUG to avoid persisting user
  content into OS log files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 03:36:08 +08:00