Commit Graph
3397 Commits
Author SHA1 Message Date
陈大猫 2da20e6b2a fix(plugins): preserve plugin tabs on overlay close and harden host surface controls (#4296) 2026-11-23 16:46:40 +08:00
minmie 10b91f607e fix(terminal): prevent mid-composition IME keydowns from duplicating voice input (#4304)
* fix(terminal): prevent mid-composition IME keydowns from duplicating voice input

Ignore sentinel mid-composition keydowns (keyCode 0 or Unidentified/Process/Dead/Compose) so xterm.js does not call _finalizeComposition(false) before voice ITN/AI polish finishes, preserve early synchronous commit state so trailing compositionend emits only the minimal diff, and track the last committed composition text for in-place consecutive rewrites.

* fix(terminal): invalidate early IME diff on terminal-mutating keys and keep tests ASCII-only

Address PR #4304 review feedback:
- Narrow sentinel keydown detection so non-empty keyCode 0 events (e.g. iOS UIKeyInput arrows) are not swallowed.
- Suppress early-sync backspace diffing and follow-up in-place rewrites when a mid-composition keydown can mutate terminal state or move the PTY cursor (such as ArrowLeft or Home).
- Escape CJK test fixtures as \uXXXX in imeCompositionRewrite.test.ts to preserve ASCII-only source files.
2026-11-23 16:44:31 +08:00
陈大猫 b24b458faf fix: fit main windows and vault editor widths on small displays (#4178)
* fix: fit main window startup bounds on small displays

* fix: fit vault editor widths without losing preferences
2026-11-23 16:33:19 +08:00
陈大猫 bbdb946989 fix(sftp): map WSL terminal cwd onto the local Windows file pane (#4212)
* fix(sftp): map WSL terminal cwd onto the local Windows file pane (#4211)

* chore: retrigger CI after plugin-contract runner cancel (#4212)
2026-11-23 16:33:09 +08:00
陈大猫 abd2557356 fix: dev CJS imports, ligatures empty-line cache crash, and AI sidebar UX (#4310)
* fix: resolve dev CJS imports, ligatures empty-line crash, and streamline AI sidebar UX

* fix(ai): ignore nested control keydown events in session manager row
2026-11-23 15:00:06 +08:00
陈大猫 ad3d0cfeda refactor: streamline codebase, unify duplicated modules, and consolidate test suite (#4307)
* refactor: streamline codebase, unify duplicated modules, and consolidate tests

* fix(test): batch discovered test files into Windows-safe command lines
2026-11-23 11:00:14 +08:00
GOUKI9999andbincxz 00e63be4f1 feat(ai): global AI session manager with cross-scope rebind (#4098 phases 4-5) (#4159)
* feat(ai): global AI session manager with cross-scope rebind

Scope-agnostic view over every AI chat regardless of panel scope
(issue #4098 phases 4-5), hosted as a scoped/global toggle inside the
existing session history drawer.

- Global list: title, agent, resolved scope (workspace title / terminal
  label / global / dangling), state badge (active / idle / dissociated),
  message count, relative time; title-substring search, agent filter,
  newest-first ordering and a render batch guard. Titles only, never
  message bodies.
- Per-row actions: open/switch (exact-scope chats only; other-scope rows
  offer rebind instead of faking activation), rebind to the current
  panel (issue #4019 path) or to any open workspace/terminal via an
  explicit target picker, confirm-gated per-record delete, and
  single-chat export (exportSessionsBackup now takes an optional
  session-id subset; import merges by id).
- App-wide open terminals are threaded to every AI panel so the manager
  resolves scopes and rebind targets across tabs.
- Deletion safety: no scopeKey is passed, stale pointers of any panel
  are repaired by the #4125 validation effect; deleting the last chat
  cannot resurrect on reboot (intentionally-deleted ids + migration
  marker). No cleanup/eviction semantics are touched (#4015 R2).

* fix(ai): stop active turns before scope rebind

Rebinding a chat while a turn streams into it corrupts streaming state
(the stream targets the old scope while the active map/panel pointer move
underneath it). Both rebind paths — the global session manager and the
/rebind <n> panel command — now await stopStreamingForSession first,
chosen over rejecting the rebind because it cleanly awaits termination
(stopAgentTurn + waitForActiveTurn) and preserves the user's rebind
intent. stopStreamingForSession moves above the /rebind handler to avoid
a TDZ reference; the guard lives in AIChatSidePanelHelpers so both call
sites share it. Also passes the panel scope host ids to the manager for
the 'This panel' rebind target.

* fix(ai): derive session manager rebind targets from all live terminals

The global AI session manager built its app-wide terminal list from
contextsByTabId, which only covers tabs whose AI panel context is
mounted - a live terminal without one was missing as a rebind target.
useTerminalAiContexts now also exposes buildAllTerminalAiInfos over the
full terminal session store (same buildAITerminalSessionInfo per
session, so infos merge seamlessly where a context exists) and threads
it to AIChatPanelsHost as appTerminalSessions.

* fix(ai): preserve host ids on panel rebind and reset stale agent filters

- 'This panel' rebind now carries the viewing panel's scope host ids
  (currentScopeHostIds) onto the rewritten scope, so the destination
  host association is not orphaned; explicit picker targets already
  forwarded their hostIds.
- The agent filter no longer survives its agent: when the filtered
  agent's last chat is deleted the filter resets to 'all' instead of
  leaving a permanently empty list with a blank select; the select's
  built-in 'all' option stays the manual clear affordance.

* fix(ai): clear source workspace views when rebinding a chat

* fix(ai): demote implicit source views when rebinding restored chats

* fix(ai): stabilize appTerminalInfos identity and polish global session manager UI

- Retain appTerminalInfos array identity across structurally equal terminal updates so unrelated tab state churn does not re-render every mounted AIChatSidePanel.
- Replace native <select> elements in GlobalAIChatSessionManager with the shared Radix Select component for consistent dark/light theme rendering.
- Wrap the disabled cross-scope open button in a <span> inside TooltipTrigger (and add type="button" to row action buttons) so hover tooltips fire reliably.

* fix(ai): carry member host IDs on explicit workspace rebind targets

* fix(ai): remove redundant title beside history drawer scope switcher

* fix(ai): guard optional appTerminalSessions in AIChatPanelsHost

* fix(ai): clear persisted source workspace anchors when rebinding chats

* fix(ai): exclude non-exact workspace matches from implicit auto-resume

---------

Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-22 11:53:02 +08:00
陈大猫 a23868ee88 fix(ai): reject invalid IPv6 External MCP listen addresses in settings (#4295)
Fixes #4293
2026-11-21 19:52:28 +08:00
陈大猫andCodex 6829f9b082 fix(notes): collapse markdown toolbar overflow instead of scrolling (#4294)
Co-authored-by: Codex <codex@openai.com>
2026-11-21 19:52:21 +08:00
陈大猫 519c463048 Merge pull request #4291 from binaricat/fix/4275-retain-configured-default-agent
fix(ai): retain the configured default agent when its probe fails
2026-11-21 17:56:30 +08:00
陈大猫 e185306e50 Merge pull request #4265 from binaricat/fix/3570-folder-partial-pause
fix(sftp): show folder pause failures without resuming siblings
2026-11-21 17:41:32 +08:00
陈大猫 b864bf55b6 fix(ai): retain configured default agent during failed discovery 2026-11-21 17:38:41 +08:00
陈大猫 9c49a07e16 Merge pull request #4290 from binaricat/fix/4262-compose-right-click
fix(terminal): keep composer right-click out of the live terminal
2026-11-21 17:04:47 +08:00
陈大猫 c5a855d885 Merge pull request #4289 from binaricat/fix/4261-rtl-pane-guard-8e86279
fix(terminal): render RTL text without destabilizing WebGL (#4261)
2026-11-21 16:52:50 +08:00
陈大猫 7bbff7ce6e fix(terminal): preserve RTL DOM cell widths and detect astral RTL 2026-11-21 15:49:45 +08:00
陈大猫 57227dfe1b Merge pull request #4288 from binaricat/fix/release-hide-plugin-platform
fix(release): temporarily hide the plugin platform
2026-11-21 15:35:43 +08:00
陈大猫 470628b1a3 fix(terminal): keep composer right-click out of the live terminal
Address the unintended paste described in #4262.
2026-11-21 13:55:51 +08:00
陈大猫 18a9000278 Merge pull request #4225 from binaricat/fix/4224-max-iteration-visible-continue
fix(ai): surface max-iteration stop with a Continue action (Fixes #4224)
2026-11-21 13:41:06 +08:00
陈大猫 8e862798e4 fix(terminal): keep RTL shaping off the WebGL atlas
Preserve the original RTL implementation and keep affected panes on the DOM renderer to avoid an oversized WebGL glyph allocation. Unchanged ASCII panes retain their renderer.
2026-11-21 11:02:05 +08:00
陈大猫 5b9d5351d7 fix(release): hide the plugin platform by default 2026-11-21 10:31:43 +08:00
Serag AhmedandClaude Opus 5.5 112bab7292 fix(terminal): draw RTL text in display order with joined letters
xterm.js has no bidi support and draws every cell on its own, so Arabic,
Persian and Hebrew words came out reversed and Arabic letters unjoined
(#4261).

Register a character joiner that marks the parts of each line the Unicode
Bidirectional Algorithm (bidi-js) puts at a right-to-left or number level
in a left-to-right paragraph. Both the WebGL and DOM renderers draw a
joined range as one string through the browser's text engine, which
orders it, shapes the letters and mirrors brackets. The buffer is
unchanged, so selection, copy, search and cursor positions still use the
logical text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 13:50:08 +03:00
陈大猫 ed9da31034 fix(terminal): keep Shift+Insert as paste when Kitty keyboard is active
Related #4279

When a TUI such as Claude Code enables the Kitty keyboard protocol, Shift+Insert was encoded as an Insert key (CSI 2;2~) instead of pasting. Netcatty always constructs xterm with Kitty support, so this happened even with the user Kitty setting off.

This claims bare Shift+Insert as clipboard paste (the same onPaste path as the paste keybinding) after user/snippet shortcuts and before Kitty/Win32 encoding.

This does not change right-click / context-menu behavior while mouse tracking is active.
2026-11-20 15:53:40 +08:00
GOUKI9999 f987341bf2 fix(ai): preserve saved harness paths on failed probes 2026-11-19 16:20:43 +08:00
陈大猫 5e4195bf7f fix(ui): snap and thicken magnified pane chrome on low-DPR displays (#4270)
Related #4168

On ~1–1.2× displays the 1px rounded accent border around a magnified
pane drops out at the corners, and a box that is not aligned to the
device-pixel grid turns the stroke into a faint, doubled hairline.

Snap the magnified terminal overlay (after the 12px inset) to integer
device pixels, and use a 2px accent stroke when devicePixelRatio is
below 1.5 on both the terminal and side-panel chrome. Higher-DPR
displays keep the existing 1px stroke.
2026-11-18 23:23:21 +08:00
陈大猫 9c292460e3 fix(ai): treat models-list 404 as a warning and send Anthropic Bearer auth (#4269)
* fix(ai): treat models-list 404 as a warning and send Anthropic Bearer on custom bases

Custom OpenAI-compatible gateways that omit a /models listing were
shown as a hard detect failure on HTTP 404. Treat 404 as a warning.
Official Anthropic stays on x-api-key only; custom Anthropic-compat
bases also send Authorization: Bearer so Agent Plan and similar
proxies authenticate.

* fix(ai): use the versioned Ark Agent Plan messages endpoint
2026-11-18 19:21:16 +08:00
陈大猫 450d1df2e7 fix(sftp): keep partial pause feedback consistent across transfer views 2026-11-18 15:07:28 +08:00
陈大猫 3ed22954db fix(sftp): preserve partial folder pause results 2026-11-18 14:44:35 +08:00
陈大猫 8b3832feef fix(notes): keep MDX link dialog inside the editor container (#4258)
MDXEditor portals the link preview toolbar to document.body by default.
Notes stays retained-mounted and is only CSS-hidden, so the toolbar was
left floating over other vault pages and terminal sessions.

Fixes #4257
2026-11-17 14:53:32 +08:00
陈大猫 51cb14955c fix(logs): finalize session logs on quit and pre-connect close (#4236)
* fix(logs): finalize session logs when the app quits without closing tabs

Fixes #4235

* fix(logs): finalize logs when unconnected sessions close

Capture never-connected terminal logs at explicit session removal, including empty buffers, without finalizing logs during runtime remounts. Cover tab close, failed-dialog close, batch close, and workspace close with persistence regressions.

Fixes #4235

* fix(logs): tolerate unavailable finalization IPC

Preserve window close and layout saves when session-log finalization IPC cannot be set up, and clear its timeout on setup failures.

Follow-up for #4235 / PR #4236.
2026-11-14 21:36:08 +08:00
陈大猫 1d5cef09ec fix(settings): index later-added settings in search catalog (Fixes #4230) (#4232)
* fix(settings): index later-added settings in search catalog

Fixes #4230

Follow-up after #4231. Settings search still missed later-added
rows such as Appearance "Code font" (代码字体) and System session
log "Add timestamps" (时间戳), which already rendered in their
tabs. Index those destinations and other visible setting rows
that had the same catalog/anchor omission.

* fix(settings): fall back to visible parent when search target is gated
2026-11-14 21:30:27 +08:00
陈大猫 cf7f998689 fix(ci): prevent plugin-contract lint-and-test hang (#4240) 2026-11-14 20:17:13 +08:00
陈大猫andCodex db3a9e88e2 fix(terminal): cap WebGL contexts for visible split panes (Fixes #4128) (#4239)
The #4122 budget of 12 only released hidden panes, so 17+ visible
splits still crossed Chromium’s 16-context limit and the 50ms
rebuild avalanched into white panes until the DOM breaker tripped.

Refuse new visible contexts when visible holders fill the cap while
preserving recently hidden holders during the tab-flip grace period.
Cover acquisition limits, missed visibility syncs, and recovery at cap.

Co-authored-by: Codex <codex@openai.com>
2026-11-14 18:21:32 +08:00
陈大猫 3096f86889 fix(sftp): use remote cp for fresh same-host copies (Fixes #4207) (#4226)
* fix(sftp): use remote cp for fresh same-host copies (Fixes #4207)

Ordinary SFTP tasks were marked resumable, which skipped the existing file and directory cp optimizations. Select the non-resumable route only when creating fresh matching-host copies with eligible encodings, keeping transfer-center rows and recursive children consistent. Existing checkpointed transfers retain their saved resumable path; failed cp attempts retain the download/upload fallback.

* fix(sftp): skip same-host directory cp when auto encoding resolves to non-UTF-8

* fix(sftp): preserve dest mode when same-host cp replaces a file

* fix(sftp): skip same-host cp for symlinks and directory merges

* test(sftp): mock missing dest in same-host cp cache fixture

* fix(sftp): expose lstat on session-backed copy clients
2026-11-13 17:24:27 +08:00
陈大猫 5cd42cb518 fix(settings): include folder compression in settings search (#4231)
Fixes #4230

Settings search uses a static catalog. The SFTP "Enable folder
compression" row was already in the tab but missing from the catalog
and had no anchor, so queries such as 压缩 showed no matches. Index
that destination, plus the skip-unchanged and SSH keep-alive rows in
the same tab that had the same omission.
2026-11-13 16:30:21 +08:00
陈大猫 f05ea0c9b7 fix(ai): surface max-iteration stop with a Continue action (Fixes #4224) 2026-11-13 12:04:16 +08:00
陈大猫 d536b22dee fix(host-details): show inherited group proxy and jump hosts (#4188)
* fix(host-details): show inherited group proxy and jump hosts

Host editor summaries for HTTP/SOCKS5/command proxy and ProxyJump
chains now display the same values applyGroupDefaults uses at
connect time, without writing inherited settings onto the host
until the user edits them.

Fixes #4187

* fix(host-details): keep custom proxy and empty jump-host overrides

Selecting Custom while a group saved proxy is inherited now keeps a host-owned draft instead of snapping back to that profile. Removing the last hop of a multi-hop inherited chain keeps an empty override so applyGroupDefaults cannot restore the group hops.

* fix(host-details): keep empty override when clearing inherited chain

Clear Chain on an inherited-only jump-host list now stores { hostIds: [] }
instead of deleting the field so group hops cannot snap back.
2026-11-08 21:30:36 +08:00
陈大猫 74d5e126d4 fix(system-manager): show all CPU cores in the overview list (#4184)
* fix(system-manager): show all CPU cores in the overview list

The overview CPU card hardcoded cpuPerCore.slice(0, 12), so a 16-thread
host showed "16 核" at the top but only C1–C12 below. Render every
reported core and allow the list to scroll when it overflows.

Fixes #4183

* ci: retrigger lint-and-test after plugin-contract runner shutdown
2026-11-08 12:59:27 +08:00
jinshenganyuciandbincxz 4a55492c17 feat(sftp): create archives from the context menu (#3936)
Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-07 20:44:49 +08:00
rnarany 51d9f715da feat(autocomplete): localize common commands and polish terminal hints (#4172)
* feat(autocomplete): add zh-CN descriptions for zip, unzip, make, nano

Cover 32 missing Fig descriptions, generate zh-TW, add batch coverage tests, and record source and semantic checks.

* fix(autocomplete): correct zip, unzip, and make semantics

Limit zip -9 to the compression level, warn that unzip -0 is a suspect upstream option, and describe make -N as the Apple/NeXT compatibility extension.

* fix(autocomplete): simplify unzip -0 warning and correct NeXT note

Keep the -O gbk version caveat in the research record and describe Next/NeXT as a capitalization difference.

* feat(autocomplete): complete remaining common command descriptions

Add 177 zh-CN descriptions for python, python3, node, vim, sort, awk, and sed; generate zh-TW, cover the batch with real Fig specs, and record one deferred shared node key.

* fix(autocomplete): correct sed n and sort parallel semantics

Add the automatic-print condition to sed n, remove the universal CPU default from sort --parallel, and remove duplicated adopted-entry sections from the source record.

* fix: repair macOS terminal setup and align autocomplete details

- Read OSC 7 setup payloads through base64 stdin so BSD/macOS works
- Keep the FIDO askpass socket path within the Unix sun_path limit
- Align autocomplete descriptions in a shared fixed column
- Fix an invalid optional-parameter declaration and lint warnings
- Harden macOS-sensitive OSC 7, SFTP, temp-dir and privacy tests

* feat(autocomplete): add zh-CN descriptions for file and text utilities

Cover ln, stat, wc, cut, uniq, tee and xargs with 70 localized
descriptions. Add coverage and localization tests, preload the new common
specs, and record the upstream wc/xargs wording corrections.

* fix(autocomplete): keep popup scrollbars draggable

Panel mousedown handlers no longer preventDefault across the whole box, so the right-side detail scrollbar and the suggestion list scrollbar can be dragged while padding clicks still preserve terminal focus.

* fix(autocomplete): keep detail panel open while selecting text

Delay row hover clearing so the pointer can move into the right-side detail panel, and allow native text selection there without stealing terminal focus on ordinary padding clicks.
2026-11-07 20:00:43 +08:00
bincxz 3622d482a4 perf(workspace): keep pane drop callbacks stable across tab switches 2026-11-07 19:34:58 +08:00
bincxz c1c5787cab fix(workspace): preserve resumed history when the last member closes 2026-11-07 19:17:55 +08:00
bincxz 419a6734fc Merge remote-tracking branch 'origin/main' into codex/preview-pr4158 2026-11-07 19:14:13 +08:00
bincxz b2be70aae7 fix(workspace): align empty state icon with workspace tabs 2026-11-07 19:02:56 +08:00
bincxz 9491b800b6 fix(workspace): retain displayed chat through final member close 2026-11-07 18:52:11 +08:00
bincxz 3c36e7e1a2 fix(workspace): prevent hidden pane moves while magnified 2026-11-07 18:32:49 +08:00
bincxz 22856a368a fix(workspace): guard stale drops and preserve chat scope priority 2026-11-07 18:18:38 +08:00
bincxz 4ed3d09c7a fix(workspace): complete pane dragging and empty workspace recovery 2026-11-07 16:08:00 +08:00
945722fbe8 fix(ai): place host_open tabs in the invoking chat's bound workspace (#4156)
* fix(ai): place host_open tabs in the invoking chat's bound workspace

* fix(ai): sync generated host open workspace guidance

* fix(ai): preserve invoking turn scope for resumed chats

---------

Co-authored-by: GOUKI9999 <GOUKI9999@users.noreply.github.com>
Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-07 15:41:46 +08:00
陈大猫 77f90999c7 fix(ui): accent border for terminal pane magnification (#4171)
* fix(ui): accent border for terminal pane magnification

* chore: retrigger CI after Actions runner shutdown flake

lint-and-test was cancelled mid-run by runner shutdown (not a product failure) on 42326458479 and 42328660175.
2026-11-07 10:44:59 +08:00
Mateus A.M Ferreiraandbincxz a62cc1bd3f feat(sftp): add a one-click Duplicate action for files and folders (#4133)
* feat(sftp): add a one-click Duplicate action for files and folders

Duplicate copies the selected entries next to their originals in the same
folder, covering files, folders, and multi-selection. It reuses the existing
transfer queue and the transfer pipeline's "(copy)" naming helper, so progress,
cancel, and error reporting behave like Copy to other pane.

The target name is resolved before the transfer starts. Resolving through the
batch conflict defaults instead would re-enter processTransfer for a task that
is still marked in flight and stall the copy.

Adds the action to both the list and tree context menus, plus translations for
en, es, ru, zh-CN, and zh-TW.

Closes #4132

* fix(sftp): keep Duplicate safe around navigation rows and reserved names

Hide and ignore the tree's synthetic ".." row: duplicating it resolved the
source to an ancestor directory and could walk the copy into its own output.
The transfer hook also drops "." / ".." inputs for duplicate batches, and the
same-pane handler filters them defensively.

Pick duplicate names around destinations already reserved by a queued or paused
transfer. Those rows have no file on disk yet, so stat-only naming returned the
same "(copy)" path and the follow-up active-path check turned the second
one-click duplicate into a conflict dialog. The naming helper now accepts an
occupied-path predicate fed from the active transfer set.

* fix(sftp): block stale entry menus on parent navigation

---------

Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-07 10:07:08 +08:00