Commit Graph
3424 Commits
Author SHA1 Message Date
陈大猫 ed90d61014 fix(terminal): cap ligature joiner span to avoid WebGL 16384px overflow atlas spike (#4063) (#4358) 2026-11-25 19:02:59 +08:00
GOUKI9999 d066f1f082 fix(tabs): honor disabled double-click on workspace tabs (#4355) 2026-11-25 17:34:32 +08:00
陈大猫 b64c36fd40 feat(ui): inline compose directory picker and streamline AI session history UX (#4356)
* feat(ui): inline compose directory picker and streamline AI session history UX

* fix(ai): exclude workspace members and hidden terminals from active-elsewhere jump targets

* fix(ai): clear non-AI magnification overlay when jumping to an active chat tab
2026-11-25 17:29:32 +08:00
Joseph Hau 403c690061 feat(terminal): support Directory Picker in Windows CMD (#4343)
* feat(terminal): support Directory Picker in Windows CMD

* fix: show CMD-specific directory integration status
2026-11-25 15:52:30 +08:00
陈大猫 5a1352aab0 feat(sftp): insert file path or cd into paired terminal from SFTP context menu (#4323)
* feat(sftp): insert file path or cd into paired terminal from SFTP context menu

* fix(sftp): guard terminal path insertion against unclosed quote contexts

* fix(sftp): reject trailing dollar fusion and after-cursor command text

* fix(terminal): detect standard root-directory shell prompts (user@host:/$) for SFTP path injection

* fix(sftp): reject arithmetic insertion contexts and continuation-prompt cd

* fix(terminal): ignore right-aligned prompt decorations in after-cursor readiness check

* fix(sftp): resolve remote shell dialect from prompt/OS and use portable Unix quoting

* fix(terminal): require unwritten xterm gap cells before ignoring right-prompt decorations
2026-11-25 12:02:41 +08:00
陈大猫 a9cf94aeba feat(sftp): add back and forward directory history navigation (#4324)
* feat(sftp): add back and forward directory history navigation

* fix(sftp): preserve pending nav history transition on mid-flight refresh
2026-11-25 11:26:13 +08:00
陈大猫 196132621c feat(ai): make tool call output truncation limit configurable in AI settings (#4328) 2026-11-25 11:25:00 +08:00
陈大猫 0098f2e670 feat(terminal): keep compose bar right-click isolated and allow reordering pinned snippets (#4327) 2026-11-25 11:22:00 +08:00
陈大猫 730c8cad59 feat(portforward): use capped exponential backoff instead of giving up after 15s (#4322) 2026-11-25 11:20:42 +08:00
陈大猫 10ad09fe34 feat(sftp): skip auto-opening SFTP side panel for network devices (#4321) 2026-11-25 10:44:22 +08:00
陈大猫 040aec53b2 feat(ai): tint user message bubbles with theme accent for clearer turn separation (#4317)
* feat(ai): tint user message bubbles with theme accent for clearer turn separation

* fix(css): wrap global border-color reset in @layer base so user bubble border-primary utilities apply
2026-11-25 10:37:12 +08:00
陈大猫 2bf8611919 feat(local-terminal): support optional startup command on local terminal hosts (#4326)
* feat(local-terminal): support optional startup command on local terminal hosts

* fix(local-terminal): validate saved local launch target before overlaying startup command
2026-11-25 10:26:36 +08:00
陈大猫 1d53af5a51 feat(ui): improve selected protocol contrast in new connection form (#4319) 2026-11-25 10:07:40 +08:00
陈大猫 50dbb5cb5f fix: prefill saved password on SSH auth retry after MFA failure (#4350)
Fixes #4346

Prefill the saved host password in the SSH credential retry dialog after a target authentication failure, instead of clearing the field.

Linux Electron smoke PASS on 20b0ad946b:
/workspace/netcatty-smoke-shots/pr-4350-20b0ad946-20261125-095752
GitHub Codex CLEAN; CI 45524469003 green.
2026-11-25 10:01:44 +08:00
陈大猫andCodex 30e9609b1b fix(terminal): preserve pane geometry through zoom and restore (#4337)
* fix(terminal): preserve pane geometry through zoom and restore

* fix(terminal): resolve percentage pane restore geometry

* fix(terminal): resolve percentage pane zoom-entry geometry

---------

Co-authored-by: Codex <codex@openai.com>
2026-11-24 14:08:32 +08:00
jinshenganyuciandbincxz 6527d5596f feat(sftp): stream packed downloads and restore folders locally (#4179)
* feat(sftp): stream packed downloads and restore selected folders locally

* fix(sftp): address packed download lifecycle and cleanup review

* fix(sftp): preserve live packed state across window reload and fall back on POSIX special child names

* fix(sftp): guard active-packed snapshot replay race and fall back on selected root symlinks

* fix(sftp): fall back before nested-link containment check for selected root symlinks

---------

Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-24 10:52:54 +08:00
GOUKI9999andbincxz a791d0b8c4 feat(terminal): configure SSH reconnect interval from 5 to 3600 seconds (#4039)
* feat(terminal): make SSH reconnect interval configurable

* fix(terminal): read latest reconnect settings via ref on session exit

* fix(terminal): pause connection timeout while waiting for auto-reconnect

---------

Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-24 10:52:25 +08:00
KenX049andbincxz bcce829294 feat(tabs): move a tab to its own window without reconnecting (#4202)
* feat(tabs): move a tab to its own window without reconnecting (#4201)

Adds "Move Tab to New Window" to the tab context menu. Instead of opening
a new connection like "Copy Tab to New Window", the tab is hidden from the
tab bar and an attach popup takes over the same live PTY, so bastion
sessions are not re-authenticated and no extra seat is used. Closing the
popup returns the tab (with its screen state) to the window it came from.

- popup lifecycle notifies the home window via terminal-popup:attach-closed
- new runtime poppedOut flag; popped-out tabs still persist for restore and
  are not labelled as AI silent sessions in the tray

* fix(tabs): keep moved tabs alive when their source window closes

- A moved-tab popup registers as the lifetime heir of its session. If the
  source window is destroyed, ownership passes to the popup instead of the
  session being closed (worker and in-process paths). AI observe popups are
  unchanged.
- If the source window is gone when the popup closes, skip the hand-back so
  the popup's ownership closes the session.
- Only offer/allow Move Tab to New Window for connected sessions; attach
  mode cannot connect or reconnect a backend.

* fix(tabs): expose Move Tab to New Window through TerminalHost

The handler was registered but not passed into the terminal domain bag,
so AppView received undefined and the menu item never rendered.

* fix(tabs): address move-to-window focus, crash ownership, live count, history, and AI context review findings

* fix(tabs): activate moved-tab lifetime heir only after output rebind succeeds

* fix(tabs): wait for popup attachment before hiding tab and exclude plugin sessions

* fix(tabs): confirm renderer reattach before resolving move and await output restore before unhiding tab

* fix(tabs): preserve detached output across popup crashes and avoid focusing main window from tray

* fix(tabs): deliver attach snapshots and output restore directly to peer session windows

* fix(tabs): schedule automatic output restore retries when popup recovery fails

* fix(tabs): handle reopen replay preservation, stale restore cancellation, startup workspace move, and shutdown log capture

* fix(tabs): reassert popped-out state after tray reopen

* test(terminal): provide log finalizer stubs in popup snapshot harness

---------

Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-24 10:50:36 +08:00
6cdf6b836b feat(terminal): show live jump hosts and fix AI prompt readiness (#4316)
* feat(terminal): extract hostnames from shell prompts

* fix(ai): accept decorated two-line shell prompts

* feat(tabs): add prompt-host title presentation

* feat(session): track prompt-host transitions

* feat(terminal): publish live prompt hostnames to tabs

* fix(session): include prompt host action in publisher runtime

* fix(ai): accept redrawn JumpServer shell prompts

* fix(tabs): prefer live prompt host behind user labels

* build(windows): normalize cross-built native modules

* fix(build): avoid config lint global shadowing

* fix(session): constrain live prompt hostname parsing

* fix(tabs): refresh workspace labels from live prompt hosts

* build(windows): validate cross-built native payloads

* fix(session): cover strict zsh and jump host prompts

* test(tabs): type live workspace prompt fixtures

* build(windows): scan packed native modules safely

* build(windows): add explicit cross-build script

* build(windows): make cross packaging self-contained

* fix(terminal): address review findings on JumpServer prompts and Windows cross-pack

* fix(windows): preserve child-process detection in cross-built packages

* fix(windows): require patched conpty.node during cross-packaging

---------

Co-authored-by: zjio26 <zjao2026@outlook.com>
Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-24 10:50:25 +08:00
182531d7a7 feat(terminal): support Directory Picker in Windows PowerShell (#4177)
* feat(terminal): support Directory Picker in Windows PowerShell

* fix(terminal): handle qualified PowerShell paths and CI fixtures

* test(plugins): await dialog focus restoration in log settings

* test(terminal): normalize Windows fixture paths with native realpath

* fix(terminal): retry stale listings and recognize spaced UNC shares

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-24 10:50:14 +08:00
GOUKI9999andbincxz abd074fe95 fix(ai): refresh stale runtime model catalogs on use (#4263)
* fix(ai): refresh stale runtime model catalogs on use

* fix(ai): check model catalog freshness on picker open

* fix(ai): preserve saved rows on current-only stale catalog revalidation

* fix(ai): skip Cursor CLI probes on cacheOnly and warm model catalog checks

* fix(ai): keep cacheOnly model hydration non-blocking and restart-safe

* fix(ai): persist exact alias keys for cacheOnly hydration and reconcile warnings

* fix(ai): add backward-compatible pre-alias v1 catalog resolution for cacheOnly

* fix(ai): track alias migration per entry and consult Cursor alias before probing

* fix(ai): resolve pre-alias catalogs asynchronously by exact binary and allow missing CLI on cacheOnly

* fix(ai): preserve saved models for missing CLI and persist joined aliases after load

* fix(ai): reuse saved alias when bare CLI disappears from PATH

* fix(ai): alias env-configured CLI paths and adopt valid model on picker revalidation

* fix(ai): reprobe moved Cursor CLI on stale revalidation instead of pinning stale alias

* fix(ai): preserve PATH fallback when env-configured CLI path is invalid

---------

Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-24 10:50:03 +08:00
陈大猫andCodex fedab5ec3b fix(settings): draw a border on frameless settings windows (#4333)
* fix(settings): draw a border on frameless settings windows

* chore: retrigger CI after unrelated compressUploadBridge flake

---------

Co-authored-by: Codex <codex@openai.com>
2026-11-23 21:47:09 +08:00
rnaranyandClaude Code 2ddb6f2bee feat(autocomplete): localize batch-4 descriptions and select Fig specs per target OS (#4180)
* feat(autocomplete): add zh-CN descriptions for small-gap utilities

Localize the remaining Fig descriptions of 22 general-purpose commands that
had 15 or fewer untranslated keys: echo, which, paste, pwd, clear, su,
crontab, env, uname, base64, date, id, split, seq, join, dig, dd, htop,
basename, dirname, readlink, and more.

- Add 159 unique zh-CN entries (160 per-command entries; basename and
  dirname share one key) and regenerate zh-TW from them.
- Preload the new specs and extend the untranslated-description audit and
  its preload assertions.
- Add batch 4 coverage, semantics, insertion-text and zh-TW terminology
  tests plus the batch research note.
- Keep upstream wording quirks documented instead of hidden: dig labels NS
  as "Query MX Record", readlink reuses stat wording, and date/su/env follow
  the BSD/macOS flags their specs actually expose.

* fix(autocomplete): align uname and dd wording with GNU output

Review the batch 4 commands against jaywcjlove/linux-command (MIT), which
Netcatty's Linux-centric sessions match better than the bundled Fig wording.

- uname -s/-r/-v now say kernel name/release/version: GNU uname prints the
  kernel, not the distribution, and macOS reports Darwin through the same
  options.
- dd cbs states the conversion record is counted in bytes.
- Document which specs in this batch expose BSD/macOS-only options (date, su,
  id, base64, split, seq, env, more, which) so their descriptions are not
  rewritten into GNU wording that the inserted option does not have, and note
  dd's upstream `files` operand artifact.

No key was added or removed; zh-TW is regenerated from zh-CN.

* feat(autocomplete): ship a GNU date spec for Linux-first completion

The bundled Fig date spec follows BSD/macOS flags (-j, -n, -t, -v, epoch
seconds for -r), so Linux hosts were offered options that do not exist there.
Local specs already override the bundled package, so add electron/specs/date.js
with the GNU option set: -d/--date, --debug, -f/--file, -I/--iso-8601,
-R/--rfc-email, --rfc-3339, -r/--reference, -s/--set, -u/--utc, plus the
+FORMAT operand.

- Translate the 13 new descriptions; zh-TW is regenerated from them.
- Remove the 13 BSD-only date entries after a repository-wide scan showed no
  other spec references them.
- Resolve local specs first in the batch 4 test, matching runtime and the
  untranslated-description audit, and spot-check the new GNU wording.

* fix(autocomplete): correct GNU wording and add local specs

Follow-up review of batch 4 found wording that would show up in the popup and
two upstream spec defects. Local specs already override @withfig/autocomplete,
so the wrong option sets are replaced rather than translated around.

- Add electron/specs/{dig,readlink,base64,htop}.js:
  dig fixes the NS label and drops the bogus TTL type; readlink replaces the
  stat wording with the real GNU options; base64 moves from BSD -b/-i/-o to
  GNU -w and --ignore-garbage; htop documents the -H delay in seconds.
- Correct awk -c (traditional mode) and -t (--lint-old) to match gawk, with
  the dictionary keys migrated alongside -n.
- Reword review findings: htop -H highlights exited processes, split -a uses
  characters and -b uses KiB/MiB/GiB, dd cbs is a conversion record length,
  join -a/-v name the file index and -o covers unpaired lines, basename -a
  accepts multiple paths, env -0 ends records with NUL, dig ANY notes RFC 8482,
  su -f/-m keep the BSD behavior without hardcoded environment claims, and
  uname uses one verb for the kernel fields.
- Extend the zh-TW generator with documented post-conversion fixes (number
  bases, extended, instance, header, TLS extension, data) and regenerate.
- Update the batch 2 and batch 4 research notes, and resolve local specs first
  in the batch 4 test so it exercises what the app loads.

* test(autocomplete): cover all preloaded specs and Apple extension term

- Assert every one of the 22 batch-4 commands in COMMON_FIG_SPECS; the old
  loop only covered 7, so dropping a preload entry could pass unnoticed.
- Keep the noun “extension” as 擴充功能: the generic 擴充套件→擴充 rule is
  right for “extended” compounds (擴充屬性, 擴充標頭, 擴充正規表示式), but
  Apple's option descriptions need the noun form.

* fix(autocomplete): choose Fig specs by target OS and correct GNU semantics

- Resolve date, base64 and readlink against the target session's OS: macOS
  keeps its BSD specs while Linux keeps the local GNU ones. The renderer now
  passes the OS over the Fig bridge, and spec contents, in-flight loads, the
  available-name list and the loaded-name index are all scoped by command and
  OS, so one renderer can serve Linux and macOS sessions without mixing them.
- Add native macOS date and readlink specs (date gains -z, readlink exposes
  only -f/-n) and keep the bundled date/base64 specs as the macOS fallback.
  The bridge spec list merges specs/macos only for macOS sessions, so a
  platform-only command is never suggested where it cannot load.
- Fix GNU readlink: -q/--quiet/-s/--silent suppress error messages, -v/--verbose
  reports them, and the nonexistent --strip is gone. Restore filepath
  completion for base64 operands and date -f/-r, and cover date -r with numeric
  prefixes so digit-leading filenames stay discoverable.
- Complete values attached to optional option arguments (-Is -> -Iseconds,
  --iso-8601=s -> --iso-8601=seconds) only for specs that opt in through
  netcattyOptionalArgAttached, leaving other commands' optional arguments and
  required-argument completion unchanged.
- Describe su -m as BSD's caller login shell versus util-linux's -s/SHELL
  order, refresh the affected zh-CN/zh-TW entries and the bundled-date fallback
  translations, and regenerate zh-TW with the repository script.
- Add focused tests for per-OS loader caching, spec listing and scoping,
  attached-argument completion, path completion, and localized descriptions;
  update the batch-4 research notes to match.

* test(autocomplete): retrigger CI after a runner cancellation

The lint-and-test job on f09b3eed0 ended with "The runner has received a
shutdown signal" during the plugin boundary step, not with a test failure.
Contributors cannot re-run that job, so this empty commit triggers a fresh
PR synchronize check.

* fix(i18n): correct zh-CN autocomplete option descriptions

- Fix 38 "registry" mistranslations: Docker/kubectl image registry vs
  npm/yarn/pnpm package source
- Fix git --source (prints a ref name, not source code)
- Fix the truncated --pathspec-file-nul key (NUL, not whitespace)
- Correct OpenCC s2twp ambiguous characters in generated zh-TW and add
  the correction table to the generator
- Add regression assertions for the corrected entries

Co-Authored-By: Claude Code <noreply@anthropic.com>

* fix(i18n): correct autocomplete option descriptions

- Fix 32 verified mistranslations across git, Docker/Kubernetes,
  package managers, and core ops commands: git pull --rebase direction,
  find primaries, scp/curl cipher terminology, git config
  --default/--system, unzip/python editorial notes, and more
- Unify git worktree on 工作树 (15 entries), Docker secret on 密钥 (7),
  and Docker buildx on 构建器 (10)
- Restore git blame's missing subcommand description with a local spec
  override and translate it
- Update batch1/batch2 expectations and the research notes for the two
  editorial notes that are now faithful translations

Co-Authored-By: Claude Code <noreply@anthropic.com>

* feat(autocomplete): add podman and ip descriptions

- Add 66 podman descriptions (325/325 coverage) and a batch5 test
- Add a local ip spec covering addresses, links, routes, neighbors,
  rules, tunnels, netns, multicast, xfrm and monitor, plus 15 root
  options; translate all 88 descriptions
- Fix podman machine terminology (虚拟机) and --log-level wording
  (指定级别及以上)
- Add a batch6 test for the ip spec

Co-Authored-By: Claude Code <noreply@anthropic.com>

* feat(autocomplete): show Chinese descriptions for command suggestions

- Generate commandDescriptions.ts from the Fig specs and the committed
  dictionaries (674 commands; 83 already translated)
- Fill source "command" suggestions with zh-CN/zh-TW descriptions
- Align cp's zh-CN description with the conventional wording
- Stop maintaining zh-TW: new entries are zh-CN only, and the tests no
  longer require zh-TW key parity, only that zh-TW has no stale keys

Co-Authored-By: Claude Code <noreply@anthropic.com>

---------

Co-authored-by: Claude Code <noreply@anthropic.com>
2026-11-23 18:42:12 +08:00
AlexPlumandbincxz 2ca3ae0e28 feat(ai): add OpenCode Go provider (#4253)
* feat(ai): add OpenCode Go provider with API-key auto-config

Add OpenCode Go as a first-class AI provider preset for Catty:

- Pre-fill the Console endpoint (https://opencode.ai/inference/go/openai/v1)
  and a curated model list, with live discovery from /models.
- After the user pastes an API key and saves, select a sensible default
  model and activate the provider when no other provider is active.
- Parse nested limit.context values from model list payloads (OpenCode Go
  reports context windows this way).
- Point users at the Console API-key page from the provider form and make
  the settings search find the entry with "opencode".

The existing x-opencode-session header already covers chat routing for
opencode.ai hosts.

* fix(ai): fix OpenCode Go protocol choices

OpenCode Go exposes exactly one wire protocol and request format, so the
provider form must not offer Anthropic/Google styles or a Responses toggle.
Hide both controls for fixed-protocol presets, force the saved config back
to OpenAI Chat Completions, and ignore stale overrides at request time.

* fix(ai): route OpenCode Go models to their native protocol

OpenCode Go's catalog is not uniformly Chat Completions: 20 models are
native chat, 5 are Responses, 6 are Anthropic Messages, and 1 is Google
GenerateContent. The Console gateway translates between them, but forcing
Chat Completions loses each model's native reasoning and tool handling.

Keep the protocol controls hidden, then pick the wire family from the
selected model:

- responses -> OpenAI Responses
- messages  -> Anthropic Messages (/anthropic/v1 prefix)
- google    -> Google GenerateContent (/google/v1beta prefix)
- default   -> OpenAI Chat Completions

Model discovery stays on the OpenAI prefix, and a read-only Base URL makes
it clear that the endpoint paths are fixed by the provider.

* fix(ai): send OpenCode session and client headers

OpenCode Go needs `x-opencode-session` on every model call for routing and
prompt-cache affinity. Catty already forwards the chat session id; this also
covers plugin model invocations, which previously had no session header.

OpenCode also asks clients to identify themselves instead of presenting a
generic SDK user agent. Send `Netcatty-AI/1.0` for opencode.ai hosts while
keeping user-configured headers as the override.

* fix(ai): hide custom headers for fixed-protocol providers

OpenCode Go has one hosted endpoint and no proxy or self-signed setup to
configure, so the custom-header editor only adds noise. Hide it for
fixed-protocol presets and leave any previously stored headers untouched
instead of overwriting them with the hidden rows.

* fix(ai): use the official OpenCode mark for the provider icon

The previous asset was a monochrome silhouette that was left-aligned and
touched the badge edges, so it read as a generic terminal glyph. Replace it
with the official OpenCode mark (white frame, gray block, dark background)
and render it full-color instead of applying the monochrome invert filter.

* fix(ai): keep the OpenCode icon square at small sizes

The 16px composer badge used a 6px radius, so the full-color mark read as a
black circle. Give full-color icons size-aware corners (3/4/6px) and move
the asset to a new filename so a stale 300px SVG from an earlier build cannot
be reused.

* fix(ai): preserve disabled state when editing an existing OpenCode Go provider

* fix(ai): recognize Google SSE streaming requests in bridge fetch

---------

Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-23 18:42:08 +08:00
陈大猫 d4a39ad2c6 feat(plugins): add bounded SSH host byte streams (network.hostStream) (#4297)
* feat(plugins): add bounded SSH host byte streams (network.hostStream)

* fix(plugins): route plugin-stream SSH host-key verification and cancel on abort
2026-11-23 18:42:03 +08:00
27a55f8b40 fix(window): fit main window to half-screen tiling cells (#4254)
* fix(window): fit main window to half-screen tiling cells

macOS and Windows window tiling keep the app's minimum size when the
requested cell is smaller, so the 1100x640 minimum pushed half-tiled
windows past the screen edge. Cap the effective minimum at half the
display work area minus the macOS tiling margin, and pull restored
bounds back inside the work area while preserving windows that span
adjacent displays.

Let Vault page headers wrap their action buttons on narrow half-screen
windows instead of clipping them.

Tests: window manager suite (127) and Vault header/layout tests pass.

Co-Authored-By: Claude Code <noreply@anthropic.com>

* fix(vault): allow nested VaultPageHeader action groups to wrap

---------

Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-23 17:04:14 +08:00
陈大猫 06a42f623e fix(tabs): stop overflowed top tabs from stealing titlebar drag regions (#4221)
* fix(tabs): stop overflowed top tabs from stealing titlebar drag regions

Keep the native no-drag exclusion on the stationary scroll viewport, neutralize scrolled descendant regions, and move the 20 px drag handle outside the viewport. Add a source-level regression for the region policy.

Related #4220. Addresses bug 2 only; the split-pane blanking bug remains unresolved.

* fix(tabs): keep unused tab-strip space draggable when tabs do not overflow

* test(tabs): read source fixtures locally in TopTabs drag-region test
2026-11-23 16:50:47 +08:00
陈大猫 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