Compare commits

..
890 changed files with 6834 additions and 133741 deletions

No files matched your search

-16
View File
@@ -1,16 +0,0 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
timezone: "Asia/Shanghai"
open-pull-requests-limit: 5
groups:
github-actions:
patterns:
- "*"
commit-message:
prefix: "ci"
-72
View File
@@ -1,72 +0,0 @@
# This file is machine-generated by `gh actions-lock`.
# Do not edit by hand; run `gh actions-lock` to update.
# Docs: https://gh.io/actions-lockfile
version: 'v0.0.3'
workflows:
'.github/workflows/build-et-binaries.yml':
- 'actions/cache@v6.1.0'
- 'actions/checkout@v7.0.1'
- 'actions/download-artifact@v8.0.2'
- 'actions/upload-artifact@v7.0.2'
- 'ilammy/msvc-dev-cmd@v1.13.0'
'.github/workflows/build.yml':
- 'actions/cache@v6.1.0'
- 'actions/checkout@v7.0.1'
- 'actions/download-artifact@v8.0.2'
- 'actions/setup-node@v7.1.0'
- 'actions/upload-artifact@v7.0.2'
- 'ilammy/msvc-dev-cmd@v1.13.0'
- 'softprops/action-gh-release@v3.0.4'
'.github/workflows/grokbot-issue-relay.yml': []
'.github/workflows/issue-format.yml':
- 'actions/checkout@v7.0.1'
- 'actions/github-script@v9.0.0'
'.github/workflows/spam-comments.yml':
- 'actions/checkout@v7.0.1'
- 'actions/github-script@v9.0.0'
'.github/workflows/star-history.yml':
- 'actions/checkout@v7.0.1'
'.github/workflows/test.yml':
- 'actions/checkout@v7.0.1'
- 'actions/setup-node@v7.1.0'
dependencies:
'actions/cache@v6.1.0':
ref: 'v6.1.0'
commit: 'sha1-55cc8345863c7cc4c66a329aec7e433d2d1c52a9'
owner_id: 44036562
repo_id: 215566462
'actions/checkout@v7.0.1':
ref: 'v7.0.1'
commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
owner_id: 44036562
repo_id: 197814629
'actions/download-artifact@v8.0.2':
ref: 'v8.0.2'
commit: 'sha1-9000827ccba6bdab643e8b6fd33ac0654aef8333'
owner_id: 44036562
repo_id: 192626254
'actions/github-script@v9.0.0':
ref: 'v9.0.0'
commit: 'sha1-3a2844b7e9c422d3c10d287c895573f7108da1b3'
owner_id: 44036562
repo_id: 205262760
'actions/setup-node@v7.1.0':
ref: 'v7.1.0'
commit: 'sha1-949feb2413d6458794dcd2491c4babbbce0c15c1'
owner_id: 44036562
repo_id: 189476904
'actions/upload-artifact@v7.0.2':
ref: 'v7.0.2'
commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9'
owner_id: 44036562
repo_id: 192625955
'ilammy/msvc-dev-cmd@v1.13.0':
ref: 'v1.13.0'
commit: 'sha1-0b201ec74fa43914dc39ae48a89fd1d8cb592756'
owner_id: 1256587
repo_id: 212181767
'softprops/action-gh-release@v3.0.4':
ref: 'v3.0.4'
commit: 'sha1-8a0cd651e5b2365bd640854a3fa5dfc70e4875f3'
owner_id: 2242
repo_id: 204253808
+19 -32
View File
@@ -48,9 +48,6 @@ concurrency:
group: build-et-binaries-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
ET_REF: ${{ inputs.et_ref || 'et-v6.2.10' }}
@@ -62,19 +59,17 @@ jobs:
name: build-linux-x64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/checkout@v7
- name: Restore cached PR build
id: et-build-cache
if: github.event_name == 'pull_request'
uses: actions/cache@v6.1.0
uses: actions/cache@v6
with:
path: out/
key: et-pr-build-v1-${{ runner.os }}-${{ runner.arch }}-${{ env.ET_REF }}-${{ hashFiles('.github/workflows/build-et-binaries.yml', 'scripts/build-et/**') }}
- name: Restore vcpkg download cache
if: github.event_name != 'pull_request' || steps.et-build-cache.outputs.cache-hit != 'true'
uses: actions/cache@v6.1.0
uses: actions/cache@v6
with:
path: .cache/vcpkg-downloads
key: vcpkg-downloads-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/build-et/**') }}
@@ -107,7 +102,7 @@ jobs:
quay.io/pypa/manylinux2014_x86_64 \
bash scripts/build-et/build-linux.sh
- name: Upload artifact
uses: actions/upload-artifact@v7.0.2
uses: actions/upload-artifact@v7
with:
name: et-linux-x64
path: out/
@@ -117,19 +112,17 @@ jobs:
name: build-linux-arm64
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/checkout@v7
- name: Restore cached PR build
id: et-build-cache
if: github.event_name == 'pull_request'
uses: actions/cache@v6.1.0
uses: actions/cache@v6
with:
path: out/
key: et-pr-build-v1-${{ runner.os }}-${{ runner.arch }}-${{ env.ET_REF }}-${{ hashFiles('.github/workflows/build-et-binaries.yml', 'scripts/build-et/**') }}
- name: Restore vcpkg download cache
if: github.event_name != 'pull_request' || steps.et-build-cache.outputs.cache-hit != 'true'
uses: actions/cache@v6.1.0
uses: actions/cache@v6
with:
path: .cache/vcpkg-downloads
key: vcpkg-downloads-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/build-et/**') }}
@@ -162,7 +155,7 @@ jobs:
quay.io/pypa/manylinux2014_aarch64 \
bash scripts/build-et/build-linux.sh
- name: Upload artifact
uses: actions/upload-artifact@v7.0.2
uses: actions/upload-artifact@v7
with:
name: et-linux-arm64
path: out/
@@ -175,19 +168,17 @@ jobs:
name: build-macos-universal
runs-on: macos-15
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/checkout@v7
- name: Restore cached PR build
id: et-build-cache
if: github.event_name == 'pull_request'
uses: actions/cache@v6.1.0
uses: actions/cache@v6
with:
path: out/
key: et-pr-build-v1-${{ runner.os }}-${{ runner.arch }}-${{ env.ET_REF }}-${{ hashFiles('.github/workflows/build-et-binaries.yml', 'scripts/build-et/**') }}
- name: Restore vcpkg download cache
if: github.event_name != 'pull_request' || steps.et-build-cache.outputs.cache-hit != 'true'
uses: actions/cache@v6.1.0
uses: actions/cache@v6
with:
path: ${{ runner.temp }}/vcpkg-downloads
key: vcpkg-downloads-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/build-et/**') }}
@@ -205,7 +196,7 @@ jobs:
MACOSX_DEPLOYMENT_TARGET: "11.0"
run: bash scripts/build-et/build-macos.sh
- name: Upload artifact
uses: actions/upload-artifact@v7.0.2
uses: actions/upload-artifact@v7
with:
name: et-darwin-universal
path: out/
@@ -218,19 +209,17 @@ jobs:
name: build-windows-x64
runs-on: windows-latest
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/checkout@v7
- name: Restore cached PR build
id: et-build-cache
if: github.event_name == 'pull_request'
uses: actions/cache@v6.1.0
uses: actions/cache@v6
with:
path: out/
key: et-pr-build-v1-${{ runner.os }}-${{ runner.arch }}-${{ env.ET_REF }}-${{ hashFiles('.github/workflows/build-et-binaries.yml', 'scripts/build-et/**') }}
- name: Restore vcpkg download cache
if: github.event_name != 'pull_request' || steps.et-build-cache.outputs.cache-hit != 'true'
uses: actions/cache@v6.1.0
uses: actions/cache@v6
with:
path: ${{ runner.temp }}\vcpkg-downloads
key: vcpkg-downloads-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/build-et/**') }}
@@ -247,7 +236,7 @@ jobs:
run: choco install -y ninja
- name: Set up MSVC developer command prompt
if: github.event_name != 'pull_request' || steps.et-build-cache.outputs.cache-hit != 'true'
uses: ilammy/msvc-dev-cmd@v1.13.0
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Build et (win32-x64)
@@ -258,7 +247,7 @@ jobs:
shell: pwsh
run: pwsh -File scripts/build-et/build-windows.ps1
- name: Upload artifact
uses: actions/upload-artifact@v7.0.2
uses: actions/upload-artifact@v7
with:
name: et-win32-x64
path: out/
@@ -283,11 +272,9 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/checkout@v7
- name: Download artifacts
uses: actions/download-artifact@v8.0.2
uses: actions/download-artifact@v8
with:
path: artifacts
- name: Stage release files
+92 -36
View File
@@ -40,6 +40,10 @@ on:
pull_request:
paths:
- ".github/workflows/build.yml"
- "components/AppLockGate.tsx"
- "components/TrayPanel.tsx"
- "index.tsx"
- "index.css"
- "build/**"
- "electron-builder.config.cjs"
- "electron/**"
@@ -77,7 +81,11 @@ on:
- "scripts/rebuildPatchedNodePty.cjs"
- "scripts/resolve-et-bin-release.cjs"
- "scripts/resolve-mosh-bin-release.cjs"
- "scripts/tray-panel-layout.live.test.cjs"
- "scripts/serial-named-pipe.live.test.cjs"
- "scripts/fixtures/serial/**"
- "scripts/verify-linux-*.sh"
- "scripts/xterm-macos-column-selection.live.test.cjs"
- "skills/**"
# A newer run for the same main push or PR cancels older in-progress work.
@@ -119,9 +127,7 @@ jobs:
mosh_bin_release: ${{ steps.resolve.outputs.mosh_bin_release }}
steps:
- name: Checkout
uses: actions/checkout@v7.0.1
with:
persist-credentials: false
uses: actions/checkout@v7
- name: Resolve bundled mosh-client release
id: resolve
@@ -148,9 +154,7 @@ jobs:
et_bin_release: ${{ steps.resolve.outputs.et_bin_release }}
steps:
- name: Checkout
uses: actions/checkout@v7.0.1
with:
persist-credentials: false
uses: actions/checkout@v7
- name: Resolve bundled et-client release
id: resolve
@@ -218,24 +222,22 @@ jobs:
fi
- name: Checkout
uses: actions/checkout@v7.0.1
with:
persist-credentials: false
uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v7.1.0
uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- name: Set up MSVC developer command prompt
if: matrix.name == 'windows'
uses: ilammy/msvc-dev-cmd@v1.13.0
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Restore Electron download cache
uses: actions/cache@v6.1.0
uses: actions/cache@v6
with:
path: |
~/.cache/electron
@@ -251,6 +253,36 @@ jobs:
- name: Install deps
run: npm ci
- name: Test Windows serial pipe through native Electron
if: matrix.name == 'windows'
run: npx electron scripts/serial-named-pipe.live.test.cjs
- name: Test macOS Option column selection
if: matrix.name == 'macos'
run: npm run test:xterm-macos-selection
- name: Compile ConPTY test helpers
if: matrix.name == 'windows'
shell: pwsh
run: |
$compiler = "$env:WINDIR\Microsoft.NET\Framework64\v4.0.30319\csc.exe"
if (-not (Test-Path $compiler)) { throw "csc.exe not found" }
New-Item -ItemType Directory -Force -Path "$env:RUNNER_TEMP\netcatty-mosh-conpty" | Out-Null
& $compiler /nologo /target:exe /out:"$env:RUNNER_TEMP\netcatty-mosh-conpty\ssh.exe" electron\bridges\fixtures\mosh-conpty-fake-ssh.cs
if ($LASTEXITCODE -ne 0) { throw "failed to compile fake ssh" }
& $compiler /nologo /target:exe /out:"$env:RUNNER_TEMP\netcatty-mosh-conpty\mosh-client.exe" electron\bridges\fixtures\mosh-conpty-fake-client.cs
if ($LASTEXITCODE -ne 0) { throw "failed to compile fake mosh-client" }
- name: Test Mosh handshake through ConPTY
if: matrix.name == 'windows'
shell: pwsh
env:
NETCATTY_TEST_MOSH_SSH_EXE: ${{ runner.temp }}\netcatty-mosh-conpty\ssh.exe
NETCATTY_TEST_MOSH_CLIENT_EXE: ${{ runner.temp }}\netcatty-mosh-conpty\mosh-client.exe
run: |
node --test electron/bridges/moshHandshake.test.cjs
node electron/bridges/terminalBridge.moshConpty.integration.cjs
- name: Fetch bundled mosh-client
if: env.BUNDLE_MOSH == 'true'
shell: bash
@@ -298,8 +330,20 @@ jobs:
APPLE_TEAM_ID: ${{ matrix.name == 'macos' && secrets.APPLE_TEAM_ID || '' }}
run: npm run ${{ matrix.pack_script }}
- name: Test packaged SSH cipher negotiation
run: node scripts/test-packaged-ssh-ciphers.cjs
- name: Test tray panel layout
run: npm run test:tray-panel-layout
- name: Test tray panel layout at 200% scale on Windows
if: matrix.name == 'windows'
env:
NETCATTY_TRAY_LAYOUT_SCALE: "2"
run: npm run test:tray-panel-layout
- name: Upload artifacts
uses: actions/upload-artifact@v7.0.2
uses: actions/upload-artifact@v7
with:
name: netcatty-${{ matrix.name }}
path: |
@@ -339,7 +383,7 @@ jobs:
# The GitHub runner already retries container pulls three times. Use the
# official Quay mirror to avoid the Docker Hub endpoint that repeatedly
# timed out in package validation.
image: quay.io/almalinuxorg/almalinux:8.10-20261114@sha256:e85b75cd6ce05cd1e7616d4b2590077e0acc395e7ee73a9f887b17d1591b6ef3
image: quay.io/almalinuxorg/almalinux:8
env:
MOSH_BIN_RELEASE: ${{ needs.resolve-mosh.outputs.mosh_bin_release }}
ET_BIN_RELEASE: ${{ needs.resolve-et.outputs.et_bin_release }}
@@ -523,12 +567,10 @@ jobs:
echo "npm_config_python=/usr/bin/python3.11" >> "${GITHUB_ENV}"
- name: Checkout
uses: actions/checkout@v7.0.1
with:
persist-credentials: false
uses: actions/checkout@v7
- name: Restore Electron download cache
uses: actions/cache@v6.1.0
uses: actions/cache@v6
with:
path: |
~/.cache/electron
@@ -592,6 +634,9 @@ jobs:
done
npm run pack:linux-x64
- name: Test packaged SSH cipher negotiation
run: node scripts/test-packaged-ssh-ciphers.cjs
- name: Verify packaged node-pty Linux runtime
run: bash scripts/ensure-node-pty-linux.sh verify x64
@@ -602,7 +647,7 @@ jobs:
run: bash scripts/verify-linux-rpm-artifact.sh x86_64
- name: Upload artifacts
uses: actions/upload-artifact@v7.0.2
uses: actions/upload-artifact@v7
with:
name: netcatty-linux-x64
path: |
@@ -626,7 +671,7 @@ jobs:
&& (needs.resolve-et.result == 'success' || needs.resolve-et.result == 'skipped')
runs-on: ubuntu-24.04-arm
container:
image: debian:bullseye-20260824@sha256:6f519a81440354a85eb592c5f32109ab80605f6b892455983a6f618bf87fabe9
image: debian:bullseye
env:
MOSH_BIN_RELEASE: ${{ needs.resolve-mosh.outputs.mosh_bin_release }}
ET_BIN_RELEASE: ${{ needs.resolve-et.outputs.et_bin_release }}
@@ -678,12 +723,10 @@ jobs:
apt-get -o Acquire::Retries=4 install -y nodejs
- name: Checkout
uses: actions/checkout@v7.0.1
with:
persist-credentials: false
uses: actions/checkout@v7
- name: Restore Electron download cache
uses: actions/cache@v6.1.0
uses: actions/cache@v6
with:
path: |
~/.cache/electron
@@ -728,6 +771,9 @@ jobs:
ELECTRON_BUILDER_PUBLISH: "never"
run: npm run pack:linux-arm64
- name: Test packaged SSH cipher negotiation
run: node scripts/test-packaged-ssh-ciphers.cjs
- name: Verify packaged node-pty Linux runtime
run: bash scripts/ensure-node-pty-linux.sh verify arm64
@@ -738,7 +784,7 @@ jobs:
run: bash scripts/verify-linux-rpm-artifact.sh aarch64
- name: Upload artifacts
uses: actions/upload-artifact@v7.0.2
uses: actions/upload-artifact@v7
with:
name: netcatty-linux-arm64
path: |
@@ -765,9 +811,7 @@ jobs:
actions: read
steps:
- name: Checkout
uses: actions/checkout@v7.0.1
with:
persist-credentials: false
uses: actions/checkout@v7
- name: Validate release tag
shell: bash
@@ -778,7 +822,7 @@ jobs:
fi
- name: Download artifacts
uses: actions/download-artifact@v8.0.2
uses: actions/download-artifact@v8
with:
path: artifacts
merge-multiple: true
@@ -820,6 +864,20 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Verify downloaded Linux amd64 deb artifact
run: |
deb_file="$(find artifacts -maxdepth 1 -type f -name '*-linux-amd64.deb' -print | sort | head -n 1)"
test -n "${deb_file}"
bash scripts/verify-linux-deb-artifact.sh amd64 "${deb_file}"
- name: Verify downloaded Linux arm64 deb artifact metadata
env:
VERIFY_LOAD: "0"
run: |
deb_file="$(find artifacts -maxdepth 1 -type f -name '*-linux-arm64.deb' -print | sort | head -n 1)"
test -n "${deb_file}"
bash scripts/verify-linux-deb-artifact.sh arm64 "${deb_file}"
- name: Generate Release Body
run: node .github/scripts/generate-release-note.js
env:
@@ -828,7 +886,7 @@ jobs:
GITHUB_SHA: ${{ github.sha }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v3.0.4
uses: softprops/action-gh-release@v2
with:
body_path: release_notes.md
prerelease: ${{ contains(github.ref_name, '-') }}
@@ -860,13 +918,13 @@ jobs:
pull-requests: write
steps:
- name: Checkout default branch
uses: actions/checkout@v7.0.1
uses: actions/checkout@v7
with:
ref: ${{ github.event.repository.default_branch }}
token: ${{ secrets.RELEASE_TOKEN }}
- name: Download Linux artifacts
uses: actions/download-artifact@v8.0.2
uses: actions/download-artifact@v8
with:
path: artifacts
merge-multiple: true
@@ -1022,12 +1080,10 @@ jobs:
&& (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.publish_release))
steps:
- name: Checkout
uses: actions/checkout@v7.0.1
with:
persist-credentials: false
uses: actions/checkout@v7
- name: Download macOS artifacts
uses: actions/download-artifact@v8.0.2
uses: actions/download-artifact@v8
with:
name: netcatty-macos
path: artifacts/
+2 -3
View File
@@ -17,15 +17,14 @@ jobs:
!contains(github.event.issue.labels.*.name, 'format-exempt')
steps:
- name: Checkout format helpers
uses: actions/checkout@v7.0.1
uses: actions/checkout@v7
with:
persist-credentials: false
sparse-checkout: |
scripts/issue-format.cjs
sparse-checkout-cone-mode: false
- name: Validate title and body
uses: actions/github-script@v9.0.0
uses: actions/github-script@v9
with:
script: |
const format = require(`${process.env.GITHUB_WORKSPACE}/scripts/issue-format.cjs`);
+2 -4
View File
@@ -14,12 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout filter rules
uses: actions/checkout@v7.0.1
with:
persist-credentials: false
uses: actions/checkout@v7
- name: Hide suspected malware spam
uses: actions/github-script@v9.0.0
uses: actions/github-script@v9
with:
script: |
const path = require('node:path');
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7.0.1
uses: actions/checkout@v7
with:
# Same PAT used for releases — needs stargazers read (admin/collaborator)
# plus contents/PR write so we can open an update PR against protected main.
+111 -3
View File
@@ -20,16 +20,21 @@ jobs:
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v7.0.1
uses: actions/checkout@v7
with:
persist-credentials: false
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v7.1.0
uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- name: Install shell test dependencies
run: |
sudo apt-get update
sudo apt-get install -y fish xvfb
- name: Install deps
run: npm ci
@@ -53,5 +58,108 @@ jobs:
- name: Test
run: npm test
- name: Test SSH cipher negotiation in Electron's crypto runtime
env:
NETCATTY_SSH_TEST_RUNTIME: electron
run: node --test electron/bridges/sshChaChaTransport.test.cjs
- name: Test browser first-link lifecycle
run: xvfb-run -a ./node_modules/.bin/electron --no-sandbox electron/hostBrowser/hostBrowser.firstLink.live.test.cjs
- name: Test terminal background rendering
run: xvfb-run -a ./node_modules/.bin/electron --no-sandbox --use-angle=swiftshader --enable-unsafe-swiftshader scripts/terminal-background-rendering.live.test.cjs
- name: Test terminal keyword highlight performance
env:
NETCATTY_TERMINAL_PERF_SHOW_WINDOW: "1"
# GitHub-hosted runners do not configure Electron's SUID sandbox helper.
run: xvfb-run -a ./node_modules/.bin/electron --no-sandbox scripts/xterm-keyword-highlight-performance.live.test.cjs
- name: Test terminal keyword highlight throughput
env:
NETCATTY_TERMINAL_PERF_MAIN_REF: ${{ github.event.pull_request.base.sha || 'HEAD^' }}
NETCATTY_TERMINAL_PERF_ROUNDS: "3"
NETCATTY_TERMINAL_PERF_SHOW_WINDOW: "1"
run: xvfb-run -a ./node_modules/.bin/electron --no-sandbox scripts/xterm-keyword-highlight-throughput.live.test.cjs
- name: Build
run: npm run build
windows-fido:
name: windows-fido
runs-on: windows-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- name: Install deps
run: npm ci --ignore-scripts
- name: Exercise serial named pipe transport on Windows
run: node --test electron/bridges/serialNamedPipe.test.cjs
- name: Apply production dependency patches
run: npx patch-package --error-on-fail
- name: Install user-mode OpenSSH and software authenticator toolchain
uses: msys2/setup-msys2@v2
with:
msystem: MSYS
update: true
install: gcc openssl-devel openssh
- name: Build disposable software authenticator
shell: msys2 {0}
run: |
gcc -shared -DHAVE_STDINT_H scripts/fixtures/fido/provider.c -lcrypto -o /usr/lib/netcatty-fido-test-provider.dll
printf 'NETCATTY_WINDOWS_SSH_AGENT=%s\n' "$(cygpath -w /usr/bin/ssh-agent.exe)" >> "$GITHUB_ENV"
printf 'NETCATTY_WINDOWS_SSH_KEYGEN=%s\n' "$(cygpath -w /usr/bin/ssh-keygen.exe)" >> "$GITHUB_ENV"
cygpath -w /usr/bin >> "$GITHUB_PATH"
ssh -V
- name: Exercise Windows pipes, PIN bridge, SK signatures and cancellation
env:
NETCATTY_FIDO_WINDOWS: "1"
run: node --test scripts/fido-windows.live.test.cjs electron/bridges/fidoNativeAgent.test.cjs electron/bridges/fidoAskpass.winpath.test.cjs
windows-broadcast-ssh:
name: windows-broadcast-ssh
runs-on: windows-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- name: Install deps
run: npm ci
- name: Build
run: npm run build
- name: Test SSH cipher negotiation in Windows Electron's crypto runtime
env:
NETCATTY_SSH_TEST_RUNTIME: electron
run: node --test electron/bridges/sshChaChaTransport.test.cjs
- name: Exercise native PowerShell and CMD directory navigation in ConPTY
env:
NETCATTY_DIRECTORY_WINDOWS_LIVE: "1"
run: |
$env:NETCATTY_TEST_PWSH = (Get-Command pwsh -ErrorAction Stop).Source
node --test --test-force-exit --import tsx infrastructure/services/terminalDirectory.windows.test.ts
- name: Exercise two SSH password prompts in the desktop app
run: node scripts/terminal-broadcast-ssh.live.cjs
-1
View File
@@ -116,7 +116,6 @@ coverage
!/build/installer.nsh
/electron/native/**/build
/electron/bridges/windowsHelloHelper/build/
/electron/preload.bundle.cjs
/release
/out
/public/monaco
+6 -8
View File
@@ -1,3 +1,5 @@
import { MonitorHostKeyDialog } from './components/vault/MonitorHostKeyDialog';
import { MonitorRuntimeHost } from './application/app/MonitorRuntimeHost';
import React, { useEffect } from 'react';
import { initializeFonts } from './application/state/fontStore';
@@ -25,7 +27,6 @@ import { SessionPublisher } from './application/app/publishers/SessionPublisher'
import { SettingsPublisher } from './application/app/publishers/SettingsPublisher';
import { VaultPublisher } from './application/app/publishers/VaultPublisher';
import { AppLockRuntimePublisher } from './application/app/publishers/AppLockRuntimePublisher';
import { useReportRendererReady } from './components/AppLockGate';
// Initialize fonts eagerly at app startup
initializeFonts();
@@ -54,7 +55,9 @@ function App() {
}, []);
return (
<AppLocalStateProvider>
<MonitorRuntimeHost />
<AppSideEffects />
<MonitorHostKeyDialog />
<AppShell />
</AppLocalStateProvider>
);
@@ -62,10 +65,8 @@ function App() {
/**
* `AppLockGate` (index.tsx) owns `useSettingsState` / `useAppLockState` so the
* lock overlay can render before app children mount, and owns splash removal
* plus the lock-gated `rendererReady` policy. This lazy route reports ready
* after `AppSideEffects` and bridge listeners have mounted so cold-start
* intents and deep links never race a suspended chunk.
* lock overlay can render before app children mount, and it owns the
* splash-removal + rendererReady signal (deep links must wait for unlock).
* App forwards the gate's settings instance into SettingsPublisher so the
* runtime slot/context still publish a single settings runtime.
*/
@@ -81,9 +82,6 @@ function AppWithProviders({ settings, appLock }: { settings: SettingsState; appL
}, []);
useExternalMcpGrantPersister();
// Signal rendererReady after child effects (AppSideEffects) and bridge setup
// have registered in this commit's effect flush.
useReportRendererReady();
return (
<SettingsPublisher settings={settings}>
+1 -41
View File
@@ -17,7 +17,7 @@
<p align="center">
Electron、React、xterm.js で構築された機能豊富な SSH ワークスペース。<br/>
🔥 内蔵 AI Agent · 🧩 プラグインシステム · 分割ターミナル · Vault ビュー · SFTP ワークフロー · カスタムテーマ — すべてが一つに。
🔥 内蔵 AI Agent · 分割ターミナル · Vault ビュー · SFTP ワークフロー · カスタムテーマ — すべてが一つに。
</p>
<p align="center">
@@ -38,16 +38,12 @@
<a href="https://github.com/sponsors/binaricat"><img src="https://img.shields.io/badge/GitHub-Sponsors-ea4aaa?style=for-the-badge&logo=githubsponsors&logoColor=white" height="28" alt="GitHub でスポンサーになる"></a>
&nbsp;
<a href="https://ko-fi.com/binaricat"><img src="https://img.shields.io/badge/Ko--fi-Support-29abe0?style=for-the-badge&logo=kofi&logoColor=white" height="28" alt="Ko-fi でサポート"></a>
&nbsp;
<a href="docs/assets/readme/wechat-group.jpg"><img src="https://img.shields.io/badge/WeChat-Official%20Group-07C160?style=for-the-badge&logo=wechat&logoColor=white" height="28" alt="公式 WeChat グループに参加"></a>
</p>
<p align="center">
<a href="./README.md">English</a> · <a href="./README.zh-CN.md">简体中文</a> · <a href="./README.zh-TW.md">繁體中文</a> · <a href="./README.ja-JP.md">日本語</a>
</p>
> **お知らせ:** プラグインシステムおよび現在の公式プラグイン(Netcatty Database、Netcatty Monitor)は、まだ不安定な段階にあります。ご利用の際はご注意ください。問題があればいつでも [Issue を作成](https://github.com/binaricat/Netcatty/issues)してください。できるだけ早く対応します。詳しくは[お知らせ](https://github.com/binaricat/Netcatty/discussions/4554)をご覧ください。
---
<img width="3358" height="1984" alt="image" src="docs/assets/readme/overview.webp" />
@@ -83,33 +79,9 @@ Catty Agent にサーバーの健全性チェックを依頼すると、適切
---
<a name="plugin-system"></a>
# 🧩 プラグインシステム — Netcatty を安全に拡張
> **お知らせ:** プラグインシステムおよび現在の公式プラグイン(Netcatty Database、Netcatty Monitor)は、まだ不安定な段階にあります。ご利用の際はご注意ください。問題があればいつでも [Issue を作成](https://github.com/binaricat/Netcatty/issues)してください。できるだけ早く対応します。詳しくは[お知らせ](https://github.com/binaricat/Netcatty/discussions/4554)をご覧ください。
> **SSH 鍵やホストレンダラーを公開することなく機能を追加できます。** Netcatty のセキュリティ優先プラグイン基盤は、通常プラグインをオフラインのサンドボックス内で実行し、**ホストレンダリング UI**(Closed Shadow DOM + ネイティブ Monaco、DataGrid、BI/メトリクスチャート、Vault SSH トンネルプロキシ)のみで画面を描画します。
### ✨ 主な特徴
- 🔒 **オフラインサンドボックス & 最小権限モデル** — プラグインは SSH パスワードや秘密鍵に直接アクセスできず、すべての機能はホスト管理の **許可 / 毎回確認 / 拒否** ポリシーを経由します。
- 🖥️ **ホストネイティブ IDE コンポーネント** — `@netcatty/plugin-sdk` を使い、React または DOM で Vault ページ、ターミナルサイドバー、モーダルを構築できます。
- 🗄️ **公式プラグインをすぐ導入** — **設定 → プラグイン** から [**Netcatty Database**](https://netcatty.app/en/plugins/netcatty-database)(113 エンジン対応 SQL IDE・Catty Agent・BI ダッシュボード)や [**Netcatty Monitor**](https://netcatty.app/en/plugins/netcatty-monitor)(エージェントレス SSH サーバー監視・Monaco ライブ可視化ログ)をワンクリック導入できます。
- 🚀 **柔軟な配布と自動更新チェック** — 内蔵の**公式マーケットプレイス**(`plugins.netcatty.app`)、GitHub Release からの直接インストール、ローカル `.ncpkg` インポート、自社ホスト静的ソースに対応します。
### 🔗 関連リンク & ガイド
- 🛒 [**公式プラグインマーケットプレイス**](https://netcatty.app/en/plugins) — 公式・コミュニティプラグインを閲覧
- 📖 [**プラグイン基盤概要**](https://netcatty.app/en/docs/plugins-overview) — サンドボックス設計・ホストレンダリング UI・権限モデル
- 🛠️ [**プラグイン開発ガイド**](https://netcatty.app/en/docs/plugins-development) — プロジェクト作成・UI 実装・権限宣言・`.ncpkg` パッケージング
- 📤 [**マーケットプレイス公開・提出ガイド**](https://netcatty.app/en/docs/plugins-marketplace) — GitHub Release 規約と公式カタログ PR 手順([`binaricat/netcatty-plugins`](https://github.com/binaricat/netcatty-plugins))
---
# 目次 <!-- omit in toc -->
- [🔥 Catty Agent — AI パートナー](#catty-agent)
- [🧩 プラグインシステム](#plugin-system)
- [Netcatty とは](#netcatty-とは)
- [なぜ Netcatty](#なぜ-netcatty)
- [機能](#機能)
@@ -122,7 +94,6 @@ Catty Agent にサーバーの健全性チェックを依頼すると、適切
- [はじめに](#はじめに)
- [ビルドとパッケージ](#ビルドとパッケージ)
- [技術スタック](#技術スタック)
- [コミュニティ](#コミュニティ)
- [コントリビューション](#コントリビューション)
- [コントリビューター](#コントリビューター)
- [Star 履歴](#star-履歴)
@@ -355,17 +326,6 @@ npm run pack:linux # Linux (AppImage + DEB + RPM)
---
<a name="コミュニティ"></a>
# 💬 コミュニティ
WeChat で QR コードをスキャンして **Netcatty 公式ユーザーグループ** に参加し、フィードバックやプラグインの話題を共有しましょう:
<p align="center">
<img src="docs/assets/readme/wechat-group.jpg" alt="Netcatty 公式 WeChat グループ QR コード" width="260" />
</p>
---
<a name="コントリビューション"></a>
# コントリビューション
+1 -43
View File
@@ -17,7 +17,7 @@
<p align="center">
A beautiful, feature-rich SSH workspace built with Electron, React, and xterm.js.<br/>
🔥 Built-in AI Agent · 🧩 Plugin System · Split terminals · Vault views · SFTP workflows · Custom themes — all in one.
🔥 Built-in AI Agent · Split terminals · Vault views · SFTP workflows · Custom themes — all in one.
</p>
<p align="center">
@@ -38,16 +38,12 @@
<a href="https://github.com/sponsors/binaricat"><img src="https://img.shields.io/badge/GitHub-Sponsors-ea4aaa?style=for-the-badge&logo=githubsponsors&logoColor=white" height="28" alt="Sponsor on GitHub"></a>
&nbsp;
<a href="https://ko-fi.com/binaricat"><img src="https://img.shields.io/badge/Ko--fi-Support-29abe0?style=for-the-badge&logo=kofi&logoColor=white" height="28" alt="Support on Ko-fi"></a>
&nbsp;
<a href="docs/assets/readme/wechat-group.jpg"><img src="https://img.shields.io/badge/WeChat-Official%20Group-07C160?style=for-the-badge&logo=wechat&logoColor=white" height="28" alt="Join Official WeChat Group"></a>
</p>
<p align="center">
<a href="./README.md">English</a> · <a href="./README.zh-CN.md">简体中文</a> · <a href="./README.zh-TW.md">繁體中文</a> · <a href="./README.ja-JP.md">日本語</a>
</p>
> **Notice:** The plugin system and the current official plugins (Netcatty Database and Netcatty Monitor) are still in an unstable stage. Please keep that in mind while using them. If you run into a problem, feel free to [open an Issue](https://github.com/binaricat/Netcatty/issues) — I'll fix it as soon as I can. See the [announcement](https://github.com/binaricat/Netcatty/discussions/4554).
---
<img width="3358" height="1984" alt="image" src="docs/assets/readme/overview.webp" />
@@ -67,8 +63,6 @@
- 🔥 **Intelligent context awareness** — understands your server environment and provides tailored responses
- 🚀 **One-click complex operations** — set up clusters, deploy services, and more with simple instructions
To search the web with DeepSeek, open **Settings → AI → Web Search**, enable web search, select **DeepSeek**, and enter your DeepSeek API key. You can use it with your current chat model. [DeepSeek Search API and pricing](https://api-docs.deepseek.com/guides/search/)
### 🎬 AI in Action
#### 🔥 Single Host — Intelligent Server Diagnostics
@@ -85,35 +79,11 @@ Watch Catty Agent orchestrate a Docker Swarm cluster across two servers in one c
<img width="3294" height="1974" alt="image" src="docs/assets/readme/catty-multi-host.webp" />
---
<a name="plugin-system"></a>
# 🧩 Plugin System — Extend Netcatty Safely
> **Notice:** The plugin system and the current official plugins (Netcatty Database and Netcatty Monitor) are still in an unstable stage. Please keep that in mind while using them. If you run into a problem, feel free to [open an Issue](https://github.com/binaricat/Netcatty/issues) — I'll fix it as soon as I can. See the [announcement](https://github.com/binaricat/Netcatty/discussions/4554).
> **Build and install rich extensions without exposing your SSH keys or host renderer.** Netcatty's security-first plugin platform runs ordinary extensions inside an offline, sandboxed runtime and renders custom views exclusively through **Host-Rendered UI** (closed Shadow DOM + native Monaco, DataGrid, BI/Metric charts, and Vault SSH tunnel brokers).
### ✨ Highlights
- 🔒 **Offline Sandbox & Least-Privilege Permissions** — Plugins never touch SSH passwords, private keys, or the host renderer; every capability goes through host-mediated **Allow / Ask / Deny** brokers.
- 🖥️ **Host-Rendered IDE Components** — Build native-feeling Vault pages, terminal sidebars, and modals with React or DOM via `@netcatty/plugin-sdk`.
- 🗄️ **Official Plugins Out of the Box** — Install [**Netcatty Database**](https://netcatty.app/en/plugins/netcatty-database) (113 database profiles, SQL IDE, Catty Agent sidebar & BI Dashboard) and [**Netcatty Monitor**](https://netcatty.app/en/plugins/netcatty-monitor) (agentless cross-OS SSH fleet observability, Monaco live logs & multi-host compare) directly in **Settings → Plugins**.
- 🚀 **Flexible Distribution** — Install from the built-in **Official Marketplace** (`plugins.netcatty.app`), directly from any public GitHub Release (**Install from GitHub**), via local `.ncpkg` import, or self-hosted static market sources.
### 🔗 Resources & Guides
- 🛒 [**Official Plugin Marketplace**](https://netcatty.app/en/plugins) — Browse official and curated plugins
- 📖 [**Plugin Platform Overview**](https://netcatty.app/en/docs/plugins-overview) — Sandbox architecture, host-rendered UI, and permission model
- 🛠️ [**Plugin Development Guide**](https://netcatty.app/en/docs/plugins-development) — Scaffold, build host-rendered views, declare permissions, and pack `.ncpkg`
- 📤 [**Marketplace Submission & Publishing Guide**](https://netcatty.app/en/docs/plugins-marketplace) — GitHub Release contract & official catalog PR workflow ([`binaricat/netcatty-plugins`](https://github.com/binaricat/netcatty-plugins))
---
# Contents <!-- omit in toc -->
- [🔥 Catty Agent — AI Partner](#catty-agent)
- [🧩 Plugin System](#plugin-system)
- [What is Netcatty](#what-is-netcatty)
- [Why Netcatty](#why-netcatty)
- [Features](#features)
@@ -126,7 +96,6 @@ Watch Catty Agent orchestrate a Docker Swarm cluster across two servers in one c
- [Open a local terminal from the command line](#open-a-local-terminal-from-the-command-line)
- [Build & Package](#build--package)
- [Tech Stack](#tech-stack)
- [Community](#community)
- [Contributing](#contributing)
- [Contributors](#contributors)
- [Star History](#star-history)
@@ -390,17 +359,6 @@ npm run pack:linux # Linux (AppImage + DEB + RPM)
---
<a name="community"></a>
# 💬 Community
Scan the QR code with WeChat to join the **Netcatty Official User Group** for feedback, tips, and plugin discussions:
<p align="center">
<img src="docs/assets/readme/wechat-group.jpg" alt="Netcatty Official WeChat Group QR Code" width="260" />
</p>
---
<a name="contributing"></a>
# Contributing
+1 -41
View File
@@ -17,7 +17,7 @@
<p align="center">
一个基于 Electron、React 和 xterm.js 构建的功能丰富的 SSH 工作空间。<br/>
🔥 内置 AI Agent · 🧩 插件系统 · 分屏终端 · Vault 多视图 · SFTP 工作流 · 自定义主题 —— 一应俱全。
🔥 内置 AI Agent · 分屏终端 · Vault 多视图 · SFTP 工作流 · 自定义主题 —— 一应俱全。
</p>
<p align="center">
@@ -38,16 +38,12 @@
<a href="https://github.com/sponsors/binaricat"><img src="https://img.shields.io/badge/GitHub-Sponsors-ea4aaa?style=for-the-badge&logo=githubsponsors&logoColor=white" height="28" alt="通过 GitHub 赞助我"></a>
&nbsp;
<a href="https://ko-fi.com/binaricat"><img src="https://img.shields.io/badge/Ko--fi-Support-29abe0?style=for-the-badge&logo=kofi&logoColor=white" height="28" alt="在 Ko-fi 上支持我"></a>
&nbsp;
<a href="docs/assets/readme/wechat-group.jpg"><img src="https://img.shields.io/badge/%E5%BE%AE%E4%BF%A1%E7%BE%A4-%E5%AE%98%E6%96%B9%E4%BA%A4%E6%B5%81%E7%BE%A4-07C160?style=for-the-badge&logo=wechat&logoColor=white" height="28" alt="加入官方微信交流群"></a>
</p>
<p align="center">
<a href="./README.md">English</a> · <a href="./README.zh-CN.md">简体中文</a> · <a href="./README.zh-TW.md">繁體中文</a> · <a href="./README.ja-JP.md">日本語</a>
</p>
> **说明:** 插件系统和现有的官方插件(Netcatty 数据库、Netcatty 监控)目前仍处于不稳定阶段,使用时请多加留意。如果你遇到问题,欢迎随时[提交 Issue](https://github.com/binaricat/Netcatty/issues),我会尽快修复。详见[公告](https://github.com/binaricat/Netcatty/discussions/4554)。
---
<img width="3358" height="1984" alt="image" src="docs/assets/readme/overview.webp" />
@@ -83,33 +79,9 @@
---
<a name="plugin-system"></a>
# 🧩 插件系统 — 安全扩展你的工作台
> **说明:** 插件系统和现有的官方插件(Netcatty 数据库、Netcatty 监控)目前仍处于不稳定阶段,使用时请多加留意。如果你遇到问题,欢迎随时[提交 Issue](https://github.com/binaricat/Netcatty/issues),我会尽快修复。详见[公告](https://github.com/binaricat/Netcatty/discussions/4554)。
> **在不暴露 SSH 密钥与主进程渲染器的前提下自由扩展 Netcatty。** Netcatty 的安全优先插件平台将普通插件隔离在离线沙箱中运行,并通过**宿主渲染 UI**(Closed Shadow DOM + 原生 Monaco 编辑器、虚拟化数据网格、实时监控/BI 图表与 Vault SSH 隧道代理)呈现原生手感界面。
### ✨ 核心亮点
- 🔒 **离线沙箱与最小权限控制** —— 插件永远无法读取 SSH 密码或私钥,所有宿主能力均受 **允许 / 询问 / 拒绝** 三态权限代理与审计保护。
- 🖥️ **宿主原生 IDE 组件** —— 通过 `@netcatty/plugin-sdk` 使用 React 或原生 DOM 构建 Vault 页面、终端侧栏与弹窗,无缝复用宿主主题。
- 🗄️ **官方插件开箱即用** —— 在 **设置 → 插件** 一键安装 [**Netcatty 数据库**](https://netcatty.app/zh/plugins/netcatty-database)(覆盖 113 种数据库配置、SQL IDE、Catty Agent 侧栏与 BI 看板)和 [**Netcatty 监控**](https://netcatty.app/zh/plugins/netcatty-monitor)(无 Agent 跨平台 SSH 集群监控、Monaco 实时日志与多机对比)。
- 🚀 **多渠道分发与自动检查更新** —— 支持内置**官方插件市场**(`plugins.netcatty.app`)、**从 GitHub 安装**公开 Release、本地导入 `.ncpkg` 以及自建第三方静态市场源。
### 🔗 相关链接与指南
- 🛒 [**官方插件市场**](https://netcatty.app/zh/plugins) —— 浏览官方与社区插件
- 📖 [**插件平台概览**](https://netcatty.app/zh/docs/plugins-overview) —— 隔离架构、宿主渲染 UI 与权限安全模型
- 🛠️ [**插件开发指南**](https://netcatty.app/zh/docs/plugins-development) —— 脚手架初始化、UI 开发、权限声明与 `.ncpkg` 打包调试
- 📤 [**插件市场发布与提交指南**](https://netcatty.app/zh/docs/plugins-marketplace) —— GitHub Release 契约与官方市场 PR 提交流程([`binaricat/netcatty-plugins`](https://github.com/binaricat/netcatty-plugins))
---
# 目录 <!-- omit in toc -->
- [🔥 Catty Agent — AI 搭档](#catty-agent)
- [🧩 插件系统](#plugin-system)
- [Netcatty 是什么](#netcatty-是什么)
- [为什么是 Netcatty](#为什么是-netcatty)
- [功能特性](#功能特性)
@@ -122,7 +94,6 @@
- [快速开始](#快速开始)
- [构建与打包](#构建与打包)
- [技术栈](#技术栈)
- [社区交流](#社区交流)
- [参与贡献](#参与贡献)
- [贡献者](#贡献者)
- [Star 历史](#star-历史)
@@ -355,17 +326,6 @@ npm run pack:linux # Linux (AppImage + DEB + RPM)
---
<a name="社区交流"></a>
# 💬 社区交流
欢迎使用微信扫码加入 **Netcatty 官方用户交流群**,交流使用技巧、插件开发与反馈建议:
<p align="center">
<img src="docs/assets/readme/wechat-group.jpg" alt="Netcatty 官方用户交流群二维码" width="260" />
</p>
---
<a name="参与贡献"></a>
# 参与贡献
+1 -41
View File
@@ -17,7 +17,7 @@
<p align="center">
以 Electron、React 與 xterm.js 打造,介面精緻、功能完整的 SSH 工作區。<br/>
🔥 內建 AI Agent · 🧩 外掛系統 · 分割終端 · Vault 檢視 · SFTP 工作流 · 自訂主題 —— 全部整合在一起。
🔥 內建 AI Agent · 分割終端 · Vault 檢視 · SFTP 工作流 · 自訂主題 —— 全部整合在一起。
</p>
<p align="center">
@@ -38,16 +38,12 @@
<a href="https://github.com/sponsors/binaricat"><img src="https://img.shields.io/badge/GitHub-Sponsors-ea4aaa?style=for-the-badge&logo=githubsponsors&logoColor=white" height="28" alt="透過 GitHub 贊助我"></a>
&nbsp;
<a href="https://ko-fi.com/binaricat"><img src="https://img.shields.io/badge/Ko--fi-Support-29abe0?style=for-the-badge&logo=kofi&logoColor=white" height="28" alt="Support on Ko-fi"></a>
&nbsp;
<a href="docs/assets/readme/wechat-group.jpg"><img src="https://img.shields.io/badge/%E5%BE%AE%E4%BF%A1%E7%BE%A4-%E5%AE%98%E6%96%B9%E4%BA%A4%E6%B5%81%E7%BE%A4-07C160?style=for-the-badge&logo=wechat&logoColor=white" height="28" alt="加入官方微信交流群"></a>
</p>
<p align="center">
<a href="./README.md">English</a> · <a href="./README.zh-CN.md">简体中文</a> · <a href="./README.zh-TW.md">繁體中文</a> · <a href="./README.ja-JP.md">日本語</a>
</p>
> **說明:** 外掛系統與現有的官方外掛(Netcatty 資料庫、Netcatty 監控)目前仍處於不穩定階段,使用時請多加留意。若遇到問題,歡迎隨時[提交 Issue](https://github.com/binaricat/Netcatty/issues),我會盡快修復。詳見[公告](https://github.com/binaricat/Netcatty/discussions/4554)。
---
<img width="3358" height="1984" alt="image" src="docs/assets/readme/overview.webp" />
@@ -83,33 +79,9 @@
---
<a name="plugin-system"></a>
# 🧩 外掛系統 —— 安全擴充你的工作台
> **說明:** 外掛系統與現有的官方外掛(Netcatty 資料庫、Netcatty 監控)目前仍處於不穩定階段,使用時請多加留意。若遇到問題,歡迎隨時[提交 Issue](https://github.com/binaricat/Netcatty/issues),我會盡快修復。詳見[公告](https://github.com/binaricat/Netcatty/discussions/4554)。
> **在不暴露 SSH 金鑰與宿主渲染器的前提下自由擴充 Netcatty。** Netcatty 的安全優先外掛平台將一般外掛隔離於離線沙箱中執行,並透過**宿主渲染 UI**(Closed Shadow DOM + 原生 Monaco 編輯器、虛擬化資料格、即時監控/BI 圖表與 Vault SSH 通道代理)呈現原生體驗。
### ✨ 核心亮點
- 🔒 **離線沙箱與最小權限控制** —— 外掛永遠無法讀取 SSH 密碼或私鑰,所有宿主能力均受 **允許 / 詢問 / 拒絕** 三態權限代理保護。
- 🖥️ **宿主原生 IDE 元件** —— 透過 `@netcatty/plugin-sdk` 以 React 或原生 DOM 開發 Vault 頁面、終端側欄與視窗,無縫跟隨宿主主題。
- 🗄️ **官方外掛開箱即用** —— 在 **設定 → 外掛** 一鍵安裝 [**Netcatty 資料庫**](https://netcatty.app/zh/plugins/netcatty-database)(113 種資料庫設定、SQL IDE、Catty Agent 側欄與 BI 看板)與 [**Netcatty 監控**](https://netcatty.app/zh/plugins/netcatty-monitor)(無 Agent 跨平台 SSH 叢集監控、Monaco 即時日誌與多機對比)。
- 🚀 **多元分發與自動檢查更新** —— 支援內建**官方外掛市場**(`plugins.netcatty.app`)、**從 GitHub 安裝**公開 Release、本機匯入 `.ncpkg` 以及自建第三方靜態市場源。
### 🔗 相關連結與指南
- 🛒 [**官方外掛市場**](https://netcatty.app/zh/plugins) —— 瀏覽官方與社群外掛
- 📖 [**外掛平台概覽**](https://netcatty.app/zh/docs/plugins-overview) —— 隔離架構、宿主渲染 UI 與權限安全模型
- 🛠️ [**外掛開發指南**](https://netcatty.app/zh/docs/plugins-development) —— 初始化專案、UI 開發、權限宣告與 `.ncpkg` 打包除錯
- 📤 [**外掛市場發布與提交指南**](https://netcatty.app/zh/docs/plugins-marketplace) —— GitHub Release 契約與官方市場 PR 提交流程([`binaricat/netcatty-plugins`](https://github.com/binaricat/netcatty-plugins))
---
# 目錄 <!-- omit in toc -->
- [🔥 Catty Agent —— AI 夥伴](#catty-agent)
- [🧩 外掛系統](#plugin-system)
- [Netcatty 是什麼](#netcatty-是什麼)
- [為什麼選 Netcatty](#為什麼選-netcatty)
- [功能特色](#功能特色)
@@ -122,7 +94,6 @@
- [快速開始](#快速開始)
- [建置與打包](#建置與打包)
- [技術堆疊](#技術堆疊)
- [社群交流](#社群交流)
- [參與貢獻](#參與貢獻)
- [貢獻者](#貢獻者)
- [Star 紀錄](#star-紀錄)
@@ -354,17 +325,6 @@ npm run pack:linux # Linux (AppImage + DEB + RPM)
---
<a name="社群交流"></a>
# 💬 社群交流
歡迎使用微信掃描下方 QR Code 加入 **Netcatty 官方用戶交流群**,交流使用技巧、外掛開發與回饋建議:
<p align="center">
<img src="docs/assets/readme/wechat-group.jpg" alt="Netcatty 官方用戶交流群 QR Code" width="260" />
</p>
---
<a name="參與貢獻"></a>
# 參與貢獻
@@ -1137,159 +1137,3 @@ test('executeHotkeyActionImpl reopenClosedTab calls reopenLastClosedTab and reco
assert.equal(logs[1].username, 'dev');
assert.equal(logs[1].protocol, 'local');
});
for (const scheme of ['pc', 'mac'] as const) {
test(`addSessionToWorkspace shortcut ${scheme}: opens append dialog and consumes event only when a workspace is active`, () => {
const target = new FakeHTMLElement();
for (const scenario of [
{ name: 'active workspace', activeTabId: 'workspace-1', expectConsume: true },
{ name: 'standalone terminal', activeTabId: 'session-1', expectConsume: false },
{ name: 'vault tab', activeTabId: 'vault', expectConsume: false },
{ name: 'sftp tab', activeTabId: 'sftp', expectConsume: false },
{ name: 'editor tab', activeTabId: 'editor:file-1', expectConsume: false },
{ name: 'log view tab', activeTabId: 'log-1', expectConsume: false },
{ name: 'plugin view tab', activeTabId: 'plugin-view:demo:main', expectConsume: false },
]) {
const dialogCalls: unknown[] = [];
let prevented = 0;
let stopped = 0;
const event = {
key: 'n',
code: 'KeyN',
ctrlKey: scheme === 'pc',
metaKey: scheme === 'mac',
altKey: false,
shiftKey: false,
target,
composedPath: () => [target],
preventDefault: () => { prevented += 1; },
stopPropagation: () => { stopped += 1; },
} as unknown as KeyboardEvent;
const actionCtx = {
activeTabStore: { getActiveTabId: () => scenario.activeTabId },
editorTabs: [{ id: 'file-1' }],
orderedTabs: ['session-1', 'workspace-1'],
sessions: [{ id: 'session-1' }, { id: 's-ws', workspaceId: 'workspace-1' }],
settings: { showSftpTab: true, shellOnlyTabNumberShortcuts: false },
setAddToWorkspaceDialog: (value: unknown) => { dialogCalls.push(value); },
toEditorTabId: (id: string) => `editor:${id}`,
workspaces: [{ id: 'workspace-1', title: 'Workspace 1' }],
};
handleGlobalHotkeyKeyDownImpl(
() => ({
HOTKEY_DEBUG: false,
closeTabKeyStr: '',
hotkeyScheme: scheme,
keyBindings: DEFAULT_KEY_BINDINGS,
matchesKeyBinding,
executeHotkeyAction: (action: string, ev: KeyboardEvent) =>
executeHotkeyActionImpl(() => actionCtx, action, ev),
}),
event,
);
assert.deepEqual(
dialogCalls,
scenario.expectConsume ? [{ mode: 'append', workspaceId: 'workspace-1' }] : [],
`${scheme} / ${scenario.name}: dialog calls`,
);
assert.equal(
prevented,
scenario.expectConsume ? 1 : 0,
`${scheme} / ${scenario.name}: preventDefault count`,
);
assert.equal(
stopped,
scenario.expectConsume ? 1 : 0,
`${scheme} / ${scenario.name}: stopPropagation count`,
);
}
});
}
test('addSessionToWorkspace shortcut stays out of form inputs and Monaco even while a workspace is active', () => {
for (const [label, target] of [
['input', new FakeInputHTMLElement()],
['monaco', new FakeMonacoHTMLElement()],
] as const) {
const dialogCalls: unknown[] = [];
let prevented = 0;
let stopped = 0;
const event = {
key: 'n',
code: 'KeyN',
ctrlKey: true,
metaKey: false,
altKey: false,
shiftKey: false,
target,
composedPath: () => [target],
preventDefault: () => { prevented += 1; },
stopPropagation: () => { stopped += 1; },
} as unknown as KeyboardEvent;
handleGlobalHotkeyKeyDownImpl(
() => ({
HOTKEY_DEBUG: false,
closeTabKeyStr: '',
hotkeyScheme: 'pc',
keyBindings: DEFAULT_KEY_BINDINGS,
matchesKeyBinding,
executeHotkeyAction: (action: string, ev: KeyboardEvent) =>
executeHotkeyActionImpl(() => ({
activeTabStore: { getActiveTabId: () => 'workspace-1' },
editorTabs: [],
orderedTabs: ['workspace-1'],
sessions: [],
settings: {},
setAddToWorkspaceDialog: (value: unknown) => { dialogCalls.push(value); },
toEditorTabId: (id: string) => `editor:${id}`,
workspaces: [{ id: 'workspace-1', title: 'Workspace 1' }],
}), action, ev),
}),
event,
);
assert.deepEqual(dialogCalls, [], `${label} should not open workspace dialog`);
assert.equal(prevented, 0, `${label} should not preventDefault`);
assert.equal(stopped, 0, `${label} should not stopPropagation`);
}
});
test('executeHotkeyActionImpl addSessionToWorkspace returns boolean availability defensively', () => {
const dialogCalls: unknown[] = [];
const makeCtx = (overrides: Record<string, unknown> = {}) => ({
activeTabStore: { getActiveTabId: () => 'workspace-1' },
editorTabs: [],
orderedTabs: [],
sessions: [],
settings: {},
setAddToWorkspaceDialog: (value: unknown) => { dialogCalls.push(value); },
toEditorTabId: (id: string) => `editor:${id}`,
workspaces: [{ id: 'workspace-1', title: 'Workspace 1' }],
...overrides,
});
assert.equal(
executeHotkeyActionImpl(() => makeCtx({ workspaces: undefined }), 'addSessionToWorkspace', {} as KeyboardEvent),
false,
);
assert.equal(
executeHotkeyActionImpl(() => makeCtx({ setAddToWorkspaceDialog: undefined }), 'addSessionToWorkspace', {} as KeyboardEvent),
false,
);
assert.equal(
executeHotkeyActionImpl(() => makeCtx({ activeTabStore: { getActiveTabId: () => 'session-1' } }), 'addSessionToWorkspace', {} as KeyboardEvent),
false,
);
assert.deepEqual(dialogCalls, []);
assert.equal(
executeHotkeyActionImpl(() => makeCtx(), 'addSessionToWorkspace', {} as KeyboardEvent),
true,
);
assert.deepEqual(dialogCalls, [{ mode: 'append', workspaceId: 'workspace-1' }]);
});
+36 -246
View File
@@ -9,25 +9,6 @@ import { getAvailablePaneMagnificationController } from '../../domain/paneMagnif
import { sanitizeHostIconFields } from '../../domain/hostIcon';
import { resolveEffectiveTerminalProtocol } from '../../domain/terminalProtocol';
import { isPluginHostProtocol } from '../../domain/pluginConnection';
import {
applyHostDefaultConnectProtocol,
buildHostForProtocolOverride,
isRemoteDesktopProtocol,
resolveRemoteDesktopConnectionSpec,
shouldPromptHostProtocolOnConnect,
type RemoteDesktopProtocol,
} from '../../domain/remoteDesktop';
import { resolveTerminalChainHosts } from '../../domain/terminalHostResolution';
import { selectConnectionLogForTerminalDataCapture } from '../../domain/connectionLog';
import {
buildSystemRemoteDesktopPayload,
isRemoteDesktopGrabReleaseChord,
isTargetInsideRemoteDesktopCapture,
} from '../../components/remoteDesktop/remoteDesktopHelpers';
import {
getConnectionLogsActions,
getConnectionLogsSnapshot,
} from '../state/connectionLogsStore';
import { getTerminalPassthroughActions } from '../state/useGlobalHotkeys';
import { getSettingsChromeSnapshot } from '../state/settingsChromeStore';
import { isHostTreeWorkTabSurface } from './workTabSurface';
@@ -270,24 +251,11 @@ export function flushQueuedTrayPanelConnectHostsImpl(getCtx: AppContextGetter) {
}
export function handleGlobalHotkeyKeyDownImpl(getCtx: AppContextGetter, e: KeyboardEvent) {
const { HOTKEY_DEBUG, executeHotkeyAction, hotkeyScheme, keyBindings, matchesKeyBinding } = getCtx();
const { HOTKEY_DEBUG, closeTabKeyStr, executeHotkeyAction, hotkeyScheme, keyBindings, matchesKeyBinding } = getCtx();
{
if (
isTargetInsideRemoteDesktopCapture(e.target, e.composedPath?.bind(e))
&& !isRemoteDesktopGrabReleaseChord(e)
) {
return;
}
const isMac = hotkeyScheme === 'mac';
// Secondary chords added in Settings share the action of their default
// binding, so every "is this action's shortcut?" check must scan all of them.
const matchesActionHotkey = (action: string): boolean => keyBindings.some((binding) => (
binding.action === action
&& matchesKeyBinding(e, isMac ? binding.mac : binding.pc, isMac)
));
const target = e.target as HTMLElement;
const isCloseTabHotkey = matchesActionHotkey('closeTab');
const isCloseTabHotkey = closeTabKeyStr ? matchesKeyBinding(e, closeTabKeyStr, isMac) : false;
const dialogHotkeyScope = target.closest?.('[data-hotkey-close-tab="true"]');
if (isCloseTabHotkey && dialogHotkeyScope) {
@@ -314,9 +282,15 @@ export function handleGlobalHotkeyKeyDownImpl(getCtx: AppContextGetter, e: Keybo
target instanceof HTMLElement &&
!!target.closest?.(".xterm, .xterm-helper-textarea, .xterm-screen, .xterm-viewport");
const isQuickSwitchHotkey = matchesActionHotkey('quickSwitch');
const isPaneZoomHotkey = matchesActionHotkey('togglePaneZoom');
const isHostTreeHotkey = matchesActionHotkey('toggleHostTree');
const quickSwitchBinding = keyBindings.find((binding) => binding.action === 'quickSwitch');
const quickSwitchKeyStr = quickSwitchBinding ? (isMac ? quickSwitchBinding.mac : quickSwitchBinding.pc) : null;
const isQuickSwitchHotkey = quickSwitchKeyStr ? matchesKeyBinding(e, quickSwitchKeyStr, isMac) : false;
const paneZoomBinding = keyBindings.find((binding) => binding.action === 'togglePaneZoom');
const paneZoomKeyStr = paneZoomBinding ? (isMac ? paneZoomBinding.mac : paneZoomBinding.pc) : null;
const isPaneZoomHotkey = paneZoomKeyStr ? matchesKeyBinding(e, paneZoomKeyStr, isMac) : false;
const hostTreeBinding = keyBindings.find((binding) => binding.action === 'toggleHostTree');
const hostTreeKeyStr = hostTreeBinding ? (isMac ? hostTreeBinding.mac : hostTreeBinding.pc) : null;
const isHostTreeHotkey = hostTreeKeyStr ? matchesKeyBinding(e, hostTreeKeyStr, isMac) : false;
if (
(isFormElement || isMonacoElement)
@@ -366,21 +340,13 @@ export function handleGlobalHotkeyKeyDownImpl(getCtx: AppContextGetter, e: Keybo
});
if (!hasOpenHostModal) {
const inPluginSurface = Boolean(target?.closest?.('[data-plugin-remote-surface]'));
const visibleFullBleedSurfaces = Array.from(
const activeFullBleedSurface = inPluginSurface || Array.from(
document.querySelectorAll<HTMLElement>('[data-plugin-chrome="full-bleed"] [data-plugin-remote-surface]'),
).filter((el) => {
).some((el) => {
const r = el.getBoundingClientRect();
return r.width > 0 && r.height > 0;
});
const active = document.activeElement;
const focusInsideHostChrome = Boolean(
active
&& active !== document.body
&& active !== document.documentElement
&& !visibleFullBleedSurfaces.some((el) => el.contains(active))
&& !active.closest?.('[data-plugin-view-slot]'),
);
if (inPluginSurface || (visibleFullBleedSurfaces.length > 0 && !focusInsideHostChrome)) {
if (activeFullBleedSurface) {
return;
}
}
@@ -394,13 +360,8 @@ export function handleGlobalHotkeyKeyDownImpl(getCtx: AppContextGetter, e: Keybo
// An unavailable action must leave the chord to the terminal.
// Broadcast keeps Ctrl/Cmd+B for tmux; the host list keeps Ctrl/Cmd+Shift+B
// when the sidebar cannot show; addSessionToWorkspace keeps Ctrl/Cmd+N
// when no workspace tab is active. Dispatch once before consuming it.
if (
binding.action === 'broadcast'
|| binding.action === 'toggleHostTree'
|| binding.action === 'addSessionToWorkspace'
) {
// when the sidebar cannot show. Dispatch once before consuming it.
if (binding.action === 'broadcast' || binding.action === 'toggleHostTree') {
if (executeHotkeyAction(binding.action, e) === true) {
e.preventDefault();
e.stopPropagation();
@@ -915,40 +876,6 @@ export function collectBatchBusyProbeSessionIds(
return sessionIdsToProbe;
}
/**
* Stamp `endTime` on open RDP/VNC `ConnectionLog` entries when remote desktop
* sessions close so they do not stay stuck at "Ongoing" in Connection Logs.
*/
export function stampRemoteDesktopSessionEndTimes(
getCtx: AppContextGetter,
closingSessionIds: readonly string[],
): number {
if (!closingSessionIds.length) return 0;
const ctx = getCtx();
const sessionsList: TerminalSession[] = Array.isArray(ctx.sessions) ? ctx.sessions : [];
const logs = Array.isArray(ctx.connectionLogs)
? ctx.connectionLogs
: [...getConnectionLogsSnapshot().connectionLogs];
const updateLog = ctx.updateConnectionLog ?? getConnectionLogsActions()?.updateConnectionLog;
if (!updateLog || logs.length === 0) return 0;
let stamped = 0;
const now = Date.now();
for (const sessionId of new Set(closingSessionIds)) {
const session = sessionsList.find((candidate) => candidate.id === sessionId);
const matchingLog = selectConnectionLogForTerminalDataCapture(logs, {
sessionId,
hostname: session?.hostname,
});
if (!matchingLog || matchingLog.endTime) continue;
const protocol = session?.protocol ?? matchingLog.protocol;
if (!isRemoteDesktopProtocol(protocol)) continue;
void Promise.resolve(updateLog(matchingLog.id, { endTime: now })).catch(() => {});
stamped += 1;
}
return stamped;
}
export async function closeTabsBatchImpl(getCtx: AppContextGetter, targetIds: string[]) {
const {
closeLogView, closeSessions, closeTabsInFlightRef, closeWorkspace,
@@ -986,12 +913,6 @@ export async function closeTabsBatchImpl(getCtx: AppContextGetter, targetIds: st
sessions.some((session) => session.workspaceId === id && keepTabIds.has(session.id))
));
const standaloneSessionIds = effectiveRegularIds.filter((id) => sessions.some((session) => session.id === id));
const workspaceSessionIds = effectiveRegularIds.flatMap((id) => (
workspaces.some((workspace) => workspace.id === id)
? sessions.filter((session) => session.workspaceId === id).map((session) => session.id)
: []
));
stampRemoteDesktopSessionEndTimes(getCtx, [...standaloneSessionIds, ...workspaceSessionIds]);
if (standaloneSessionIds.length) closeSessions(standaloneSessionIds);
for (const id of effectiveRegularIds) {
if (workspaces.some((workspace) => workspace.id === id)) closeWorkspace(id);
@@ -1085,19 +1006,13 @@ export function executeHotkeyActionImpl(getCtx: AppContextGetter, action: string
switch (intent.kind) {
case 'closeSingleTab': {
const ok = await confirmIfBusyLocalTerminal([intent.sessionId]);
if (ok) {
stampRemoteDesktopSessionEndTimes(getCtx, [intent.sessionId]);
closeSession(intent.sessionId);
}
if (ok) closeSession(intent.sessionId);
return;
}
case 'closeWorkspace': {
const ids = sessions.filter((s) => s.workspaceId === intent.workspaceId).map((s) => s.id);
const ok = await confirmIfBusyLocalTerminal(ids);
if (ok) {
stampRemoteDesktopSessionEndTimes(getCtx, ids);
closeWorkspace(intent.workspaceId);
}
if (ok) closeWorkspace(intent.workspaceId);
return;
}
case 'noop':
@@ -1133,7 +1048,6 @@ export function executeHotkeyActionImpl(getCtx: AppContextGetter, action: string
if (focusedId) {
const ok = await confirmIfBusyLocalTerminal([focusedId]);
if (ok) {
stampRemoteDesktopSessionEndTimes(getCtx, [focusedId]);
// The pane shortcut closes the tab when only one pane remains.
if (aliveIds.length === 1) closeWorkspace(workspace.id);
else closeSession(focusedId);
@@ -1142,10 +1056,7 @@ export function executeHotkeyActionImpl(getCtx: AppContextGetter, action: string
} else if (session) {
// Standalone session tab — close the session
const ok = await confirmIfBusyLocalTerminal([session.id]);
if (ok) {
stampRemoteDesktopSessionEndTimes(getCtx, [session.id]);
closeSession(session.id);
}
if (ok) closeSession(session.id);
}
} finally {
closeTabInFlightRef.current = false;
@@ -1223,17 +1134,6 @@ export function executeHotkeyActionImpl(getCtx: AppContextGetter, action: string
// button, but without having to open QS first.
setAddToWorkspaceDialog({ mode: 'create' });
break;
case 'addSessionToWorkspace': {
// Open the same append-mode picker the workspace tab context menu
// uses, targeting the currently active workspace. A standalone tab
// (or vault/settings) has no workspace to append into, so return false
// to leave the chord for the active surface or terminal.
const currentId = activeTabStore.getActiveTabId();
const activeWs = (workspaces ?? []).find((w) => w.id === currentId);
if (!activeWs || typeof setAddToWorkspaceDialog !== 'function') return false;
setAddToWorkspaceDialog({ mode: 'append', workspaceId: activeWs.id });
return true;
}
case 'portForwarding':
// Navigate to vault and open port forwarding section
setActiveTabId('vault');
@@ -1460,11 +1360,7 @@ export function handleConnectToHostImpl(getCtx: AppContextGetter, host: Host, hi
// Local-shell vault hosts carry no SSH credentials, so log the system
// user like local terminals do (see handleCreateLocalTerminalImpl)
// instead of 'root' or an inherited group SSH username.
username: protocol === 'local'
? username
: isRemoteDesktopProtocol(protocol)
? (effectiveHost.username || '')
: (resolvedAuth.username || 'root'),
username: protocol === 'local' ? username : (resolvedAuth.username || 'root'),
protocol,
...getLogHostVisualSnapshot(effectiveHost),
startTime: Date.now(),
@@ -1476,85 +1372,6 @@ export function handleConnectToHostImpl(getCtx: AppContextGetter, host: Host, hi
}
}
export function handleConnectRemoteDesktopImpl(
getCtx: AppContextGetter,
host: Host,
protocol: RemoteDesktopProtocol,
options?: { splitFromSessionId?: string },
) {
const { addConnectionLog, connectToHostRemoteDesktop, identities, resolveEffectiveHost, systemInfoRef } = getCtx();
const effectiveHost = resolveEffectiveHost(host);
const spec = resolveRemoteDesktopConnectionSpec(effectiveHost, protocol, identities ?? []);
const sessionId = connectToHostRemoteDesktop(effectiveHost, protocol, options);
if (!sessionId) return null;
const { username: localUsername, hostname: localHostname } = systemInfoRef.current;
addConnectionLog({
sessionId,
hostId: host.id,
hostLabel: spec.isCompanion ? `${spec.label} (${protocol.toUpperCase()})` : spec.label,
hostname: spec.hostHostname,
username: spec.username,
protocol,
...getLogHostVisualSnapshot(effectiveHost),
startTime: Date.now(),
localUsername,
localHostname,
saved: false,
});
return sessionId;
}
export async function handleOpenSystemRemoteDesktopImpl(
getCtx: AppContextGetter,
host: Host,
protocol: RemoteDesktopProtocol,
rawRdpContent?: string,
) {
const {
groupConfigs,
hosts,
identities,
keys,
knownHosts,
netcattyBridge,
proxyProfiles,
resolveEffectiveHost,
toast,
} = getCtx();
const rdBridge = netcattyBridge.get()?.remoteDesktop;
if (!rdBridge?.openSystemClient) {
toast?.error?.('System remote desktop launch is unavailable');
return { ok: false };
}
const effectiveHost = resolveEffectiveHost(host);
const chainHosts = resolveTerminalChainHosts({
host: effectiveHost,
hosts: hosts ?? [],
groupConfigs: groupConfigs ?? [],
proxyProfiles: proxyProfiles ?? [],
});
const payload = buildSystemRemoteDesktopPayload({
host: effectiveHost,
protocol,
chainHosts,
keys: keys ?? [],
identities: identities ?? [],
knownHosts: knownHosts ?? [],
rawRdpContent,
});
try {
const result = await rdBridge.openSystemClient(payload);
if (!result?.ok) {
toast?.error?.(result?.error || 'Failed to open system remote desktop client');
}
return result;
} catch (err) {
const message = err instanceof Error ? err.message : 'Failed to open system remote desktop client';
toast?.error?.(message);
return { ok: false, error: message };
}
}
export function startRestoredSessionConnectionLogImpl(getCtx: AppContextGetter, session: TerminalSession) {
const { addConnectionLog, systemInfoRef } = getCtx();
const { username, hostname } = systemInfoRef.current;
@@ -1591,16 +1408,10 @@ export async function handleTerminalDataCaptureImpl(getCtx: AppContextGetter, se
// The IndexedDB replay write commits asynchronously. Waiting here keeps
// a crash during session teardown from dropping the newest capture any
// more often than the old synchronous localStorage write.
const isRemoteDesktopLog = isRemoteDesktopProtocol(session?.protocol ?? matchingLog.protocol);
await updateConnectionLog(
matchingLog.id,
isRemoteDesktopLog && !data
? { endTime: Date.now() }
: {
endTime: Date.now(),
terminalData: data,
},
);
await updateConnectionLog(matchingLog.id, {
endTime: Date.now(),
terminalData: data,
});
if (IS_DEV) console.log('[handleTerminalDataCapture] Updated log with terminalData');
// Auto-save is now handled by real-time streaming in the main process
@@ -1622,7 +1433,8 @@ export function hasMultipleProtocolsImpl(getCtx: AppContextGetter, host: Host) {
// SSH/Telnet pickers driven by an inherited group Telnet flag. Hosts
// without an explicit protocol are legacy SSH entries.
const effective = resolveEffectiveHost(host);
return shouldPromptHostProtocolOnConnect(effective);
const effectiveProtocol = effective.protocol ?? 'ssh';
return effectiveProtocol === 'ssh' && Boolean(effective.telnetEnabled);
}
}
@@ -1639,40 +1451,18 @@ export function handleHostConnectWithProtocolCheckImpl(getCtx: AppContextGetter,
}
}
export function handleProtocolSelectImpl(
getCtx: AppContextGetter,
protocol: HostProtocol,
port: number,
rememberDefault?: boolean,
) {
const {
handleConnectToHost,
handleConnectRemoteDesktop,
protocolSelectHost,
setProtocolSelectHost,
updateHosts,
} = getCtx();
export function handleProtocolSelectImpl(getCtx: AppContextGetter, protocol: HostProtocol, port: number) {
const { handleConnectToHost, protocolSelectHost, setProtocolSelectHost } = getCtx();
{
if (protocolSelectHost) {
if (
rememberDefault &&
typeof updateHosts === 'function' &&
(protocol === 'ssh' || protocol === 'mosh' || protocol === 'et' || protocol === 'rdp' || protocol === 'vnc' || protocol === 'telnet')
) {
updateHosts((prev: Host[]) =>
prev.map((h) =>
h.id === protocolSelectHost.id
? applyHostDefaultConnectProtocol(h, protocol)
: h,
),
);
}
const dispatch = buildHostForProtocolOverride(protocolSelectHost, protocol, port);
if (dispatch.mode === 'remoteDesktop' && typeof handleConnectRemoteDesktop === 'function') {
handleConnectRemoteDesktop(dispatch.host, dispatch.protocol);
} else {
handleConnectToHost(dispatch.host);
}
const hostWithProtocol: Host = {
...protocolSelectHost,
protocol: (protocol === 'mosh' || protocol === 'et') ? 'ssh' : protocol,
port,
moshEnabled: protocol === 'mosh',
etEnabled: protocol === 'et',
};
handleConnectToHost(hostWithProtocol);
setProtocolSelectHost(null);
}
}
+4 -6
View File
@@ -1,12 +1,12 @@
import React, { Suspense, lazy, useMemo, useState } from 'react';
import React, { useMemo, useState } from 'react';
import type { WorkSurfaceHostEditorTarget } from '../state/useWorkSurfaceHostEditor';
import type { EditorTabChrome } from '../state/editorTabStore';
import type { LogView } from '../state/logViewState';
import { useI18n } from '../i18n/I18nProvider';
const HostDetailsPanel = lazy(() => import('../../components/HostDetailsPanel'));
const LocalShellHostDetailsPanel = lazy(() => import('../../components/LocalShellHostDetailsPanel'));
const SerialHostDetailsPanel = lazy(() => import('../../components/SerialHostDetailsPanel'));
import HostDetailsPanel from '../../components/HostDetailsPanel';
import LocalShellHostDetailsPanel from '../../components/LocalShellHostDetailsPanel';
import SerialHostDetailsPanel from '../../components/SerialHostDetailsPanel';
import { PortalContainerProvider } from '../../components/ui/portal-container';
import { resolveGroupDefaults } from '../../domain/groupConfig';
import { STORAGE_KEY_VAULT_HOST_PANEL_WIDTH } from '@/infrastructure/config/storageKeys';
@@ -163,7 +163,6 @@ export const AppHostEditorLayer: React.FC<AppHostEditorLayerProps> = ({
style={getAppHostEditorLayerStyle(surfaceVisible)}
>
<PortalContainerProvider container={portalContainer}>
<Suspense fallback={null}>
{target.mode === 'edit' && target.openedHost.protocol === 'local' ? (
<LocalShellHostDetailsPanel
key={editorKey}
@@ -216,7 +215,6 @@ export const AppHostEditorLayer: React.FC<AppHostEditorLayerProps> = ({
{...hostPanelResizeProps}
/>
)}
</Suspense>
</PortalContainerProvider>
</div>
);
+15 -36
View File
@@ -1,4 +1,4 @@
import React, { Suspense, lazy, memo, useMemo, useRef, useState } from 'react';
import React, { memo, useMemo, useRef } from 'react';
import { useActiveTabId } from '../state/activeTabStore';
import { useAppearanceChromeStore } from '../state/appearanceChromeStore';
@@ -6,6 +6,7 @@ import type { EditorTabChrome } from '../state/editorTabStore';
import type { LogView } from '../state/logViewState';
import { useTerminalHostTreeOpen } from '../state/terminalHostTreeStore';
import { useManualTerminalChromeSurfaceInjection } from '../state/useManualTerminalChromeSurfaceInjection';
import { TerminalHostTreeSidebar } from '../../components/terminalLayer/TerminalHostTreeSidebar';
import type {
ResolvedAppearance,
TerminalAppearanceHostScope,
@@ -17,12 +18,6 @@ import {
resolveWorkTabActiveHostId,
} from './workTabSurface';
const TerminalHostTreeSidebar = lazy(() =>
import('../../components/terminalLayer/TerminalHostTreeSidebar').then((mod) => ({
default: mod.TerminalHostTreeSidebar,
})),
);
interface AppHostTreeLayerProps {
enabled: boolean;
hosts: Host[];
@@ -39,8 +34,6 @@ interface AppHostTreeLayerProps {
themeById: ReadonlyMap<string, TerminalTheme>;
resolveSessionAppearance?: (hostScope: TerminalAppearanceHostScope) => ResolvedAppearance;
onConnect: (host: Host) => void;
onConnectRemoteDesktop?: (host: Host, protocol: 'vnc' | 'rdp') => void;
onOpenSystemRemoteDesktop?: (host: Host, protocol: 'vnc' | 'rdp') => void;
onNewHost?: (defaultGroup?: string) => void;
onEditHost?: (host: Host) => void;
onCreateLocalTerminal?: () => void;
@@ -75,8 +68,6 @@ function appHostTreeLayerAreEqual(
&& prev.themeById === next.themeById
&& prev.resolveSessionAppearance === next.resolveSessionAppearance
&& prev.onConnect === next.onConnect
&& prev.onConnectRemoteDesktop === next.onConnectRemoteDesktop
&& prev.onOpenSystemRemoteDesktop === next.onOpenSystemRemoteDesktop
&& prev.onNewHost === next.onNewHost
&& prev.onEditHost === next.onEditHost
&& prev.onCreateLocalTerminal === next.onCreateLocalTerminal;
@@ -98,8 +89,6 @@ const AppHostTreeLayerInner: React.FC<AppHostTreeLayerProps> = ({
themeById,
resolveSessionAppearance,
onConnect,
onConnectRemoteDesktop,
onOpenSystemRemoteDesktop,
onNewHost,
onEditHost,
onCreateLocalTerminal,
@@ -127,10 +116,6 @@ const AppHostTreeLayerInner: React.FC<AppHostTreeLayerProps> = ({
workspaceIds,
});
const sidebarActive = surfaceVisible && enabled && isHostTreeOpen;
const [hasMountedSidebar, setHasMountedSidebar] = useState(sidebarActive);
if (sidebarActive && !hasMountedSidebar) {
setHasMountedSidebar(true);
}
const activeHostId = useMemo(() => (
sidebarActive
@@ -191,25 +176,19 @@ const AppHostTreeLayerInner: React.FC<AppHostTreeLayerProps> = ({
data-section="app-host-tree-layer"
style={getAppHostTreeLayerStyle(surfaceVisible)}
>
{hasMountedSidebar ? (
<Suspense fallback={null}>
<TerminalHostTreeSidebar
enabled={enabled}
surfaceVisible={surfaceVisible}
hosts={hosts}
customGroups={customGroups}
groupConfigs={groupConfigs}
resolvedPreviewTheme={sidebarPreviewTheme}
activeHostId={activeHostId}
onConnect={onConnect}
onConnectRemoteDesktop={onConnectRemoteDesktop}
onOpenSystemRemoteDesktop={onOpenSystemRemoteDesktop}
onNewHost={onNewHost}
onEditHost={onEditHost}
onCreateLocalTerminal={onCreateLocalTerminal}
/>
</Suspense>
) : null}
<TerminalHostTreeSidebar
enabled={enabled}
surfaceVisible={surfaceVisible}
hosts={hosts}
customGroups={customGroups}
groupConfigs={groupConfigs}
resolvedPreviewTheme={sidebarPreviewTheme}
activeHostId={activeHostId}
onConnect={onConnect}
onNewHost={onNewHost}
onEditHost={onEditHost}
onCreateLocalTerminal={onCreateLocalTerminal}
/>
</div>
);
};
+15 -4
View File
@@ -196,9 +196,9 @@ export const TerminalLayerMount: React.FC<TerminalLayerProps> = (props) => {
const isVisible = isTerminalSurfaceActive || !!props.draggingSessionId;
// Silent MCP sessions never become the activeTabId, so `isVisible` alone
// would leave this whole layer (and its PTY-starting TerminalPane) unmounted
// after host_open returns — racing an immediate terminal_execute.
// for up to 5s (the idle-callback fallback below) after host_open returns —
// long enough for an immediate terminal_execute to race an unstarted session.
const hasHiddenSession = props.sessions.some((session) => session.hiddenFromTabs);
const hasTerminalContent = props.sessions.length > 0 || props.workspaces.length > 0;
const [shouldMount, setShouldMount] = useState(isVisible || hasHiddenSession);
useEffect(() => {
@@ -206,8 +206,19 @@ export const TerminalLayerMount: React.FC<TerminalLayerProps> = (props) => {
}, [isVisible, hasHiddenSession]);
useEffect(() => {
if (hasTerminalContent) setShouldMount(true);
}, [hasTerminalContent]);
if (shouldMount) return;
type IdleWindow = Window & {
requestIdleCallback?: (callback: () => void, options?: { timeout: number }) => number;
cancelIdleCallback?: (id: number) => void;
};
const idleWindow = window as IdleWindow;
if (typeof idleWindow.requestIdleCallback === "function") {
const id = idleWindow.requestIdleCallback(() => setShouldMount(true), { timeout: 5000 });
return () => idleWindow.cancelIdleCallback?.(id);
}
const id = window.setTimeout(() => setShouldMount(true), 5000);
return () => window.clearTimeout(id);
}, [shouldMount]);
const shouldRender = shouldRenderTerminalLayerMount(isVisible, shouldMount);
+1 -20
View File
@@ -1,10 +1,6 @@
import React, { useEffect, useMemo } from 'react';
import React, { useMemo } from 'react';
import { PluginContributionHost } from '../../components/plugins/PluginContributionHost';
import {
isRemoteDesktopGrabReleaseChord,
isTargetInsideRemoteDesktopCapture,
} from '../../components/remoteDesktop/remoteDesktopHelpers';
import type { TerminalSession, Workspace } from '../../types';
import { useActiveTabId } from '../state/activeTabStore';
import { resolveActivePluginKeybindingContext } from '../state/pluginContributionContexts';
@@ -29,21 +25,6 @@ export function AppPluginKeybindingHost({
workspaces: Workspace[];
}) {
const activeTabId = useActiveTabId();
// Short-circuit plugin keybindings when keyboard focus is inside an active
// remote desktop capture surface (except for the grab-release chord).
useEffect(() => {
const onDocumentKeyDown = (event: KeyboardEvent) => {
if (!isTargetInsideRemoteDesktopCapture(event.target, event.composedPath?.bind(event))) {
return;
}
if (isRemoteDesktopGrabReleaseChord(event)) return;
event.preventDefault();
};
document.addEventListener('keydown', onDocumentKeyDown);
return () => document.removeEventListener('keydown', onDocumentKeyDown);
}, []);
const keybindingContext = useMemo(() => {
// AI chat recency drives the workspace anchor fallback (#4098 phase 2).
// Read without subscribing: keybinding context is best-effort and refreshes
+14 -122
View File
@@ -66,7 +66,7 @@ import type { PaneMagnificationController } from '../../domain/paneMagnification
import { isPluginViewEditingTarget } from '../state/pluginKeybindings';
import { resolveCloseIntent } from '../state/resolveCloseIntent';
import { resolveSnippetsShortcutIntent } from '../state/resolveSnippetsShortcutIntent';
import { isNativeCloseTabBound, resolveWindowCommandCloseIntent } from '../state/windowCommandClose';
import { isPrimaryModifierWBinding, resolveWindowCommandCloseIntent } from '../state/windowCommandClose';
import type { SyncPayload } from '../../domain/sync';
import { prepareSyncPayloadApply, buildLocalVaultPayloadAsync, hasMeaningfulSyncData } from '../syncPayload';
import {
@@ -104,8 +104,7 @@ import { collectSnippetDeleteIds } from '../../domain/snippetSelection.ts';
import { shouldOpenLocalTerminalOnStartup, resolveStartupLandingSetting } from '../../domain/startupLanding';
import { createOpenTerminalQueue } from './openTerminalQueue';
import { useAppStartupEffects } from './useAppStartupEffects';
import { handleTrayJumpToSessionImpl, handleTrayTogglePortForwardImpl, handleTrayPanelConnectImpl, handleTrayPanelConnectRequestImpl, flushQueuedTrayPanelConnectHostsImpl, handleGlobalHotkeyKeyDownImpl, handleEscapeKeyDownImpl, handleKeyboardInteractiveSubmitImpl, handleKeyboardInteractiveCancelImpl, handlePassphraseSubmitImpl, handlePassphraseCancelImpl, handlePassphraseSkipImpl, handleFidoPromptSubmitImpl, handleFidoPromptCancelImpl, createLocalTerminalWithCurrentShellImpl, splitSessionWithCurrentShellImpl, copySessionWithCurrentShellImpl, duplicateSessionWithCurrentShellImpl, copyWorkspaceWithCurrentShellImpl, copySessionToNewWindowWithCurrentShellImpl, moveSessionToNewWindowImpl, confirmIfBusyLocalTerminalImpl, closeTabsBatchImpl, executeHotkeyActionImpl, handleCreateLocalTerminalImpl, handleConnectToHostImpl, handleConnectRemoteDesktopImpl, handleOpenSystemRemoteDesktopImpl, handleTerminalDataCaptureImpl, startRestoredSessionConnectionLogImpl, hasMultipleProtocolsImpl, handleHostConnectWithProtocolCheckImpl, handleProtocolSelectImpl, handleRootContextMenuImpl, markForwardedNativeShortcutEvent } from './AppHandlers';
import type { RemoteDesktopProtocol } from '../../domain/remoteDesktop';
import { handleTrayJumpToSessionImpl, handleTrayTogglePortForwardImpl, handleTrayPanelConnectImpl, handleTrayPanelConnectRequestImpl, flushQueuedTrayPanelConnectHostsImpl, handleGlobalHotkeyKeyDownImpl, handleEscapeKeyDownImpl, handleKeyboardInteractiveSubmitImpl, handleKeyboardInteractiveCancelImpl, handlePassphraseSubmitImpl, handlePassphraseCancelImpl, handlePassphraseSkipImpl, handleFidoPromptSubmitImpl, handleFidoPromptCancelImpl, createLocalTerminalWithCurrentShellImpl, splitSessionWithCurrentShellImpl, copySessionWithCurrentShellImpl, duplicateSessionWithCurrentShellImpl, copyWorkspaceWithCurrentShellImpl, copySessionToNewWindowWithCurrentShellImpl, moveSessionToNewWindowImpl, confirmIfBusyLocalTerminalImpl, closeTabsBatchImpl, executeHotkeyActionImpl, handleCreateLocalTerminalImpl, handleConnectToHostImpl, handleTerminalDataCaptureImpl, startRestoredSessionConnectionLogImpl, hasMultipleProtocolsImpl, handleHostConnectWithProtocolCheckImpl, handleProtocolSelectImpl, handleRootContextMenuImpl, markForwardedNativeShortcutEvent } from './AppHandlers';
type OpenSessionInNewWindowPayload = {
title?: string;
@@ -261,7 +260,6 @@ export function AppSideEffects() {
createLocalTerminal,
createSerialSession,
connectToHost,
connectToHostRemoteDesktop,
appendHostToWorkspaceConfirmed,
closeSession,
closeSessions,
@@ -604,37 +602,7 @@ export function AppSideEffects() {
});
// Window controls - must be before update toast effect which uses openSettingsWindow
const { openSettingsWindow, isFullscreen, onFullscreenChanged } = useWindowControls();
// Sync host platform and fullscreen state to DOM so platform-aware chrome
// (such as macOS rounded window corners on outer split-pane focus borders)
// stays accurate across fullscreen transitions without per-pane polling.
useEffect(() => {
const isMac = typeof navigator !== 'undefined' && /Mac/i.test(navigator.platform);
if (isMac) {
document.documentElement.setAttribute('data-platform', 'darwin');
} else {
document.documentElement.removeAttribute('data-platform');
document.documentElement.removeAttribute('data-window-fullscreen');
return undefined;
}
let cancelled = false;
const syncFullscreen = (value: boolean) => {
if (value) {
document.documentElement.setAttribute('data-window-fullscreen', 'true');
} else {
document.documentElement.removeAttribute('data-window-fullscreen');
}
};
void isFullscreen().then((value) => {
if (!cancelled) syncFullscreen(!!value);
});
const unsubscribe = onFullscreenChanged((value) => syncFullscreen(!!value));
return () => {
cancelled = true;
unsubscribe();
};
}, [isFullscreen, onFullscreenChanged]);
const { openSettingsWindow } = useWindowControls();
const _handleTrayJumpToSession = useEffectEvent((sessionId: string) => {
return handleTrayJumpToSessionImpl(() => ({
sessionId,
@@ -651,7 +619,7 @@ export function AppSideEffects() {
const _handleTrayTogglePortForward = useEffectEvent((ruleId: string, start: boolean) => { return handleTrayTogglePortForwardImpl(() => ({ hasRuntimeTunnel, hosts, identities, keys, knownHosts: effectiveKnownHosts, portForwardingRules, resolveEffectiveHost, ruleId, start, startTunnel, stopTunnel, t, terminalSettings, toast, undefined }), ruleId, start); });
const _handleTrayPanelConnect = useEffectEvent((hostId: string) => { return handleTrayPanelConnectImpl(() => ({ addConnectionLog, connectToHost, hostId, hosts, identities, keys, resolveEffectiveHost, resolveHostAuth, systemInfoRef, t, toast }), hostId); });
const _handleTrayPanelConnectRequest = useEffectEvent((hostId: string) => { return handleTrayPanelConnectRequestImpl(() => ({ connectNow: _handleTrayPanelConnect, hostId, isVaultInitialized, queueConnect: (queuedHostId: string) => setPendingTrayPanelConnectHostIds((prev) => [...prev, queuedHostId]) }), hostId); });
const _handleGlobalHotkeyKeyDown = useEffectEvent((e: KeyboardEvent) => { return handleGlobalHotkeyKeyDownImpl(() => ({ HOTKEY_DEBUG, e, executeHotkeyAction, hotkeyScheme, keyBindings, matchesKeyBinding }), e); });
const _handleGlobalHotkeyKeyDown = useEffectEvent((e: KeyboardEvent) => { return handleGlobalHotkeyKeyDownImpl(() => ({ HOTKEY_DEBUG, closeTabKeyStr, e, executeHotkeyAction, hotkeyScheme, keyBindings, matchesKeyBinding }), e); });
const _handleEscapeKeyDown = useEffectEvent((e: KeyboardEvent) => { return handleEscapeKeyDownImpl(() => ({ e, isQuickSwitcherOpen, setIsQuickSwitcherOpen }), e); });
// Vault hosts for tray / auto-start; terminalHosts (vault + ephemeral) only for
@@ -1082,6 +1050,13 @@ export function AppSideEffects() {
setSessionPoppedOut(sessionId, false);
}), [setSessionPoppedOut]);
const closeTabKeyStr = useMemo(() => {
if (hotkeyScheme === 'disabled') return null;
const closeTabBinding = keyBindings.find((binding) => binding.action === 'closeTab');
if (!closeTabBinding) return null;
return hotkeyScheme === 'mac' ? closeTabBinding.mac : closeTabBinding.pc;
}, [hotkeyScheme, keyBindings]);
const confirmIfBusyLocalTerminal = useCallback(
async (sessionIds: string[]): Promise<boolean> => { return confirmIfBusyLocalTerminalImpl(() => ({ netcattyBridge, sessionIds, sessions, t }), sessionIds); },
[sessions, t],
@@ -1221,7 +1196,7 @@ export function AppSideEffects() {
logViewIds: logViews.map((logView) => logView.id),
pluginViewTabIds: pluginViewTabs.map((tab) => tab.id),
hasOpenDialog: Boolean(topmostDialogClose),
closeTabShortcutEnabled: isNativeCloseTabBound(hotkeyScheme, keyBindings, true),
closeTabShortcutEnabled: isPrimaryModifierWBinding(closeTabKeyStr, matchesKeyBinding, true),
});
if (intent.kind === 'forwardShortcut') {
@@ -1254,7 +1229,7 @@ export function AppSideEffects() {
}
await netcattyBridge.get()?.windowClose?.();
}, [closeLogView, editorTabs, executeHotkeyAction, hotkeyScheme, keyBindings, logViews, pluginViewTabs, sessions, workspaces]);
}, [closeLogView, closeTabKeyStr, editorTabs, executeHotkeyAction, logViews, pluginViewTabs, sessions, workspaces]);
useEffect(() => {
// Cmd/Ctrl+W from the app menu arrives via IPC, not the keydown listener.
@@ -1542,38 +1517,6 @@ export function AppSideEffects() {
}), connectionHost, hidden);
}, [addConnectionLog, appendHostToWorkspaceConfirmed, connectToHost, resolveEffectiveHost, identities, keys, discoveredShells]);
const handleConnectRemoteDesktop = useCallback((
host: Host,
protocol: RemoteDesktopProtocol,
options?: { splitFromSessionId?: string },
) => {
return handleConnectRemoteDesktopImpl(() => ({
addConnectionLog,
connectToHostRemoteDesktop,
identities,
resolveEffectiveHost,
systemInfoRef,
}), host, protocol, options);
}, [addConnectionLog, connectToHostRemoteDesktop, identities, resolveEffectiveHost]);
const handleOpenSystemRemoteDesktop = useCallback((
host: Host,
protocol: RemoteDesktopProtocol,
rawRdpContent?: string,
) => {
void handleOpenSystemRemoteDesktopImpl(() => ({
groupConfigs,
hosts,
identities,
keys,
knownHosts: knownHostsRef.current,
netcattyBridge,
proxyProfiles,
resolveEffectiveHost,
toast,
}), host, protocol, rawRdpContent);
}, [groupConfigs, hosts, identities, keys, proxyProfiles, resolveEffectiveHost]);
const handleConnectToHostWithTabName = useCallback((host: Host, tabName?: string) => {
const sessionId = handleConnectToHost(host);
if (sessionId && tabName) {
@@ -1826,34 +1769,6 @@ export function AppSideEffects() {
}
return;
}
const targetProtocol = result.target.protocol.toLowerCase();
const jumpServerRdpLaunchMode = settings.jumpServerRdpLaunchMode ?? 'builtin';
if (
targetProtocol === 'rdp'
&& jumpServerRdpLaunchMode === 'system'
&& result.target.rawRdpFileContent
) {
const rdBridge = netcattyBridge.get()?.remoteDesktop;
if (rdBridge?.openSystemClient) {
void rdBridge.openSystemClient({
protocol: 'rdp',
hostname: result.target.hostname,
port: result.target.port,
username: result.target.username || undefined,
...(result.target.password ? { password: result.target.password } : {}),
domain: result.target.domain || undefined,
label: result.target.label,
rdpContent: result.target.rawRdpFileContent,
}).then((res) => {
if (!res?.ok) {
toast.error(res?.error || 'Failed to launch system RDP client');
}
}).catch((err) => {
toast.error(err instanceof Error ? err.message : 'Failed to launch system RDP client');
});
return;
}
}
const ephemeralHost = buildJmsDeepLinkEphemeralHost(result.target, {
id: crypto.randomUUID(),
now: Date.now(),
@@ -2094,26 +2009,7 @@ export function AppSideEffects() {
const handleHostConnectWithProtocolCheck = useCallback((host: Host) => { return handleHostConnectWithProtocolCheckImpl(() => ({ handleConnectToHost, hasMultipleProtocols, host, resolveEffectiveHost, setIsQuickSwitcherOpen, setProtocolSelectHost }), host); }, [hasMultipleProtocols, handleConnectToHost, resolveEffectiveHost]);
// Handle protocol selection from dialog
const handleProtocolSelect = useCallback(
(protocol: HostProtocol, port: number, rememberDefault?: boolean) => {
return handleProtocolSelectImpl(
() => ({
handleConnectToHost,
handleConnectRemoteDesktop,
port,
protocol,
protocolSelectHost,
rememberDefault,
setProtocolSelectHost,
updateHosts,
}),
protocol,
port,
rememberDefault,
);
},
[protocolSelectHost, handleConnectToHost, handleConnectRemoteDesktop, updateHosts],
);
const handleProtocolSelect = useCallback((protocol: HostProtocol, port: number) => { return handleProtocolSelectImpl(() => ({ handleConnectToHost, port, protocol, protocolSelectHost, setProtocolSelectHost }), protocol, port); }, [protocolSelectHost, handleConnectToHost]);
const handleOpenQuickSwitcher = useCallback(() => {
setIsQuickSwitcherOpen(true);
@@ -2206,8 +2102,6 @@ export function AppSideEffects() {
createWorkspaceWithHosts: createWorkspaceWithEffectiveHosts,
handleConnectSerial,
handleConnectToHost,
handleConnectRemoteDesktop,
handleOpenSystemRemoteDesktop,
handleCreateLocalTerminal,
handleHotkeyAction,
handleSessionStatusChange,
@@ -2287,8 +2181,6 @@ export function AppSideEffects() {
createWorkspaceWithEffectiveHosts,
handleConnectSerial,
handleConnectToHost,
handleConnectRemoteDesktop,
handleOpenSystemRemoteDesktop,
handleCreateLocalTerminal,
handleHotkeyAction,
handleSessionStatusChange,
+1 -8
View File
@@ -277,7 +277,7 @@ function AppViewInner({ domains }: AppViewProps) {
convertKnownHostToHost, createWorkspaceFromSessions, createWorkspaceFromTargets, createWorkspaceWithHosts,
customGroups, currentTerminalTheme, deepLinkHostDraft, draggingSessionId, effectiveKnownHosts, editorTabs, editorWordWrap, emptyVaultConflict,
followAppTerminalTheme,
groupConfigs, handleAddKnownHost, handleConnectSerial, handleConnectToHost, handleConnectRemoteDesktop, handleOpenSystemRemoteDesktop, handleCreateLocalTerminal, handleDefaultTerminalThemeChange, handleDeleteHost,
groupConfigs, handleAddKnownHost, handleConnectSerial, handleConnectToHost, handleCreateLocalTerminal, handleDefaultTerminalThemeChange, handleDeleteHost,
handleEndSessionDrag, handleFollowAppTerminalThemeChange, handleHostConnectWithProtocolCheck, handleHotkeyAction, handleKeyboardInteractiveCancel, handleKeyboardInteractiveSubmit,
handleOpenHostFromVaultNote, handleOpenQuickSwitcher, handleOpenSettings, handleOpenVaultHostFromChat, handleOpenVaultNoteFromChat, handleOpenVaultSectionFromChat, handleOpenVaultSnippetFromChat, handleRootContextMenu, handlePassphraseCancel, handlePassphraseSkip, handlePassphraseSubmit, handleFidoPromptSubmit, handleFidoPromptCancel, handleProtocolSelect,
handleRequestCloseEditorTabRef, handleSessionStatusChange, handleSyncNowManual, handleTerminalDataCapture, handleUpdateHostFromTerminal,
@@ -572,7 +572,6 @@ function AppViewInner({ domains }: AppViewProps) {
onEditHost={handleEditHostFromOverlay}
onRenameWorkspace={startWorkspaceRename}
onCopyWorkspace={copyWorkspaceWithCurrentShell}
onRequestAddToWorkspace={handleRequestAddToWorkspace}
onCloseWorkspace={closeWorkspace}
onCloseLogView={closeLogView}
onCloseTabsBatch={closeTabsBatch}
@@ -622,8 +621,6 @@ function AppViewInner({ domains }: AppViewProps) {
themeById={themeById}
resolveSessionAppearance={resolveSessionAppearance}
onConnect={handleConnectToHost}
onConnectRemoteDesktop={handleConnectRemoteDesktop}
onOpenSystemRemoteDesktop={handleOpenSystemRemoteDesktop}
onNewHost={workSurfaceHostEditor.openNew}
onEditHost={workSurfaceHostEditor.openEdit}
onCreateLocalTerminal={handleCreateLocalTerminal}
@@ -675,8 +672,6 @@ function AppViewInner({ domains }: AppViewProps) {
onConnectSerial={handleConnectSerial}
onDeleteHost={handleDeleteHost}
onConnect={handleConnectToHost}
onConnectRemoteDesktop={handleConnectRemoteDesktop}
onOpenSystemRemoteDesktop={handleOpenSystemRemoteDesktop}
onOpenHostFromNote={handleOpenHostFromVaultNote}
groupConfigs={groupConfigs}
onUpdateGroupConfigs={updateGroupConfigs}
@@ -805,8 +800,6 @@ function AppViewInner({ domains }: AppViewProps) {
onCopySessionToNewWindow={copySessionToNewWindowWithCurrentShell}
onSplitSession={splitSessionWithCurrentShell}
onConnectToHost={handleConnectToHost}
onConnectRemoteDesktop={handleConnectRemoteDesktop}
onOpenSystemRemoteDesktop={handleOpenSystemRemoteDesktop}
openNoteRequest={openNoteRequest}
onOpenVaultNoteFromChat={handleOpenVaultNoteFromChat}
onOpenVaultHostFromChat={handleOpenVaultHostFromChat}
+1 -6
View File
@@ -3,7 +3,6 @@ import React, { Suspense, lazy, useMemo, useState } from 'react';
import type { QuickSwitcherProps } from '../../components/QuickSwitcher';
import { LazyLoadBoundary } from '../../components/ui/lazy-load-boundary';
import { getHostSearchMatch } from '../../domain/searchMatcher';
import { usePinyinMatcherVersion } from '../state/usePinyinMatcherVersion';
import type { Host } from '../../types';
const LazyQuickSwitcher = lazy(() =>
@@ -38,11 +37,7 @@ export type QuickSwitcherOverlayProps =
*/
export function QuickSwitcherOverlay({ hosts, ...props }: QuickSwitcherOverlayProps) {
const [query, setQuery] = useState('');
const pinyinMatcherVersion = usePinyinMatcherVersion();
const results = useMemo(() => {
void pinyinMatcherVersion;
return filterQuickSwitcherHosts(hosts, query);
}, [hosts, query, pinyinMatcherVersion]);
const results = useMemo(() => filterQuickSwitcherHosts(hosts, query), [hosts, query]);
return (
<LazyLoadBoundary name="Quick switcher" resetKey={query}>
<Suspense fallback={null}>
-2
View File
@@ -195,8 +195,6 @@ export function TerminalHost() {
resolveSessionAppearance: resolveFocusedAppearance,
handleConnectSerial: handlers.handleConnectSerial,
handleConnectToHost: handlers.handleConnectToHost,
handleConnectRemoteDesktop: handlers.handleConnectRemoteDesktop,
handleOpenSystemRemoteDesktop: handlers.handleOpenSystemRemoteDesktop,
handleCreateLocalTerminal: handlers.handleCreateLocalTerminal,
handleDefaultTerminalThemeChange,
handleFollowAppTerminalThemeChange,
+18 -43
View File
@@ -32,66 +32,41 @@ function loadComponent(path: string, name: string, bindings: Record<string, unkn
}) as React.ComponentType;
}
test('App no longer mounts retired built-in MonitorRuntimeHost or MonitorHostKeyDialog', async () => {
const env = globalThis as typeof globalThis & { IS_REACT_ACT_ENVIRONMENT?: boolean };
const previous = env.IS_REACT_ACT_ENVIRONMENT;
env.IS_REACT_ACT_ENVIRONMENT = true;
let sideEffectRenders = 0;
let shellRenders = 0;
const appSource = readFileSync(new URL('../../App.tsx', import.meta.url), 'utf8');
assert.doesNotMatch(appSource, /MonitorRuntimeHost/, 'App must not mount retired MonitorRuntimeHost');
assert.doesNotMatch(appSource, /MonitorHostKeyDialog/, 'App must not mount retired MonitorHostKeyDialog');
const App = loadComponent('../../App.tsx', 'App', {
performance: { mark: () => {} },
AppLocalStateProvider: ({ children }: { children: React.ReactNode }) => children,
AppSideEffects: () => { sideEffectRenders += 1; return null; },
AppShell: React.memo(() => { shellRenders += 1; return null; }),
});
let renderer: ReturnType<typeof create> | undefined;
try {
await act(async () => { renderer = create(React.createElement(App)); });
assert.equal(sideEffectRenders, 1);
assert.equal(shellRenders, 1);
} finally {
await act(async () => renderer?.unmount());
env.IS_REACT_ACT_ENVIRONMENT = previous;
}
});
test('MonitorRuntimeHost keeps monitor runtime updates isolated from sibling components when mounted', async () => {
test('monitor controls update their runtime without rendering unrelated app siblings', async () => {
const env = globalThis as typeof globalThis & { IS_REACT_ACT_ENVIRONMENT?: boolean };
const previous = env.IS_REACT_ACT_ENVIRONMENT;
env.IS_REACT_ACT_ENVIRONMENT = true;
let updateMonitor: (() => void) | undefined;
let runtimeRenders = 0;
let siblingRenders = 0;
let sideEffectRenders = 0;
let shellRenders = 0;
const useMonitorRuntime = () => {
const [, setVersion] = useState(0);
updateMonitor = () => setVersion((version) => version + 1);
runtimeRenders += 1;
};
const MonitorRuntimeHost = loadComponent('./MonitorRuntimeHost.tsx', 'MonitorRuntimeHost', { useMonitorRuntime });
const StableSibling = React.memo(() => { siblingRenders += 1; return null; });
const App = loadComponent('../../App.tsx', 'App', {
performance: { mark: () => {} },
useMonitorRuntime,
MonitorRuntimeHost,
AppLocalStateProvider: ({ children }: { children: React.ReactNode }) => children,
AppSideEffects: () => { sideEffectRenders += 1; return null; },
MonitorHostKeyDialog: () => null,
AppShell: React.memo(() => { shellRenders += 1; return null; }),
});
let renderer: ReturnType<typeof create> | undefined;
try {
await act(async () => {
renderer = create(
React.createElement(
React.Fragment,
null,
React.createElement(MonitorRuntimeHost),
React.createElement(StableSibling),
),
);
});
await act(async () => { renderer = create(React.createElement(App)); });
const initialRuntimeRenders = runtimeRenders;
const initialSiblingRenders = siblingRenders;
const initialSideEffectRenders = sideEffectRenders;
const initialShellRenders = shellRenders;
for (let i = 0; i < 10; i += 1) {
await act(async () => updateMonitor!());
}
assert.equal(runtimeRenders - initialRuntimeRenders, 10, 'monitor updates must run inside MonitorRuntimeHost');
assert.equal(siblingRenders - initialSiblingRenders, 0, 'monitor updates must not re-render siblings');
assert.equal(runtimeRenders - initialRuntimeRenders, 10, 'monitor updates must still run');
assert.equal(sideEffectRenders - initialSideEffectRenders, 0, 'monitor-only state must not render AppSideEffects');
assert.equal(shellRenders - initialShellRenders, 0, 'monitor controls must leave the shell stable');
} finally {
await act(async () => renderer?.unmount());
env.IS_REACT_ACT_ENVIRONMENT = previous;
@@ -53,7 +53,6 @@ export function SessionPublisher({ persistSessionRestore, children }: SessionPub
createLocalTerminal,
createSerialSession,
connectToHost,
connectToHostRemoteDesktop,
updateSessionStatus,
updateSessionFontSize,
clearSessionFontSizeOverride,
@@ -142,7 +141,6 @@ export function SessionPublisher({ persistSessionRestore, children }: SessionPub
createLocalTerminal,
createSerialSession,
connectToHost,
connectToHostRemoteDesktop,
updateSessionStatus,
updateSessionFontSize,
clearSessionFontSizeOverride,
@@ -190,7 +188,6 @@ export function SessionPublisher({ persistSessionRestore, children }: SessionPub
closeSessions,
closeWorkspace,
connectToHost,
connectToHostRemoteDesktop,
copySession,
copyWorkspace,
createLocalTerminal,
-71
View File
@@ -117,9 +117,6 @@ export const enAiMessages: Messages = {
'ai.codex.appServer.available': 'App Server is available for this Codex CLI.',
'ai.codex.appServer.modelCatalogWarning': 'The live Codex model catalog is unavailable. Using the built-in model list.',
'ai.codex.appServer.approval.allowSession': 'Allow for session',
'ai.planReview.title': 'Review implementation plan',
'ai.planReview.keepPlanning': 'Keep planning',
'ai.planReview.approveAndImplement': 'Approve and implement',
'ai.codex.appServer.userInput.title': 'Codex needs your input',
'ai.codex.appServer.userInput.description': 'Answer these questions to continue the current turn.',
'ai.codex.appServer.userInput.other': 'Enter another answer',
@@ -308,16 +305,6 @@ export const enAiMessages: Messages = {
'ai.opencode.v2.mcpSkipped': 'OpenCode 2 could not attach an MCP tool. The chat will continue without it.',
// AI MiMo Code (Xiaomi MiMo Code CLI — OpenCode fork)
'ai.agy.title': 'Antigravity CLI (Beta)',
'ai.agy.description': "Experimental Beta: Google's Antigravity coding agent CLI connected via the official Agent Client Protocol (agy acp --stdio). Feature coverage is still limited and not yet thoroughly tested — use at your own risk. Sign in with agy in your terminal, then select it as an external coding agent.",
'ai.agy.detecting': 'Detecting...',
'ai.agy.detected': 'Detected',
'ai.agy.notFound': 'Not found',
'ai.agy.path': 'Path:',
'ai.agy.notFoundHint': 'Could not find agy in PATH. Install Antigravity CLI or specify the executable path below.',
'ai.agy.customPathPlaceholder': 'e.g. /usr/local/bin/agy',
'ai.agy.check': 'Check',
'ai.agy.resetPath': 'Reset',
'ai.mimo.title': 'MiMo Code',
'ai.mimo.description': "Xiaomi's MiMo Code CLI, an OpenCode fork. Install it and configure providers in its own config, then select it as an external coding agent.",
'ai.mimo.detecting': 'Detecting...',
@@ -341,9 +328,6 @@ export const enAiMessages: Messages = {
'ai.grok.check': 'Check',
'ai.grok.resetPath': 'Reset',
'ai.grok.runtime.acp.title': 'Use Grok ACP (agent stdio)',
'ai.grok.userQuestion.title': 'Grok needs your input',
'ai.grok.userQuestion.description': 'Answers do not grant permissions. Do not include passwords or tokens.',
'ai.grok.userQuestion.submit': 'Send answers',
'ai.grok.runtime.acp.default': 'Default',
'ai.grok.runtime.acp.description':
'Talk to Grok over Agent Client Protocol (grok agent stdio). Injects Netcatty MCP on session/new. Turn off to use the original headless streaming-json CLI path.',
@@ -645,25 +629,12 @@ export const enAiMessages: Messages = {
'ai.chat.managerRebindPick': 'Choose a terminal or workspace…',
'ai.chat.managerRebindHere': 'Current panel',
'ai.chat.managerRebindDone': 'Moved "{title}" to {target}.',
'ai.chat.managerToggleSelection': 'Select chats',
'ai.chat.managerSelectAll': 'Select all',
'ai.chat.managerSelectedCount': '{n} selected',
'ai.chat.managerSelectRow': 'Select this chat',
'ai.chat.managerRegenerateTitle': 'Regenerate title with AI',
'ai.chat.managerRegenerateTitleUpdated': 'Chat title updated.',
'ai.chat.managerRegenerateTitleUnchanged': 'Chat title is already up to date.',
'ai.chat.managerRegenerateTitleNoModel': 'No AI provider/model is configured for title generation. Configure a provider or title model in AI Settings.',
'ai.chat.managerRegenerateTitleFailed': 'Failed to regenerate title: {error}',
'ai.chat.managerRegenerateTitleBatchDone': 'Updated {n} chat title(s).',
'ai.chat.managerRegenerateTitleBatchPartial': 'Updated {updated} title(s), {failed} failed.',
'ai.chat.managerExportOne': 'Export this chat',
'ai.chat.managerBadgeActive': 'Active',
'ai.chat.managerBadgeIdle': 'Idle',
'ai.chat.managerMessagesCount': '{n} messages',
'ai.chat.managerDeleteTitle': 'Delete this chat?',
'ai.chat.managerDeleteMessage': '"{title}" and its messages will be removed from every panel. This cannot be undone.',
'ai.chat.managerBulkDeleteTitle': 'Delete {n} chats?',
'ai.chat.managerBulkDeleteMessage': '{n} selected chats and their messages will be removed from every panel. This cannot be undone.',
'ai.chat.justNow': 'Just now',
'ai.chat.minutesAgo': '{n}m ago',
'ai.chat.hoursAgo': '{n}h ago',
@@ -714,25 +685,9 @@ export const enAiMessages: Messages = {
'ai.chatShortcuts.selectionAction': 'Show Add to Conversation when selecting terminal text',
'ai.chatShortcuts.selectionAction.description': 'Show a small AI button next to selected terminal text.',
'ai.chatHistory.title': 'Chat History',
'ai.chatHistory.storageUsage': 'Local chat history size',
'ai.chatHistory.storageUsage.description': 'Estimate the size of saved chat records as UTF-8 JSON.',
'ai.chatHistory.storageUsage.measure': 'Measure',
'ai.chatHistory.storageUsage.measuring': 'Measuring…',
'ai.chatHistory.storageUsage.result': 'Saved records · {count}. Estimated JSON size · {size}.',
'ai.chatHistory.storageUsage.partial': 'Records excluded from the size estimate · {count}.',
'ai.chatHistory.storageUsage.error': 'Could not read the local chat history. Try again.',
'ai.chatHistory.messageCap': 'Messages kept per chat',
'ai.chatHistory.messageCap.description': 'Maximum number of messages stored per chat (50–2000). Lowering it drops the oldest messages from storage on the next write. Larger values increase storage and cloud-sync size.',
'ai.chatHistory.messageCap.unit': 'messages',
'ai.chatHistory.autoLlmTitle': 'Auto-generate chat titles',
'ai.chatHistory.autoLlmTitle.description': 'Use a small one-shot LLM call to write a short title after the first message. Falls back to the first line if unavailable. Local setting only.',
'ai.chatHistory.titleModel': 'Title model',
'ai.chatHistory.titleModel.description': 'Provider and model used to generate chat titles. Pick a small, cheap model. Defaults to the current Catty model.',
'ai.chatHistory.titleModel.none': 'No enabled provider available.',
'ai.chatHistory.titleModel.useCurrentCatty': 'Use current Catty model',
'ai.chatHistory.titleModel.unavailable': 'Unavailable',
'ai.chatHistory.titleModel.providerPlaceholder': 'Select provider',
'ai.chatHistory.titleModel.modelPlaceholder': 'Select model',
// AI Error
'ai.codex.bridgeError': 'Codex main-process handlers are not loaded yet. Fully restart Netcatty, or restart the Electron dev process, then try again.',
@@ -880,15 +835,6 @@ export const enAiMessages: Messages = {
'ai.chat.artifact.scriptRunPaused': 'Script run paused',
'ai.chat.artifact.scriptRunResumed': 'Script run resumed',
'ai.chat.artifact.scriptReference': 'nct API reference',
'ai.chat.artifact.rdScreenRead': 'Read remote screen',
'ai.chat.artifact.rdScreenGrid': 'Read remote screen (grid)',
'ai.chat.artifact.rdScreenCropped': 'Captured zoomed region',
'ai.chat.artifact.rdActionExecuted': 'Ran {count} remote actions',
'ai.chat.artifact.rdActionCount': '{count} actions',
'ai.chat.artifact.rdActionPreempted': 'Remote action paused by user',
'ai.chat.artifact.rdScreenFailed': 'Remote screen capture failed',
'ai.chat.artifact.rdActionFailed': 'Remote desktop action failed',
'ai.chat.artifact.rdPreviewScreen': 'Preview captured screen',
'zmodem.waitingForRemote': 'Waiting for remote...',
'zmodem.uploading': 'Uploading',
'zmodem.downloading': 'Downloading',
@@ -922,21 +868,4 @@ export const enAiMessages: Messages = {
"ai.toolSettings.conflict": "Settings changed in another window. Your draft is preserved. Cancel and reopen to load the saved settings.",
"ai.toolSettings.retry": "Retry",
"ai.toolSettings.applyingHttp": "Applying HTTP configuration...",
"ai.vision.quickPrompt.explainError": "Explain current error",
"ai.vision.quickPrompt.diagnoseUi": "Diagnose UI issue",
"ai.vision.quickPrompt.summarizeScreen": "Summarize screen",
"ai.vision.unsupportedModelWarning": "Current model ({model}) does not support image input. Switch to a vision-capable model to read remote screens.",
"ai.vision.switchModel": "Switch model",
"ai.vision.modelSupportsVision": "Supports image input",
"ai.vision.snip.hint": "Drag to select a region · Esc to cancel",
"ai.vision.snip.cancel": "Cancel region snip",
"ai.vision.snip.ariaLabel": "Select a region of the remote desktop screen",
"ai.vision.privacyBlocked": "AI screen reading is blocked for this session.",
"ai.vision.viewingScreen": "Catty is viewing desktop",
"ai.vision.askAi": "Ask AI",
"ai.vision.captureFullAndAsk": "Capture screen & ask AI",
"ai.vision.snipRegionAndAsk": "Snip region & ask AI",
"ai.vision.openAiChat": "Open AI assistant",
"ai.vision.privacyLockOn": "AI screen reading blocked",
"ai.vision.privacyLockOff": "Allow AI to read screen",
};
+2 -68
View File
@@ -8,7 +8,7 @@ export const enCoreMessages: Messages = {
"settings.plugins.github.busy": "Downloading, validating or installing the package...",
"settings.plugins.github.review": "Repository ownership and package integrity do not verify publisher trust. No build scripts run. The plugin installs disabled; review permission modes before enabling.",
"settings.plugins.github.accept": "I trust this repository and have reviewed the declared permissions.",
"settings.plugins.github.confirm": "Install",
"settings.plugins.github.confirm": "Install disabled",
"settings.plugins.github.download": "Download and review",
"settings.plugins.github.error.invalidRepository": "Enter https://github.com/owner/repo, github.com/owner/repo or owner/repo (repository only; no credentials, query, fragment or extra paths).",
"settings.plugins.github.error.unavailable": "GitHub plugin installation is unavailable in this session.",
@@ -431,8 +431,6 @@ export const enCoreMessages: Messages = {
'settings.vault.showSftpTab': 'Show SFTP tab',
'settings.vault.showSftpTabDesc': 'Display the standalone SFTP view in the top tab bar. When hidden, use the in-session SFTP side panel instead.',
'settings.vault.showHostTreeSidebar': 'Show host list sidebar',
'settings.vault.removeTopTabsDragArea': 'Remove the top window-drag area',
'settings.vault.removeTopTabsDragAreaDesc': 'When enabled, remove the draggable space above the tabs so the top edge is available for clicks.',
'settings.vault.showHostTreeSidebarDesc': 'Display the host list sidebar and its top-bar toggle on terminal and editor tabs.',
'settings.vault.autoImportSystemKnownHosts': 'Auto-import system known_hosts',
'settings.vault.autoImportSystemKnownHostsDesc': 'When Vault loads, silently import entries from the OpenSSH known_hosts file. Turn this off to keep Netcatty known hosts separate; Scan System still imports on demand.',
@@ -1001,9 +999,6 @@ Highlight the focused split pane:
'Choose whether autocomplete history suggestions come from the current host only, or from commands recorded on all hosts.',
'settings.terminal.autocomplete.historyScope.host': 'Current host',
'settings.terminal.autocomplete.historyScope.global': 'All hosts',
'settings.terminal.autocomplete.showSnippets': 'Show code snippets',
'settings.terminal.autocomplete.showSnippets.desc':
'Include matching code snippets in the autocomplete list. Turn this off if snippets crowd out command and history suggestions.',
// Settings > Terminal > Password prompt assist (sudo/su)
'settings.terminal.section.passwordPromptAssist': 'Password prompt assist',
@@ -1032,9 +1027,6 @@ Highlight the focused split pane:
'settings.shortcuts.recording': 'Press keys...',
'settings.shortcuts.none': 'None',
'settings.shortcuts.setDisabled': 'Set to disabled',
'settings.shortcuts.addExtra': 'Add shortcut',
'settings.shortcuts.additional': 'Additional shortcut',
'settings.shortcuts.removeExtra': 'Remove shortcut',
'settings.shortcuts.category.tabs': 'Tabs',
'settings.shortcuts.category.terminal': 'Terminal',
'settings.shortcuts.category.navigation': 'Navigation',
@@ -1069,7 +1061,6 @@ Highlight the focused split pane:
'settings.shortcuts.binding.command-palette': 'Open Command Palette',
'settings.shortcuts.binding.quick-switch': 'Quick Switch',
'settings.shortcuts.binding.new-workspace': 'New Workspace',
'settings.shortcuts.binding.add-session-to-workspace': 'Add Session to Workspace',
'settings.shortcuts.binding.snippets': 'Open Snippets',
'settings.shortcuts.binding.broadcast': 'Switch the Broadcast Mode',
'settings.shortcuts.binding.toggle-side-panel': 'Toggle Side Panel',
@@ -1183,16 +1174,6 @@ Highlight the focused split pane:
'vault.nav.notes': 'Notes',
'vault.nav.knownHosts': 'Known Hosts',
'vault.nav.logs': 'Logs',
'vault.nav.customize': 'Customize sidebar',
'vault.nav.customizeHint': 'Drag items to reorder or toggle visibility.',
'vault.nav.hideItem': 'Hide {label}',
'vault.nav.moveUp': 'Move up',
'vault.nav.moveDown': 'Move down',
'vault.nav.resetDefault': 'Reset to default',
'vault.nav.alwaysVisible': 'Always visible',
'vault.nav.pluginBadge': 'Plugin',
'vault.nav.dragToReorder': 'Drag to reorder {label}',
'vault.nav.toggleVisibility': 'Toggle {label} visibility',
'proxyProfiles.action.add': 'Add Proxy',
'proxyProfiles.search.placeholder': 'Search proxies…',
@@ -1244,10 +1225,7 @@ Highlight the focused split pane:
'vault.groups.details': 'Group Details',
'vault.groups.details.general': 'General',
'vault.groups.details.ssh': 'SSH',
'vault.groups.details.rdp': 'RDP',
'vault.groups.details.vnc': 'VNC',
'vault.groups.details.telnet': 'Telnet',
'vault.groups.details.protocolNotEnabledDesc': 'Default {protocol} settings are not configured for this group yet.',
'vault.groups.details.advanced': 'Advanced',
'vault.groups.details.appearance': 'Appearance',
'vault.groups.details.mosh': 'Mosh',
@@ -1339,12 +1317,7 @@ Highlight the focused split pane:
"plugins.sidebar.selectTerminal": "Select an open terminal first.",
"plugins.sidebar.loading": "Loading extension page…",
"plugins.vault.loading": "Loading plugin page…",
"plugins.vault.viewError": "The plugin page failed to render.",
"plugins.vault.retry": "Retry",
"plugins.interaction.title": "Plugin request",
"plugins.interaction.openUrlTitle": "Open external link?",
"plugins.interaction.openUrlNote": "This plugin wants to open the following HTTPS URL in your default browser:",
"plugins.interaction.openUrlAction": "Open URL",
"plugins.interaction.sharing": "Text you share becomes available to this plugin and its granted capabilities, including network access. Reading does not approve a new network destination.",
"plugins.interaction.input": "Input text",
"plugins.interaction.filter": "Filter choices",
@@ -1418,10 +1391,7 @@ Highlight the focused split pane:
"settings.plugins.market.title": "Marketplace",
"settings.plugins.market.note": "Curated open-source plugins. Review is not a security certification. Updates are manual.",
"settings.plugins.market.back": "All plugins",
"settings.plugins.market.install": "Install",
"settings.plugins.market.installing": "Installing...",
"settings.plugins.market.update": "Update",
"settings.plugins.market.updating": "Updating...",
"settings.plugins.market.install": "Install this version (disabled)",
"settings.plugins.market.installNote": "This replaces and stops the installed version. Review its permissions in Installed plugins before enabling.",
"settings.plugins.market.sourceOnly": "First-party source example. Build with the local CLI and import the .ncpkg; no downloadable release has been published.",
"settings.plugins.market.readmeNote": "Pinned to the commit above. HTML is inert and remote images are not loaded. Written by the plugin author.",
@@ -1507,41 +1477,5 @@ Highlight the focused split pane:
'plugins.hostActions.managedUnsupported': 'Managed SSH config changes require the Vault host editor.',
'plugins.hostActions.failed': 'The request expired, was revoked, or the host changed. Select the host again.',
'plugins.hostActions.selectionLimit': 'Select up to 50 current hosts.',
'settings.externalEditor.title': 'External Remote Editor',
'settings.externalEditor.desc': 'Open remote SSH projects and files directly in local editors such as Zed, VS Code, or Cursor.',
'settings.externalEditor.preferredEditor': 'Preferred editor',
'settings.externalEditor.preferredEditor.desc': 'Default local editor used for SFTP context menu actions and terminal open requests.',
'settings.externalEditor.executablePath': 'Editor executable',
'settings.externalEditor.executablePath.desc': 'Leave empty to auto-detect, or choose the local binary manually.',
'settings.externalEditor.executablePath.placeholder': 'Auto-detect executable path',
'settings.externalEditor.status.configured': 'Custom path',
'settings.externalEditor.status.detected': 'Auto-detected',
'settings.externalEditor.status.notFound': 'Not detected',
'settings.externalEditor.browse': 'Browse…',
'settings.externalEditor.resetPath': 'Reset to auto-detect',
'settings.externalEditor.redetect': 'Re-detect installed editors',
'settings.externalEditor.customArgs': 'Custom arguments',
'settings.externalEditor.customArgs.desc': 'Space-separated arguments (placeholders: {sshUri}, {sshTarget}, {remotePath}, {encodedPath}, {kind}).',
'settings.externalEditor.connectionMode': 'SSH connection mode',
'settings.externalEditor.connectionMode.desc': 'Netcatty SSH Bridge reuses your active authenticated session without exposing vault keys or host lists.',
'settings.externalEditor.connectionMode.bridge': 'Netcatty SSH Bridge (*.netcatty)',
'settings.externalEditor.connectionMode.direct': 'Direct OpenSSH (user@host:port)',
'settings.externalEditor.sshBridge.title': 'OpenSSH *.netcatty bridge rule',
'settings.externalEditor.sshBridge.desc': 'Adds a single static Host *.netcatty block to your OpenSSH config without writing any hostnames, keys, or passwords.',
'settings.externalEditor.sshBridge.install': 'Install bridge rule',
'settings.externalEditor.sshBridge.reinstall': 'Reinstall rule',
'settings.externalEditor.sshBridge.update': 'Update rule',
'settings.externalEditor.sshBridge.remove': 'Remove rule',
'settings.externalEditor.terminalRequests': 'Allow terminal open requests (OSC 7337)',
'settings.externalEditor.terminalRequests.desc': 'Let remote shells open paths in your configured local editor via commands like `zed .`.',
'settings.externalEditor.autoSetup': 'Enable remote editor commands for Netcatty sessions',
'settings.externalEditor.autoSetup.desc': 'Install `zed` / `ncedit` helpers into ~/.netcatty/bin and activate them in PATH for this Netcatty terminal session only, without modifying ~/.bashrc or ~/.zshrc (can also be toggled per host).',
'settings.externalEditor.defaultTrust': 'Default host trust',
'settings.externalEditor.defaultTrust.desc': 'Permission policy when an unrecognized remote host requests opening a local editor.',
'settings.externalEditor.trust.ask': 'Ask every time',
'settings.externalEditor.trust.allow': 'Always allow',
'settings.externalEditor.trust.deny': 'Always deny',
'settings.externalEditor.trustedHosts.host': 'Host',
'settings.externalEditor.trustedHosts.policy': 'Policy',
};
-12
View File
@@ -106,16 +106,4 @@ export const enMonitorMessages = {
"monitor.status.disconnected": "Disconnected",
"monitor.status.stale": "Out of date",
"monitor.status.missing": "Host deleted",
"monitor.status.online": "Online",
"monitor.status.offline": "Offline",
"monitor.checkNow": "Check now",
"monitor.openRemoteDesktop": "Open {protocol}",
"monitor.latencyTrend": "Latency trend",
"monitor.bannerVerified": "Protocol verified",
"monitor.bannerUnverified": "Port open (banner unverified)",
"monitor.companionDesktops": "Remote Desktop Services",
"monitor.reachabilityOnly": "Reachability probe only",
"monitor.viaSsh": "via SSH",
"monitor.direct": "Direct",
"monitor.rttStats": "Min / Avg / Max",
};
@@ -214,25 +214,6 @@ export const enSystemManagerMessages: Messages = {
'systemManager.ports.unknownProcess': 'Unknown process',
'systemManager.ports.terminate': 'Terminate',
'systemManager.ports.confirmTerminate': 'Send SIGTERM to process {{pid}} that holds this port?',
'systemManager.ports.forwardedMeta': '{{count}} forwarded',
'systemManager.ports.forward': 'Forward to local port',
'systemManager.ports.stopForward': 'Stop port forwarding',
'systemManager.ports.forwardTitle': 'Forward port to local',
'systemManager.ports.forwardDesc': 'Create a local SSH port forward to this remote listener.',
'systemManager.ports.forwardDescWithHost': 'Forward this listener on {{host}} to a local port over SSH.',
'systemManager.ports.forwardLocalPort': 'Local port',
'systemManager.ports.forwardBindAddress': 'Bind address',
'systemManager.ports.forwardAction': 'Forward',
'systemManager.ports.forwarding': 'Forwarding…',
'systemManager.ports.forwardInvalidPort': 'Enter a valid port number between 1 and 65535.',
'systemManager.ports.forwardInvalidBindAddress': 'Enter a valid bind address (e.g. 127.0.0.1 or 0.0.0.0).',
'systemManager.ports.forwardPortInUse': 'Local port {{port}} is already used by "{{label}}".',
'systemManager.ports.forwardFailed': 'Failed to start port forwarding.',
'systemManager.ports.forwardStarted': 'Forwarding {{local}} → {{remote}}',
'systemManager.ports.forwardStopped': 'Stopped forwarding {{local}}',
'systemManager.ports.copiedEndpoint': 'Copied {{endpoint}}',
'systemManager.ports.copyEndpointAria': 'Copy local address {{endpoint}}',
'systemManager.ports.clickToCopy': 'Click to copy local address',
'systemManager.services.unavailable': 'systemctl is not available on this host.',
'systemManager.services.loading': 'Loading systemd services…',
-24
View File
@@ -2,14 +2,6 @@ import type { Messages } from '../types';
export const enTerminalMessages: Messages = {
'terminal.directory.open': 'Current directory: {path}. Change directory',
'terminal.gitBranch.current': 'Git branch: {{value}}',
'terminal.gitBranch.detached': 'Detached HEAD: {{value}}',
'terminal.gitBranch.search': 'Search local branches...',
'terminal.gitBranch.branches': 'Local branches',
'terminal.gitBranch.loading': 'Reading branches...',
'terminal.gitBranch.empty': 'No local branches yet',
'terminal.gitBranch.noMatches': 'No matching branches',
'terminal.gitBranch.unavailable': 'Could not read branches for this session.',
'terminal.directory.unknown': 'Directory unknown',
'terminal.directory.search': 'Search child directories...',
'terminal.directory.directories': 'Directories',
@@ -23,8 +15,6 @@ export const enTerminalMessages: Messages = {
'terminal.directory.integrationUnavailable': 'PowerShell directory integration is not ready. Startup arguments or execution policy may prevent it.',
'terminal.directory.cmdIntegrationUnavailable': 'Waiting for a directory report from the original Command Prompt session.',
'terminal.directory.gitBashIntegrationUnavailable': 'Waiting for an accessible directory from the original Git Bash session.',
'terminal.directory.wslIntegrationUnavailable': 'Waiting for an idle Bash session in the selected WSL distribution.',
'terminal.directory.cygwinIntegrationUnavailable': 'Waiting for Cygwin Bash to return to an idle prompt.',
'terminal.directory.nonFilesystem': 'The current PowerShell location is not a filesystem directory.',
'terminal.directory.busy': 'Wait for an empty shell prompt.',
'terminal.directory.readFailed': 'Could not read this directory. Try refreshing.',
@@ -478,7 +468,6 @@ export const enTerminalMessages: Messages = {
'cloudSync.localBackups.reason.beforeRestore': 'Before restore',
'cloudSync.localBackups.versionChange': '{from} -> {to}',
'cloudSync.localBackups.counts': '{hosts} hosts, {keys} keys, {snippets} snippets, {notes} notes',
'cloudSync.localBackups.aiCounts': '{sessions} AI chats, {settings} settings',
'cloudSync.localBackups.restore': 'Restore',
'cloudSync.localBackups.restoreSuccess': 'Local backup restored.',
'cloudSync.localBackups.restoreFailedTitle': 'Restore failed',
@@ -629,10 +618,6 @@ export const enTerminalMessages: Messages = {
'keychain.export.scriptPlaceholder': 'Export script...',
'keychain.export.missingCredentials':
'Host has no saved password or key. Please add password credentials to the host first.',
'keychain.export.missingPublicKey':
'This key has no public key. Open Edit, paste the public key, then try Export and Attach again.',
'keychain.export.missingPublicKeyNote':
'This key has no public key. Paste it in the key editor before exporting.',
'keychain.export.successTitle': 'Export Successful',
'keychain.export.successMessage': 'Public key exported and attached to {host}',
'keychain.export.failedTitle': 'Export Failed',
@@ -709,7 +694,6 @@ export const enTerminalMessages: Messages = {
'tabs.logPrefix': 'Log:',
'tabs.logLocal': 'Local',
'tabs.copyTab': 'Copy Tab',
'tabs.addSessionToWorkspace': 'Add Session to Workspace',
'tabs.duplicateSession': 'Duplicate Session',
'tabs.copyTabToNewWindow': 'Copy Tab to New Window',
'tabs.copyTabToNewWindowFailed': 'Failed to open tab in a new window',
@@ -1003,12 +987,4 @@ export const enTerminalMessages: Messages = {
'terminal.browser.allScopeHint': 'Show in every host’s browser.',
'terminal.browser.downloadLocation': 'Saved to your Downloads folder',
'terminal.browser.saveAs': 'Save as…',
'terminal.externalEditor.opened': 'Opened {path} in {editor}',
'terminal.externalEditor.failed': 'Failed to open in {editor}',
'terminal.externalEditor.prompt.title': 'Open in {editor}?',
'terminal.externalEditor.prompt.desc': 'Remote host {host} requested opening this remote path in {editor}:',
'terminal.externalEditor.prompt.deny': 'Deny',
'terminal.externalEditor.prompt.allowOnce': 'Allow Once',
'terminal.externalEditor.prompt.alwaysTrust': 'Always Trust Host',
'terminal.externalEditor.autoSetupConfigured': 'Remote editor commands configured ({editor})',
};
+1 -377
View File
@@ -680,7 +680,6 @@ export const enVaultMessages: Messages = {
// Protocol select dialog
'protocolSelect.chooseProtocol': 'Choose protocol',
'protocolSelect.rememberDefault': 'Remember as default (skip this prompt next time)',
'protocolSelect.port': 'port:',
// Host Details
@@ -992,22 +991,7 @@ export const enVaultMessages: Messages = {
'hostDetails.startupCommand.runMode.help': 'Choose how multi-line startup commands are sent after connection.',
'hostDetails.startupCommand.runMode.lineDelay': 'Send line by line',
'hostDetails.startupCommand.runMode.paste': 'Send all at once',
'hostDetails.otherProtocols': 'Additional Protocols',
'hostDetails.otherProtocolsHint': 'Attach secondary access methods to this SSH host without changing its default connection',
'hostDetails.protocol.defaultHint': 'Default on double-click ({protocol})',
'hostDetails.protocol.secondaryHint': 'Enabled as secondary protocol',
'hostDetails.protocol.setDefault': 'Set as default',
'hostDetails.protocol.remove': 'Remove',
'hostDetails.protocol.doubleClick': 'On double-click',
'hostDetails.protocol.connectOptionDefault': 'Default: {protocol}',
'hostDetails.protocol.connectOptionAsk': 'Ask every time',
'hostDetails.protocol.alsoEnable': 'Also enable',
'hostDetails.protocol.removeProtocol': 'Remove {protocol}',
'hostDetails.protocol.addProtocol': 'Add {protocol}',
'hostDetails.section.connectBehavior': 'Connection Behavior',
'hostDetails.protocol.notEnabledDesc': '{protocol} is not enabled on this host yet.',
'hostDetails.protocol.addSecondary': 'Add {protocol} (keep {defaultProtocol} default)',
'hostDetails.protocol.switchOnly': 'Use {protocol} only',
'hostDetails.otherProtocols': 'Other Protocols',
'hostDetails.telnetOn': 'Telnet on',
'hostDetails.port': 'port',
'hostDetails.telnet.credentials': 'Credentials',
@@ -1107,364 +1091,4 @@ export const enVaultMessages: Messages = {
'vault.import.plugins.moreItems': '{count} more items are included in this import.',
'vault.import.plugins.moreDiagnostics': '{count} more diagnostics were omitted from this preview.',
// Remote Desktop (VNC / RDP / JumpServer RDP)
'vault.hosts.newRdpHost': 'New RDP Host',
'vault.hosts.newVncHost': 'New VNC Host',
'vault.hosts.connectRdp': 'Connect RDP',
'vault.hosts.connectSsh': 'Connect SSH',
'vault.hosts.connectVnc': 'Connect VNC',
'vault.hosts.openInSystemRdp': 'Open in System RDP',
'vault.hosts.openInSystemVnc': 'Open in Screen Sharing',
'settings.jmsDeepLink.rdpLaunchMode': 'Open JumpServer RDP in',
'settings.jmsDeepLink.rdpLaunchModeDesc': 'Choose whether JumpServer jms:// RDP sessions open in Netcatty\'s built-in client or your system RDP app.',
'settings.jmsDeepLink.rdpLaunchMode.builtin': 'Built-in Client',
'settings.jmsDeepLink.rdpLaunchMode.system': 'System RDP Client',
'vault.import.rdp.label': 'RDP (.rdp)',
'vault.import.rdp.hint': 'Import one or more Microsoft / JumpServer .rdp files.',
'vault.import.remoteDesktopTip': 'MobaXterm, CSV, and .rdp imports also support RDP and VNC hosts.',
'keychain.identity.domain': 'Domain (RDP, optional)',
'keychain.identity.domainPlaceholder': 'CORP or AD domain',
'quickConnect.rdp.domain': 'Domain (optional)',
'quickConnect.rdp.domainPlaceholder': 'CORP or leave empty for local account',
'quickConnect.vnc.optionalUsername': 'Username (optional, for Apple ARD / VeNCrypt)',
'quickConnect.vnc.optionalUsernameHint': 'Most VNC servers only require a password.',
'quickConnect.vnc.passwordHint': 'Leave empty if the VNC server does not require authentication.',
'quickConnect.vnc.displayHelper': 'Display {display}',
'hostDetails.protocol.label': 'Protocol',
'hostDetails.rdp.portLabel': 'RDP on',
'hostDetails.vnc.portLabel': 'VNC on',
'hostDetails.vnc.displayHint': 'Display {display}',
'hostDetails.vnc.displayPlaceholder': '5900 or :0',
'hostDetails.rdp.domain': 'Domain (optional)',
'hostDetails.rdp.domainPlaceholder': 'CORP (optional)',
'hostDetails.rdp.domainLabel': 'Domain',
'hostDetails.rdp.usernamePlaceholder': 'Username, DOMAIN\\user, or JumpServer user|uuid',
'hostDetails.vnc.optionalUsername': 'Username (Apple ARD / VeNCrypt)',
'hostDetails.vnc.optionalUsernameHint': 'Optional. Standard VNC servers authenticate with password only.',
'hostDetails.vnc.usernamePlaceholder': 'Username (optional)',
'hostDetails.remoteDesktop.sectionTitle': 'Remote Desktop Display & Options',
'hostDetails.rdp.resolutionMode': 'Resolution Mode',
'hostDetails.rdp.resolutionMode.dynamic': 'Dynamic Resize',
'hostDetails.rdp.resolutionMode.fit': 'Fit to Window',
'hostDetails.rdp.resolutionMode.fixed': 'Fixed Size',
'hostDetails.rdp.width': 'Width',
'hostDetails.rdp.height': 'Height',
'hostDetails.rdp.dimensionHint': 'Enter a whole number from 200 to 8192.',
'hostDetails.rdp.colorDepth': 'Color Depth',
'hostDetails.rdp.audio': 'Audio Output',
'hostDetails.rdp.audioDesc': 'Play remote desktop sound locally',
'hostDetails.rdp.clipboard': 'Clipboard Sync',
'hostDetails.rdp.clipboardDesc': 'Share text and images with the remote desktop',
'hostDetails.rdp.clipboardFiles': 'Clipboard File Transfer',
'hostDetails.rdp.clipboardFilesDesc': 'Allow copying and dropping files via clipboard',
'hostDetails.rdp.securityMode': 'Security Mode',
'hostDetails.rdp.securityMode.auto': 'Auto',
'hostDetails.rdp.securityMode.nla': 'NLA (CredSSP)',
'hostDetails.rdp.securityMode.tls': 'TLS',
'hostDetails.rdp.securityMode.rdp': 'Standard RDP',
'hostDetails.rdp.ignoreCertErrors': 'Ignore Certificate Errors',
'hostDetails.rdp.ignoreCertErrorsDesc': 'Skip TLS certificate trust prompts (not recommended)',
'hostDetails.rdp.advanced': 'Advanced RDP Options',
'hostDetails.rdp.loadBalanceInfo': 'Load Balance Info',
'hostDetails.rdp.loadBalanceInfoPlaceholder': 'tsv://MS Terminal Services Plugin.1.Collection',
'hostDetails.rdp.alternateShell': 'Alternate Shell',
'hostDetails.rdp.alternateShellPlaceholder': 'Optional startup program path',
'hostDetails.rdp.shellWorkingDir': 'Working Directory',
'hostDetails.rdp.shellWorkingDirPlaceholder': 'Optional startup directory',
'hostDetails.vnc.scalingMode': 'Scaling Mode',
'hostDetails.vnc.scalingMode.fit': 'Fit to Window',
'hostDetails.vnc.scalingMode.actual': 'Actual (1:1)',
'hostDetails.vnc.scalingMode.stretch': 'Stretch',
'hostDetails.vnc.scalingMode.dynamic': 'Dynamic Resize',
'hostDetails.vnc.quality': 'Image Quality',
'hostDetails.vnc.compression': 'Compression Level',
'hostDetails.vnc.viewOnly': 'View-Only Mode',
'hostDetails.vnc.viewOnlyDesc': 'Disable sending mouse and keyboard input',
'hostDetails.vnc.sharedSession': 'Shared Session',
'hostDetails.vnc.sharedSessionDesc': 'Keep other VNC clients connected',
'hostDetails.vnc.clipboard': 'Clipboard Sync',
'hostDetails.vnc.clipboardDesc': 'Sync UTF-8 clipboard text with remote desktop',
'hostDetails.vnc.showRemoteCursor': 'Show Remote Cursor',
'hostDetails.vnc.showRemoteCursorDesc': 'Render server-provided cursor shape',
'hostDetails.companion.addVnc': 'Add VNC',
'hostDetails.companion.addRdp': 'Add RDP',
'hostDetails.companion.tunnelViaSsh': 'Tunnel via this host\'s SSH',
'hostDetails.companion.tunnelViaSshDesc': 'Forward through this host\'s SSH connection automatically',
'hostDetails.companion.tunnelTargetHost': 'Remote target address',
'hostDetails.companion.credentialsSource': 'Credentials',
'hostDetails.companion.credentials.host': 'Reuse host SSH credentials',
'hostDetails.companion.credentials.manual': 'Custom username / password',
'hostDetails.companion.credentials.manualHint': 'Saved securely to Keychain when you save this host',
'hostDetails.companion.credentials.identity': 'Keychain Identity',
'hostDetails.companion.credentials.ask': 'Ask on connect',
'hostDetails.companion.identityPlaceholder': 'Select a saved identity',
'hostDetails.companion.saveAsIdentity': 'Save as Identity',
'hostDetails.companion.saveIdentityAction': 'Create & Select Identity',
'hostDetails.companion.identityLabelPlaceholder': 'Identity label (e.g. Desktop VNC)',
'hostDetails.companion.identitySaved': 'Identity saved and selected.',
'hostDetails.companion.setDefaultRdp': 'Connect with RDP by default',
'hostDetails.companion.setDefaultVnc': 'Connect with VNC by default',
// Known Hosts — Remote Desktop TLS Certificates
'knownHosts.tabs.ssh': 'SSH Host Keys',
'knownHosts.tabs.remoteDesktopCerts': 'Remote Desktop Certificates',
'knownHosts.certs.clearAll': 'Clear All',
'knownHosts.certs.expired': 'Expired',
'knownHosts.certs.expiredNotice': 'This certificate has passed its validity expiration date.',
'knownHosts.certs.copied': 'SHA-256 fingerprint copied',
'knownHosts.certs.action.inspect': 'Inspect Certificate',
'knownHosts.certs.action.copyFingerprint': 'Copy SHA-256',
'knownHosts.certs.action.revoke': 'Revoke Trust',
'knownHosts.certs.empty.title': 'No Trusted Remote Desktop Certificates',
'knownHosts.certs.empty.desc': 'TLS certificates you trust while connecting to RDP or VeNCrypt VNC hosts will appear here.',
'knownHosts.certs.empty.searchTitle': 'No Matching Certificates',
'knownHosts.certs.empty.searchDesc': 'Try a different hostname, port, protocol, or SHA-256 fingerprint.',
'knownHosts.certs.detail.subtitle': 'Pinned TLS certificate trusted on this device (TOFU)',
'knownHosts.certs.detail.fingerprint': 'SHA-256 Fingerprint',
'knownHosts.certs.detail.subject': 'Subject',
'knownHosts.certs.detail.issuer': 'Issuer',
'knownHosts.certs.detail.validFrom': 'Valid From',
'knownHosts.certs.detail.validTo': 'Valid To',
'knownHosts.certs.detail.trustedAt': 'Trusted At',
'knownHosts.certs.detail.lastSeen': 'Last Seen',
'knownHosts.certs.revokeConfirm.title': 'Revoke certificate for {endpoint}?',
'knownHosts.certs.revokeConfirm.desc': 'You will be asked to verify this server\'s TLS certificate again on the next connection.',
'knownHosts.certs.clearAllConfirm.title': 'Clear all trusted remote desktop certificates?',
'knownHosts.certs.clearAllConfirm.desc': 'This will revoke all {count} pinned RDP/VNC certificates on this device.',
'knownHosts.certs.toast.revoked': 'Certificate trust revoked',
'knownHosts.certs.toast.clearedAll': 'Cleared {count} remote desktop certificates',
// Host Connection Test — RDP / VNC Probe
'hostDetails.connectionTest.rdp': 'Test RDP',
'hostDetails.connectionTest.vnc': 'Test VNC',
'hostDetails.connectionTest.probe.rtt': 'Latency (RTT)',
'hostDetails.connectionTest.probe.protocol': 'Protocol',
'hostDetails.connectionTest.probe.security': 'Negotiated Security',
'hostDetails.connectionTest.probe.rfbVersion': 'RFB Version',
'hostDetails.connectionTest.probe.securityTypes': 'Security Types',
'hostDetails.connectionTest.probe.tls': 'TLS',
'hostDetails.connectionTest.probe.fingerprint': 'SHA-256 Fingerprint',
'hostDetails.connectionTest.probe.trustStatus.trusted': 'Trusted',
'hostDetails.connectionTest.probe.trustStatus.firstSeen': 'First Seen',
'hostDetails.connectionTest.probe.trustStatus.changed': 'Changed',
'hostDetails.connectionTest.probe.trustFingerprint': 'Trust Fingerprint',
'hostDetails.connectionTest.probe.fingerprintTrusted': 'Certificate fingerprint trusted',
// Remote Desktop Toolbar — SFTP, CLIPRDR, Recording, Ask AI
'remoteDesktop.toolbar.keysLocal': 'Keys: Local',
'remoteDesktop.toolbar.keysRemote': 'Keys: Remote',
'remoteDesktop.toolbar.keysLocalTip': 'Local tab/window shortcuts stay active. Click to capture shortcuts for remote desktop.',
'remoteDesktop.toolbar.keysRemoteTip': 'App shortcuts are forwarded to remote. Press Ctrl+Alt+Shift or double-tap Right Alt/Option to release.',
'remoteDesktop.toolbar.sendKeys': 'Send Keys',
'remoteDesktop.toolbar.specialKeys': 'Special Key Chords',
'remoteDesktop.toolbar.typeClipboard': 'Type Clipboard as Keystrokes',
'remoteDesktop.toolbar.linuxTty': 'Linux Virtual Consoles',
'remoteDesktop.toolbar.osChordNote': 'OS-reserved chords (Alt+Tab, Cmd+Tab, Ctrl+Alt+Del) are intercepted by your local OS and must be sent from this menu.',
'remoteDesktop.toolbar.display': 'Display Scaling',
'remoteDesktop.toolbar.sshTunneled': 'Tunneled over SSH',
'remoteDesktop.toolbar.encrypted': 'Encrypted TLS connection',
'remoteDesktop.toolbar.standardRdpSecurity': 'Standard RDP Security ({{cipher}})',
'remoteDesktop.rdp.fallbackStandardRdp': 'Connected using Standard RDP Security.',
'remoteDesktop.rdp.fallbackStandardRdpWithCipher': 'Connected using Standard RDP Security ({{cipher}}).',
'remoteDesktop.toolbar.viewOnly': 'View-Only Mode',
'remoteDesktop.toolbar.viewOnlyBadge': 'View',
'remoteDesktop.toolbar.audio': 'RDP Audio',
'remoteDesktop.toolbar.mute': 'Mute',
'remoteDesktop.toolbar.unmute': 'Unmute',
'remoteDesktop.toolbar.clipboard': 'Clipboard Sync',
'remoteDesktop.toolbar.clipboardSync': 'Clipboard Sync',
'remoteDesktop.toolbar.clipboardFiles': 'RDP Clipboard Files',
'remoteDesktop.toolbar.clipboardFilesHint': 'Copy files on remote to download here, or drag local files onto the desktop to copy.',
'remoteDesktop.toolbar.saveFile': 'Save File',
'remoteDesktop.toolbar.options': 'Quality & Input Options',
'remoteDesktop.toolbar.quality': 'Encoding Quality',
'remoteDesktop.toolbar.screenshot': 'Screenshot',
'remoteDesktop.toolbar.copyScreenshot': 'Copy PNG to Clipboard',
'remoteDesktop.toolbar.saveScreenshot': 'Save PNG Screenshot',
'remoteDesktop.toolbar.fullscreen': 'Fullscreen',
'remoteDesktop.toolbar.exitFullscreen': 'Exit Fullscreen',
'remoteDesktop.toolbar.pin': 'Pin toolbar',
'remoteDesktop.toolbar.unpin': 'Unpin toolbar',
'remoteDesktop.toolbar.popOut': 'Open in New Window',
'remoteDesktop.toolbar.reconnect': 'Reconnect',
'remoteDesktop.toolbar.disconnect': 'Disconnect',
'remoteDesktop.toolbar.openSystemRdp': 'Open in System RDP',
'remoteDesktop.toolbar.openSystemVnc': 'Open in Screen Sharing',
'remoteDesktop.display.dynamic': 'Dynamic Resize',
'remoteDesktop.display.fit': 'Fit to Pane',
'remoteDesktop.display.actual': '1:1 Actual Size',
'remoteDesktop.display.stretch': 'Stretch',
'remoteDesktop.display.highDpi': 'Retina HiDPI',
'remoteDesktop.display.unsupported': 'Unsupported',
'remoteDesktop.toolbar.mapCmdToCtrl': 'Map Cmd → Ctrl',
'remoteDesktop.toolbar.showRemoteCursor': 'Show Remote Cursor',
'remoteDesktop.toolbar.refreshScreen': 'Force Full Screen Refresh',
'remoteDesktop.xvp.title': 'Remote Power (XVP)',
'remoteDesktop.xvp.reboot': 'Reboot',
'remoteDesktop.xvp.shutdown': 'Shutdown',
'remoteDesktop.xvp.reset': 'Hard Reset',
'remoteDesktop.vnc.bell': 'Remote desktop bell',
'remoteDesktop.toolbar.moreActions': 'More Actions',
'remoteDesktop.clipboard.pushNow': 'Push Local Clipboard Now',
'remoteDesktop.clipboard.pushed': 'Local clipboard synced to remote',
'remoteDesktop.disconnected.title': 'Session Disconnected',
'remoteDesktop.auth.reenter': 'Credentials',
'remoteDesktop.auth.cancelled': 'Authentication cancelled.',
'remoteDesktop.cert.rejected': 'TLS certificate rejected by user.',
'remoteDesktop.step.bastion': 'Bastion',
'remoteDesktop.step.network': 'Network',
'remoteDesktop.step.nla': 'NLA Auth',
'remoteDesktop.step.rfb': 'RFB Auth',
'remoteDesktop.step.desktop': 'Desktop',
'remoteDesktop.toolbar.openSftp': 'SFTP',
'remoteDesktop.toolbar.record': 'Record session',
'remoteDesktop.toolbar.stopRecording': 'Stop recording',
'remoteDesktop.toolbar.savingRecording': 'Saving...',
'remoteDesktop.toolbar.recording': 'Recording',
'remoteDesktop.toolbar.askAi': 'Ask AI',
'remoteDesktop.toolbar.askAiFull': 'Capture Screen & Ask AI',
'remoteDesktop.toolbar.askAiRegion': 'Select Region & Ask AI',
'remoteDesktop.toolbar.aiReadAllowed': 'AI screen reading allowed',
'remoteDesktop.toolbar.aiReadBlocked': 'AI screen reading blocked for this session',
'remoteDesktop.toolbar.aiReadingBanner': 'AI is viewing this screen',
'remoteDesktop.clipboard.dropTitle': 'Drop files to send to remote clipboard (CLIPRDR)',
'remoteDesktop.clipboard.dropSubtitle': 'After dropping, press Ctrl+V inside the remote desktop to paste',
'remoteDesktop.clipboard.dropFileCount': '{count} file(s)',
'remoteDesktop.clipboard.dropBlockedViewOnly': 'File drop is disabled in View-Only mode',
'remoteDesktop.clipboard.dropBlockedDisabled': 'Clipboard file transfer is disabled for this host',
'remoteDesktop.clipboard.dropFolderUnsupported': 'Folders are not supported over RDP clipboard. Use SFTP or archive them as a .zip file.',
'remoteDesktop.clipboard.stagedPill': '{count} file(s) · Ctrl+V',
'remoteDesktop.clipboard.sendLocalFiles': 'Send Local Files...',
'remoteDesktop.clipboard.uploading': 'Sending via clipboard',
'remoteDesktop.clipboard.downloading': 'Receiving via clipboard',
'remoteDesktop.clipboard.transferCompleted': 'Clipboard file transfer complete',
'remoteDesktop.clipboard.transferFailed': 'Clipboard file transfer failed',
'remoteDesktop.recording.started': 'Session recording started',
'remoteDesktop.recording.saved': 'Session recording saved to Connection Logs',
'remoteDesktop.recording.failed': 'Session recording failed',
'remoteDesktop.recording.unsupported': 'Session recording is not supported in this environment',
// Remote Desktop — Resolution Presets, Multi-Monitor, RDPDR Shared Folders, Network Telemetry, AI Computer Use
'remoteDesktop.display.resolutionPresets': 'Resolution Presets',
'remoteDesktop.display.customWidth': 'Width',
'remoteDesktop.display.customHeight': 'Height',
'remoteDesktop.display.applyResolution': 'Apply',
'remoteDesktop.display.multiMonitor': 'Multi-Monitor Layout',
'remoteDesktop.display.monitorSingle': 'Single Monitor',
'remoteDesktop.display.monitorDual': 'Dual Side-by-Side',
'remoteDesktop.display.monitorAllLocal': 'Match Local Displays',
'remoteDesktop.display.monitorAllLocalCount': 'Match Local Displays ({count})',
'remoteDesktop.display.monitorSwitcher': 'Switch active monitor',
'remoteDesktop.display.monitorAll': 'All',
'remoteDesktop.sharedFolders.title': 'Shared Folders (RDPDR)',
'remoteDesktop.sharedFolders.add': 'Add Folder',
'remoteDesktop.sharedFolders.empty': 'Mount a local folder as a virtual drive on the remote Windows desktop.',
'remoteDesktop.sharedFolders.remove': 'Remove folder',
'remoteDesktop.sharedFolders.readOnly': 'Read-only',
'remoteDesktop.sharedFolders.hint': 'Windows: This PC → <Folder> on Netcatty (\\\\tsclient\\<Name>). Local-only, never synced.',
'remoteDesktop.sharedFolders.duplicate': 'This folder is already shared',
'remoteDesktop.sharedFolders.mounted': 'Mounted "{name}" on remote desktop',
'remoteDesktop.sharedFolders.unmounted': 'Unmounted "{name}"',
'remoteDesktop.network.title': 'Connection Telemetry',
'remoteDesktop.network.latency': 'Latency',
'remoteDesktop.network.resolution': 'Resolution',
'remoteDesktop.network.downlink': 'Downlink (RX)',
'remoteDesktop.network.uplink': 'Uplink (TX)',
'remoteDesktop.network.totalRx': 'Total RX',
'remoteDesktop.network.totalTx': 'Total TX',
'remoteDesktop.network.tlsEncrypted': 'TLS',
'remoteDesktop.network.quality.excellent': 'Excellent',
'remoteDesktop.network.quality.good': 'Good',
'remoteDesktop.network.quality.fair': 'Fair',
'remoteDesktop.network.quality.poor': 'Poor',
'remoteDesktop.network.quality.unknown': 'Measuring',
'remoteDesktop.ai.controllingBanner': 'Catty controlling · Click desktop or press Esc to take over',
'remoteDesktop.ai.stopControl': 'Stop',
'remoteDesktop.ai.preempted': 'AI control paused — you have taken over',
'remoteDesktop.ai.preemptedStopped': 'AI control stopped — you have taken over',
'remoteDesktop.ai.audit.menuItem': 'Computer Use Audit Log',
'remoteDesktop.ai.audit.title': 'AI Computer Use Audit Log',
'remoteDesktop.ai.audit.subtitleHost': 'Mouse and keyboard actions executed by AI on this remote desktop.',
'remoteDesktop.ai.audit.subtitleAll': 'Local ring buffer of the latest 500 AI remote desktop actions (sensitive text redacted).',
'remoteDesktop.ai.audit.searchPlaceholder': 'Filter by action, host, or error code...',
'remoteDesktop.ai.audit.scopeSession': 'This session',
'remoteDesktop.ai.audit.scopeAll': 'All',
'remoteDesktop.ai.audit.filterAll': 'All',
'remoteDesktop.ai.audit.filterOk': 'OK',
'remoteDesktop.ai.audit.filterPreempted': 'Preempted',
'remoteDesktop.ai.audit.filterIssues': 'Blocked/Err',
'remoteDesktop.ai.audit.empty': 'No AI remote desktop actions recorded yet.',
'remoteDesktop.ai.audit.outcomeOk': 'OK',
'remoteDesktop.ai.audit.outcomePreempted': 'Preempted',
'remoteDesktop.ai.audit.outcomeBlocked': 'Blocked',
'remoteDesktop.ai.audit.outcomeDenied': 'Denied',
'remoteDesktop.ai.audit.outcomeError': 'Error',
'remoteDesktop.ai.audit.copyJson': 'Copy JSON',
'remoteDesktop.ai.audit.copied': 'Copied',
'remoteDesktop.ai.audit.clear': 'Clear',
// LogView — Remote Desktop Recordings & Metadata
'logView.recording.download': 'Download .webm',
'logView.recording.delete': 'Delete Recording',
'logView.recording.loading': 'Loading session recording...',
'logView.recording.withAudio': 'Audio',
'logView.recording.missingTitle': 'Recording no longer on disk',
'logView.recording.missingDesc': 'This .webm file was removed, cleaned up by retention settings, or moved from the recordings folder.',
'logView.recording.playbackErrorTitle': 'Unable to play recording',
'logView.recording.playbackErrorDesc': 'The video file may be incomplete or unsupported by the built-in player.',
'logView.recording.exportSuccess': 'Recording exported',
'logView.recording.exportFailed': 'Failed to export recording',
'logView.recording.deleted': 'Recording deleted',
'logView.recording.deleteFailed': 'Failed to delete recording',
'logView.recording.deleteConfirmTitle': 'Delete this session recording?',
'logView.recording.deleteConfirmDesc': 'The .webm video file will be permanently removed from disk. The connection log entry itself will remain.',
'logView.remoteDesktop.noRecordingSubtitle': 'No screen recording was captured for this session',
'logView.remoteDesktop.host': 'Host',
'logView.remoteDesktop.protocol': 'Protocol',
'logView.remoteDesktop.user': 'Username',
'logView.remoteDesktop.started': 'Started',
'logView.remoteDesktop.ended': 'Ended',
'logView.remoteDesktop.duration': 'Duration',
'logView.remoteDesktop.resolution': 'Resolution',
'logView.remoteDesktop.security': 'Security',
'logView.remoteDesktop.disconnectReason': 'Disconnect reason',
'logView.remoteDesktop.timeline': 'Session Timeline',
'logView.remoteDesktop.recordingTip': 'Click Record in the remote desktop toolbar or enable Auto-record in Settings -> System to save .webm replays here.',
'logs.recording.clipsCount': '{count} clips',
'logs.filter.all': 'All',
'logs.filter.terminal': 'Terminal',
'logs.filter.remoteDesktop': 'Remote Desktop',
'logs.filter.recorded': 'Recorded',
'logs.filter.emptyTitle': 'No matching logs',
'logs.filter.emptyDesc': 'No connection logs match the selected filter yet.',
// Settings -> System -> Remote Desktop Recordings
'settings.remoteDesktopRecordings.title': 'Remote Desktop Recordings',
'settings.remoteDesktopRecordings.autoRecord': 'Auto-record remote desktop sessions',
'settings.remoteDesktopRecordings.autoRecordDesc': 'Automatically start recording RDP and VNC sessions once connected (off by default to conserve disk space).',
'settings.remoteDesktopRecordings.fps': 'Recording frame rate',
'settings.remoteDesktopRecordings.fpsDesc': 'Higher frame rates look smoother but use more CPU and disk space.',
'settings.remoteDesktopRecordings.fpsOption': '{fps} FPS',
'settings.remoteDesktopRecordings.includeAudio': 'Include RDP audio',
'settings.remoteDesktopRecordings.includeAudioDesc': 'Merge remote desktop audio output into the recorded .webm video when available.',
'settings.remoteDesktopRecordings.maxStorage': 'Maximum storage cap',
'settings.remoteDesktopRecordings.maxStorageDesc': 'Oldest unsaved session recordings are automatically removed when total usage exceeds this limit.',
'settings.remoteDesktopRecordings.retentionDays': 'Retention period',
'settings.remoteDesktopRecordings.retentionDaysDesc': 'Automatically delete unsaved recordings older than this period.',
'settings.remoteDesktopRecordings.retentionDaysOption': '{days} days',
'settings.remoteDesktopRecordings.retentionUnlimited': 'Unlimited',
'settings.remoteDesktopRecordings.storageUsage': 'Local recording storage',
'settings.remoteDesktopRecordings.storageUsageSummary': '{count} files · {size}',
'settings.remoteDesktopRecordings.storageUsageLoading': 'Calculating disk usage...',
'settings.remoteDesktopRecordings.refresh': 'Refresh storage usage',
'settings.remoteDesktopRecordings.openFolder': 'Open Folder',
'settings.remoteDesktopRecordings.clearAll': 'Clear All Recordings',
'settings.remoteDesktopRecordings.clearAllConfirmTitle': 'Clear all remote desktop recordings?',
'settings.remoteDesktopRecordings.clearAllConfirmDesc': 'This will permanently delete {count} recorded .webm file(s) from this device.',
'settings.remoteDesktopRecordings.clearResult': 'Removed {count} recording file(s).',
'settings.remoteDesktopRecordings.hint': 'Recordings are stored locally on this device and never synced to the cloud. Bookmarked logs are protected from automatic cleanup.',
'sftp.context.openInExternalEditor': 'Open in {editor}',
'hostDetails.externalEditorShellIntegration': 'Enable external editor commands in this session',
'hostDetails.externalEditorShellIntegration.desc': 'Expose `zed` / `ncedit` via ~/.netcatty/bin for this Netcatty terminal session only (including tmux) without modifying ~/.bashrc or ~/.zshrc.',
};
-71
View File
@@ -117,9 +117,6 @@ export const esAiMessages: Messages = {
'ai.codex.appServer.available': 'App Server está disponible para esta Codex CLI.',
'ai.codex.appServer.modelCatalogWarning': 'El catálogo de modelos de Codex en vivo no está disponible. Se usa la lista de modelos integrada.',
'ai.codex.appServer.approval.allowSession': 'Permitir por sesión',
'ai.planReview.title': 'Revisar el plan de implementación',
'ai.planReview.keepPlanning': 'Seguir planificando',
'ai.planReview.approveAndImplement': 'Aprobar e implementar',
'ai.codex.appServer.userInput.title': 'Codex necesita tu aporte',
'ai.codex.appServer.userInput.description': 'Responde estas preguntas para continuar el turno actual.',
'ai.codex.appServer.userInput.other': 'Ingresa otra respuesta',
@@ -308,16 +305,6 @@ export const esAiMessages: Messages = {
'ai.opencode.v2.mcpSkipped': 'OpenCode 2 no pudo adjuntar una herramienta MCP. El chat continuará sin ella.',
// AI MiMo Code (CLI de Xiaomi MiMo Code — fork de OpenCode)
'ai.agy.title': 'Antigravity CLI (Beta)',
'ai.agy.description': 'Beta experimental: CLI del agente de codificación Antigravity de Google conectado mediante el Agent Client Protocol oficial (agy acp --stdio). El soporte aún es limitado y no ha sido probado a fondo; úsalo bajo tu propia responsabilidad. Inicia sesión con agy en tu terminal y selecciónalo como agente externo.',
'ai.agy.detecting': 'Detectando...',
'ai.agy.detected': 'Detectado',
'ai.agy.notFound': 'No encontrado',
'ai.agy.path': 'Ruta:',
'ai.agy.notFoundHint': 'No se pudo encontrar agy en el PATH. Instala Antigravity CLI o especifica la ruta del ejecutable a continuación.',
'ai.agy.customPathPlaceholder': 'p. ej. /usr/local/bin/agy',
'ai.agy.check': 'Verificar',
'ai.agy.resetPath': 'Restablecer',
'ai.mimo.title': 'MiMo Code',
'ai.mimo.description': 'CLI de MiMo Code de Xiaomi, un fork de OpenCode. Instálalo y configura los proveedores en su propia configuración, luego selecciónalo como agente de codificación externo.',
'ai.mimo.detecting': 'Detectando...',
@@ -341,9 +328,6 @@ export const esAiMessages: Messages = {
'ai.grok.check': 'Verificar',
'ai.grok.resetPath': 'Restablecer',
'ai.grok.runtime.acp.title': 'Usar Grok ACP (agente stdio)',
'ai.grok.userQuestion.title': 'Grok necesita tu respuesta',
'ai.grok.userQuestion.description': 'Las respuestas no conceden permisos. No incluyas contraseñas ni tokens.',
'ai.grok.userQuestion.submit': 'Enviar respuestas',
'ai.grok.runtime.acp.default': 'Predeterminado',
'ai.grok.runtime.acp.description':
'Habla con Grok mediante el Protocolo de Cliente de Agente (grok agent stdio). Inyecta el MCP de Netcatty en session/new. Apágalo para usar la ruta original de CLI headless con streaming-json.',
@@ -645,25 +629,12 @@ export const esAiMessages: Messages = {
'ai.chat.managerRebindPick': 'Elegir terminal o espacio de trabajo…',
'ai.chat.managerRebindHere': 'Panel actual',
'ai.chat.managerRebindDone': 'Se movió «{title}» a {target}.',
'ai.chat.managerToggleSelection': 'Seleccionar chats',
'ai.chat.managerSelectAll': 'Seleccionar todo',
'ai.chat.managerSelectedCount': '{n} seleccionados',
'ai.chat.managerSelectRow': 'Seleccionar este chat',
'ai.chat.managerRegenerateTitle': 'Regenerar título con IA',
'ai.chat.managerRegenerateTitleUpdated': 'Título del chat actualizado.',
'ai.chat.managerRegenerateTitleUnchanged': 'El título del chat ya está actualizado.',
'ai.chat.managerRegenerateTitleNoModel': 'No hay un proveedor o modelo de IA configurado para generar títulos. Configúralo en Ajustes de IA.',
'ai.chat.managerRegenerateTitleFailed': 'Error al regenerar el título: {error}',
'ai.chat.managerRegenerateTitleBatchDone': 'Se actualizaron {n} título(s) de chat.',
'ai.chat.managerRegenerateTitleBatchPartial': 'Se actualizaron {updated} título(s) y fallaron {failed}.',
'ai.chat.managerExportOne': 'Exportar este chat',
'ai.chat.managerBadgeActive': 'Activo',
'ai.chat.managerBadgeIdle': 'Inactivo',
'ai.chat.managerMessagesCount': '{n} mensajes',
'ai.chat.managerDeleteTitle': '¿Eliminar este chat?',
'ai.chat.managerDeleteMessage': '«{title}» y sus mensajes se eliminarán de todos los paneles. Esta acción no se puede deshacer.',
'ai.chat.managerBulkDeleteTitle': '¿Eliminar {n} chats?',
'ai.chat.managerBulkDeleteMessage': 'Los {n} chats seleccionados y sus mensajes se eliminarán de todos los paneles. Esta acción no se puede deshacer.',
'ai.chat.justNow': 'Ahora mismo',
'ai.chat.minutesAgo': 'hace {n} min',
'ai.chat.hoursAgo': 'hace {n} h',
@@ -714,25 +685,9 @@ export const esAiMessages: Messages = {
'ai.chatShortcuts.selectionAction': 'Mostrar "Agregar a la conversación" al seleccionar texto de la terminal',
'ai.chatShortcuts.selectionAction.description': 'Muestra un pequeño botón de IA junto al texto seleccionado de la terminal.',
'ai.chatHistory.title': 'Historial de chat',
'ai.chatHistory.storageUsage': 'Tamaño del historial de chats local',
'ai.chatHistory.storageUsage.description': 'Calcula el tamaño de los registros guardados como JSON UTF-8.',
'ai.chatHistory.storageUsage.measure': 'Calcular',
'ai.chatHistory.storageUsage.measuring': 'Calculando…',
'ai.chatHistory.storageUsage.result': 'Registros guardados · {count}. Tamaño estimado del JSON · {size}.',
'ai.chatHistory.storageUsage.partial': 'Registros excluidos del cálculo · {count}.',
'ai.chatHistory.storageUsage.error': 'No se pudo leer el historial de chats local. Vuelve a intentarlo.',
'ai.chatHistory.messageCap': 'Mensajes conservados por chat',
'ai.chatHistory.messageCap.description': 'Número máximo de mensajes almacenados por chat (50–2000). Al reducirlo, los mensajes más antiguos se descartan del almacenamiento en la siguiente escritura. Los valores más altos aumentan el almacenamiento y el tamaño de la sincronización en la nube.',
'ai.chatHistory.messageCap.unit': 'mensajes',
'ai.chatHistory.autoLlmTitle': 'Generar títulos automáticamente',
'ai.chatHistory.autoLlmTitle.description': 'Usa una breve llamada LLM para crear un título corto tras el primer mensaje. Si no está disponible, usa la primera línea. Ajuste solo local.',
'ai.chatHistory.titleModel': 'Modelo de título',
'ai.chatHistory.titleModel.description': 'Proveedor y modelo usados para generar títulos. Elige un modelo pequeño y económico. Por defecto usa el modelo actual de Catty.',
'ai.chatHistory.titleModel.none': 'No hay proveedores habilitados.',
'ai.chatHistory.titleModel.useCurrentCatty': 'Usar el modelo actual de Catty',
'ai.chatHistory.titleModel.unavailable': 'No disponible',
'ai.chatHistory.titleModel.providerPlaceholder': 'Seleccionar proveedor',
'ai.chatHistory.titleModel.modelPlaceholder': 'Seleccionar modelo',
// AI Error
'ai.codex.bridgeError': 'Los controladores del proceso principal de Codex aún no están cargados. Reinicia Netcatty por completo o reinicia el proceso de desarrollo de Electron y vuelve a intentarlo.',
@@ -880,15 +835,6 @@ export const esAiMessages: Messages = {
'ai.chat.artifact.scriptRunPaused': 'Ejecución del script en pausa',
'ai.chat.artifact.scriptRunResumed': 'Ejecución del script reanudada',
'ai.chat.artifact.scriptReference': 'referencia de la API de nct',
'ai.chat.artifact.rdScreenRead': 'Lectura de pantalla remota',
'ai.chat.artifact.rdScreenGrid': 'Lectura de pantalla remota (cuadrícula)',
'ai.chat.artifact.rdScreenCropped': 'Región ampliada capturada',
'ai.chat.artifact.rdActionExecuted': 'Se ejecutaron {count} acciones remotas',
'ai.chat.artifact.rdActionCount': '{count} acciones',
'ai.chat.artifact.rdActionPreempted': 'Acción remota pausada por el usuario',
'ai.chat.artifact.rdScreenFailed': 'Error al capturar la pantalla remota',
'ai.chat.artifact.rdActionFailed': 'Error en la acción de escritorio remoto',
'ai.chat.artifact.rdPreviewScreen': 'Vista previa de la captura',
'zmodem.waitingForRemote': 'Esperando al servidor remoto...',
'zmodem.uploading': 'Subiendo',
'zmodem.downloading': 'Descargando',
@@ -922,21 +868,4 @@ export const esAiMessages: Messages = {
"ai.toolSettings.conflict": "La configuración cambió en otra ventana. Se conserva el borrador. Cancela y vuelve a abrir para cargar la configuración guardada.",
"ai.toolSettings.retry": "Reintentar",
"ai.toolSettings.applyingHttp": "Aplicando la configuración HTTP...",
"ai.vision.quickPrompt.explainError": "Explicar el error actual",
"ai.vision.quickPrompt.diagnoseUi": "Diagnosticar problema de interfaz",
"ai.vision.quickPrompt.summarizeScreen": "Resumir pantalla",
"ai.vision.unsupportedModelWarning": "El modelo actual ({model}) no admite entrada de imágenes. Cambia a un modelo con visión para leer pantallas remotas.",
"ai.vision.switchModel": "Cambiar modelo",
"ai.vision.modelSupportsVision": "Admite entrada de imágenes",
"ai.vision.snip.hint": "Arrastra para seleccionar un área · Esc para cancelar",
"ai.vision.snip.cancel": "Cancelar selección",
"ai.vision.snip.ariaLabel": "Seleccionar un área de la pantalla del escritorio remoto",
"ai.vision.privacyBlocked": "La lectura de pantalla por IA está bloqueada en esta sesión.",
"ai.vision.viewingScreen": "Catty está viendo el escritorio",
"ai.vision.askAi": "Preguntar a la IA",
"ai.vision.captureFullAndAsk": "Capturar pantalla y preguntar a la IA",
"ai.vision.snipRegionAndAsk": "Recortar área y preguntar a la IA",
"ai.vision.openAiChat": "Abrir asistente de IA",
"ai.vision.privacyLockOn": "Lectura de pantalla por IA bloqueada",
"ai.vision.privacyLockOff": "Permitir lectura de pantalla por IA",
};
+2 -68
View File
@@ -8,7 +8,7 @@ export const esCoreMessages: Messages = {
"settings.plugins.github.busy": "Descargando, validando o instalando el paquete...",
"settings.plugins.github.review": "El origen y la integridad no verifican la confianza en el autor. No se ejecutan scripts de compilación. Se instala desactivado; revisa los permisos antes de activarlo.",
"settings.plugins.github.accept": "Confío en este repositorio y he revisado los permisos declarados.",
"settings.plugins.github.confirm": "Instalar",
"settings.plugins.github.confirm": "Instalar desactivado",
"settings.plugins.github.download": "Descargar y revisar",
"settings.plugins.github.error.invalidRepository": "Introduce https://github.com/owner/repo, github.com/owner/repo u owner/repo. Usa solo el repositorio, sin credenciales, parámetros, fragmentos ni rutas adicionales.",
"settings.plugins.github.error.unavailable": "La instalación de plugins desde GitHub no está disponible en esta sesión.",
@@ -431,8 +431,6 @@ export const esCoreMessages: Messages = {
'settings.vault.showSftpTab': 'Mostrar pestaña SFTP',
'settings.vault.showSftpTabDesc': 'Muestra la vista SFTP independiente en la barra de pestañas superior. Cuando está oculta, usa el panel lateral SFTP dentro de la sesión.',
'settings.vault.showHostTreeSidebar': 'Mostrar barra lateral de lista de hosts',
'settings.vault.removeTopTabsDragArea': 'Quitar el área superior para arrastrar la ventana',
'settings.vault.removeTopTabsDragAreaDesc': 'Al activarla, quita el espacio de arrastre sobre las pestañas para poder hacer clic en el borde superior.',
'settings.vault.showHostTreeSidebarDesc': 'Muestra la barra lateral de lista de hosts y su alternador en la barra superior en las pestañas de terminal y editor.',
'settings.vault.autoImportSystemKnownHosts': 'Importar automáticamente known_hosts del sistema',
'settings.vault.autoImportSystemKnownHostsDesc': 'Cuando se carga el Vault, importa en silencio las entradas del archivo known_hosts de OpenSSH. Desactívalo para mantener los hosts conocidos de Netcatty separados; Escanear sistema sigue importando a pedido.',
@@ -1001,9 +999,6 @@ Resalta el panel dividido enfocado:
'Elige si las sugerencias de autocompletado del historial provienen solo del host actual o de los comandos registrados en todos los hosts.',
'settings.terminal.autocomplete.historyScope.host': 'Host actual',
'settings.terminal.autocomplete.historyScope.global': 'Todos los hosts',
'settings.terminal.autocomplete.showSnippets': 'Mostrar fragmentos de código',
'settings.terminal.autocomplete.showSnippets.desc':
'Incluye fragmentos de código coincidentes en la lista de autocompletado. Desactiva esta opción si los fragmentos desplazan las sugerencias de comandos e historial.',
// Settings > Terminal > Password prompt assist (sudo/su)
'settings.terminal.section.passwordPromptAssist': 'Asistencia para solicitud de contraseña',
@@ -1032,9 +1027,6 @@ Resalta el panel dividido enfocado:
'settings.shortcuts.recording': 'Presiona teclas...',
'settings.shortcuts.none': 'Ninguno',
'settings.shortcuts.setDisabled': 'Configurar como desactivado',
'settings.shortcuts.addExtra': 'Añadir atajo',
'settings.shortcuts.additional': 'Atajo adicional',
'settings.shortcuts.removeExtra': 'Eliminar atajo',
'settings.shortcuts.category.tabs': 'Pestañas',
'settings.shortcuts.category.terminal': 'Terminal',
'settings.shortcuts.category.navigation': 'Navegación',
@@ -1070,7 +1062,6 @@ Resalta el panel dividido enfocado:
'settings.shortcuts.binding.command-palette': 'Abrir paleta de comandos',
'settings.shortcuts.binding.quick-switch': 'Cambio rápido',
'settings.shortcuts.binding.new-workspace': 'Nuevo espacio de trabajo',
'settings.shortcuts.binding.add-session-to-workspace': 'Añadir sesión al espacio de trabajo',
'settings.shortcuts.binding.snippets': 'Abrir fragmentos',
'settings.shortcuts.binding.broadcast': 'Alternar modo de transmisión',
'settings.shortcuts.binding.toggle-opacity': 'Alternar la transparencia de la ventana',
@@ -1183,16 +1174,6 @@ Resalta el panel dividido enfocado:
'vault.nav.notes': 'Notas',
'vault.nav.knownHosts': 'Hosts conocidos',
'vault.nav.logs': 'Registros',
'vault.nav.customize': 'Personalizar barra lateral',
'vault.nav.customizeHint': 'Arrastra elementos para reordenar o alternar visibilidad.',
'vault.nav.hideItem': 'Ocultar {label}',
'vault.nav.moveUp': 'Subir',
'vault.nav.moveDown': 'Bajar',
'vault.nav.resetDefault': 'Restablecer a los valores predeterminados',
'vault.nav.alwaysVisible': 'Siempre visible',
'vault.nav.pluginBadge': 'Complemento',
'vault.nav.dragToReorder': 'Arrastra para reordenar {label}',
'vault.nav.toggleVisibility': 'Alternar visibilidad de {label}',
'proxyProfiles.action.add': 'Agregar proxy',
'proxyProfiles.search.placeholder': 'Buscar proxies…',
@@ -1244,10 +1225,7 @@ Resalta el panel dividido enfocado:
'vault.groups.details': 'Detalles del grupo',
'vault.groups.details.general': 'General',
'vault.groups.details.ssh': 'SSH',
'vault.groups.details.rdp': 'RDP',
'vault.groups.details.vnc': 'VNC',
'vault.groups.details.telnet': 'Telnet',
'vault.groups.details.protocolNotEnabledDesc': 'La configuración predeterminada de {protocol} aún no está configurada para este grupo.',
'vault.groups.details.advanced': 'Avanzado',
'vault.groups.details.appearance': 'Apariencia',
'vault.groups.details.mosh': 'Mosh',
@@ -1339,12 +1317,7 @@ Resalta el panel dividido enfocado:
"plugins.sidebar.selectTerminal": "Selecciona primero un terminal abierto.",
"plugins.sidebar.loading": "Cargando página de extensión…",
"plugins.vault.loading": "Cargando página del plugin…",
"plugins.vault.viewError": "No se pudo renderizar la página del plugin.",
"plugins.vault.retry": "Reintentar",
"plugins.interaction.title": "Solicitud de complemento",
"plugins.interaction.openUrlTitle": "¿Abrir enlace externo?",
"plugins.interaction.openUrlNote": "Este complemento solicita abrir la siguiente URL HTTPS en tu navegador predeterminado:",
"plugins.interaction.openUrlAction": "Abrir URL",
"plugins.interaction.sharing": "El texto compartido estará disponible para este complemento y sus capacidades autorizadas, incluida la red. Leer no autoriza un nuevo destino de red.",
"plugins.interaction.input": "Introducir texto",
"plugins.interaction.filter": "Filtrar opciones",
@@ -1418,10 +1391,7 @@ Resalta el panel dividido enfocado:
"settings.plugins.market.title": "Catálogo",
"settings.plugins.market.note": "Plugins de código abierto seleccionados. La revisión no certifica su seguridad. Las actualizaciones son manuales.",
"settings.plugins.market.back": "Todos los plugins",
"settings.plugins.market.install": "Instalar",
"settings.plugins.market.installing": "Instalando...",
"settings.plugins.market.update": "Actualizar",
"settings.plugins.market.updating": "Actualizando...",
"settings.plugins.market.install": "Instalar esta versión (desactivada)",
"settings.plugins.market.installNote": "Esto reemplaza y detiene la versión instalada. Revisa sus permisos antes de activarla.",
"settings.plugins.market.sourceOnly": "Ejemplo propio con código fuente. Compílalo con la CLI local e importa el .ncpkg; no hay versión publicada para descargar.",
"settings.plugins.market.readmeNote": "Fijado al commit indicado. El HTML no se ejecuta y las imágenes remotas no se cargan. Contenido del autor.",
@@ -1507,41 +1477,5 @@ Resalta el panel dividido enfocado:
'plugins.hostActions.managedUnsupported': 'Los cambios de configuración SSH administrada requieren el editor de equipos de Vault.',
'plugins.hostActions.failed': 'La solicitud caducó, se revocó o el equipo cambió. Selecciona el equipo de nuevo.',
'plugins.hostActions.selectionLimit': 'Selecciona hasta 50 equipos actuales.',
'settings.externalEditor.title': 'Editor remoto externo',
'settings.externalEditor.desc': 'Abre proyectos y archivos SSH remotos directamente en editores locales como Zed, VS Code o Cursor.',
'settings.externalEditor.preferredEditor': 'Editor preferido',
'settings.externalEditor.preferredEditor.desc': 'Editor local predeterminado para el menú contextual de SFTP y las solicitudes desde el terminal.',
'settings.externalEditor.executablePath': 'Ejecutable del editor',
'settings.externalEditor.executablePath.desc': 'Déjalo vacío para detectarlo automáticamente o elige el binario local manualmente.',
'settings.externalEditor.executablePath.placeholder': 'Detectar ruta del ejecutable automáticamente',
'settings.externalEditor.status.configured': 'Ruta personalizada',
'settings.externalEditor.status.detected': 'Detectado automáticamente',
'settings.externalEditor.status.notFound': 'No detectado',
'settings.externalEditor.browse': 'Examinar…',
'settings.externalEditor.resetPath': 'Restablecer a detección automática',
'settings.externalEditor.redetect': 'Volver a detectar editores instalados',
'settings.externalEditor.customArgs': 'Argumentos personalizados',
'settings.externalEditor.customArgs.desc': 'Argumentos separados por espacios (marcadores: {sshUri}, {sshTarget}, {remotePath}, {encodedPath}, {kind}).',
'settings.externalEditor.connectionMode': 'Modo de conexión SSH',
'settings.externalEditor.connectionMode.desc': 'El puente SSH de Netcatty reutiliza tu sesión autenticada activa sin exponer claves ni listas de equipos.',
'settings.externalEditor.connectionMode.bridge': 'Puente SSH de Netcatty (*.netcatty)',
'settings.externalEditor.connectionMode.direct': 'OpenSSH directo (usuario@host:puerto)',
'settings.externalEditor.sshBridge.title': 'Regla OpenSSH *.netcatty',
'settings.externalEditor.sshBridge.desc': 'Añade un único bloque estático Host *.netcatty a tu configuración de OpenSSH sin escribir nombres de equipo, claves ni contraseñas.',
'settings.externalEditor.sshBridge.install': 'Instalar regla',
'settings.externalEditor.sshBridge.reinstall': 'Reinstalar regla',
'settings.externalEditor.sshBridge.update': 'Actualizar regla',
'settings.externalEditor.sshBridge.remove': 'Eliminar regla',
'settings.externalEditor.terminalRequests': 'Permitir solicitudes desde el terminal (OSC 7337)',
'settings.externalEditor.terminalRequests.desc': 'Permite que las shells remotas abran rutas en tu editor local configurado mediante comandos como `zed .`.',
'settings.externalEditor.autoSetup': 'Habilitar comandos de editor remoto en sesiones de Netcatty',
'settings.externalEditor.autoSetup.desc': 'Instala helpers `zed` / `ncedit` en ~/.netcatty/bin y los activa en el PATH solo para esta sesión de Netcatty, sin modificar ~/.bashrc ni ~/.zshrc (también configurable por equipo).',
'settings.externalEditor.defaultTrust': 'Confianza predeterminada del equipo',
'settings.externalEditor.defaultTrust.desc': 'Política de permisos cuando un equipo remoto no reconocido solicita abrir un editor local.',
'settings.externalEditor.trust.ask': 'Preguntar siempre',
'settings.externalEditor.trust.allow': 'Permitir siempre',
'settings.externalEditor.trust.deny': 'Denegar siempre',
'settings.externalEditor.trustedHosts.host': 'Equipo',
'settings.externalEditor.trustedHosts.policy': 'Política',
};
-12
View File
@@ -106,16 +106,4 @@ export const esMonitorMessages = {
"monitor.status.disconnected": "Desconectado",
"monitor.status.stale": "Sin actualizar",
"monitor.status.missing": "Equipo eliminado",
"monitor.status.online": "En línea",
"monitor.status.offline": "Sin conexión",
"monitor.checkNow": "Comprobar ahora",
"monitor.openRemoteDesktop": "Abrir {protocol}",
"monitor.latencyTrend": "Tendencia de latencia",
"monitor.bannerVerified": "Protocolo verificado",
"monitor.bannerUnverified": "Puerto abierto (banner sin verificar)",
"monitor.companionDesktops": "Servicios de escritorio remoto",
"monitor.reachabilityOnly": "Solo sondeo de disponibilidad",
"monitor.viaSsh": "vía SSH",
"monitor.direct": "Directo",
"monitor.rttStats": "Mín / Prom / Máx",
};
@@ -214,25 +214,6 @@ export const esSystemManagerMessages: Messages = {
'systemManager.ports.unknownProcess': 'Proceso desconocido',
'systemManager.ports.terminate': 'Terminar',
'systemManager.ports.confirmTerminate': '¿Enviar SIGTERM al proceso {{pid}} que ocupa este puerto?',
'systemManager.ports.forwardedMeta': '{{count}} reenviado(s)',
'systemManager.ports.forward': 'Reenviar a puerto local',
'systemManager.ports.stopForward': 'Detener reenvío de puerto',
'systemManager.ports.forwardTitle': 'Reenviar puerto a local',
'systemManager.ports.forwardDesc': 'Crea un reenvío local SSH hacia este puerto remoto en escucha.',
'systemManager.ports.forwardDescWithHost': 'Reenvía este puerto en escucha de {{host}} a un puerto local por SSH.',
'systemManager.ports.forwardLocalPort': 'Puerto local',
'systemManager.ports.forwardBindAddress': 'Dirección de enlace',
'systemManager.ports.forwardAction': 'Reenviar',
'systemManager.ports.forwarding': 'Reenviando…',
'systemManager.ports.forwardInvalidPort': 'Ingresa un número de puerto válido entre 1 y 65535.',
'systemManager.ports.forwardInvalidBindAddress': 'Ingresa una dirección de enlace válida (p. ej., 127.0.0.1 o 0.0.0.0).',
'systemManager.ports.forwardPortInUse': 'El puerto local {{port}} ya está en uso por «{{label}}».',
'systemManager.ports.forwardFailed': 'No se pudo iniciar el reenvío de puerto.',
'systemManager.ports.forwardStarted': 'Reenviando {{local}} → {{remote}}',
'systemManager.ports.forwardStopped': 'Reenvío detenido en {{local}}',
'systemManager.ports.copiedEndpoint': 'Copiado {{endpoint}}',
'systemManager.ports.copyEndpointAria': 'Copiar dirección local {{endpoint}}',
'systemManager.ports.clickToCopy': 'Haz clic para copiar la dirección local',
'systemManager.services.unavailable': 'systemctl no está disponible en este host.',
'systemManager.services.loading': 'Cargando servicios de systemd…',
-24
View File
@@ -2,14 +2,6 @@ import type { Messages } from '../types';
export const esTerminalMessages: Messages = {
'terminal.directory.open': 'Directorio actual: {path}. Cambiar directorio',
'terminal.gitBranch.current': 'Rama de Git: {{value}}',
'terminal.gitBranch.detached': 'HEAD separado: {{value}}',
'terminal.gitBranch.search': 'Buscar ramas locales...',
'terminal.gitBranch.branches': 'Ramas locales',
'terminal.gitBranch.loading': 'Leyendo ramas...',
'terminal.gitBranch.empty': 'Aún no hay ramas locales',
'terminal.gitBranch.noMatches': 'No hay ramas coincidentes',
'terminal.gitBranch.unavailable': 'No se pudieron leer las ramas de esta sesión.',
'terminal.directory.unknown': 'Directorio desconocido',
'terminal.directory.search': 'Buscar subdirectorios...',
'terminal.directory.directories': 'Directorios',
@@ -23,8 +15,6 @@ export const esTerminalMessages: Messages = {
'terminal.directory.integrationUnavailable': 'La integración de directorios de PowerShell no está lista. Los argumentos de inicio o la política de ejecución pueden impedirla.',
'terminal.directory.cmdIntegrationUnavailable': 'Esperando el directorio de la sesión original del símbolo del sistema.',
'terminal.directory.gitBashIntegrationUnavailable': 'Esperando un directorio accesible de la sesión original de Git Bash.',
'terminal.directory.wslIntegrationUnavailable': 'Esperando una sesión de Bash inactiva en la distribución WSL seleccionada.',
'terminal.directory.cygwinIntegrationUnavailable': 'Esperando que Bash de Cygwin vuelva a un indicador inactivo.',
'terminal.directory.nonFilesystem': 'La ubicación actual de PowerShell no es un directorio del sistema de archivos.',
'terminal.directory.accessDenied': 'Permiso denegado al listar este directorio.',
'terminal.directory.busy': 'Espera a que el prompt esté vacío.',
@@ -478,7 +468,6 @@ export const esTerminalMessages: Messages = {
'cloudSync.localBackups.reason.beforeRestore': 'Antes de la restauración',
'cloudSync.localBackups.versionChange': '{from} -> {to}',
'cloudSync.localBackups.counts': '{hosts} hosts, {keys} claves, {snippets} snippets, {notes} notas',
'cloudSync.localBackups.aiCounts': '{sessions} chats de IA, {settings} ajustes',
'cloudSync.localBackups.restore': 'Restaurar',
'cloudSync.localBackups.restoreSuccess': 'Copia de seguridad local restaurada.',
'cloudSync.localBackups.restoreFailedTitle': 'Falló la restauración',
@@ -629,10 +618,6 @@ export const esTerminalMessages: Messages = {
'keychain.export.scriptPlaceholder': 'Script de exportación...',
'keychain.export.missingCredentials':
'El host no tiene contraseña ni clave guardadas. Primero agrega credenciales de contraseña al host.',
'keychain.export.missingPublicKey':
'Esta clave no tiene clave pública. Ábrela en Editar, pega la clave pública y vuelve a intentar Exportar y adjuntar.',
'keychain.export.missingPublicKeyNote':
'Esta clave no tiene clave pública. Pégala en el editor de claves antes de exportar.',
'keychain.export.successTitle': 'Exportación exitosa',
'keychain.export.successMessage': 'Clave pública exportada y adjuntada a {host}',
'keychain.export.failedTitle': 'Falló la exportación',
@@ -711,7 +696,6 @@ export const esTerminalMessages: Messages = {
'tabs.logPrefix': 'Registro:',
'tabs.logLocal': 'Local',
'tabs.copyTab': 'Copiar pestaña',
'tabs.addSessionToWorkspace': 'Añadir sesión al espacio de trabajo',
'tabs.duplicateSession': 'Duplicar sesión',
'tabs.copyTabToNewWindow': 'Copiar pestaña a una nueva ventana',
'tabs.copyTabToNewWindowFailed': 'No se pudo abrir la pestaña en una nueva ventana',
@@ -1005,12 +989,4 @@ export const esTerminalMessages: Messages = {
'terminal.browser.allScopeHint': 'Mostrar en el navegador de todos los hosts.',
'terminal.browser.downloadLocation': 'Guardado en la carpeta Descargas',
'terminal.browser.saveAs': 'Guardar como…',
'terminal.externalEditor.opened': 'Se abrió {path} en {editor}',
'terminal.externalEditor.failed': 'No se pudo abrir en {editor}',
'terminal.externalEditor.prompt.title': '¿Abrir en {editor}?',
'terminal.externalEditor.prompt.desc': 'El equipo remoto {host} solicitó abrir esta ruta remota en {editor}:',
'terminal.externalEditor.prompt.deny': 'Denegar',
'terminal.externalEditor.prompt.allowOnce': 'Permitir una vez',
'terminal.externalEditor.prompt.alwaysTrust': 'Confiar siempre en este equipo',
'terminal.externalEditor.autoSetupConfigured': 'Comandos de editor remoto configurados ({editor})',
};
+1 -375
View File
@@ -680,7 +680,6 @@ export const esVaultMessages: Messages = {
// Protocol select dialog
'protocolSelect.chooseProtocol': 'Elegir protocolo',
'protocolSelect.rememberDefault': 'Recordar como predeterminado (no preguntar la próxima vez)',
'protocolSelect.port': 'puerto:',
// Host Details
@@ -988,22 +987,7 @@ export const esVaultMessages: Messages = {
'hostDetails.startupCommand.runMode.help': 'Elige cómo se envían los comandos de inicio multilínea después de la conexión.',
'hostDetails.startupCommand.runMode.lineDelay': 'Enviar línea por línea',
'hostDetails.startupCommand.runMode.paste': 'Enviar todo de una vez',
'hostDetails.otherProtocols': 'Protocolos adicionales',
'hostDetails.otherProtocolsHint': 'Adjunta métodos de acceso secundarios a este host SSH sin cambiar la conexión principal',
'hostDetails.protocol.defaultHint': 'Predeterminado al hacer doble clic ({protocol})',
'hostDetails.protocol.secondaryHint': 'Activado como protocolo secundario',
'hostDetails.protocol.setDefault': 'Establecer por defecto',
'hostDetails.protocol.remove': 'Quitar',
'hostDetails.protocol.doubleClick': 'Al hacer doble clic',
'hostDetails.protocol.connectOptionDefault': 'Por defecto: {protocol}',
'hostDetails.protocol.connectOptionAsk': 'Preguntar cada vez',
'hostDetails.protocol.alsoEnable': 'Activar también',
'hostDetails.protocol.removeProtocol': 'Quitar {protocol}',
'hostDetails.protocol.addProtocol': 'Añadir {protocol}',
'hostDetails.section.connectBehavior': 'Comportamiento de conexión',
'hostDetails.protocol.notEnabledDesc': '{protocol} aún no está habilitado en este host.',
'hostDetails.protocol.addSecondary': 'Añadir {protocol} (mantener {defaultProtocol})',
'hostDetails.protocol.switchOnly': 'Usar solo {protocol}',
'hostDetails.otherProtocols': 'Otros protocolos',
'hostDetails.telnetOn': 'Telnet activado',
'hostDetails.port': 'puerto',
'hostDetails.telnet.credentials': 'Credenciales',
@@ -1109,362 +1093,4 @@ export const esVaultMessages: Messages = {
'vault.import.plugins.moreItems': '{count} elementos más están incluidos en esta importación.',
'vault.import.plugins.moreDiagnostics': '{count} diagnósticos más se omitieron de esta vista previa.',
// Remote Desktop (VNC / RDP / JumpServer RDP)
'vault.hosts.newRdpHost': 'Nuevo host RDP',
'vault.hosts.newVncHost': 'Nuevo host VNC',
'vault.hosts.connectRdp': 'Conectar RDP',
'vault.hosts.connectSsh': 'Conectar SSH',
'vault.hosts.connectVnc': 'Conectar VNC',
'vault.hosts.openInSystemRdp': 'Abrir en RDP del sistema',
'vault.hosts.openInSystemVnc': 'Abrir en Compartir pantalla',
'settings.jmsDeepLink.rdpLaunchMode': 'Abrir RDP de JumpServer en',
'settings.jmsDeepLink.rdpLaunchModeDesc': 'Elige si las sesiones RDP de JumpServer jms:// se abren en el cliente integrado de Netcatty o en el cliente RDP del sistema.',
'settings.jmsDeepLink.rdpLaunchMode.builtin': 'Cliente integrado',
'settings.jmsDeepLink.rdpLaunchMode.system': 'Cliente RDP del sistema',
'vault.import.rdp.label': 'RDP (.rdp)',
'vault.import.rdp.hint': 'Importa uno o varios archivos .rdp de Microsoft o JumpServer.',
'vault.import.remoteDesktopTip': 'Las importaciones de MobaXterm, CSV y .rdp también admiten hosts RDP y VNC.',
'keychain.identity.domain': 'Dominio (RDP, opcional)',
'keychain.identity.domainPlaceholder': 'CORP o dominio AD',
'quickConnect.rdp.domain': 'Dominio (opcional)',
'quickConnect.rdp.domainPlaceholder': 'CORP o déjalo vacío para cuenta local',
'quickConnect.vnc.optionalUsername': 'Usuario (opcional, para Apple ARD / VeNCrypt)',
'quickConnect.vnc.optionalUsernameHint': 'La mayoría de los servidores VNC solo requieren contraseña.',
'quickConnect.vnc.passwordHint': 'Déjalo vacío si el servidor VNC no requiere autenticación.',
'quickConnect.vnc.displayHelper': 'Pantalla {display}',
'hostDetails.protocol.label': 'Protocolo',
'hostDetails.rdp.portLabel': 'RDP en',
'hostDetails.vnc.portLabel': 'VNC en',
'hostDetails.vnc.displayHint': 'Pantalla {display}',
'hostDetails.vnc.displayPlaceholder': '5900 o :0',
'hostDetails.rdp.domain': 'Dominio (opcional)',
'hostDetails.rdp.domainPlaceholder': 'CORP (opcional)',
'hostDetails.rdp.domainLabel': 'Dominio',
'hostDetails.rdp.usernamePlaceholder': 'Usuario, DOMINIO\\usuario o JumpServer user|uuid',
'hostDetails.vnc.optionalUsername': 'Usuario (Apple ARD / VeNCrypt)',
'hostDetails.vnc.optionalUsernameHint': 'Opcional. Los servidores VNC estándar solo usan contraseña.',
'hostDetails.vnc.usernamePlaceholder': 'Usuario (opcional)',
'hostDetails.remoteDesktop.sectionTitle': 'Pantalla y opciones de escritorio remoto',
'hostDetails.rdp.resolutionMode': 'Modo de resolución',
'hostDetails.rdp.resolutionMode.dynamic': 'Cambio dinámico',
'hostDetails.rdp.resolutionMode.fit': 'Ajustar a la ventana',
'hostDetails.rdp.resolutionMode.fixed': 'Tamaño fijo',
'hostDetails.rdp.width': 'Ancho',
'hostDetails.rdp.height': 'Alto',
'hostDetails.rdp.dimensionHint': 'Introduce un número entero entre 200 y 8192.',
'hostDetails.rdp.colorDepth': 'Profundidad de color',
'hostDetails.rdp.audio': 'Salida de audio',
'hostDetails.rdp.audioDesc': 'Reproducir el audio del escritorio remoto localmente',
'hostDetails.rdp.clipboard': 'Sincronización de portapapeles',
'hostDetails.rdp.clipboardDesc': 'Compartir texto e imágenes con el escritorio remoto',
'hostDetails.rdp.clipboardFiles': 'Transferencia de archivos por portapapeles',
'hostDetails.rdp.clipboardFilesDesc': 'Permitir copiar y arrastrar archivos mediante el portapapeles',
'hostDetails.rdp.securityMode': 'Modo de seguridad',
'hostDetails.rdp.securityMode.auto': 'Automático',
'hostDetails.rdp.securityMode.nla': 'NLA (CredSSP)',
'hostDetails.rdp.securityMode.tls': 'TLS',
'hostDetails.rdp.securityMode.rdp': 'RDP estándar',
'hostDetails.rdp.ignoreCertErrors': 'Ignorar errores de certificado',
'hostDetails.rdp.ignoreCertErrorsDesc': 'Omitir avisos de confianza de certificados TLS (no recomendado)',
'hostDetails.rdp.advanced': 'Opciones avanzadas de RDP',
'hostDetails.rdp.loadBalanceInfo': 'Información de balanceo de carga',
'hostDetails.rdp.loadBalanceInfoPlaceholder': 'tsv://MS Terminal Services Plugin.1.Collection',
'hostDetails.rdp.alternateShell': 'Shell alternativo',
'hostDetails.rdp.alternateShellPlaceholder': 'Ruta opcional del programa inicial',
'hostDetails.rdp.shellWorkingDir': 'Directorio de trabajo',
'hostDetails.rdp.shellWorkingDirPlaceholder': 'Directorio inicial opcional',
'hostDetails.vnc.scalingMode': 'Modo de escala',
'hostDetails.vnc.scalingMode.fit': 'Ajustar a la ventana',
'hostDetails.vnc.scalingMode.actual': 'Tamaño real (1:1)',
'hostDetails.vnc.scalingMode.stretch': 'Estirar',
'hostDetails.vnc.scalingMode.dynamic': 'Cambio dinámico',
'hostDetails.vnc.quality': 'Calidad de imagen',
'hostDetails.vnc.compression': 'Nivel de compresión',
'hostDetails.vnc.viewOnly': 'Modo solo lectura',
'hostDetails.vnc.viewOnlyDesc': 'Desactivar el envío de entradas de ratón y teclado',
'hostDetails.vnc.sharedSession': 'Sesión compartida',
'hostDetails.vnc.sharedSessionDesc': 'Mantener conectados otros clientes VNC',
'hostDetails.vnc.clipboard': 'Sincronización de portapapeles',
'hostDetails.vnc.clipboardDesc': 'Sincronizar texto UTF-8 del portapapeles con el escritorio remoto',
'hostDetails.vnc.showRemoteCursor': 'Mostrar cursor remoto',
'hostDetails.vnc.showRemoteCursorDesc': 'Mostrar la forma del cursor enviada por el servidor',
'hostDetails.companion.addVnc': 'Añadir VNC',
'hostDetails.companion.addRdp': 'Añadir RDP',
'hostDetails.companion.tunnelViaSsh': 'Túnel mediante el SSH de este host',
'hostDetails.companion.tunnelViaSshDesc': 'Reenviar automáticamente a través de la conexión SSH de este host',
'hostDetails.companion.tunnelTargetHost': 'Dirección de destino remota',
'hostDetails.companion.credentialsSource': 'Credenciales',
'hostDetails.companion.credentials.host': 'Reutilizar credenciales SSH del host',
'hostDetails.companion.credentials.manual': 'Usuario y contraseña propios',
'hostDetails.companion.credentials.manualHint': 'Se guarda de forma segura en el llavero al guardar el host',
'hostDetails.companion.credentials.identity': 'Identidad del llavero',
'hostDetails.companion.credentials.ask': 'Preguntar al conectar',
'hostDetails.companion.identityPlaceholder': 'Seleccionar una identidad guardada',
'hostDetails.companion.saveAsIdentity': 'Guardar como identidad',
'hostDetails.companion.saveIdentityAction': 'Crear y seleccionar identidad',
'hostDetails.companion.identityLabelPlaceholder': 'Nombre de identidad (p. ej. Desktop VNC)',
'hostDetails.companion.identitySaved': 'Identidad guardada y seleccionada.',
'hostDetails.companion.setDefaultRdp': 'Conectar con RDP por defecto',
'hostDetails.companion.setDefaultVnc': 'Conectar con VNC por defecto',
// Known Hosts — Remote Desktop TLS Certificates
'knownHosts.tabs.ssh': 'Claves de host SSH',
'knownHosts.tabs.remoteDesktopCerts': 'Certificados de escritorio remoto',
'knownHosts.certs.clearAll': 'Borrar todo',
'knownHosts.certs.expired': 'Caducado',
'knownHosts.certs.expiredNotice': 'Este certificado ha superado su fecha de caducidad.',
'knownHosts.certs.copied': 'Huella SHA-256 copiada',
'knownHosts.certs.action.inspect': 'Inspeccionar certificado',
'knownHosts.certs.action.copyFingerprint': 'Copiar SHA-256',
'knownHosts.certs.action.revoke': 'Revocar confianza',
'knownHosts.certs.empty.title': 'Sin certificados de escritorio remoto confiables',
'knownHosts.certs.empty.desc': 'Los certificados TLS en los que confíes al conectar a hosts RDP o VNC VeNCrypt aparecerán aquí.',
'knownHosts.certs.empty.searchTitle': 'Sin certificados coincidentes',
'knownHosts.certs.empty.searchDesc': 'Prueba con otro nombre de host, puerto, protocolo o huella SHA-256.',
'knownHosts.certs.detail.subtitle': 'Certificado TLS fijado en este dispositivo (TOFU)',
'knownHosts.certs.detail.fingerprint': 'Huella SHA-256',
'knownHosts.certs.detail.subject': 'Asunto',
'knownHosts.certs.detail.issuer': 'Emisor',
'knownHosts.certs.detail.validFrom': 'Válido desde',
'knownHosts.certs.detail.validTo': 'Válido hasta',
'knownHosts.certs.detail.trustedAt': 'Confiado el',
'knownHosts.certs.detail.lastSeen': 'Última conexión',
'knownHosts.certs.revokeConfirm.title': '¿Revocar el certificado de {endpoint}?',
'knownHosts.certs.revokeConfirm.desc': 'Se te pedirá volver a verificar el certificado TLS de este servidor en la próxima conexión.',
'knownHosts.certs.clearAllConfirm.title': '¿Borrar todos los certificados confiables de escritorio remoto?',
'knownHosts.certs.clearAllConfirm.desc': 'Se revocarán los {count} certificados RDP/VNC fijados en este dispositivo.',
'knownHosts.certs.toast.revoked': 'Confianza del certificado revocada',
'knownHosts.certs.toast.clearedAll': 'Se borraron {count} certificados de escritorio remoto',
// Host Connection Test — RDP / VNC Probe
'hostDetails.connectionTest.rdp': 'Probar RDP',
'hostDetails.connectionTest.vnc': 'Probar VNC',
'hostDetails.connectionTest.probe.rtt': 'Latencia (RTT)',
'hostDetails.connectionTest.probe.protocol': 'Protocolo',
'hostDetails.connectionTest.probe.security': 'Seguridad negociada',
'hostDetails.connectionTest.probe.rfbVersion': 'Versión RFB',
'hostDetails.connectionTest.probe.securityTypes': 'Tipos de seguridad',
'hostDetails.connectionTest.probe.tls': 'TLS',
'hostDetails.connectionTest.probe.fingerprint': 'Huella SHA-256',
'hostDetails.connectionTest.probe.trustStatus.trusted': 'Confiable',
'hostDetails.connectionTest.probe.trustStatus.firstSeen': 'Primera vez',
'hostDetails.connectionTest.probe.trustStatus.changed': 'Modificado',
'hostDetails.connectionTest.probe.trustFingerprint': 'Confiar en huella',
'hostDetails.connectionTest.probe.fingerprintTrusted': 'Huella del certificado confiada',
// Remote Desktop Toolbar — SFTP, CLIPRDR, Recording, Ask AI
'remoteDesktop.toolbar.keysLocal': 'Teclas: Local',
'remoteDesktop.toolbar.keysRemote': 'Teclas: Remoto',
'remoteDesktop.toolbar.keysLocalTip': 'Los atajos locales de pestaña/ventana siguen activos. Haz clic para capturar atajos para el escritorio remoto.',
'remoteDesktop.toolbar.keysRemoteTip': 'Los atajos de la app se envían al equipo remoto. Pulsa Ctrl+Alt+Shift o pulsa dos veces Alt/Opción derecho para liberar.',
'remoteDesktop.toolbar.sendKeys': 'Enviar teclas',
'remoteDesktop.toolbar.specialKeys': 'Combinaciones especiales',
'remoteDesktop.toolbar.typeClipboard': 'Escribir portapapeles como pulsaciones',
'remoteDesktop.toolbar.linuxTty': 'Consolas virtuales de Linux',
'remoteDesktop.toolbar.osChordNote': 'Las combinaciones reservadas del sistema (Alt+Tab, Cmd+Tab, Ctrl+Alt+Del) son interceptadas localmente y deben enviarse desde este menú.',
'remoteDesktop.toolbar.display': 'Escala de pantalla',
'remoteDesktop.toolbar.sshTunneled': 'Tunelizado por SSH',
'remoteDesktop.toolbar.encrypted': 'Conexión TLS cifrada',
'remoteDesktop.toolbar.standardRdpSecurity': 'Seguridad RDP estándar ({{cipher}})',
'remoteDesktop.rdp.fallbackStandardRdp': 'Conectado con seguridad RDP estándar.',
'remoteDesktop.rdp.fallbackStandardRdpWithCipher': 'Conectado con seguridad RDP estándar ({{cipher}}).',
'remoteDesktop.toolbar.viewOnly': 'Modo solo lectura',
'remoteDesktop.toolbar.viewOnlyBadge': 'Ver',
'remoteDesktop.toolbar.audio': 'Audio RDP',
'remoteDesktop.toolbar.mute': 'Silenciar',
'remoteDesktop.toolbar.unmute': 'Activar sonido',
'remoteDesktop.toolbar.clipboard': 'Sincronización de portapapeles',
'remoteDesktop.toolbar.clipboardSync': 'Sincronización de portapapeles',
'remoteDesktop.toolbar.clipboardFiles': 'Archivos del portapapeles RDP',
'remoteDesktop.toolbar.clipboardFilesHint': 'Copia archivos en el equipo remoto para descargarlos aquí, o arrastra archivos locales al escritorio para copiarlos.',
'remoteDesktop.toolbar.saveFile': 'Guardar archivo',
'remoteDesktop.toolbar.options': 'Opciones de calidad y entrada',
'remoteDesktop.toolbar.quality': 'Calidad de codificación',
'remoteDesktop.toolbar.screenshot': 'Captura de pantalla',
'remoteDesktop.toolbar.copyScreenshot': 'Copiar PNG al portapapeles',
'remoteDesktop.toolbar.saveScreenshot': 'Guardar captura PNG',
'remoteDesktop.toolbar.fullscreen': 'Pantalla completa',
'remoteDesktop.toolbar.exitFullscreen': 'Salir de pantalla completa',
'remoteDesktop.toolbar.pin': 'Fijar barra',
'remoteDesktop.toolbar.unpin': 'Desfijar barra',
'remoteDesktop.toolbar.popOut': 'Abrir en nueva ventana',
'remoteDesktop.toolbar.reconnect': 'Reconectar',
'remoteDesktop.toolbar.disconnect': 'Desconectar',
'remoteDesktop.toolbar.openSystemRdp': 'Abrir en RDP del sistema',
'remoteDesktop.toolbar.openSystemVnc': 'Abrir en Compartir pantalla',
'remoteDesktop.display.dynamic': 'Ajuste dinámico',
'remoteDesktop.display.fit': 'Ajustar al panel',
'remoteDesktop.display.actual': 'Tamaño real 1:1',
'remoteDesktop.display.stretch': 'Estirar',
'remoteDesktop.display.highDpi': 'Retina HiDPI',
'remoteDesktop.display.unsupported': 'No compatible',
'remoteDesktop.toolbar.mapCmdToCtrl': 'Mapear Cmd → Ctrl',
'remoteDesktop.toolbar.showRemoteCursor': 'Mostrar cursor remoto',
'remoteDesktop.toolbar.refreshScreen': 'Forzar actualización completa de pantalla',
'remoteDesktop.xvp.title': 'Energía remota (XVP)',
'remoteDesktop.xvp.reboot': 'Reiniciar',
'remoteDesktop.xvp.shutdown': 'Apagar',
'remoteDesktop.xvp.reset': 'Reinicio forzado',
'remoteDesktop.vnc.bell': 'Aviso sonoro del escritorio remoto',
'remoteDesktop.toolbar.moreActions': 'Más acciones',
'remoteDesktop.clipboard.pushNow': 'Enviar portapapeles local ahora',
'remoteDesktop.clipboard.pushed': 'Portapapeles local sincronizado con el remoto',
'remoteDesktop.disconnected.title': 'Sesión desconectada',
'remoteDesktop.auth.reenter': 'Credenciales',
'remoteDesktop.auth.cancelled': 'Autenticación cancelada.',
'remoteDesktop.cert.rejected': 'Certificado TLS rechazado por el usuario.',
'remoteDesktop.step.bastion': 'Bastión',
'remoteDesktop.step.network': 'Red',
'remoteDesktop.step.nla': 'Auth NLA',
'remoteDesktop.step.rfb': 'Auth RFB',
'remoteDesktop.step.desktop': 'Escritorio',
'remoteDesktop.display.resolutionPresets': 'Resoluciones predefinidas',
'remoteDesktop.display.customWidth': 'Ancho',
'remoteDesktop.display.customHeight': 'Alto',
'remoteDesktop.display.applyResolution': 'Aplicar',
'remoteDesktop.display.multiMonitor': 'Disposición multimonitor',
'remoteDesktop.display.monitorSingle': 'Un solo monitor',
'remoteDesktop.display.monitorDual': 'Doble lado a lado',
'remoteDesktop.display.monitorAllLocal': 'Igualar pantallas locales',
'remoteDesktop.display.monitorAllLocalCount': 'Igualar pantallas locales ({count})',
'remoteDesktop.display.monitorSwitcher': 'Cambiar monitor activo',
'remoteDesktop.display.monitorAll': 'Todos',
'remoteDesktop.sharedFolders.title': 'Carpetas compartidas (RDPDR)',
'remoteDesktop.sharedFolders.add': 'Añadir carpeta',
'remoteDesktop.sharedFolders.empty': 'Monta una carpeta local como unidad virtual en el escritorio remoto de Windows.',
'remoteDesktop.sharedFolders.remove': 'Quitar carpeta',
'remoteDesktop.sharedFolders.readOnly': 'Solo lectura',
'remoteDesktop.sharedFolders.hint': 'Windows: Este equipo → <Carpeta> en Netcatty (\\\\tsclient\\<Nombre>). Solo local, nunca sincronizado.',
'remoteDesktop.sharedFolders.duplicate': 'Esta carpeta ya está compartida',
'remoteDesktop.sharedFolders.mounted': 'Se montó "{name}" en el escritorio remoto',
'remoteDesktop.sharedFolders.unmounted': 'Se desmontó "{name}"',
'remoteDesktop.network.title': 'Telemetría de conexión',
'remoteDesktop.network.latency': 'Latencia',
'remoteDesktop.network.resolution': 'Resolución',
'remoteDesktop.network.downlink': 'Bajada (RX)',
'remoteDesktop.network.uplink': 'Subida (TX)',
'remoteDesktop.network.totalRx': 'Total RX',
'remoteDesktop.network.totalTx': 'Total TX',
'remoteDesktop.network.tlsEncrypted': 'TLS',
'remoteDesktop.network.quality.excellent': 'Excelente',
'remoteDesktop.network.quality.good': 'Buena',
'remoteDesktop.network.quality.fair': 'Regular',
'remoteDesktop.network.quality.poor': 'Baja',
'remoteDesktop.network.quality.unknown': 'Midiendo',
'remoteDesktop.ai.controllingBanner': 'Catty controlando · Haz clic en el escritorio o pulsa Esc para tomar el control',
'remoteDesktop.ai.stopControl': 'Detener',
'remoteDesktop.ai.preempted': 'Control de IA pausado: has tomado el control',
'remoteDesktop.ai.preemptedStopped': 'Control de IA detenido: has tomado el control',
'remoteDesktop.ai.audit.menuItem': 'Registro de auditoría de control IA',
'remoteDesktop.ai.audit.title': 'Registro de auditoría de control IA',
'remoteDesktop.ai.audit.subtitleHost': 'Acciones de ratón y teclado ejecutadas por la IA en este escritorio remoto.',
'remoteDesktop.ai.audit.subtitleAll': 'Historial local de las últimas 500 acciones de IA en escritorio remoto (texto sensible oculto).',
'remoteDesktop.ai.audit.searchPlaceholder': 'Filtrar por acción, host o código de error...',
'remoteDesktop.ai.audit.scopeSession': 'Esta sesión',
'remoteDesktop.ai.audit.scopeAll': 'Todas',
'remoteDesktop.ai.audit.filterAll': 'Todas',
'remoteDesktop.ai.audit.filterOk': 'OK',
'remoteDesktop.ai.audit.filterPreempted': 'Retomado',
'remoteDesktop.ai.audit.filterIssues': 'Bloqueado/Err',
'remoteDesktop.ai.audit.empty': 'Aún no se han registrado acciones de IA en el escritorio remoto.',
'remoteDesktop.ai.audit.outcomeOk': 'OK',
'remoteDesktop.ai.audit.outcomePreempted': 'Retomado',
'remoteDesktop.ai.audit.outcomeBlocked': 'Bloqueado',
'remoteDesktop.ai.audit.outcomeDenied': 'Denegado',
'remoteDesktop.ai.audit.outcomeError': 'Error',
'remoteDesktop.ai.audit.copyJson': 'Copiar JSON',
'remoteDesktop.ai.audit.copied': 'Copiado',
'remoteDesktop.ai.audit.clear': 'Limpiar',
'remoteDesktop.toolbar.openSftp': 'SFTP',
'remoteDesktop.toolbar.record': 'Grabar sesión',
'remoteDesktop.toolbar.stopRecording': 'Detener grabación',
'remoteDesktop.toolbar.savingRecording': 'Guardando...',
'remoteDesktop.toolbar.recording': 'Grabando',
'remoteDesktop.toolbar.askAi': 'Preguntar a la IA',
'remoteDesktop.toolbar.askAiFull': 'Capturar pantalla y preguntar a la IA',
'remoteDesktop.toolbar.askAiRegion': 'Seleccionar región y preguntar a la IA',
'remoteDesktop.toolbar.aiReadAllowed': 'Lectura de pantalla por IA permitida',
'remoteDesktop.toolbar.aiReadBlocked': 'Lectura de pantalla por IA bloqueada en esta sesión',
'remoteDesktop.toolbar.aiReadingBanner': 'La IA está viendo esta pantalla',
'remoteDesktop.clipboard.dropTitle': 'Suelta archivos para enviarlos al portapapeles remoto (CLIPRDR)',
'remoteDesktop.clipboard.dropSubtitle': 'Después de soltar, pulsa Ctrl+V en el escritorio remoto para pegar',
'remoteDesktop.clipboard.dropFileCount': '{count} archivo(s)',
'remoteDesktop.clipboard.dropBlockedViewOnly': 'No se pueden soltar archivos en modo solo lectura',
'remoteDesktop.clipboard.dropBlockedDisabled': 'La transferencia de archivos por portapapeles está desactivada en este host',
'remoteDesktop.clipboard.dropFolderUnsupported': 'Las carpetas no son compatibles por el portapapeles RDP. Usa SFTP o comprímelas en un archivo .zip.',
'remoteDesktop.clipboard.stagedPill': '{count} archivo(s) · Ctrl+V',
'remoteDesktop.clipboard.sendLocalFiles': 'Enviar archivos locales...',
'remoteDesktop.clipboard.uploading': 'Enviando por portapapeles',
'remoteDesktop.clipboard.downloading': 'Recibiendo por portapapeles',
'remoteDesktop.clipboard.transferCompleted': 'Transferencia de archivos por portapapeles completada',
'remoteDesktop.clipboard.transferFailed': 'Error en la transferencia de archivos por portapapeles',
'remoteDesktop.recording.started': 'Grabación de sesión iniciada',
'remoteDesktop.recording.saved': 'Grabación de sesión guardada en los registros de conexión',
'remoteDesktop.recording.failed': 'Error al grabar la sesión',
'remoteDesktop.recording.unsupported': 'La grabación de sesiones no es compatible en este entorno',
// LogView — Remote Desktop Recordings & Metadata
'logView.recording.download': 'Descargar .webm',
'logView.recording.delete': 'Eliminar grabación',
'logView.recording.loading': 'Cargando grabación de sesión...',
'logView.recording.withAudio': 'Audio',
'logView.recording.missingTitle': 'La grabación ya no está en el disco',
'logView.recording.missingDesc': 'Este archivo .webm fue eliminado, limpiado por la política de retención o movido de la carpeta de grabaciones.',
'logView.recording.playbackErrorTitle': 'No se puede reproducir la grabación',
'logView.recording.playbackErrorDesc': 'El archivo de vídeo puede estar incompleto o no ser compatible con el reproductor integrado.',
'logView.recording.exportSuccess': 'Grabación exportada',
'logView.recording.exportFailed': 'Error al exportar la grabación',
'logView.recording.deleted': 'Grabación eliminada',
'logView.recording.deleteFailed': 'Error al eliminar la grabación',
'logView.recording.deleteConfirmTitle': '¿Eliminar esta grabación de sesión?',
'logView.recording.deleteConfirmDesc': 'El archivo de vídeo .webm se eliminará permanentemente del disco. La entrada del registro de conexión se conservará.',
'logView.remoteDesktop.noRecordingSubtitle': 'No se capturó ninguna grabación de pantalla para esta sesión',
'logView.remoteDesktop.host': 'Host',
'logView.remoteDesktop.protocol': 'Protocolo',
'logView.remoteDesktop.user': 'Usuario',
'logView.remoteDesktop.started': 'Inicio',
'logView.remoteDesktop.ended': 'Fin',
'logView.remoteDesktop.duration': 'Duración',
'logView.remoteDesktop.resolution': 'Resolución',
'logView.remoteDesktop.security': 'Seguridad',
'logView.remoteDesktop.disconnectReason': 'Motivo de desconexión',
'logView.remoteDesktop.timeline': 'Cronología de sesión',
'logView.remoteDesktop.recordingTip': 'Haz clic en Grabar en la barra de escritorio remoto o activa la grabación automática en Ajustes → Sistema para guardar repeticiones .webm aquí.',
'logs.recording.clipsCount': '{count} clips',
'logs.filter.all': 'Todos',
'logs.filter.terminal': 'Terminal',
'logs.filter.remoteDesktop': 'Escritorio remoto',
'logs.filter.recorded': 'Con grabación',
'logs.filter.emptyTitle': 'Sin registros coincidentes',
'logs.filter.emptyDesc': 'Todavía no hay registros de conexión que coincidan con este filtro.',
// Settings -> System -> Remote Desktop Recordings
'settings.remoteDesktopRecordings.title': 'Grabaciones de escritorio remoto',
'settings.remoteDesktopRecordings.autoRecord': 'Grabar automáticamente sesiones de escritorio remoto',
'settings.remoteDesktopRecordings.autoRecordDesc': 'Iniciar la grabación de sesiones RDP y VNC al conectarse (desactivado por defecto para ahorrar espacio en disco).',
'settings.remoteDesktopRecordings.fps': 'Frecuencia de fotogramas',
'settings.remoteDesktopRecordings.fpsDesc': 'Una mayor frecuencia ofrece más fluidez pero consume más CPU y espacio en disco.',
'settings.remoteDesktopRecordings.fpsOption': '{fps} FPS',
'settings.remoteDesktopRecordings.includeAudio': 'Incluir audio RDP',
'settings.remoteDesktopRecordings.includeAudioDesc': 'Combinar la salida de audio del escritorio remoto en el vídeo .webm cuando esté disponible.',
'settings.remoteDesktopRecordings.maxStorage': 'Límite máximo de almacenamiento',
'settings.remoteDesktopRecordings.maxStorageDesc': 'Las grabaciones más antiguas sin guardar se eliminan automáticamente al superar este límite.',
'settings.remoteDesktopRecordings.retentionDays': 'Periodo de retención',
'settings.remoteDesktopRecordings.retentionDaysDesc': 'Eliminar automáticamente las grabaciones sin guardar más antiguas que este periodo.',
'settings.remoteDesktopRecordings.retentionDaysOption': '{days} días',
'settings.remoteDesktopRecordings.retentionUnlimited': 'Ilimitado',
'settings.remoteDesktopRecordings.storageUsage': 'Almacenamiento local de grabaciones',
'settings.remoteDesktopRecordings.storageUsageSummary': '{count} archivos · {size}',
'settings.remoteDesktopRecordings.storageUsageLoading': 'Calculando uso de disco...',
'settings.remoteDesktopRecordings.refresh': 'Actualizar uso de almacenamiento',
'settings.remoteDesktopRecordings.openFolder': 'Abrir carpeta',
'settings.remoteDesktopRecordings.clearAll': 'Borrar todas las grabaciones',
'settings.remoteDesktopRecordings.clearAllConfirmTitle': '¿Borrar todas las grabaciones de escritorio remoto?',
'settings.remoteDesktopRecordings.clearAllConfirmDesc': 'Se eliminarán permanentemente {count} archivo(s) .webm grabados en este dispositivo.',
'settings.remoteDesktopRecordings.clearResult': 'Se eliminaron {count} archivo(s) de grabación.',
'settings.remoteDesktopRecordings.hint': 'Las grabaciones se guardan solo localmente en este dispositivo y nunca se sincronizan en la nube. Los registros guardados están protegidos frente a la limpieza automática.',
'sftp.context.openInExternalEditor': 'Abrir en {editor}',
'hostDetails.externalEditorShellIntegration': 'Habilitar comandos de editor externo en esta sesión',
'hostDetails.externalEditorShellIntegration.desc': 'Activa `zed` / `ncedit` desde ~/.netcatty/bin solo para esta sesión de terminal de Netcatty (incluido tmux), sin modificar ~/.bashrc ni ~/.zshrc.',
};
@@ -228,25 +228,3 @@ test("AI tool output limit settings copy is localized across all five locales",
assert.match(zhTW["ai.safety.toolOutputMaxChars.description"], /傳回/);
assert.equal(zhTW["ai.safety.toolOutputMaxChars.description"].includes("返回"), false);
});
test("LLM chat title settings copy is localized across all five locales", () => {
const keys = [
"ai.chatHistory.autoLlmTitle",
"ai.chatHistory.autoLlmTitle.description",
"ai.chatHistory.titleModel",
"ai.chatHistory.titleModel.description",
"ai.chatHistory.titleModel.none",
"ai.chatHistory.titleModel.useCurrentCatty",
"ai.chatHistory.titleModel.unavailable",
"ai.chatHistory.titleModel.providerPlaceholder",
"ai.chatHistory.titleModel.modelPlaceholder",
] as const;
for (const [locale, messages] of Object.entries(ALL_LOCALES)) {
for (const key of keys) {
assert.ok(messages[key]?.trim(), `${locale}: missing ${key}`);
if (locale !== "en") {
assert.notEqual(messages[key], en[key], `${locale}: ${key} should be translated`);
}
}
}
});
@@ -8,6 +8,12 @@ import ru from "./ru.ts";
import zhCN from "./zh-CN.ts";
import zhTW from "./zh-TW.ts";
// Locales that are not at full key parity with `en` yet. They are tracked here
// so the remaining debt stays visible instead of silently rendering in English
// through the `DEFAULT_UI_LOCALE` fallback in `I18nProvider.resolveMessage`.
// Move a locale out of this list once it covers every `en` key.
const LOCALES_PENDING_PARITY = ["ru"] as const;
const hasKey = (messages: Record<string, string>, key: string) =>
Object.hasOwn(messages, key);
@@ -104,7 +110,7 @@ test("en shortcut labels stay identical to DEFAULT_KEY_BINDINGS", () => {
}
});
test("every translated locale defines every message key from en", () => {
test("every locale outside the pending list is at full parity with en", () => {
const locales = [
{ name: "es", messages: es },
{ name: "ru", messages: ru },
@@ -113,6 +119,10 @@ test("every translated locale defines every message key from en", () => {
];
for (const locale of locales) {
if ((LOCALES_PENDING_PARITY as readonly string[]).includes(locale.name)) {
continue;
}
const missing = Object.keys(en).filter(
(key) => !hasKey(locale.messages, key),
);
@@ -124,9 +134,3 @@ test("every translated locale defines every message key from en", () => {
);
}
});
test("every locale explains the fixed RDP dimension limits", () => {
for (const messages of [en, es, ru, zhCN, zhTW]) {
assert.match(messages["hostDetails.rdp.dimensionHint"] ?? "", /200.*8192/);
}
});
+50 -190
View File
@@ -10,28 +10,9 @@ export const ruAiMessages: Messages = {
'ai.chat.preparing': 'Подготовка…',
'ai.chat.modelCatalogWarning': 'Не удалось обновить список моделей. Показаны последние доступные или встроенные модели.',
'ai.chat.modelCatalogRetry': 'Повторить',
'ai.chat.compactingContext': 'Сжимаем предыдущий контекст…',
'ai.chat.compactingStep': 'Сокращаем контекст для следующего шага…',
'ai.chat.contextCompacted': 'Контекст сжат',
'ai.chat.compactionRetry': 'Запрос слишком большой. Сжимаем контекст и повторяем попытку…',
'ai.chat.compactionBanner': 'Контекст сжат: с {before} тыс. до {after} тыс. токенов',
'ai.chat.activity.title': 'Действия агента',
'ai.chat.activity.plan': 'План',
'ai.chat.activity.webSearch': 'Поиск в интернете',
'ai.chat.activity.fileChanges': 'Изменения файлов',
'ai.chat.activity.status.running': 'Выполняется',
'ai.chat.activity.status.completed': 'Завершено',
'ai.chat.activity.status.failed': 'Ошибка',
'ai.chat.activity.file.add': 'Добавление',
'ai.chat.activity.file.update': 'Изменение',
'ai.chat.activity.file.delete': 'Удаление',
'ai.chat.activity.usage': 'Токены',
'ai.chat.activity.usage.input': 'вход',
'ai.chat.activity.usage.output': 'выход',
'ai.chat.activity.usage.cached': 'из кэша',
'ai.chat.activity.usage.reasoning': 'рассуждение',
'ai.title': 'ИИ',
'ai.description': 'Настройка провайдеров ИИ, агентов и параметров безопасности',
'ai.title': 'AI',
'ai.description': 'Настройка AI-провайдеров, агентов и параметров безопасности',
'ai.providers': 'Провайдеры',
'ai.agents': 'Агенты',
'ai.providers.empty': 'Провайдеры не настроены. Добавьте провайдера, чтобы начать.',
@@ -62,15 +43,6 @@ export const ruAiMessages: Messages = {
'ai.providers.apiKey': 'API-ключ',
'ai.providers.apiKey.placeholder': 'Введите API-ключ',
'ai.providers.apiKey.decrypting': 'Расшифровка...',
'ai.providers.headers': 'Пользовательские заголовки HTTP',
'ai.providers.headers.help': 'Необязательные заголовки для этого провайдера. Значения скрыты и шифруются при сохранении.',
'ai.providers.headers.name': 'Имя заголовка',
'ai.providers.headers.value': 'Значение заголовка',
'ai.providers.headers.add': 'Добавить заголовок',
'ai.providers.headers.remove': 'Удалить заголовок',
'ai.providers.headers.invalid': 'Укажите корректные заголовки HTTP без повторяющихся имён. Content-Length и Transfer-Encoding задаются автоматически.',
'ai.providers.headers.loadError': 'Не удалось открыть сохранённые заголовки. Отмените операцию, разблокируйте системное хранилище ключей и повторите попытку.',
'ai.providers.headers.saveError': 'Не удалось сохранить заголовки в зашифрованном виде. Проверьте, доступно ли системное хранилище ключей, и повторите попытку.',
'ai.providers.opencodeGo.help': 'Вставьте API-ключ OpenCode, чтобы использовать OpenCode Go. Базовый URL и список моделей настроятся автоматически.',
'ai.providers.opencodeGo.getKey': 'Получить API-ключ',
'ai.providers.fixedBaseUrl.help': 'Задаётся провайдером. Netcatty автоматически выбирает путь эндпоинта для каждой модели.',
@@ -117,9 +89,6 @@ export const ruAiMessages: Messages = {
'ai.codex.appServer.available': 'Эта версия Codex CLI поддерживает App Server.',
'ai.codex.appServer.modelCatalogWarning': 'Динамический каталог моделей Codex недоступен. Используется встроенный список моделей.',
'ai.codex.appServer.approval.allowSession': 'Разрешить для сеанса',
'ai.planReview.title': 'Проверить план реализации',
'ai.planReview.keepPlanning': 'Продолжить планирование',
'ai.planReview.approveAndImplement': 'Одобрить и приступить к реализации',
'ai.codex.appServer.userInput.title': 'Codex требуется ваш ответ',
'ai.codex.appServer.userInput.description': 'Ответьте на вопросы, чтобы продолжить текущую задачу.',
'ai.codex.appServer.userInput.other': 'Введите другой ответ',
@@ -197,20 +166,20 @@ export const ruAiMessages: Messages = {
'ai.cursor.detected': 'Доступен',
'ai.cursor.notFound': 'Недоступен',
'ai.cursor.path': 'Среда:',
'ai.cursor.notFoundHint': 'Укажите API-ключ или переключитесь на вход через CLI.',
'ai.cursor.notFoundHint': 'Укажите API-ключ или переключитесь на CLI login.',
'ai.cursor.notInstalledHint': 'Cursor SDK / Agent CLI не обнаружен.',
'ai.cursor.installStatus': 'Среда Cursor',
'ai.cursor.installed': 'Обнаружено',
'ai.cursor.notInstalled': 'Не обнаружено',
'ai.cursor.modeCli': 'Вход через CLI',
'ai.cursor.modeApiKey': 'API-ключ',
'ai.cursor.modeCli': 'CLI login',
'ai.cursor.modeApiKey': 'API Key',
'ai.cursor.modeCliHint': 'Использует локальный `cursor-agent login` и квоту подписки Auto. Сохранённый API-ключ сохраняется, но в этом режиме не используется.',
'ai.cursor.modeApiKeyHint': 'Использует платный Cursor API. Вход через CLI в этом режиме игнорируется.',
'ai.cursor.cliLoginStatus': 'Вход через CLI',
'ai.cursor.modeApiKeyHint': 'Использует платный Cursor API. CLI login в этом режиме игнорируется.',
'ai.cursor.cliLoginStatus': 'CLI login',
'ai.cursor.cliLoginOk': 'Вход выполнен',
'ai.cursor.cliLoginAs': 'Вход как {{email}}',
'ai.cursor.cliLoginMissing': 'Нет входа',
'ai.cursor.cliLoginHint': 'Выполните `cursor-agent login` в терминале, затем нажмите «Проверить».',
'ai.cursor.cliLoginHint': 'Выполните `cursor-agent login` в терминале, затем нажмите Check.',
'ai.cursor.apiKeyStatus': 'API-ключ',
'ai.cursor.apiKeyConfigured': 'Настроен',
'ai.cursor.apiKeyMissing': 'Не указан',
@@ -241,22 +210,22 @@ export const ruAiMessages: Messages = {
'ai.codebuddy.configSection': 'Аутентификация и конфигурация (необязательно)',
'ai.codebuddy.internetEnv': 'Сетевая среда',
'ai.codebuddy.internetEnv.default': 'По умолчанию (зарубежная)',
'ai.codebuddy.internetEnv.internal': 'Внутренняя',
'ai.codebuddy.internetEnv.internal': 'Internal',
'ai.codebuddy.internetEnv.ioa': 'IOA',
'ai.codebuddy.internetEnv.hint': 'Задаёт переменную CODEBUDDY_INTERNET_ENVIRONMENT. Для сетей с ограниченным доступом выберите «Внутренняя» или IOA.',
'ai.codebuddy.internetEnv.hint': 'Устанавливает CODEBUDDY_INTERNET_ENVIRONMENT — выберите Internal или IOA для ограниченных сетевых сред.',
'ai.codebuddy.envVars': 'Переменные окружения',
'ai.codebuddy.envVars.placeholder': 'CODEBUDDY_API_KEY=...\nCODEBUDDY_AUTH_TOKEN=...\nOTHER_VAR=...',
'ai.codebuddy.envVars.hint': 'По одной записи KEY=VALUE на строку, передаются агенту CodeBuddy. Укажите CODEBUDDY_API_KEY или CODEBUDDY_AUTH_TOKEN для аутентификации. Хранятся локально в открытом виде.',
'ai.codebuddy.advancedSection': 'Расширенные параметры (SDK 0.3.258)',
'ai.codebuddy.effort': 'Глубина рассуждения',
'ai.codebuddy.effort': 'Усилие рассуждения',
'ai.codebuddy.effort.default': 'По умолчанию',
'ai.codebuddy.effort.minimal': 'Минимальная',
'ai.codebuddy.effort.low': 'Низкая',
'ai.codebuddy.effort.medium': 'Средняя',
'ai.codebuddy.effort.high': 'Высокая',
'ai.codebuddy.effort.xhigh': 'Очень высокая',
'ai.codebuddy.effort.max': 'Максимальная',
'ai.codebuddy.effort.hint': 'Для простых команд выбирайте минимальную или низкую глубину рассуждения, чтобы экономить токены. Для сложной диагностики выбирайте высокую или максимальную.',
'ai.codebuddy.effort.minimal': 'Minimal',
'ai.codebuddy.effort.low': 'Low',
'ai.codebuddy.effort.medium': 'Medium',
'ai.codebuddy.effort.high': 'High',
'ai.codebuddy.effort.xhigh': 'XHigh',
'ai.codebuddy.effort.max': 'Max',
'ai.codebuddy.effort.hint': 'Управляет глубиной рассуждения модели. Для простых команд используйте Minimal/Low, чтобы экономить токены, а для сложной диагностики — Max/High.',
'ai.codebuddy.maxTurns': 'Максимум шагов',
'ai.codebuddy.maxTurns.hint': 'Ограничивает максимальное число шагов диалога за запрос, предотвращая зацикливание. Оставьте пустым для значения по умолчанию.',
'ai.codebuddy.maxBudget': 'Максимальный бюджет (USD)',
@@ -299,73 +268,28 @@ export const ruAiMessages: Messages = {
'ai.grok.check': 'Проверить',
'ai.grok.resetPath': 'Сбросить',
'ai.grok.runtime.acp.title': 'Использовать Grok ACP (agent stdio)',
'ai.grok.userQuestion.title': 'Grok ждёт вашего ответа',
'ai.grok.userQuestion.description': 'Ответы не предоставляют разрешений. Не указывайте пароли и токены.',
'ai.grok.userQuestion.submit': 'Отправить ответы',
'ai.grok.runtime.acp.default': 'По умолчанию',
'ai.grok.runtime.acp.description':
'Подключение к Grok через Agent Client Protocol (grok agent stdio). Netcatty MCP внедряется в session/new. Выключите, чтобы использовать исходный headless streaming-json CLI.',
'ai.grok.runtime.streamingJson.hint':
'Режим headless streaming-json (grok -p --output-format streaming-json). MCP внедряется через .grok/config.toml проекта.',
// OpenCode
'ai.opencode.title': 'OpenCode',
'ai.opencode.description': 'Подключается к OpenCode через официальный SDK. Настройте провайдеров и ключи в OpenCode, затем выберите его как внешнего агента для программирования.',
'ai.opencode.detecting': 'Поиск…',
'ai.opencode.detected': 'Найден',
'ai.opencode.notFound': 'Не найден',
'ai.opencode.path': 'Путь:',
'ai.opencode.notFoundHint': 'Не удалось найти opencode в PATH. Установите OpenCode или укажите путь к исполняемому файлу ниже.',
'ai.opencode.customPathPlaceholder': 'например, /usr/local/bin/opencode',
'ai.opencode.check': 'Проверить',
'ai.opencode.resetPath': 'Сбросить',
'ai.opencode.v2.startupTimeout': 'OpenCode 2 не успел запуститься. Убедитесь, что команда `opencode serve` работает в терминале, и повторите попытку.',
'ai.opencode.v2.exited': 'OpenCode 2 завершил работу до запуска чата.',
'ai.opencode.v2.unauthorized': 'OpenCode 2 отклонил подключение. Повторите попытку в чате.',
'ai.opencode.v2.unavailable': 'Не удалось подключиться к OpenCode 2. Проверьте, установлен ли он, и повторите попытку.',
'ai.opencode.v2.sessionFailed': 'OpenCode 2 не смог завершить обработку запроса.',
'ai.opencode.v2.empty': 'OpenCode 2 вернул пустой ответ. Запустите `opencode` в терминале, чтобы настроить вход и модели.',
'ai.opencode.v2.contextSkipped': 'OpenCode 2 не смог использовать контекст чата Netcatty.',
'ai.opencode.v2.mcpSkipped': 'OpenCode 2 не смог подключить инструмент MCP. Чат продолжится без него.',
// MiMo Code
'ai.agy.title': 'Antigravity CLI (Beta)',
'ai.agy.description': 'Экспериментальная бета-версия: CLI агента Google Antigravity через официальный протокол ACP (agy acp --stdio). Поддержка пока ограничена и не прошла полноценного тестирования — используйте на свой страх и риск. Выполните вход через agy в терминале и выберите его как внешнего агента.',
'ai.agy.detecting': 'Поиск…',
'ai.agy.detected': 'Найден',
'ai.agy.notFound': 'Не найден',
'ai.agy.path': 'Путь:',
'ai.agy.notFoundHint': 'Не удалось найти agy в PATH. Установите Antigravity CLI или укажите путь к исполняемому файлу ниже.',
'ai.agy.customPathPlaceholder': 'например, /usr/local/bin/agy',
'ai.agy.check': 'Проверить',
'ai.agy.resetPath': 'Сбросить',
'ai.mimo.title': 'MiMo Code',
'ai.mimo.description': 'MiMo Code от Xiaomi — форк OpenCode с интерфейсом командной строки. Установите его и настройте провайдеров в его конфигурации, затем выберите MiMo Code как внешнего агента для программирования.',
'ai.mimo.detecting': 'Поиск…',
'ai.mimo.detected': 'Найден',
'ai.mimo.notFound': 'Не найден',
'ai.mimo.path': 'Путь:',
'ai.mimo.notFoundHint': 'Не удалось найти mimo в PATH. Установите MiMo Code или укажите путь к исполняемому файлу ниже.',
'ai.mimo.customPathPlaceholder': 'например, /usr/local/bin/mimo',
'ai.mimo.check': 'Проверить',
'ai.mimo.resetPath': 'Сбросить',
// AI Default Agent
'ai.defaultAgent': 'Агент по умолчанию',
'ai.defaultAgent.description': 'Агент, который будет использоваться при запуске нового сеанса ИИ',
'ai.defaultAgent.description': 'Агент, который будет использоваться при запуске новой AI-сессии',
'ai.defaultAgent.catty': 'Catty (встроенный)',
'ai.defaultAgent.unavailable': 'Недоступен',
'ai.toolAccess.title': 'Доступ к инструментам',
'ai.toolAccess.mode': 'Режим доступа Netcatty',
'ai.toolAccess.description': 'Выберите, как внешние агенты получают доступ к сеансам Netcatty. MCP предоставляет встроенный сервер, а режим «Навыки + CLI» указывает агентам на локальный навык Netcatty и команды CLI.',
'ai.toolAccess.description': 'Выберите, как внешние агенты получают доступ к сессиям Netcatty. MCP предоставляет встроенный сервер, а Skills + CLI указывает агентам на локальный skill Netcatty и команды CLI.',
'ai.toolAccess.mode.mcp': 'MCP',
'ai.toolAccess.mode.skills': 'Навыки + CLI',
'ai.toolAccess.mode.skills': 'Skills + CLI',
'ai.toolAccess.mcpPrompt.title': 'Промпт для вашего ИИ-клиента',
'ai.toolAccess.mcpPrompt.description': 'Вставьте этот промпт в ИИ-клиент (Codex, Claude Code и т. д.), и он сам зарегистрирует MCP Netcatty.',
'ai.toolAccess.mcpPrompt.enableHint': 'Включите внешний MCP ниже, чтобы в промпт попал путь к лаунчеру.',
'ai.toolAccess.skills.file': 'Файл навыка',
'ai.toolAccess.skills.description': 'В режиме «Навыки + CLI» агенты автоматически получают путь к локальному файлу навыка. Путь к файлу запуска Netcatty CLI передаётся агенту в каждом сеансе.',
'ai.toolAccess.skills.unavailable': 'Путь к файлу навыка недоступен',
'ai.toolAccess.skills.file': 'Файл skill',
'ai.toolAccess.skills.description': 'В режиме Skills + CLI агенты автоматически получают путь к этому локальному skill-файлу. Путь к лаунчеру Netcatty CLI передаётся агенту в каждой сессии.',
'ai.toolAccess.skills.unavailable': 'Путь к skill-файлу недоступен',
'ai.externalMcp.title': 'Внешний MCP',
'ai.externalMcp.allowCommandOnHost': 'Всегда',
@@ -399,13 +323,13 @@ export const ruAiMessages: Messages = {
'ai.externalMcp.sessionIdleTimeout': 'Тайм-аут открытого сеанса',
'ai.externalMcp.sessionIdleTimeout.description': 'Автоматически закрывать сеансы, открытые ИИ, после указанного числа минут без операций терминала или файлов.',
'ai.externalMcp.usage.title': 'Как пользоваться',
'ai.externalMcp.usage.keepRunning': '1. Включите внешний MCP и оставьте Netcatty запущенным.',
'ai.externalMcp.usage.localhost': '2. Клиенты подключаются через локальный файл запуска (только 127.0.0.1). При отключении файл обнаружения удаляется.',
'ai.externalMcp.usage.permissions': '3. Для операций записи действуют параметры в разделе «Настройки → ИИ → Безопасность» и список заблокированных команд.',
'ai.externalMcp.usage.capabilities': '4. Доступен полный каталог: терминал, SFTP, хранилище и проброс портов. Секреты не возвращаются.',
'ai.externalMcp.help.ariaLabel': 'Справка по внешнему MCP',
'ai.externalMcp.usage.keepRunning': '1. Включите External MCP и держите Netcatty запущенным.',
'ai.externalMcp.usage.localhost': '2. Клиенты подключаются через локальный launcher (только 127.0.0.1). Discovery удаляется при отключении.',
'ai.externalMcp.usage.permissions': '3. Запись следует Settings → AI → Safety и списку блокировки команд.',
'ai.externalMcp.usage.capabilities': '4. Доступен полный catalog: терминал, SFTP, Vault и проброс портов. Секреты не возвращаются.',
'ai.externalMcp.help.ariaLabel': 'Справка External MCP',
'ai.externalMcp.security': 'Безопасность',
'ai.externalMcp.security.description': 'Принимает подключения только на 127.0.0.1, обновляет токен, применяет режим разрешений ИИ к операциям записи и удаляет файл обнаружения при отключении. Локальный мост приложения работает без OAuth.',
'ai.externalMcp.security.description': 'Слушает только 127.0.0.1 с ротацией token, использует AI Permission Mode для записи и удаляет discovery при отключении.',
"ai.privacy.title": "Конфиденциальность ИИ",
"ai.privacy.description": "Фильтрует известные шаблоны конфиденциального текста в контексте и результатах инструментов, управляемых Netcatty, для Catty, встроенных агентов и внешних MCP-клиентов. По умолчанию отключено. Не обнаруживает все секреты. При включении двоичные ответы инструментов блокируются.",
"ai.privacy.boundary": "Защищаются только данные и инструменты, управляемые Netcatty. Собственные инструменты сторонних агентов, их прямой доступ к файлам и другие MCP-серверы не входят в эту область.",
@@ -438,11 +362,11 @@ export const ruAiMessages: Messages = {
'ai.externalMcp.http.invalidClientHost': 'Адрес клиента должен быть доступным IP, а не 0.0.0.0 или ::.',
'ai.externalMcp.http.warning': 'Прослушивание не только 127.0.0.1 открывает External MCP другим машинам, которые могут достичь этого адреса. Храните bearer token в секрете и не публикуйте этот порт.',
'ai.externalMcp.http.url': 'URL',
'ai.externalMcp.http.token': 'Токен Bearer',
'ai.externalMcp.http.token': 'Bearer token',
'ai.externalMcp.http.regenerate': 'Создать заново',
'ai.externalMcp.http.regenerateHint': 'Выпускает новый bearer token. HTTP-клиенты должны использовать новый token. Файл discovery для stdio обновляется; уже подключенные stdio-клиенты остаются подключенными.',
'ai.externalMcp.http.wslHint': 'При mirrored networking в WSL достаточно localhost. Иначе слушайте 0.0.0.0 или IP vEthernet и укажите IP узла Windows как адрес клиента.',
'ai.externalMcp.http.codexSnippet': 'Файл config.toml для Codex',
'ai.externalMcp.http.codexSnippet': 'Codex config.toml',
'ai.externalMcp.http.claudeCommand': 'Claude Code',
'ai.externalMcp.http.genericSnippet': 'Общий JSON',
'ai.externalMcp.http.envLine': 'Переменная окружения token для Codex',
@@ -456,12 +380,12 @@ export const ruAiMessages: Messages = {
'ai.externalMcp.http.legacySseNote': 'Устаревший HTTP+SSE (2024-11-05) не предоставляется. Используйте этот URL Streamable HTTP.',
'ai.externalMcp.permissionMode': 'Текущий режим разрешений: {mode}',
'ai.externalMcp.permissionMode.label': 'Режим разрешений на запись',
'ai.externalMcp.permissionMode.hint': 'Тот же параметр, что в разделе «Настройки → ИИ → Безопасность». В режиме «Авто» Netcatty выполняет операции записи без запроса. В режиме «Подтверждение» Netcatty запрашивает разрешение каждый раз. Внешние клиенты (Codex, Claude, Grok) могут запрашивать собственное подтверждение.',
'ai.externalMcp.permissionMode.hint': 'Тот же параметр, что Settings → AI → Safety. Auto выполняет write-инструменты Netcatty без запросов; Confirm спрашивает каждый раз. Внешние клиенты (Codex / Claude / Grok) могут показывать своё подтверждение инструментов.',
'ai.externalMcp.permissionMode.unknown': 'Неизвестно',
'ai.externalMcp.discovery': 'Файл обнаружения',
'ai.externalMcp.launcher': 'Файл запуска',
'ai.externalMcp.discovery': 'Discovery',
'ai.externalMcp.launcher': 'Launcher',
'ai.externalMcp.unavailable': 'Недоступно',
'ai.externalMcp.bridgeUnavailable': 'Мост внешнего MCP недоступен',
'ai.externalMcp.bridgeUnavailable': 'Мост External MCP недоступен',
'ai.externalMcp.copy': 'Копировать',
'ai.externalMcp.copied': 'Скопировано',
'ai.externalMcp.copyFailed': 'Не удалось скопировать. Скопируйте вручную.',
@@ -516,7 +440,7 @@ export const ruAiMessages: Messages = {
// AI Quick Messages
'ai.quickMessages.title': 'Быстрые сообщения',
'ai.quickMessages.description': 'Создавайте подсказки для повторного использования. Чтобы вставить текст подсказки в поле ввода чата с ИИ, наберите / или нажмите кнопку быстрых сообщений.',
'ai.quickMessages.description': 'Создавайте часто используемые подсказки и вставляйте их в AI-чат через / или кнопку быстрых сообщений. В отличие от user skills, быстрые сообщения заполняют поле ввода текстом.',
'ai.quickMessages.add': 'Добавить быстрое сообщение',
'ai.quickMessages.createTitle': 'Новое быстрое сообщение',
'ai.quickMessages.editTitle': 'Редактировать быстрое сообщение',
@@ -538,14 +462,14 @@ export const ruAiMessages: Messages = {
'ai.quickMessages.error.maxItems': 'Можно сохранить не более {max} быстрых сообщений.',
// AI Chat
'ai.chat.noProvider': 'Провайдер ИИ не настроен. Перейдите в **Настройки → ИИ → Провайдеры**, чтобы добавить и включить провайдера.',
'ai.chat.noProvider': 'AI-провайдер не настроен. Перейдите в **Настройки → AI → Провайдеры**, чтобы добавить и включить провайдера.',
'ai.chat.toolDenied': 'Действие было отклонено пользователем.',
'ai.chat.toolApproved': 'Одобрено',
'ai.chat.toolApprovalHint': 'Enter — разрешить один раз, Escape — отклонить',
'ai.chat.approve': 'Одобрить',
'ai.chat.approveOnce': 'Разрешить один раз',
'ai.chat.alwaysAllow': 'Всегда разрешать',
'ai.chat.slashStopDesc': 'Остановить текущий ход ИИ и отменить выполняющиеся инструменты',
'ai.chat.slashStopDesc': 'Остановить текущий ход AI и отменить выполняющиеся инструменты',
'ai.chat.slashCompactDesc': 'Сжать ранний контекст разговора',
'ai.chat.slashRenameDesc': 'Переименовать текущий чат (/rename <название>)',
'ai.chat.slashChatsDesc': 'Показать чаты, видимые в этой панели',
@@ -556,12 +480,12 @@ export const ruAiMessages: Messages = {
'ai.chat.copyCommand': 'Копировать',
'ai.chat.commandCopied': 'Скопировано',
'ai.chat.approvalSession': 'Сессия',
'ai.chat.approvalShell': 'Оболочка',
'ai.chat.approvalShell': 'Shell',
'ai.chat.approvalCwd': 'Каталог',
'ai.chat.approvalReason': 'Причина',
'ai.chat.approvalInvocation': 'Вызов',
'ai.chat.permissionRequired': 'Требуется разрешение',
'ai.chat.permissionDescription': 'Агент ИИ хочет вызвать инструмент, для которого требуется ваше разрешение.',
'ai.chat.permissionDescription': 'AI-агент хочет выполнить вызов инструмента, для которого требуется ваше одобрение.',
'ai.chat.commandBlocked': 'Эта команда заблокирована вашей политикой безопасности и не может быть выполнена.',
'ai.chat.recommendAllow': 'Разрешить',
'ai.chat.recommendConfirm': 'Подтвердить',
@@ -587,7 +511,7 @@ export const ruAiMessages: Messages = {
'ai.chat.placeholder': 'Сообщение {agent} — @ для добавления контекста, / для команд',
'ai.chat.placeholderDefault': 'Сообщение агенту Catty...',
'ai.chat.noModel': 'Нет модели',
'ai.chat.noProviderModel': 'Модель по умолчанию не задана. Выберите её в разделе «Настройки → ИИ → Провайдеры».',
'ai.chat.noProviderModel': 'Модель по умолчанию не задана — настройте её в Настройки → AI → Провайдеры.',
'ai.chat.selectProvider': 'Выберите провайдера',
'ai.chat.selectProviderAndModel': 'Выберите провайдера и модель',
'ai.chat.selectModel': 'Выберите модель',
@@ -624,7 +548,7 @@ export const ruAiMessages: Messages = {
'ai.chat.importNone': 'В выбранном файле не найдено чатов ИИ.',
'ai.chat.chatsHeader': 'Чаты, видимые в этой панели:',
'ai.chat.chatsEmpty': 'В этой панели нет видимых чатов.',
'ai.chat.chatsScopeWorkspace': 'Рабочая область',
'ai.chat.chatsScopeWorkspace': 'Workspace',
'ai.chat.chatsScopeTerminal': 'Терминал',
'ai.chat.chatsScopeGlobal': 'Глобально',
'ai.chat.chatsScopeDangling': 'Связь потеряна',
@@ -644,25 +568,12 @@ export const ruAiMessages: Messages = {
'ai.chat.managerRebindPick': 'Выберите терминал или рабочее пространство…',
'ai.chat.managerRebindHere': 'Текущая панель',
'ai.chat.managerRebindDone': 'Чат «{title}» перемещён в {target}.',
'ai.chat.managerToggleSelection': 'Выбрать чаты',
'ai.chat.managerSelectAll': 'Выбрать все',
'ai.chat.managerSelectedCount': 'Выбрано: {n}',
'ai.chat.managerSelectRow': 'Выбрать этот чат',
'ai.chat.managerRegenerateTitle': 'Пересоздать заголовок через ИИ',
'ai.chat.managerRegenerateTitleUpdated': 'Заголовок чата обновлён.',
'ai.chat.managerRegenerateTitleUnchanged': 'Заголовок чата уже актуален.',
'ai.chat.managerRegenerateTitleNoModel': 'Не настроен провайдер/модель ИИ для генерации заголовков. Настройте модель в настройках ИИ.',
'ai.chat.managerRegenerateTitleFailed': 'Не удалось пересоздать заголовок: {error}',
'ai.chat.managerRegenerateTitleBatchDone': 'Обновлено заголовков: {n}.',
'ai.chat.managerRegenerateTitleBatchPartial': 'Обновлено {updated}, ошибок: {failed}.',
'ai.chat.managerExportOne': 'Экспортировать этот чат',
'ai.chat.managerBadgeActive': 'Активен',
'ai.chat.managerBadgeIdle': 'Простой',
'ai.chat.managerMessagesCount': '{n} сообщений',
'ai.chat.managerDeleteTitle': 'Удалить этот чат?',
'ai.chat.managerDeleteMessage': '«{title}» и его сообщения будут удалены из всех панелей. Это действие нельзя отменить.',
'ai.chat.managerBulkDeleteTitle': 'Удалить выбранные чаты ({n})?',
'ai.chat.managerBulkDeleteMessage': 'Выбранные чаты ({n}) и их сообщения будут удалены из всех панелей. Это действие нельзя отменить.',
'ai.chat.justNow': 'Только что',
'ai.chat.minutesAgo': '{n}м назад',
'ai.chat.hoursAgo': '{n}ч назад',
@@ -706,32 +617,16 @@ export const ruAiMessages: Messages = {
'ai.chat.slashUserSkills': 'Пользовательские навыки',
'ai.chat.quickMessages': 'Команды /',
'ai.chat.slashNoResults': 'Нет подходящих команд',
'ai.chat.slashEmptyHint': 'Добавьте подсказки в разделе «Настройки → ИИ → Быстрые сообщения».',
'ai.chat.slashEmptyHint': 'Добавьте подсказки в Настройки → AI → Быстрые сообщения.',
// AI Chat Shortcuts
'ai.chatShortcuts.title': 'Быстрые действия чата',
'ai.chatShortcuts.selectionAction': 'Показывать «Добавить в чат» при выделении в терминале',
'ai.chatShortcuts.selectionAction.description': 'Показывать небольшую кнопку ИИ рядом с выделенным текстом терминала.',
'ai.chatShortcuts.selectionAction.description': 'Показывать небольшую кнопку AI рядом с выделенным текстом терминала.',
'ai.chatHistory.title': 'История чата',
'ai.chatHistory.storageUsage': 'Размер локальной истории чатов',
'ai.chatHistory.storageUsage.description': 'Оценивает размер сохранённых записей чатов в формате JSON (UTF-8).',
'ai.chatHistory.storageUsage.measure': 'Рассчитать',
'ai.chatHistory.storageUsage.measuring': 'Расчёт…',
'ai.chatHistory.storageUsage.result': 'Сохранено записей — {count}. Примерный размер JSON — {size}.',
'ai.chatHistory.storageUsage.partial': 'Записей, исключённых из расчёта размера, — {count}.',
'ai.chatHistory.storageUsage.error': 'Не удалось прочитать локальную историю чатов. Повторите попытку.',
'ai.chatHistory.messageCap': 'Сообщений, сохраняемых в чате',
'ai.chatHistory.messageCap.description': 'Максимальное число сообщений, хранимых для одного чата (50–2000). При уменьшении самые старые сообщения удаляются из хранилища при следующей записи. Большие значения увеличивают объём хранилища и синхронизации с облаком.',
'ai.chatHistory.messageCap.unit': 'сообщений',
'ai.chatHistory.autoLlmTitle': 'Автосоздание заголовков чатов',
'ai.chatHistory.autoLlmTitle.description': 'Короткий запрос к LLM создаёт заголовок после первого сообщения. Если недоступно, используется первая строка. Локальная настройка.',
'ai.chatHistory.titleModel': 'Модель для заголовков',
'ai.chatHistory.titleModel.description': 'Провайдер и модель для создания заголовков. Выберите небольшую недорогую модель. По умолчанию — текущая модель Catty.',
'ai.chatHistory.titleModel.none': 'Нет включённых провайдеров.',
'ai.chatHistory.titleModel.useCurrentCatty': 'Использовать текущую модель Catty',
'ai.chatHistory.titleModel.unavailable': 'Недоступно',
'ai.chatHistory.titleModel.providerPlaceholder': 'Выбрать провайдер',
'ai.chatHistory.titleModel.modelPlaceholder': 'Выбрать модель',
// AI Error
'ai.codex.bridgeError': 'Обработчики главного процесса Codex ещё не загружены. Полностью перезапустите Netcatty или dev-процесс Electron и попробуйте снова.',
@@ -739,7 +634,7 @@ export const ruAiMessages: Messages = {
// AI Web Search
'ai.webSearch.title': 'Веб-поиск',
'ai.webSearch.enable': 'Включить веб-поиск',
'ai.webSearch.enable.description': 'Разрешить агенту ИИ искать в интернете актуальную информацию.',
'ai.webSearch.enable.description': 'Разрешить AI-агенту искать в интернете актуальную информацию.',
'ai.webSearch.provider': 'Провайдер поиска',
'ai.webSearch.provider.description': 'Выберите провайдера API веб-поиска.',
'ai.webSearch.apiKey': 'API-ключ',
@@ -754,7 +649,7 @@ export const ruAiMessages: Messages = {
// AI Safety Settings
'ai.safety.title': 'Безопасность',
'ai.safety.permissionMode': 'Режим разрешений',
'ai.safety.permissionMode.description': 'Управляет тем, как ИИ взаимодействует с вашими терминалами. Режим наблюдателя блокирует все операции записи через Netcatty и применяется как к встроенным, так и к внешним агентам. Режим подтверждения носит рекомендательный характер для внешних агентов (они управляют собственным потоком одобрения инструментов).',
'ai.safety.permissionMode.description': 'Управляет тем, как AI взаимодействует с вашими терминалами. Режим наблюдателя блокирует все операции записи через Netcatty и применяется как к встроенным, так и к внешним агентам. Режим подтверждения носит рекомендательный характер для внешних агентов (они управляют собственным потоком одобрения инструментов).',
'ai.safety.permissionMode.observer': 'Наблюдатель — только чтение, без действий',
'ai.safety.permissionMode.confirm': 'Подтверждение — спрашивать перед действиями',
'ai.safety.permissionMode.auto': 'Авто — выполнять свободно',
@@ -765,7 +660,7 @@ export const ruAiMessages: Messages = {
'ai.safety.responseIdleTimeout.description': 'Отменяет запрос встроенного ИИ после указанного числа секунд без нового ответа. Не управляет общей длительностью ответа и выполнением команд.',
'ai.safety.responseIdleTimeout.unit': 'с',
'ai.safety.maxIterations': 'Макс. число итераций',
'ai.safety.maxIterations.description': 'Максимальное число циклов использования инструментов ИИ, чтобы предотвратить бесконтрольное выполнение. У внешних агентов могут быть собственные внутренние лимиты итераций, имеющие приоритет.',
'ai.safety.maxIterations.description': 'Максимальное число циклов использования инструментов AI, чтобы предотвратить бесконтрольное выполнение. У внешних агентов могут быть собственные внутренние лимиты итераций, имеющие приоритет.',
'ai.safety.toolOutputMaxChars': 'Лимит вывода инструментов встроенного ИИ',
'ai.safety.toolOutputMaxChars.description': 'Максимум символов, оставляемых напрямую в результате инструмента встроенного ИИ (например, вывода команд терминала или чтения SFTP) до обрезки и сохранения полного вывода в дескриптор (2 000–200 000).',
'ai.safety.toolOutputMaxChars.unit': 'симв.',
@@ -798,15 +693,12 @@ export const ruAiMessages: Messages = {
'terminal.layer.history': 'История',
'terminal.layer.theme': 'Тема',
'terminal.layer.notes': 'Заметки',
'terminal.layer.aiChat': 'Чат с ИИ',
'terminal.layer.aiChat': 'AI-чат',
'terminal.layer.choosePanelPosition': 'Изменить положение',
'terminal.layer.dockLeft': 'Слева',
'terminal.layer.dockRight': 'Справа',
'terminal.layer.dockBottom': 'Снизу',
'terminal.layer.closePanel': 'Закрыть панель',
'terminal.layer.saveLayoutAsDefault': 'Сохранить расположение панелей по умолчанию',
'terminal.layer.layoutSavedAsDefault': 'Расположение панелей по умолчанию сохранено',
'terminal.layer.layoutSaveFailed': 'Не удалось сохранить расположение панелей',
'terminal.layer.closePane': 'Закрыть область',
'terminal.layer.resizeSplit': 'Изменить размер области',
'terminal.layer.splitHorizontal': 'Разделить сверху и снизу',
@@ -826,15 +718,9 @@ export const ruAiMessages: Messages = {
'terminal.layer.hostTree.collapse': 'Свернуть список хостов',
'terminal.layer.hostTree.expand': 'Развернуть список хостов',
'terminal.layer.hostTree.empty': 'Хосты не найдены',
'terminal.layer.hostTree.details.host': 'Хост',
'terminal.layer.hostTree.details.user': 'Пользователь',
'terminal.layer.hostTree.details.port': 'Порт',
'terminal.layer.hostTree.details.protocol': 'Протокол',
'terminal.layer.hostTree.details.group': 'Группа',
'terminal.layer.hostTree.details.tags': 'Теги',
'topTabs.openQuickSwitcher': 'Открыть быстрый переключатель',
'topTabs.moreTabs': 'Больше вкладок',
'topTabs.aiAssistant': 'ИИ-помощник',
'topTabs.aiAssistant': 'AI-помощник',
'topTabs.controlPanel': 'Быстрые настройки',
'topTabs.controlPanel.externalMcp': 'Внешний MCP',
'topTabs.controlPanel.theme': 'Тема',
@@ -879,15 +765,6 @@ export const ruAiMessages: Messages = {
'ai.chat.artifact.scriptRunPaused': 'Запуск скрипта приостановлен',
'ai.chat.artifact.scriptRunResumed': 'Запуск скрипта возобновлён',
'ai.chat.artifact.scriptReference': 'Справка nct API',
'ai.chat.artifact.rdScreenRead': 'Снимок удалённого экрана',
'ai.chat.artifact.rdScreenGrid': 'Снимок удалённого экрана (сетка)',
'ai.chat.artifact.rdScreenCropped': 'Снимок увеличенной области',
'ai.chat.artifact.rdActionExecuted': 'Выполнено удалённых действий: {count}',
'ai.chat.artifact.rdActionCount': 'действий: {count}',
'ai.chat.artifact.rdActionPreempted': 'Удалённое действие прервано пользователем',
'ai.chat.artifact.rdScreenFailed': 'Не удалось снять удалённый экран',
'ai.chat.artifact.rdActionFailed': 'Ошибка действия на удалённом рабочем столе',
'ai.chat.artifact.rdPreviewScreen': 'Предпросмотр снимка экрана',
'zmodem.waitingForRemote': 'Ожидание удалённой стороны...',
'zmodem.uploading': 'Загрузка',
'zmodem.downloading': 'Скачивание',
@@ -921,21 +798,4 @@ export const ruAiMessages: Messages = {
"ai.toolSettings.conflict": "Настройки изменены в другом окне. Черновик сохранён. Отмените и откройте окно снова, чтобы загрузить сохранённые настройки.",
"ai.toolSettings.retry": "Повторить",
"ai.toolSettings.applyingHttp": "Применение настроек HTTP...",
"ai.vision.quickPrompt.explainError": "Объяснить текущую ошибку",
"ai.vision.quickPrompt.diagnoseUi": "Диагностировать проблему интерфейса",
"ai.vision.quickPrompt.summarizeScreen": "Кратко описать экран",
"ai.vision.unsupportedModelWarning": "Текущая модель ({model}) не поддерживает изображения. Переключитесь на модель с поддержкой зрения для просмотра удалённого экрана.",
"ai.vision.switchModel": "Сменить модель",
"ai.vision.modelSupportsVision": "Поддерживает изображения",
"ai.vision.snip.hint": "Выделите область мышью · Esc для отмены",
"ai.vision.snip.cancel": "Отменить выделение",
"ai.vision.snip.ariaLabel": "Выделить область экрана удалённого рабочего стола",
"ai.vision.privacyBlocked": "Чтение экрана ИИ заблокировано для этой сессии.",
"ai.vision.viewingScreen": "Catty просматривает рабочий стол",
"ai.vision.askAi": "Спросить ИИ",
"ai.vision.captureFullAndAsk": "Снимок экрана и вопрос ИИ",
"ai.vision.snipRegionAndAsk": "Выделить область и спросить ИИ",
"ai.vision.openAiChat": "Открыть ИИ-ассистента",
"ai.vision.privacyLockOn": "Чтение экрана ИИ заблокировано",
"ai.vision.privacyLockOff": "Разрешить ИИ чтение экрана",
};
+33 -176
View File
@@ -8,7 +8,7 @@ export const ruCoreMessages: Messages = {
"settings.plugins.github.busy": "Загрузка, проверка или установка пакета...",
"settings.plugins.github.review": "Источник и целостность пакета не подтверждают доверие к издателю. Скрипты сборки не запускаются. Плагин устанавливается выключенным; проверьте разрешения перед включением.",
"settings.plugins.github.accept": "Я доверяю этому репозиторию и проверил заявленные разрешения.",
"settings.plugins.github.confirm": "Установить",
"settings.plugins.github.confirm": "Установить выключенным",
"settings.plugins.github.download": "Загрузить и проверить",
"settings.plugins.github.error.invalidRepository": "Введите https://github.com/owner/repo, github.com/owner/repo или owner/repo. Укажите только репозиторий, без учётных данных, параметров, фрагментов и дополнительных путей.",
"settings.plugins.github.error.unavailable": "Установка плагинов из GitHub недоступна в этом сеансе.",
@@ -38,33 +38,6 @@ export const ruCoreMessages: Messages = {
"settings.plugins.github.error.failed": "Не удалось проверить или установить плагин. Изучите технические подробности перед повторной попыткой.",
"settings.plugins.github.error.details": "Технические подробности",
"settings.plugins.landing.checkUpdates": "Проверить обновления",
"settings.plugins.landing.checkingUpdates": "Проверка…",
"settings.plugins.landing.updateSummary": "Проверено: {checked} · Опубликовано обновлений: {updates} · Пропущено: {skipped}.",
"settings.plugins.landing.updateSourcesFailed": "Недоступных источников: {count}.",
"settings.plugins.landing.updateReview": "Перед установкой проверьте обновления в менеджере плагинов.",
"settings.plugins.landing.updateAvailable": "Доступна версия {version}",
"settings.plugins.landing.loading": "Загрузка установленных плагинов…",
"settings.plugins.landing.settingsUnavailable": "Здесь настройки плагинов недоступны.",
"settings.plugins.landing.options": "Параметры плагина",
"settings.plugins.landing.manager": "Менеджер плагинов",
"settings.plugins.landing.managerDescription": "Просматривайте плагины и управляйте установленными пакетами и источниками.",
"settings.plugins.landing.browse": "Обзор",
"settings.plugins.landing.refresh": "Обновить список установленных плагинов",
"settings.plugins.landing.unavailable": "Управление плагинами недоступно в этом сеансе.",
"settings.plugins.landing.empty": "Плагины ещё не установлены. Откройте менеджер плагинов, чтобы посмотреть доступные варианты.",
"settings.plugins.landing.search": "Поиск установленных плагинов",
"settings.plugins.landing.settingsFor": "Настройки плагина {name}",
"settings.plugins.landing.enableSettings": "Включите плагин, чтобы открыть его настройки.",
"settings.plugins.landing.sourceUnknown": "Источник неизвестен",
"settings.plugins.landing.status.running": "Работает",
"settings.plugins.landing.status.starting": "Запускается",
"settings.plugins.landing.status.stopping": "Останавливается",
"settings.plugins.landing.status.error": "Ошибка",
"settings.plugins.landing.status.quarantined": "В карантине",
"settings.plugins.landing.status.unknown": "Состояние неизвестно",
"settings.plugins.landing.status.idle": "Включён, не запущен",
// Common
'common.save': 'Сохранить',
'common.cancel': 'Отмена',
@@ -177,7 +150,7 @@ export const ruCoreMessages: Messages = {
'settings.tab.appearance': 'Внешний вид',
'settings.tab.terminal': 'Терминал',
'settings.tab.shortcuts': 'Горячие клавиши',
'settings.tab.ai': 'ИИ',
'settings.tab.ai': 'AI',
'settings.tab.syncCloud': 'Синхронизация и облако',
'settings.tab.system': 'Система',
'settings.search.open': 'Поиск настроек',
@@ -272,7 +245,7 @@ export const ruCoreMessages: Messages = {
// Settings > System > Network Proxy
'settings.system.networkProxy.title': 'Сетевой прокси',
'settings.system.networkProxy.description': 'HTTP(S)-прокси для облачной синхронизации и провайдеров ИИ. Не связан с SSH ProxyJump / ProxyCommand.',
'settings.system.networkProxy.description': 'HTTP(S)-прокси для облачной синхронизации и AI-провайдеров. Не связан с SSH ProxyJump / ProxyCommand.',
'settings.system.networkProxy.mode': 'Режим прокси',
'settings.system.networkProxy.mode.system': 'Системный прокси',
'settings.system.networkProxy.mode.direct': 'Напрямую (без прокси)',
@@ -283,7 +256,7 @@ export const ruCoreMessages: Messages = {
'settings.system.networkProxy.bypass': 'Список исключений',
'settings.system.networkProxy.bypass.placeholder': '<local>,localhost,127.0.0.1',
'settings.system.networkProxy.bypass.desc': 'Хосты через запятую, для которых прокси не используется. <local> — localhost и локальные имена.',
'settings.system.networkProxy.hint': 'Влияет на вход в Google Drive, OneDrive и GitHub для синхронизации и на запросы к провайдерам ИИ. SSH-подключения не меняет.',
'settings.system.networkProxy.hint': 'Влияет на вход в Google Drive / OneDrive / GitHub sync и запросы к AI-провайдерам. SSH-подключения не меняет.',
// Settings > System > Crash Logs
'settings.system.crashLogs.title': 'Журналы сбоев',
@@ -323,21 +296,6 @@ export const ruCoreMessages: Messages = {
'settings.update.autoUpdateEnabled': 'Автоматические обновления',
'settings.update.autoUpdateEnabledDesc': 'Автоматически проверять и загружать обновления, когда они доступны.',
// Settings > Session Restore
'settings.sessionRestore.title': 'Восстановление сеансов',
'settings.sessionRestore.startupLanding': 'При запуске',
'settings.sessionRestore.startupLandingDesc': 'Выберите, что открывать при запуске Netcatty, если сеансы не восстановлены: главную страницу с хостами или локальный терминал.',
'settings.sessionRestore.startupLanding.vault': 'Главная (хосты)',
'settings.sessionRestore.startupLanding.localTerminal': 'Локальный терминал',
'settings.sessionRestore.restorePreviousSession': 'Восстанавливать вкладки и рабочие области',
'settings.sessionRestore.restorePreviousSessionDesc': 'Открывать вкладки терминала и восстанавливать расположение панелей в рабочих областях из предыдущего сеанса приложения.',
'settings.sessionRestore.restoreTerminalCwd': 'Восстанавливать рабочий каталог терминала',
'settings.sessionRestore.restoreTerminalCwdDesc': 'При переподключении восстановленного терминала пытаться перейти в последний известный рабочий каталог, не задерживая подключение.',
'terminal.restore.placeholder.title': 'Восстановленный сеанс',
'terminal.restore.placeholder.desc': 'Терминал отключён. Подключитесь снова, чтобы запустить новую оболочку в этой вкладке.',
'terminal.restore.placeholder.reconnect': 'Переподключиться',
'terminal.restore.cwdLog': 'Восстановление рабочего каталога: {cwd}',
// Settings > Session Logs
'settings.sessionLogs.title': 'Журналы сессий',
'settings.sessionLogs.description': 'Настройка экспорта журналов сессий и параметров автосохранения.',
@@ -430,8 +388,6 @@ export const ruCoreMessages: Messages = {
'settings.vault.showSftpTab': 'Показывать вкладку SFTP',
'settings.vault.showSftpTabDesc': 'Показывать отдельный SFTP-вид в верхней панели вкладок. Если скрыто, используйте боковую панель SFTP внутри сессии.',
'settings.vault.showHostTreeSidebar': 'Показывать боковую панель хостов',
'settings.vault.removeTopTabsDragArea': 'Убрать верхнюю область перетаскивания окна',
'settings.vault.removeTopTabsDragAreaDesc': 'При включении удаляется область перетаскивания над вкладками, чтобы по верхнему краю можно было нажимать.',
'settings.vault.showHostTreeSidebarDesc': 'Показывать список хостов и кнопку в верхней панели для вкладок терминала и редактора.',
'settings.vault.autoImportSystemKnownHosts': 'Автоимпорт системного known_hosts',
'settings.vault.autoImportSystemKnownHostsDesc': 'При открытии хранилища тихо импортировать записи из OpenSSH known_hosts. Отключите, чтобы держать известные хосты Netcatty отдельно; кнопка «Сканировать систему» по-прежнему импортирует вручную.',
@@ -539,7 +495,7 @@ export const ruCoreMessages: Messages = {
### Боковая панель терминала
- \`terminal-side-panel\` — панель SFTP / скриптов / темы / ИИ (только пока открыта)
- \`terminal-side-panel\` — панель SFTP / скриптов / темы / AI (только пока открыта)
- \`terminal-side-panel-tabs\`
- \`terminal-side-panel-content\`
@@ -641,7 +597,6 @@ export const ruCoreMessages: Messages = {
'settings.terminal.section.keyboard': 'Клавиатура',
'settings.terminal.section.accessibility': 'Доступность',
'settings.terminal.section.behavior': 'Поведение',
'settings.terminal.section.sidePanel': 'Боковая панель',
'settings.terminal.section.scrollback': 'Буфер прокрутки',
'settings.terminal.section.keywordHighlight': 'Подсветка ключевых слов',
'settings.terminal.font.family': 'Шрифт',
@@ -867,18 +822,6 @@ export const ruCoreMessages: Messages = {
'settings.terminal.localShell.startDir.placeholder': 'Домашний каталог',
'settings.terminal.localShell.startDir.notFound': 'Каталог не найден',
'settings.terminal.localShell.startDir.isFile': 'Путь указывает на файл, а не на каталог',
'settings.terminal.sidePanel.autoOpen': 'Открывать боковую панель при подключении',
'settings.terminal.sidePanel.autoOpen.desc': 'Автоматически открывать боковую панель после подключения терминала.',
'settings.terminal.sidePanel.autoOpenPane': 'Боковая панель по умолчанию',
'settings.terminal.sidePanel.autoOpenPane.desc': 'Выберите, какую панель открывать в первую очередь.',
'settings.terminal.sidePanel.pane.sftp': 'SFTP',
'settings.terminal.sidePanel.pane.scripts': 'Скрипты',
'settings.terminal.sidePanel.pane.history': 'История',
'settings.terminal.sidePanel.pane.theme': 'Тема',
'settings.terminal.sidePanel.pane.system': 'Система',
'settings.terminal.sidePanel.pane.notes': 'Заметки',
'settings.terminal.sidePanel.pane.ai': 'ИИ',
'settings.terminal.section.localShellSidePanel': 'Боковая панель локальной оболочки',
'settings.terminal.localShellSidePanel.autoOpen': 'Развернуть боковую панель при открытии локальной оболочки',
'settings.terminal.localShellSidePanel.autoOpen.desc': 'Автоматически открывать боковую панель после открытия локальной оболочки.',
@@ -886,14 +829,10 @@ export const ruCoreMessages: Messages = {
'settings.terminal.localShellSidePanel.autoOpenPane.desc': 'Выберите, какую панель открывать в первую очередь.',
'settings.terminal.localShellSidePanel.pane.files': 'Файлы',
'settings.terminal.section.connection': 'Подключение',
'settings.terminal.connection.verifyHostKeys': 'Проверять ключи SSH-хостов',
'settings.terminal.connection.verifyHostKeys.desc': 'Запрашивать подтверждение при подключении к SSH-хосту с новым или изменившимся ключом. Отключайте проверку только в доверенных частных сетях.',
'settings.terminal.connection.temporaryLegacyAlgorithms': 'Устаревшие алгоритмы для временных подключений',
'settings.terminal.connection.temporaryLegacyAlgorithms.desc': 'SSH-подключения без сохранённого хоста, включая запуск в стиле PuTTY и быстрое подключение, предлагают те же устаревшие алгоритмы, что и настройка хоста. Сохранённые хосты используют свою настройку. По умолчанию выключено: у этих алгоритмов есть известные слабости.',
'settings.terminal.connection.temporaryNetworkDeviceMode': 'Режим сетевого устройства для временных подключений',
'settings.terminal.connection.temporaryNetworkDeviceMode.desc': 'SSH-подключения без сохранённого хоста, включая внешний запуск и быстрое подключение, открываются в режиме сетевого устройства. Сохранённые хосты и группы сохраняют свой тип устройства. По умолчанию выключено.',
'settings.terminal.connection.sshAutoReconnectEnabled': 'Автоматически переподключать SSH-сеансы',
'settings.terminal.connection.sshAutoReconnectEnabled.desc': 'При неожиданном разрыве SSH-соединения повторять попытки с заданным интервалом, пока соединение не восстановится или вкладка не будет закрыта.',
'settings.terminal.connection.sshAutoReconnectInterval': 'Интервал переподключения SSH (секунды)',
'settings.terminal.connection.sshAutoReconnectInterval.desc': 'Ожидание между попытками: 5–3600 секунд (по умолчанию 5). Изменение применяется к следующему ожиданию; уже запущенный таймер не меняется.',
'settings.terminal.connection.keepaliveInterval': 'Интервал keepalive',
@@ -933,18 +872,6 @@ export const ruCoreMessages: Messages = {
'settings.terminal.rendering.renderer': 'Рендерер',
'settings.terminal.rendering.renderer.desc': 'Выберите технологию рендеринга терминала. В режиме "Авто" на устройствах с малым объёмом памяти будет использоваться DOM. Изменения применяются к новым терминальным сессиям.',
'settings.terminal.rendering.auto': 'Авто',
'settings.terminal.rendering.hibernateHiddenTabs': 'Переводить скрытые вкладки в спящий режим',
'settings.terminal.rendering.hibernateHiddenTabs.desc': 'В спящем режиме скрытые вкладки освобождают память, занятую рендерером, и сохраняют SSH-соединение. Во время передачи файлов режим не включается.',
'settings.terminal.rendering.hibernateHiddenTabsDelay': 'Задержка перед переходом в спящий режим',
'settings.terminal.rendering.hibernateHiddenTabsDelay.desc': 'Сколько времени вкладка должна оставаться скрытой до освобождения рендерера (5–600 секунд).',
'settings.terminal.rendering.hibernateSkipAltScreen': 'Отключать спящий режим для полноэкранных приложений',
'settings.terminal.rendering.hibernateSkipAltScreen.desc': 'Сохранять рендерер терминала, пока vim, htop или агенты с текстовым интерфейсом используют альтернативный экранный буфер.',
'settings.terminal.rendering.hibernateKeepRendererCount': 'Сохранять рендереры скрытых вкладок',
'settings.terminal.rendering.hibernateKeepRendererCount.desc': 'Количество скрытых вкладок, для которых рендерер сохраняется с приостановленным WebGL перед переходом в спящий режим.',
'settings.terminal.rendering.hibernateReplayChunkBytes': 'Объём вывода за кадр при восстановлении',
'settings.terminal.rendering.hibernateReplayChunkBytes.desc': 'Сколько данных вывода восстанавливать за один кадр анимации при выходе терминала из спящего режима (4–64 КБ).',
'settings.terminal.rendering.hibernatePreferWasmSerialize': 'Предпочитать сериализацию через WASM',
'settings.terminal.rendering.hibernatePreferWasmSerialize.desc': 'По возможности сериализовать состояние терминала через WASM. Если WASM недоступен, использовать JavaScript.',
// Settings > Terminal > Inline Images
'settings.terminal.section.inlineImages': 'Встроенные изображения',
@@ -986,9 +913,6 @@ export const ruCoreMessages: Messages = {
'Выберите, брать ли подсказки истории автодополнения только с текущего хоста или со всех хостов.',
'settings.terminal.autocomplete.historyScope.host': 'Текущий хост',
'settings.terminal.autocomplete.historyScope.global': 'Все хосты',
'settings.terminal.autocomplete.showSnippets': 'Показывать сниппеты',
'settings.terminal.autocomplete.showSnippets.desc':
'Включать подходящие сниппеты в список автодополнения. Отключите, если сниппеты вытесняют подсказки команд и истории.',
// Settings > Terminal > Password prompt assist (sudo/su)
'settings.terminal.section.passwordPromptAssist': 'Подсказки пароля',
@@ -1017,9 +941,6 @@ export const ruCoreMessages: Messages = {
'settings.shortcuts.recording': 'Нажмите клавиши...',
'settings.shortcuts.none': 'Нет',
'settings.shortcuts.setDisabled': 'Отключить',
'settings.shortcuts.addExtra': 'Добавить сочетание',
'settings.shortcuts.additional': 'Дополнительное сочетание',
'settings.shortcuts.removeExtra': 'Удалить сочетание',
'settings.shortcuts.category.tabs': 'Вкладки',
'settings.shortcuts.category.terminal': 'Терминал',
'settings.shortcuts.category.navigation': 'Навигация',
@@ -1054,7 +975,6 @@ export const ruCoreMessages: Messages = {
'settings.shortcuts.binding.command-palette': 'Открыть палитру команд',
'settings.shortcuts.binding.quick-switch': 'Быстрое переключение',
'settings.shortcuts.binding.new-workspace': 'Новая рабочая область',
'settings.shortcuts.binding.add-session-to-workspace': 'Добавить сессию в рабочую область',
'settings.shortcuts.binding.snippets': 'Открыть сниппеты',
'settings.shortcuts.binding.broadcast': 'Переключить режим трансляции',
'settings.shortcuts.binding.toggle-opacity': 'Переключить прозрачность окна',
@@ -1167,16 +1087,6 @@ export const ruCoreMessages: Messages = {
'vault.nav.notes': 'Заметки',
'vault.nav.knownHosts': 'Известные хосты',
'vault.nav.logs': 'Журналы',
'vault.nav.customize': 'Настроить боковую панель',
'vault.nav.customizeHint': 'Перетаскивайте элементы для сортировки или переключения видимости.',
'vault.nav.hideItem': 'Скрыть «{label}»',
'vault.nav.moveUp': 'Переместить выше',
'vault.nav.moveDown': 'Переместить ниже',
'vault.nav.resetDefault': 'Сбросить по умолчанию',
'vault.nav.alwaysVisible': 'Всегда видно',
'vault.nav.pluginBadge': 'Плагин',
'vault.nav.dragToReorder': 'Перетащите, чтобы изменить порядок «{label}»',
'vault.nav.toggleVisibility': 'Переключить видимость «{label}»',
'proxyProfiles.action.add': 'Добавить прокси',
'proxyProfiles.search.placeholder': 'Поиск прокси…',
@@ -1219,7 +1129,6 @@ export const ruCoreMessages: Messages = {
'vault.groups.selectedCount': 'Выбрано групп: {count}',
'vault.groups.deleteMultiple.success': 'Удалено выбранных элементов: {count}',
'vault.groups.ungrouped': 'Без группы',
'vault.groups.unnamed': 'Группа без имени',
'vault.groups.field.name': 'Имя группы',
'vault.groups.placeholder.example': 'например, Production',
'vault.groups.parentLabel': 'Родитель',
@@ -1228,10 +1137,7 @@ export const ruCoreMessages: Messages = {
'vault.groups.details': 'Сведения о группе',
'vault.groups.details.general': 'Общие',
'vault.groups.details.ssh': 'SSH',
'vault.groups.details.rdp': 'RDP',
'vault.groups.details.vnc': 'VNC',
'vault.groups.details.telnet': 'Telnet',
'vault.groups.details.protocolNotEnabledDesc': 'Параметры {protocol} по умолчанию для этой группы ещё не настроены.',
'vault.groups.details.advanced': 'Дополнительно',
'vault.groups.details.appearance': 'Внешний вид',
'vault.groups.details.mosh': 'Mosh',
@@ -1257,7 +1163,6 @@ export const ruCoreMessages: Messages = {
'vault.hosts.header.entries': 'Записей: {count}',
'vault.hosts.header.live': 'Активных: {count}',
'vault.hosts.errors.nameRequired': 'Укажите имя хоста.',
'deepLink.ssh.invalid': 'Недопустимая ссылка ssh://',
'deepLink.telnet.invalid': 'Недопустимая ссылка telnet://',
'deepLink.jms.invalid': 'Недопустимая ссылка JumpServer',
@@ -1280,12 +1185,7 @@ export const ruCoreMessages: Messages = {
"plugins.sidebar.selectTerminal": "Сначала выберите открытый терминал.",
"plugins.sidebar.loading": "Загрузка страницы расширения…",
"plugins.vault.loading": "Загрузка страницы плагина…",
"plugins.vault.viewError": "Не удалось отобразить страницу плагина.",
"plugins.vault.retry": "Повторить",
"plugins.interaction.title": "Запрос плагина",
"plugins.interaction.openUrlTitle": "Открыть внешнюю ссылку?",
"plugins.interaction.openUrlNote": "Этот плагин запрашивает открытие следующего HTTPS-адреса в браузере по умолчанию:",
"plugins.interaction.openUrlAction": "Открыть URL",
"plugins.interaction.sharing": "Переданный текст доступен плагину и его разрешённым возможностям, включая сеть. Чтение не разрешает новый сетевой адрес.",
"plugins.interaction.input": "Ввести текст",
"plugins.interaction.filter": "Фильтр вариантов",
@@ -1296,19 +1196,15 @@ export const ruCoreMessages: Messages = {
"plugins.interaction.copy": "Копировать в буфер обмена",
"plugins.interaction.failed": "Запрос истёк или не выполнен.",
"plugins.command.failed": "Не удалось выполнить команду плагина. Проверьте необходимые выбранные объекты и разрешения.",
"plugins.interaction.terminalDisclosure": "Плагину передаётся только выделенный в этом терминале текст (до 4096 байт в UTF-8). Он может содержать пароли, токены и другие секреты. Перед передачей проверьте текст целиком. Автоматическое скрытие секретов не гарантируется.",
"plugins.interaction.terminalTarget": "Выбранный терминал",
"plugins.interaction.terminalPreview": "Предпросмотр выделенного текста",
"plugins.interaction.draftNote": "Здесь можно просмотреть и отредактировать черновик. Диалог не отправляет в терминал текст или нажатие Enter. Чтобы отправить текст, скопируйте его и вставьте в терминал. Изменения сохраняются только в этом диалоге.",
"plugins.interaction.draft": "Черновик ввода в терминал",
"plugins.interaction.exactText": "Исходный текст с экранированными управляющими символами",
"plugins.interaction.closeDraft": "Закрыть черновик",
"plugins.interaction.terminalDisclosure": "Only the current selection from this terminal is shared, up to 4096 UTF-8 bytes. Terminal text can contain passwords, tokens, and other secrets. Inspect the exact preview before sharing. No redaction guarantee is made.",
"plugins.interaction.terminalTarget": "Selected terminal",
"plugins.interaction.terminalPreview": "Preview terminal selection",
"plugins.interaction.draftNote": "Editable draft for review only. This dialog sends no terminal input or Enter. Copy text yourself and use the normal terminal UI if you choose to send it. Your edits stay in this dialog.",
"plugins.interaction.draft": "Terminal input draft",
"plugins.interaction.exactText": "Exact text with escaped controls",
"plugins.interaction.closeDraft": "Close draft",
"settings.plugins.permissions.current": "Соответствует текущему запуску",
"settings.plugins.permissions.inactive": "Не действует для текущего запуска",
"settings.plugins.permissions.note": "Заявленные возможности по умолчанию разрешены. В режиме «Спрашивать» Netcatty запрашивает разрешение с ограниченной областью действия. Режим «Запретить» сразу блокирует доступ. Цель можно выбрать, а черновик отредактировать в интерфейсе Netcatty.",
"settings.plugins.permissions.allow": "Разрешить",
"settings.plugins.permissions.ask": "Спрашивать",
"settings.plugins.permissions.deny": "Запретить",
"settings.plugins.permissions.title": "Сохранённые разрешения",
"settings.plugins.permissions.refresh": "Обновить",
"settings.plugins.permissions.loading": "Загрузка разрешений...",
@@ -1318,7 +1214,7 @@ export const ruCoreMessages: Messages = {
"settings.plugins.permissions.session": "До закрытия сеанса",
"settings.plugins.permissions.audit": "Последние события безопасности (до 100)",
"settings.plugins.permissions.revoke": "Отключить и отозвать все разрешения",
"settings.plugins.permissions.revokeNote": "Плагин будет отключён, его задачи отменены, а сохранённые разрешения отозваны. Выбранные режимы «Разрешить», «Спрашивать» и «Запретить» сохранятся.",
"settings.plugins.permissions.revokeNote": "Плагин будет отключён, его задачи отменены, а сохранённые разрешения удалены. Включите его для нового запроса доступа.",
"settings.plugins.permissions.unavailable": "Управление разрешениями недоступно",
"settings.plugins.manager.permissions": "Заявленные разрешения",
"settings.plugins.manager.permissionNote": "Заявленные поддерживаемые возможности по умолчанию разрешены. Для каждой можно выбрать запрос или запрет в настройках разрешений. Проверки приложения и область ресурсов действуют всегда.",
@@ -1359,10 +1255,7 @@ export const ruCoreMessages: Messages = {
"settings.plugins.market.title": "Каталог",
"settings.plugins.market.note": "Отобранные плагины с открытым кодом. Проверка не гарантирует безопасность. Обновления выполняются вручную.",
"settings.plugins.market.back": "Все плагины",
"settings.plugins.market.install": "Установить",
"settings.plugins.market.installing": "Установка...",
"settings.plugins.market.update": "Обновить",
"settings.plugins.market.updating": "Обновление...",
"settings.plugins.market.install": "Установить эту версию (отключённой)",
"settings.plugins.market.installNote": "Установленная версия будет заменена и остановлена. Проверьте разрешения перед включением.",
"settings.plugins.market.sourceOnly": "Пример из этого проекта. Соберите локальной CLI и импортируйте .ncpkg; готовый пакет для скачивания не опубликован.",
"settings.plugins.market.readmeNote": "Зафиксирован указанный коммит. HTML не выполняется, внешние изображения не загружаются. Текст автора плагина.",
@@ -1379,28 +1272,28 @@ export const ruCoreMessages: Messages = {
"settings.plugins.manager.unbounded": "Более узкая область ресурсов не заявлена. Проверки приложения и выбранный режим разрешений продолжают действовать.",
"settings.plugins.openView": "Открыть",
"settings.plugins.openManager": "Открыть управление плагинами",
"settings.plugins.sources.conflict": "Плагин с этим идентификатором установлен из другого источника. Перед сменой источника удалите плагин и очистите его приватные данные. Текущий источник:",
"settings.plugins.sources.clearPrivate": "Также удалить приватные данные, выданные разрешения и секреты этого источника, чтобы установить плагин из другого источника. Это действие нельзя отменить.",
"settings.plugins.sources.conflict": "This ID is installed from another source. Uninstall and explicitly reset its private data before switching. Existing source:",
"settings.plugins.sources.clearPrivate": "Also clear this source’s private data, grants and secrets to reinstall from another source. This cannot be undone.",
"settings.plugins.sources.short.official": "Официальный",
"settings.plugins.sources.short.thirdparty": "Сторонний",
"settings.plugins.sources.short.local": "Локальный",
"settings.plugins.sources.official": "Официальный каталог",
"settings.plugins.sources.thirdparty": "Сторонний каталог",
"settings.plugins.sources.manage": "Управление источниками",
"settings.plugins.sources.select": "Выбрать источник",
"settings.plugins.sources.empty": "Выберите или добавьте сторонний источник.",
"settings.plugins.sources.add": "Добавить источник",
"settings.plugins.sources.remove": "Удалить источник",
"settings.plugins.sources.name": "Название источника",
"settings.plugins.sources.address": "HTTPS-адрес источника",
"settings.plugins.sources.risk": "Netcatty не поддерживает и не рекомендует сторонние источники. Перед установкой проверьте фактический домен, разрешения пакета и сведения об авторе.",
"settings.plugins.sources.accept": "Я доверяю этому домену как источнику метаданных и пакетов плагинов. Это не выдаёт плагинам разрешений.",
"settings.plugins.sources.removeNote": "Установленные плагины и их данные сохранятся. Обновления из этого источника прекратятся. Другой источник не заменит его.",
"settings.plugins.sources.disablePlugins": "Также отключить плагины из этого источника",
"settings.plugins.sources.installConfirm": "Проверка установки из стороннего источника",
"settings.plugins.sources.source": "Источник",
"settings.plugins.sources.local": "Импорт из файла",
"settings.plugins.sources.all": "Все источники",
"settings.plugins.sources.official": "Official marketplace",
"settings.plugins.sources.thirdparty": "Third-party marketplace",
"settings.plugins.sources.manage": "Manage sources",
"settings.plugins.sources.select": "Select a source",
"settings.plugins.sources.empty": "Choose or add a third-party source.",
"settings.plugins.sources.add": "Add source",
"settings.plugins.sources.remove": "Remove source",
"settings.plugins.sources.name": "Source name",
"settings.plugins.sources.address": "HTTPS source address",
"settings.plugins.sources.risk": "Third-party sources are not maintained or endorsed by Netcatty. Review the real domain, package permissions and author before installing.",
"settings.plugins.sources.accept": "I trust this domain to supply plugin metadata and packages. This does not grant plugin permissions.",
"settings.plugins.sources.removeNote": "Installed plugins and their data remain. Updates from this source stop; another source will not replace it.",
"settings.plugins.sources.disablePlugins": "Also disable plugins installed from this source",
"settings.plugins.sources.installConfirm": "Review third-party installation",
"settings.plugins.sources.source": "Source",
"settings.plugins.sources.local": "Local import",
"settings.plugins.sources.all": "All sources",
"settings.plugins.title": "Плагины",
"settings.plugins.configuration": "Настройки плагина",
"settings.plugins.description": "Управляйте плагинами и просматривайте каталог.",
@@ -1448,40 +1341,4 @@ export const ruCoreMessages: Messages = {
'plugins.hostActions.managedUnsupported': 'Изменяйте управляемые настройки SSH в редакторе хостов Vault.',
'plugins.hostActions.failed': 'Запрос истёк, был отозван или хост изменился. Выберите хост заново.',
'plugins.hostActions.selectionLimit': 'Выберите не более 50 текущих хостов.',
'settings.externalEditor.title': 'Внешний удалённый редактор',
'settings.externalEditor.desc': 'Открывайте удалённые SSH-проекты и файлы напрямую в локальных редакторах, таких как Zed, VS Code или Cursor.',
'settings.externalEditor.preferredEditor': 'Предпочитаемый редактор',
'settings.externalEditor.preferredEditor.desc': 'Локальный редактор по умолчанию для контекстного меню SFTP и запросов из терминала.',
'settings.externalEditor.executablePath': 'Исполняемый файл редактора',
'settings.externalEditor.executablePath.desc': 'Оставьте пустым для автоопределения или выберите локальный файл вручную.',
'settings.externalEditor.executablePath.placeholder': 'Автоопределение пути к файлу',
'settings.externalEditor.status.configured': 'Указан вручную',
'settings.externalEditor.status.detected': 'Определён автоматически',
'settings.externalEditor.status.notFound': 'Не найден',
'settings.externalEditor.browse': 'Обзор…',
'settings.externalEditor.resetPath': 'Сбросить на автоопределение',
'settings.externalEditor.redetect': 'Повторить поиск редакторов',
'settings.externalEditor.customArgs': 'Пользовательские аргументы',
'settings.externalEditor.customArgs.desc': 'Аргументы через пробел (подстановки: {sshUri}, {sshTarget}, {remotePath}, {encodedPath}, {kind}).',
'settings.externalEditor.connectionMode': 'Режим SSH-подключения',
'settings.externalEditor.connectionMode.desc': 'SSH-мост Netcatty переиспользует активную аутентифицированную сессию без раскрытия ключей или списка хостов.',
'settings.externalEditor.connectionMode.bridge': 'SSH-мост Netcatty (*.netcatty)',
'settings.externalEditor.connectionMode.direct': 'Прямой OpenSSH (user@host:port)',
'settings.externalEditor.sshBridge.title': 'Правило OpenSSH *.netcatty',
'settings.externalEditor.sshBridge.desc': 'Добавляет один статический блок Host *.netcatty в конфиг OpenSSH без записи хостов, ключей и паролей.',
'settings.externalEditor.sshBridge.install': 'Установить правило',
'settings.externalEditor.sshBridge.reinstall': 'Переустановить правило',
'settings.externalEditor.sshBridge.update': 'Обновить правило',
'settings.externalEditor.sshBridge.remove': 'Удалить правило',
'settings.externalEditor.terminalRequests': 'Разрешить запросы из терминала (OSC 7337)',
'settings.externalEditor.terminalRequests.desc': 'Позволяет удалённой оболочке открывать пути в локальном редакторе командами вроде `zed .`.',
'settings.externalEditor.autoSetup': 'Включить команды редактора только в сессиях Netcatty',
'settings.externalEditor.autoSetup.desc': 'Устанавливает утилиты `zed` / `ncedit` в ~/.netcatty/bin и добавляет их в PATH только для этой сессии Netcatty, не изменяя ~/.bashrc и ~/.zshrc (можно задать отдельно для хоста).',
'settings.externalEditor.defaultTrust': 'Доверие хостам по умолчанию',
'settings.externalEditor.defaultTrust.desc': 'Политика разрешений, когда неизвестный удалённый хост запрашивает открытие локального редактора.',
'settings.externalEditor.trust.ask': 'Спрашивать каждый раз',
'settings.externalEditor.trust.allow': 'Всегда разрешать',
'settings.externalEditor.trust.deny': 'Всегда запрещать',
'settings.externalEditor.trustedHosts.host': 'Хост',
'settings.externalEditor.trustedHosts.policy': 'Политика',
};
-12
View File
@@ -105,16 +105,4 @@ export const ruMonitorMessages = {
"monitor.status.disconnected": "Отключено",
"monitor.status.stale": "Устарело",
"monitor.status.missing": "Сервер удалён",
"monitor.status.online": "В сети",
"monitor.status.offline": "Не в сети",
"monitor.checkNow": "Проверить сейчас",
"monitor.openRemoteDesktop": "Открыть {protocol}",
"monitor.latencyTrend": "График задержки",
"monitor.bannerVerified": "Протокол подтверждён",
"monitor.bannerUnverified": "Порт открыт (баннер не проверен)",
"monitor.companionDesktops": "Службы удалённого рабочего стола",
"monitor.reachabilityOnly": "Только проверка доступности",
"monitor.viaSsh": "через SSH",
"monitor.direct": "Напрямую",
"monitor.rttStats": "Мин / Сред / Макс",
};
+1 -37
View File
@@ -26,9 +26,6 @@ export const ruSystemManagerMessages: Messages = {
'systemManager.errors.loadDockerImages': 'Не удалось загрузить образы',
'systemManager.errors.loadKubernetes': 'Не удалось загрузить ресурсы Kubernetes',
'systemManager.errors.loadPods': 'Не удалось загрузить поды',
'systemManager.errors.nerdctlUnreachable': 'nerdctl не может подключиться к containerd',
'systemManager.errors.clusterUnreachable': 'Не удалось подключиться к кластеру для контекста {{context}}',
'systemManager.errors.clusterUnreachableGeneric': 'Не удалось подключиться к кластеру',
'systemManager.errors.loadGpu': 'Не удалось загрузить статистику GPU / NPU',
'systemManager.errors.loadPorts': 'Не удалось загрузить слушающие порты',
'systemManager.errors.loadServices': 'Не удалось загрузить службы systemd',
@@ -190,20 +187,6 @@ export const ruSystemManagerMessages: Messages = {
'systemManager.k8s.restarts': '{{count}} перезапусков',
'systemManager.k8s.chooseContainer': 'Выберите контейнер',
'systemManager.k8s.noContext': 'На этом хосте нет контекста Kubernetes',
'systemManager.k8s.status.Running': 'Работает',
'systemManager.k8s.status.Pending': 'Ожидает запуска',
'systemManager.k8s.status.Completed': 'Завершён',
'systemManager.k8s.status.Succeeded': 'Завершён успешно',
'systemManager.k8s.status.Failed': 'Завершён с ошибкой',
'systemManager.k8s.status.Unknown': 'Состояние неизвестно',
'systemManager.k8s.status.CrashLoopBackOff': 'Циклические сбои',
'systemManager.k8s.status.ContainerCreating': 'Создаётся контейнер',
'systemManager.k8s.status.Terminating': 'Завершается',
'systemManager.k8s.status.ImagePullBackOff': 'Повтор загрузки',
'systemManager.k8s.status.ErrImagePull': 'Ошибка загрузки образа',
'systemManager.k8s.status.Error': 'Ошибка',
'systemManager.k8s.status.Evicted': 'Вытеснен',
'systemManager.k8s.status.OOMKilled': 'Нехватка памяти',
'systemManager.ports.unavailable': 'На этом хосте не обнаружены инструменты портов (ss / netstat).',
'systemManager.ports.loading': 'Загрузка слушающих портов…',
@@ -214,25 +197,6 @@ export const ruSystemManagerMessages: Messages = {
'systemManager.ports.unknownProcess': 'Неизвестный процесс',
'systemManager.ports.terminate': 'Завершить',
'systemManager.ports.confirmTerminate': 'Отправить SIGTERM процессу {{pid}}, занимающему этот порт?',
'systemManager.ports.forwardedMeta': 'проброшено: {{count}}',
'systemManager.ports.forward': 'Пробросить на локальный порт',
'systemManager.ports.stopForward': 'Остановить проброс порта',
'systemManager.ports.forwardTitle': 'Пробросить порт локально',
'systemManager.ports.forwardDesc': 'Создать локальный SSH-туннель к этому удалённому порту.',
'systemManager.ports.forwardDescWithHost': 'Пробросить этот порт на {{host}} на локальный порт через SSH.',
'systemManager.ports.forwardLocalPort': 'Локальный порт',
'systemManager.ports.forwardBindAddress': 'Адрес привязки',
'systemManager.ports.forwardAction': 'Пробросить',
'systemManager.ports.forwarding': 'Проброс…',
'systemManager.ports.forwardInvalidPort': 'Введите корректный номер порта от 1 до 65535.',
'systemManager.ports.forwardInvalidBindAddress': 'Введите корректный адрес привязки (например, 127.0.0.1 или 0.0.0.0).',
'systemManager.ports.forwardPortInUse': 'Локальный порт {{port}} уже занят правилом «{{label}}».',
'systemManager.ports.forwardFailed': 'Не удалось запустить проброс порта.',
'systemManager.ports.forwardStarted': 'Проброс {{local}} → {{remote}} запущен',
'systemManager.ports.forwardStopped': 'Проброс {{local}} остановлен',
'systemManager.ports.copiedEndpoint': 'Скопировано: {{endpoint}}',
'systemManager.ports.copyEndpointAria': 'Скопировать локальный адрес {{endpoint}}',
'systemManager.ports.clickToCopy': 'Нажмите, чтобы скопировать локальный адрес',
'systemManager.services.unavailable': 'systemctl недоступен на этом хосте.',
'systemManager.services.loading': 'Загрузка служб systemd…',
@@ -249,7 +213,7 @@ export const ruSystemManagerMessages: Messages = {
'systemManager.services.enable': 'Включить автозапуск',
'systemManager.services.disable': 'Отключить автозапуск',
'systemManager.services.reload': 'Перезагрузить',
'systemManager.services.scope.user': 'Пользовательская служба',
'systemManager.services.scope.user': 'user',
'systemManager.services.confirmAction': '{{action}} {{name}}?',
'systemManager.gpu.unavailable': 'На этом хосте не обнаружены инструменты NVIDIA GPU или Ascend NPU.',
+9 -39
View File
@@ -2,14 +2,6 @@ import type { Messages } from '../types';
export const ruTerminalMessages: Messages = {
'terminal.directory.open': 'Текущий каталог: {path}. Сменить каталог',
'terminal.gitBranch.current': 'Ветка Git: {{value}}',
'terminal.gitBranch.detached': 'Отсоединённый HEAD: {{value}}',
'terminal.gitBranch.search': 'Поиск локальных веток...',
'terminal.gitBranch.branches': 'Локальные ветки',
'terminal.gitBranch.loading': 'Чтение веток...',
'terminal.gitBranch.empty': 'Локальных веток пока нет',
'terminal.gitBranch.noMatches': 'Ветки не найдены',
'terminal.gitBranch.unavailable': 'Не удалось прочитать ветки для этого сеанса.',
'terminal.directory.unknown': 'Каталог неизвестен',
'terminal.directory.search': 'Поиск подкаталогов...',
'terminal.directory.directories': 'Каталоги',
@@ -23,16 +15,14 @@ export const ruTerminalMessages: Messages = {
'terminal.directory.integrationUnavailable': 'Интеграция каталогов PowerShell не готова. Проверьте параметры запуска и политику выполнения.',
'terminal.directory.cmdIntegrationUnavailable': 'Ожидание данных о каталоге от исходного сеанса командной строки.',
'terminal.directory.gitBashIntegrationUnavailable': 'Ожидание доступного каталога исходного сеанса Git Bash.',
'terminal.directory.wslIntegrationUnavailable': 'Ожидание готовности Bash в выбранном дистрибутиве WSL.',
'terminal.directory.cygwinIntegrationUnavailable': 'Ожидание готовности Bash в Cygwin.',
'terminal.directory.nonFilesystem': 'Текущее расположение PowerShell не является каталогом файловой системы.',
'terminal.directory.accessDenied': 'Нет разрешения на просмотр содержимого этого каталога.',
'terminal.directory.busy': 'Дождитесь пустой командной строки.',
'terminal.directory.readFailed': 'Не удалось прочитать каталог. Попробуйте обновить.',
'terminal.directory.changeFailed': 'Не удалось подтвердить смену каталога. Обновите перед повтором.',
'terminal.directory.unsupportedPath': 'Это имя каталога нельзя безопасно передать в терминал.',
'settings.terminal.behavior.contextChips': 'Панель контекста',
'settings.terminal.behavior.contextChips.desc': 'Показывать панель контекста под быстрыми командами в области ввода.',
'settings.terminal.behavior.contextChips': 'Context Chips',
'settings.terminal.behavior.contextChips.desc': 'Показывать панель контекста под быстрыми командами.',
'terminal.toolbar.openSessionLog': 'Открыть журнал сессии',
'terminal.toolbar.sessionLogActions': 'Действия с журналом',
@@ -85,13 +75,13 @@ export const ruTerminalMessages: Messages = {
'terminal.browser.title': 'Браузер',
'terminal.browser.sshOnly': 'Выберите SSH-терминал, чтобы открыть его браузер.',
'terminal.browser.open': 'Открыть браузер',
'terminal.toolbar.availableAfterConnect': 'Нужно подключение',
'terminal.toolbar.availableAfterConnect': 'Доступно после подключения',
'terminal.toolbar.sendYmodem': 'Отправить через YMODEM',
'terminal.toolbar.receiveYmodem': 'Получить через YMODEM',
'terminal.toolbar.more': 'Другие действия',
'terminal.toolbar.scripts': 'Скрипты',
'terminal.toolbar.history': 'История команд',
'terminal.toolbar.configureOsc7': 'Отслеживание каталога',
'terminal.toolbar.configureOsc7': 'Настроить отслеживание каталога',
'history.scope.label': 'Область истории',
'history.tab.host': 'Хост',
'history.tab.global': 'Глобальная',
@@ -246,7 +236,7 @@ export const ruTerminalMessages: Messages = {
'terminal.clipboardImageUpload.noImage': 'В буфере обмена нет изображения',
'terminal.clipboardImageUpload.failed': 'Не удалось загрузить изображение из буфера обмена',
'terminal.selection.addToAI': 'Добавить в чат',
'terminal.selection.addToAIDesc': 'Прикрепить выделенный вывод терминала к черновику сообщения для ИИ',
'terminal.selection.addToAIDesc': 'Прикрепить выбранный вывод терминала к черновику AI',
'terminal.auth.password': 'Пароль',
'terminal.auth.sshKey': 'SSH-ключ',
'terminal.auth.username': 'Имя пользователя',
@@ -283,11 +273,8 @@ export const ruTerminalMessages: Messages = {
'terminal.connection.protocol.ssh': 'SSH',
'terminal.connection.protocol.telnet': 'Telnet',
'terminal.connection.protocol.mosh': 'Mosh',
'terminal.connection.protocol.et': 'EternalTerminal',
'terminal.connection.protocol.plugin': 'Подключение плагина',
'terminal.et.proxyUnsupported': 'EternalTerminal пока не поддерживает настройки прокси Netcatty. Используйте SSH или уберите прокси для этого хоста.',
'terminal.et.multiJumpUnsupported': 'В Netcatty EternalTerminal пока поддерживает только один промежуточный хост.',
'terminal.connection.protocol.serial': 'Последовательный порт',
'terminal.connection.protocol.serial': 'Serial',
'terminal.connection.protocol.local': 'Локальная оболочка',
'terminal.hostKey.unknownTitle': 'Подтвердите этот ключ хоста',
'terminal.hostKey.changedTitle': 'Ключ хоста изменился',
@@ -498,7 +485,6 @@ export const ruTerminalMessages: Messages = {
'cloudSync.localBackups.reason.beforeRestore': 'Перед восстановлением',
'cloudSync.localBackups.versionChange': '{from} -> {to}',
'cloudSync.localBackups.counts': '{hosts} хостов, {keys} ключей, {snippets} сниппетов, {notes} заметок',
'cloudSync.localBackups.aiCounts': '{sessions} чатов ИИ, {settings} настроек',
'cloudSync.localBackups.restore': 'Восстановить',
'cloudSync.localBackups.restoreSuccess': 'Локальная резервная копия восстановлена.',
'cloudSync.localBackups.restoreFailedTitle': 'Ошибка восстановления',
@@ -646,8 +632,6 @@ export const ruTerminalMessages: Messages = {
'keychain.export.script': 'Скрипт *',
'keychain.export.scriptPlaceholder': 'Скрипт экспорта...',
'keychain.export.missingCredentials': 'У хоста нет сохранённого пароля или ключа. Сначала добавьте в хост учётные данные с паролем.',
'keychain.export.missingPublicKey': 'У этого ключа нет публичного ключа. Откройте «Редактировать», вставьте публичный ключ и снова нажмите «Экспортировать и привязать».',
'keychain.export.missingPublicKeyNote': 'У этого ключа нет публичного ключа. Вставьте его в редакторе ключа перед экспортом.',
'keychain.export.successTitle': 'Экспорт выполнен успешно',
'keychain.export.successMessage': 'Публичный ключ экспортирован и привязан к {host}',
'keychain.export.failedTitle': 'Ошибка экспорта',
@@ -724,7 +708,6 @@ export const ruTerminalMessages: Messages = {
'tabs.logPrefix': 'Журнал:',
'tabs.logLocal': 'Локальный',
'tabs.copyTab': 'Копировать вкладку',
'tabs.addSessionToWorkspace': 'Добавить сессию в эту рабочую область',
'tabs.duplicateSession': 'Дублировать сессию',
'tabs.copyTabToNewWindow': 'Копировать вкладку в новое окно',
'tabs.copyTabToNewWindowFailed': 'Не удалось открыть вкладку в новом окне',
@@ -753,8 +736,6 @@ export const ruTerminalMessages: Messages = {
'snippets.action.selectSnippets': 'Выбрать сниппеты',
'snippets.panel.newTitle': 'Новый сниппет',
'snippets.panel.editTitle': 'Редактировать сниппет',
'snippets.panel.newAutomationTitle': 'Новый скрипт автоматизации',
'snippets.panel.editAutomationTitle': 'Редактировать скрипт автоматизации',
'snippets.panel.resizeWidth': 'Изменить ширину панели',
'snippets.field.description': 'Описание действия',
'snippets.field.descriptionPlaceholder': 'Например: проверить сетевую нагрузку',
@@ -781,9 +762,6 @@ export const ruTerminalMessages: Messages = {
'snippets.targets.selectHosts': 'Хосты',
'snippets.targets.selectGroups': 'Группы',
'snippets.targets.noGroups': 'Группы не найдены',
'snippets.targets.allHosts': 'Применять ко всем хостам',
'snippets.targets.allHostsShort': 'Все хосты',
'snippets.targets.allHostsActive': 'Применяется ко всем хостам, к которым можно подключиться.',
'snippets.history.title': 'История оболочки',
'snippets.history.subtitle': '{count} команд',
'snippets.history.emptyTitle': 'История оболочки пока пуста',
@@ -866,7 +844,7 @@ export const ruTerminalMessages: Messages = {
'snippets.shortkey.error.snippetConflict': 'Это сочетание уже используется сниппетом: {name}',
// Serial Port
'serial.button': 'Serial',
'serial.button': 'Серийный',
'serial.modal.title': 'Подключение к последовательному порту',
'serial.modal.desc': 'Настройте параметры подключения к последовательному порту',
'serial.field.port': 'Последовательный порт',
@@ -884,8 +862,8 @@ export const ruTerminalMessages: Messages = {
'serial.parity.none': 'Нет',
'serial.parity.even': 'Чётная',
'serial.parity.odd': 'Нечётная',
'serial.parity.mark': 'Всегда 1 (Mark)',
'serial.parity.space': 'Всегда 0 (Space)',
'serial.parity.mark': 'Mark',
'serial.parity.space': 'Space',
'serial.flowControl.none': 'Нет',
'serial.flowControl.xon/xoff': 'XON/XOFF (программный)',
'serial.flowControl.rts/cts': 'RTS/CTS (аппаратный)',
@@ -1017,12 +995,4 @@ export const ruTerminalMessages: Messages = {
'terminal.browser.allScopeHint': 'В браузерах всех хостов.',
'terminal.browser.downloadLocation': 'Файлы сохраняются в папку «Загрузки»',
'terminal.browser.saveAs': 'Сохранить как…',
'terminal.externalEditor.opened': 'Открыто {path} в {editor}',
'terminal.externalEditor.failed': 'Не удалось открыть в {editor}',
'terminal.externalEditor.prompt.title': 'Открыть в {editor}?',
'terminal.externalEditor.prompt.desc': 'Удалённый хост {host} запросил открытие этого пути в {editor}:',
'terminal.externalEditor.prompt.deny': 'Отклонить',
'terminal.externalEditor.prompt.allowOnce': 'Разрешить один раз',
'terminal.externalEditor.prompt.alwaysTrust': 'Всегда доверять хосту',
'terminal.externalEditor.autoSetupConfigured': 'Команды удалённого редактора настроены ({editor})',
};
+3 -380
View File
@@ -723,7 +723,6 @@ export const ruVaultMessages: Messages = {
// Protocol select dialog
'protocolSelect.chooseProtocol': 'Выберите протокол',
'protocolSelect.rememberDefault': 'Запомнить по умолчанию (больше не спрашивать)',
'protocolSelect.port': 'порт:',
// Host Details
@@ -861,9 +860,6 @@ export const ruVaultMessages: Messages = {
'hostDetails.distro.option.zyxel': 'ZyXEL',
'hostDetails.distro.option.ruijie': 'Ruijie',
'hostDetails.section.mosh': 'Mosh',
'hostDetails.section.et': 'EternalTerminal',
'hostDetails.et.port': 'Порт сервера ET',
'hostDetails.et.port.desc': 'Порт, на котором etserver принимает подключения (по умолчанию 2022)',
'hostDetails.username.placeholder': 'Имя пользователя',
'hostDetails.password.placeholder': 'Пароль',
'hostDetails.password.show': 'Показать пароль',
@@ -942,7 +938,7 @@ export const ruVaultMessages: Messages = {
'hostDetails.section.deviceType': 'Тип устройства',
'hostDetails.deviceType': 'Режим сетевого устройства',
'hostDetails.deviceType.desc': 'Включайте для сетевого оборудования (коммутаторов, маршрутизаторов, межсетевых экранов), подключённого по SSH. Команды отправляются как есть, без обёртки оболочки, что совместимо с CLI вендоров вроде Huawei VRP и Cisco IOS.',
'hostDetails.deviceType.warning': 'Команды агента ИИ будут отправляться напрямую без отслеживания кода выхода. Включайте только для устройств, на которых нет стандартной оболочки.',
'hostDetails.deviceType.warning': 'Команды AI-агента будут отправляться напрямую без отслеживания кода выхода. Включайте только для устройств, на которых нет стандартной оболочки.',
'hostDetails.section.sshAlgorithms': 'SSH-алгоритмы',
'hostDetails.section.terminalBehavior': 'Поведение терминала',
'hostDetails.lineTimestamps': 'Показывать время вывода',
@@ -1028,27 +1024,12 @@ export const ruVaultMessages: Messages = {
'hostDetails.startupCommand': 'Команда запуска',
'hostDetails.startupCommand.placeholder': 'Команда для запуска при подключении (например, cd /app && ls)',
'hostDetails.startupCommand.help':
'Команда выполняется автоматически после подключения по SSH.',
'This command will be executed automatically after SSH connection is established.',
'hostDetails.startupCommand.runMode': 'Многострочный запуск',
'hostDetails.startupCommand.runMode.help': 'Выберите, как отправлять многострочные команды запуска после подключения.',
'hostDetails.startupCommand.runMode.lineDelay': 'Отправлять построчно',
'hostDetails.startupCommand.runMode.paste': 'Отправить сразу',
'hostDetails.otherProtocols': 'Дополнительные протоколы',
'hostDetails.otherProtocolsHint': 'Добавьте вспомогательные способы подключения к этому SSH-хосту без смены основного протокола',
'hostDetails.protocol.defaultHint': 'По умолчанию при двойном клике ({protocol})',
'hostDetails.protocol.secondaryHint': 'Включён как дополнительный протокол',
'hostDetails.protocol.setDefault': 'Сделать основным',
'hostDetails.protocol.remove': 'Удалить',
'hostDetails.protocol.doubleClick': 'По двойному клику',
'hostDetails.protocol.connectOptionDefault': 'По умолчанию: {protocol}',
'hostDetails.protocol.connectOptionAsk': 'Спрашивать каждый раз',
'hostDetails.protocol.alsoEnable': 'Также включить',
'hostDetails.protocol.removeProtocol': 'Удалить {protocol}',
'hostDetails.protocol.addProtocol': 'Добавить {protocol}',
'hostDetails.section.connectBehavior': 'Поведение подключения',
'hostDetails.protocol.notEnabledDesc': 'Протокол {protocol} ещё не включён для этого хоста.',
'hostDetails.protocol.addSecondary': 'Добавить {protocol} (оставить {defaultProtocol})',
'hostDetails.protocol.switchOnly': 'Использовать только {protocol}',
'hostDetails.otherProtocols': 'Другие протоколы',
'hostDetails.telnetOn': 'Telnet на',
'hostDetails.port': 'порт',
'hostDetails.telnet.credentials': 'Учётные данные',
@@ -1128,362 +1109,4 @@ export const ruVaultMessages: Messages = {
'vault.import.plugins.moreItems': 'В импорт включено ещё элементов: {count}.',
'vault.import.plugins.moreDiagnostics': 'В предварительном просмотре скрыто ещё сообщений: {count}.',
// Remote Desktop (VNC / RDP / JumpServer RDP)
'vault.hosts.newRdpHost': 'Новый хост RDP',
'vault.hosts.newVncHost': 'Новый хост VNC',
'vault.hosts.connectRdp': 'Подключить RDP',
'vault.hosts.connectSsh': 'Подключить SSH',
'vault.hosts.connectVnc': 'Подключить VNC',
'vault.hosts.openInSystemRdp': 'Открыть в системном RDP',
'vault.hosts.openInSystemVnc': 'Открыть в системном VNC',
'settings.jmsDeepLink.rdpLaunchMode': 'Открывать JumpServer RDP в',
'settings.jmsDeepLink.rdpLaunchModeDesc': 'Выберите, открывать ли RDP-сессии JumpServer jms:// во встроенном клиенте Netcatty или в системном RDP-клиенте.',
'settings.jmsDeepLink.rdpLaunchMode.builtin': 'Встроенный клиент',
'settings.jmsDeepLink.rdpLaunchMode.system': 'Системный клиент RDP',
'vault.import.rdp.label': 'RDP (.rdp)',
'vault.import.rdp.hint': 'Импорт одного или нескольких файлов Microsoft / JumpServer .rdp.',
'vault.import.remoteDesktopTip': 'Импорт MobaXterm, CSV и .rdp также поддерживает хосты RDP и VNC.',
'keychain.identity.domain': 'Домен (RDP, необязательно)',
'keychain.identity.domainPlaceholder': 'CORP или домен AD',
'quickConnect.rdp.domain': 'Домен (необязательно)',
'quickConnect.rdp.domainPlaceholder': 'CORP или оставьте пустым для локальной учётной записи',
'quickConnect.vnc.optionalUsername': 'Имя пользователя (необязательно, для Apple ARD / VeNCrypt)',
'quickConnect.vnc.optionalUsernameHint': 'Большинство серверов VNC требуют только пароль.',
'quickConnect.vnc.passwordHint': 'Оставьте пустым, если сервер VNC не требует аутентификации.',
'quickConnect.vnc.displayHelper': 'Дисплей {display}',
'hostDetails.protocol.label': 'Протокол',
'hostDetails.rdp.portLabel': 'RDP на',
'hostDetails.vnc.portLabel': 'VNC на',
'hostDetails.vnc.displayHint': 'Дисплей {display}',
'hostDetails.vnc.displayPlaceholder': '5900 или :0',
'hostDetails.rdp.domain': 'Домен (необязательно)',
'hostDetails.rdp.domainPlaceholder': 'CORP (необязательно)',
'hostDetails.rdp.domainLabel': 'Домен',
'hostDetails.rdp.usernamePlaceholder': 'Имя пользователя, DOMAIN\\user или JumpServer user|uuid',
'hostDetails.vnc.optionalUsername': 'Имя пользователя (Apple ARD / VeNCrypt)',
'hostDetails.vnc.optionalUsernameHint': 'Необязательно. Стандартный VNC использует только пароль.',
'hostDetails.vnc.usernamePlaceholder': 'Имя пользователя (необязательно)',
'hostDetails.remoteDesktop.sectionTitle': 'Экран и параметры удалённого рабочего стола',
'hostDetails.rdp.resolutionMode': 'Режим разрешения',
'hostDetails.rdp.resolutionMode.dynamic': 'Динамический размер',
'hostDetails.rdp.resolutionMode.fit': 'По размеру окна',
'hostDetails.rdp.resolutionMode.fixed': 'Фиксированный размер',
'hostDetails.rdp.width': 'Ширина',
'hostDetails.rdp.height': 'Высота',
'hostDetails.rdp.dimensionHint': 'Введите целое число от 200 до 8192.',
'hostDetails.rdp.colorDepth': 'Глубина цвета',
'hostDetails.rdp.audio': 'Вывод звука',
'hostDetails.rdp.audioDesc': 'Воспроизводить звук удалённого рабочего стола локально',
'hostDetails.rdp.clipboard': 'Синхронизация буфера обмена',
'hostDetails.rdp.clipboardDesc': 'Обмен текстом и изображениями с удалённым рабочим столом',
'hostDetails.rdp.clipboardFiles': 'Передача файлов через буфер обмена',
'hostDetails.rdp.clipboardFilesDesc': 'Разрешить копирование и перетаскивание файлов через буфер обмена',
'hostDetails.rdp.securityMode': 'Режим безопасности',
'hostDetails.rdp.securityMode.auto': 'Авто',
'hostDetails.rdp.securityMode.nla': 'NLA (CredSSP)',
'hostDetails.rdp.securityMode.tls': 'TLS',
'hostDetails.rdp.securityMode.rdp': 'Стандартный RDP',
'hostDetails.rdp.ignoreCertErrors': 'Игнорировать ошибки сертификатов',
'hostDetails.rdp.ignoreCertErrorsDesc': 'Пропускать проверку доверия TLS-сертификатов (не рекомендуется)',
'hostDetails.rdp.advanced': 'Дополнительные параметры RDP',
'hostDetails.rdp.loadBalanceInfo': 'Информация балансировки (Load Balance Info)',
'hostDetails.rdp.loadBalanceInfoPlaceholder': 'tsv://MS Terminal Services Plugin.1.Collection',
'hostDetails.rdp.alternateShell': 'Альтернативная оболочка',
'hostDetails.rdp.alternateShellPlaceholder': 'Необязательный путь к программе запуска',
'hostDetails.rdp.shellWorkingDir': 'Рабочий каталог',
'hostDetails.rdp.shellWorkingDirPlaceholder': 'Необязательный рабочий каталог запуска',
'hostDetails.vnc.scalingMode': 'Масштабирование',
'hostDetails.vnc.scalingMode.fit': 'По размеру окна',
'hostDetails.vnc.scalingMode.actual': 'Исходный (1:1)',
'hostDetails.vnc.scalingMode.stretch': 'Растянуть',
'hostDetails.vnc.scalingMode.dynamic': 'Динамический размер',
'hostDetails.vnc.quality': 'Качество изображения',
'hostDetails.vnc.compression': 'Уровень сжатия',
'hostDetails.vnc.viewOnly': 'Только просмотр',
'hostDetails.vnc.viewOnlyDesc': 'Отключить передачу ввода мыши и клавиатуры',
'hostDetails.vnc.sharedSession': 'Совместная сессия',
'hostDetails.vnc.sharedSessionDesc': 'Не отключать другие VNC-клиенты',
'hostDetails.vnc.clipboard': 'Синхронизация буфера обмена',
'hostDetails.vnc.clipboardDesc': 'Синхронизировать текст UTF-8 с удалённым рабочим столом',
'hostDetails.vnc.showRemoteCursor': 'Показывать удалённый курсор',
'hostDetails.vnc.showRemoteCursorDesc': 'Отображать курсор, передаваемый сервером',
'hostDetails.companion.addVnc': 'Добавить VNC',
'hostDetails.companion.addRdp': 'Добавить RDP',
'hostDetails.companion.tunnelViaSsh': 'Туннель через SSH этого хоста',
'hostDetails.companion.tunnelViaSshDesc': 'Автоматическая переадресация через SSH-подключение этого хоста',
'hostDetails.companion.tunnelTargetHost': 'Удалённый целевой адрес',
'hostDetails.companion.credentialsSource': 'Учётные данные',
'hostDetails.companion.credentials.host': 'Использовать SSH-данные хоста',
'hostDetails.companion.credentials.manual': 'Свой логин и пароль',
'hostDetails.companion.credentials.manualHint': 'Безопасно сохранится в связке ключей при сохранении хоста',
'hostDetails.companion.credentials.identity': 'Учётные данные из связки',
'hostDetails.companion.credentials.ask': 'Спрашивать при подключении',
'hostDetails.companion.identityPlaceholder': 'Выберите сохранённую учётную запись',
'hostDetails.companion.saveAsIdentity': 'Сохранить как учётную запись',
'hostDetails.companion.saveIdentityAction': 'Создать и выбрать',
'hostDetails.companion.identityLabelPlaceholder': 'Название (например, Desktop VNC)',
'hostDetails.companion.identitySaved': 'Учётная запись сохранена и выбрана.',
'hostDetails.companion.setDefaultRdp': 'Подключаться по RDP по умолчанию',
'hostDetails.companion.setDefaultVnc': 'Подключаться по VNC по умолчанию',
// Known Hosts — Remote Desktop TLS Certificates
'knownHosts.tabs.ssh': 'Ключи хостов SSH',
'knownHosts.tabs.remoteDesktopCerts': 'Сертификаты удалённого рабочего стола',
'knownHosts.certs.clearAll': 'Очистить все',
'knownHosts.certs.expired': 'Истёк',
'knownHosts.certs.expiredNotice': 'Срок действия этого сертификата истёк.',
'knownHosts.certs.copied': 'Отпечаток SHA-256 скопирован',
'knownHosts.certs.action.inspect': 'Просмотреть сертификат',
'knownHosts.certs.action.copyFingerprint': 'Копировать SHA-256',
'knownHosts.certs.action.revoke': 'Отозвать доверие',
'knownHosts.certs.empty.title': 'Нет доверенных сертификатов удалённого рабочего стола',
'knownHosts.certs.empty.desc': 'TLS-сертификаты, которым вы доверились при подключении к хостам RDP или VeNCrypt VNC, появятся здесь.',
'knownHosts.certs.empty.searchTitle': 'Подходящие сертификаты не найдены',
'knownHosts.certs.empty.searchDesc': 'Попробуйте другой хост, порт, протокол или отпечаток SHA-256.',
'knownHosts.certs.detail.subtitle': 'Закреплённый TLS-сертификат на этом устройстве (TOFU)',
'knownHosts.certs.detail.fingerprint': 'Отпечаток SHA-256',
'knownHosts.certs.detail.subject': 'Субъект',
'knownHosts.certs.detail.issuer': 'Издатель',
'knownHosts.certs.detail.validFrom': 'Действителен с',
'knownHosts.certs.detail.validTo': 'Действителен до',
'knownHosts.certs.detail.trustedAt': 'Доверен с',
'knownHosts.certs.detail.lastSeen': 'Последнее подключение',
'knownHosts.certs.revokeConfirm.title': 'Отозвать сертификат для {endpoint}?',
'knownHosts.certs.revokeConfirm.desc': 'При следующем подключении потребуется повторно подтвердить TLS-сертификат этого сервера.',
'knownHosts.certs.clearAllConfirm.title': 'Очистить все доверенные сертификаты удалённого рабочего стола?',
'knownHosts.certs.clearAllConfirm.desc': 'Будет отозвано доверие для всех закреплённых сертификатов RDP/VNC ({count}) на этом устройстве.',
'knownHosts.certs.toast.revoked': 'Доверие к сертификату отозвано',
'knownHosts.certs.toast.clearedAll': 'Очищено сертификатов удалённого рабочего стола: {count}',
// Host Connection Test — RDP / VNC Probe
'hostDetails.connectionTest.rdp': 'Проверить RDP',
'hostDetails.connectionTest.vnc': 'Проверить VNC',
'hostDetails.connectionTest.probe.rtt': 'Задержка (RTT)',
'hostDetails.connectionTest.probe.protocol': 'Протокол',
'hostDetails.connectionTest.probe.security': 'Согласованная защита',
'hostDetails.connectionTest.probe.rfbVersion': 'Версия RFB',
'hostDetails.connectionTest.probe.securityTypes': 'Типы аутентификации',
'hostDetails.connectionTest.probe.tls': 'TLS',
'hostDetails.connectionTest.probe.fingerprint': 'Отпечаток SHA-256',
'hostDetails.connectionTest.probe.trustStatus.trusted': 'Доверенный',
'hostDetails.connectionTest.probe.trustStatus.firstSeen': 'Впервые встречен',
'hostDetails.connectionTest.probe.trustStatus.changed': 'Изменён',
'hostDetails.connectionTest.probe.trustFingerprint': 'Доверять отпечатку',
'hostDetails.connectionTest.probe.fingerprintTrusted': 'Отпечаток сертификата добавлен в доверенные',
// Remote Desktop Toolbar — SFTP, CLIPRDR, Recording, Ask AI
'remoteDesktop.toolbar.keysLocal': 'Клавиши: локально',
'remoteDesktop.toolbar.keysRemote': 'Клавиши: удалённо',
'remoteDesktop.toolbar.keysLocalTip': 'Локальные сочетания вкладок и окон активны. Нажмите, чтобы перехватывать сочетания для удалённого рабочего стола.',
'remoteDesktop.toolbar.keysRemoteTip': 'Сочетания приложения передаются на удалённый компьютер. Нажмите Ctrl+Alt+Shift или дважды правый Alt/Option для освобождения.',
'remoteDesktop.toolbar.sendKeys': 'Отправить клавиши',
'remoteDesktop.toolbar.specialKeys': 'Специальные сочетания',
'remoteDesktop.toolbar.typeClipboard': 'Ввести буфер обмена как нажатия клавиш',
'remoteDesktop.toolbar.linuxTty': 'Виртуальные консоли Linux',
'remoteDesktop.toolbar.osChordNote': 'Системные сочетания (Alt+Tab, Cmd+Tab, Ctrl+Alt+Del) перехватываются локальной ОС и отправляются через это меню.',
'remoteDesktop.toolbar.display': 'Масштаб экрана',
'remoteDesktop.toolbar.sshTunneled': 'Туннель через SSH',
'remoteDesktop.toolbar.encrypted': 'Шифрованное TLS-соединение',
'remoteDesktop.toolbar.standardRdpSecurity': 'Стандартная безопасность RDP ({{cipher}})',
'remoteDesktop.rdp.fallbackStandardRdp': 'Подключено через стандартную безопасность RDP.',
'remoteDesktop.rdp.fallbackStandardRdpWithCipher': 'Подключено через стандартную безопасность RDP ({{cipher}}).',
'remoteDesktop.toolbar.viewOnly': 'Режим «Только просмотр»',
'remoteDesktop.toolbar.viewOnlyBadge': 'Просмотр',
'remoteDesktop.toolbar.audio': 'Звук RDP',
'remoteDesktop.toolbar.mute': 'Выкл. звук',
'remoteDesktop.toolbar.unmute': 'Вкл. звук',
'remoteDesktop.toolbar.clipboard': 'Синхронизация буфера обмена',
'remoteDesktop.toolbar.clipboardSync': 'Синхронизация буфера обмена',
'remoteDesktop.toolbar.clipboardFiles': 'Файлы буфера обмена RDP',
'remoteDesktop.toolbar.clipboardFilesHint': 'Скопируйте файлы на удалённом компьютере для скачивания или перетащите локальные файлы на рабочий стол.',
'remoteDesktop.toolbar.saveFile': 'Сохранить файл',
'remoteDesktop.toolbar.options': 'Качество и параметры ввода',
'remoteDesktop.toolbar.quality': 'Качество кодирования',
'remoteDesktop.toolbar.screenshot': 'Снимок экрана',
'remoteDesktop.toolbar.copyScreenshot': 'Копировать PNG в буфер',
'remoteDesktop.toolbar.saveScreenshot': 'Сохранить снимок PNG',
'remoteDesktop.toolbar.fullscreen': 'Полный экран',
'remoteDesktop.toolbar.exitFullscreen': 'Выйти из полного экрана',
'remoteDesktop.toolbar.pin': 'Закрепить панель',
'remoteDesktop.toolbar.unpin': 'Открепить панель',
'remoteDesktop.toolbar.popOut': 'Открыть в новом окне',
'remoteDesktop.toolbar.reconnect': 'Переподключиться',
'remoteDesktop.toolbar.disconnect': 'Отключиться',
'remoteDesktop.toolbar.openSystemRdp': 'Открыть в системном RDP',
'remoteDesktop.toolbar.openSystemVnc': 'Открыть в общем экране',
'remoteDesktop.display.dynamic': 'Динамический размер',
'remoteDesktop.display.fit': 'По размеру окна',
'remoteDesktop.display.actual': '1:1 исходный размер',
'remoteDesktop.display.stretch': 'Растянуть',
'remoteDesktop.display.highDpi': 'Retina HiDPI',
'remoteDesktop.display.unsupported': 'Не поддерживается',
'remoteDesktop.toolbar.mapCmdToCtrl': 'Сопоставить Cmd → Ctrl',
'remoteDesktop.toolbar.showRemoteCursor': 'Показывать удалённый курсор',
'remoteDesktop.toolbar.refreshScreen': 'Принудительно обновить экран',
'remoteDesktop.xvp.title': 'Питание сервера (XVP)',
'remoteDesktop.xvp.reboot': 'Перезагрузить',
'remoteDesktop.xvp.shutdown': 'Выключить',
'remoteDesktop.xvp.reset': 'Жёсткий сброс',
'remoteDesktop.vnc.bell': 'Звуковой сигнал удалённого рабочего стола',
'remoteDesktop.toolbar.moreActions': 'Ещё действия',
'remoteDesktop.clipboard.pushNow': 'Отправить локальный буфер обмена',
'remoteDesktop.clipboard.pushed': 'Локальный буфер обмена синхронизирован с удалённым',
'remoteDesktop.disconnected.title': 'Сессия отключена',
'remoteDesktop.auth.reenter': 'Учётные данные',
'remoteDesktop.auth.cancelled': 'Аутентификация отменена.',
'remoteDesktop.cert.rejected': 'TLS-сертификат отклонён пользователем.',
'remoteDesktop.step.bastion': 'Бастион',
'remoteDesktop.step.network': 'Сеть',
'remoteDesktop.step.nla': 'Аутентификация NLA',
'remoteDesktop.step.rfb': 'Аутентификация RFB',
'remoteDesktop.step.desktop': 'Рабочий стол',
'remoteDesktop.display.resolutionPresets': 'Пресеты разрешения',
'remoteDesktop.display.customWidth': 'Ширина',
'remoteDesktop.display.customHeight': 'Высота',
'remoteDesktop.display.applyResolution': 'Применить',
'remoteDesktop.display.multiMonitor': 'Мультимониторная раскладка',
'remoteDesktop.display.monitorSingle': 'Один монитор',
'remoteDesktop.display.monitorDual': 'Два рядом',
'remoteDesktop.display.monitorAllLocal': 'Как локальные мониторы',
'remoteDesktop.display.monitorAllLocalCount': 'Как локальные мониторы ({count})',
'remoteDesktop.display.monitorSwitcher': 'Переключить активный монитор',
'remoteDesktop.display.monitorAll': 'Все',
'remoteDesktop.sharedFolders.title': 'Общие папки (RDPDR)',
'remoteDesktop.sharedFolders.add': 'Добавить папку',
'remoteDesktop.sharedFolders.empty': 'Подключите локальную папку как виртуальный диск на удалённом рабочем столе Windows.',
'remoteDesktop.sharedFolders.remove': 'Удалить папку',
'remoteDesktop.sharedFolders.readOnly': 'Только чтение',
'remoteDesktop.sharedFolders.hint': 'Windows: Этот компьютер → <Папка> на Netcatty (\\\\tsclient\\<Имя>). Хранится только локально, без синхронизации.',
'remoteDesktop.sharedFolders.duplicate': 'Эта папка уже добавлена',
'remoteDesktop.sharedFolders.mounted': 'Папка «{name}» подключена к удалённому рабочему столу',
'remoteDesktop.sharedFolders.unmounted': 'Папка «{name}» отключена',
'remoteDesktop.network.title': 'Телеметрия соединения',
'remoteDesktop.network.latency': 'Задержка',
'remoteDesktop.network.resolution': 'Разрешение',
'remoteDesktop.network.downlink': 'Загрузка (RX)',
'remoteDesktop.network.uplink': 'Отдача (TX)',
'remoteDesktop.network.totalRx': 'Всего RX',
'remoteDesktop.network.totalTx': 'Всего TX',
'remoteDesktop.network.tlsEncrypted': 'TLS',
'remoteDesktop.network.quality.excellent': 'Отлично',
'remoteDesktop.network.quality.good': 'Хорошо',
'remoteDesktop.network.quality.fair': 'Средне',
'remoteDesktop.network.quality.poor': 'Плохо',
'remoteDesktop.network.quality.unknown': 'Измерение',
'remoteDesktop.ai.controllingBanner': 'Catty управляет · Нажмите на экран или Esc, чтобы перехватить управление',
'remoteDesktop.ai.stopControl': 'Стоп',
'remoteDesktop.ai.preempted': 'Управление ИИ приостановлено — вы перехватили управление',
'remoteDesktop.ai.preemptedStopped': 'Управление ИИ остановлено — вы перехватили управление',
'remoteDesktop.ai.audit.menuItem': 'Журнал аудита управления ИИ',
'remoteDesktop.ai.audit.title': 'Журнал аудита управления ИИ',
'remoteDesktop.ai.audit.subtitleHost': 'Действия мыши и клавиатуры, выполненные ИИ на этом удалённом рабочем столе.',
'remoteDesktop.ai.audit.subtitleAll': 'Локальный буфер последних 500 действий ИИ на удалённом рабочем столе (секреты скрыты).',
'remoteDesktop.ai.audit.searchPlaceholder': 'Фильтр по действию, хосту или коду ошибки...',
'remoteDesktop.ai.audit.scopeSession': 'Эта сессия',
'remoteDesktop.ai.audit.scopeAll': 'Все',
'remoteDesktop.ai.audit.filterAll': 'Все',
'remoteDesktop.ai.audit.filterOk': 'ОК',
'remoteDesktop.ai.audit.filterPreempted': 'Перехват',
'remoteDesktop.ai.audit.filterIssues': 'Блок/Ошибки',
'remoteDesktop.ai.audit.empty': 'Действий ИИ на удалённом рабочем столе пока не зафиксировано.',
'remoteDesktop.ai.audit.outcomeOk': 'ОК',
'remoteDesktop.ai.audit.outcomePreempted': 'Перехвачено',
'remoteDesktop.ai.audit.outcomeBlocked': 'Заблокировано',
'remoteDesktop.ai.audit.outcomeDenied': 'Отклонено',
'remoteDesktop.ai.audit.outcomeError': 'Ошибка',
'remoteDesktop.ai.audit.copyJson': 'Копировать JSON',
'remoteDesktop.ai.audit.copied': 'Скопировано',
'remoteDesktop.ai.audit.clear': 'Очистить',
'remoteDesktop.toolbar.openSftp': 'SFTP',
'remoteDesktop.toolbar.record': 'Записать сессию',
'remoteDesktop.toolbar.stopRecording': 'Остановить запись',
'remoteDesktop.toolbar.savingRecording': 'Сохранение...',
'remoteDesktop.toolbar.recording': 'Запись',
'remoteDesktop.toolbar.askAi': 'Спросить ИИ',
'remoteDesktop.toolbar.askAiFull': 'Снять экран и спросить ИИ',
'remoteDesktop.toolbar.askAiRegion': 'Выбрать область и спросить ИИ',
'remoteDesktop.toolbar.aiReadAllowed': 'Чтение экрана ИИ разрешено',
'remoteDesktop.toolbar.aiReadBlocked': 'Чтение экрана ИИ запрещено для этой сессии',
'remoteDesktop.toolbar.aiReadingBanner': 'ИИ просматривает экран',
'remoteDesktop.clipboard.dropTitle': 'Перетащите файлы для отправки в удалённый буфер обмена (CLIPRDR)',
'remoteDesktop.clipboard.dropSubtitle': 'После перетаскивания нажмите Ctrl+V на удалённом рабочем столе',
'remoteDesktop.clipboard.dropFileCount': 'Файлов: {count}',
'remoteDesktop.clipboard.dropBlockedViewOnly': 'Перетаскивание файлов отключено в режиме «Только просмотр»',
'remoteDesktop.clipboard.dropBlockedDisabled': 'Передача файлов через буфер обмена отключена для этого хоста',
'remoteDesktop.clipboard.dropFolderUnsupported': 'Папки не поддерживаются буфером обмена RDP. Используйте SFTP или упакуйте их в .zip.',
'remoteDesktop.clipboard.stagedPill': 'Файлов: {count} · Ctrl+V',
'remoteDesktop.clipboard.sendLocalFiles': 'Выбрать локальные файлы...',
'remoteDesktop.clipboard.uploading': 'Отправка через буфер обмена',
'remoteDesktop.clipboard.downloading': 'Получение через буфер обмена',
'remoteDesktop.clipboard.transferCompleted': 'Передача файлов через буфер обмена завершена',
'remoteDesktop.clipboard.transferFailed': 'Ошибка передачи файлов через буфер обмена',
'remoteDesktop.recording.started': 'Запись сессии начата',
'remoteDesktop.recording.saved': 'Запись сессии сохранена в журналах подключений',
'remoteDesktop.recording.failed': 'Ошибка записи сессии',
'remoteDesktop.recording.unsupported': 'Запись сессий не поддерживается в этой среде',
// LogView — Remote Desktop Recordings & Metadata
'logView.recording.download': 'Скачать .webm',
'logView.recording.delete': 'Удалить запись',
'logView.recording.loading': 'Загрузка записи сессии...',
'logView.recording.withAudio': 'Звук',
'logView.recording.missingTitle': 'Файл записи отсутствует на диске',
'logView.recording.missingDesc': 'Этот файл .webm был удалён, очищен по сроку хранения или перемещён из папки записей.',
'logView.recording.playbackErrorTitle': 'Не удалось воспроизвести запись',
'logView.recording.playbackErrorDesc': 'Видеофайл может быть повреждён или не поддерживается встроенным плеером.',
'logView.recording.exportSuccess': 'Запись экспортирована',
'logView.recording.exportFailed': 'Не удалось экспортировать запись',
'logView.recording.deleted': 'Запись удалена',
'logView.recording.deleteFailed': 'Не удалось удалить запись',
'logView.recording.deleteConfirmTitle': 'Удалить эту запись сессии?',
'logView.recording.deleteConfirmDesc': 'Видеофайл .webm будет безвозвратно удалён с диска. Сама запись в журнале подключений сохранится.',
'logView.remoteDesktop.noRecordingSubtitle': 'Для этой сессии видеозапись экрана не велась',
'logView.remoteDesktop.host': 'Хост',
'logView.remoteDesktop.protocol': 'Протокол',
'logView.remoteDesktop.user': 'Пользователь',
'logView.remoteDesktop.started': 'Начало',
'logView.remoteDesktop.ended': 'Окончание',
'logView.remoteDesktop.duration': 'Длительность',
'logView.remoteDesktop.resolution': 'Разрешение',
'logView.remoteDesktop.security': 'Безопасность',
'logView.remoteDesktop.disconnectReason': 'Причина отключения',
'logView.remoteDesktop.timeline': 'Хронология сессии',
'logView.remoteDesktop.recordingTip': 'Нажмите «Записать сессию» на панели удалённого рабочего стола или включите автозапись в Настройки → Система, чтобы сохранять повторы .webm.',
'logs.recording.clipsCount': 'Клипов: {count}',
'logs.filter.all': 'Все',
'logs.filter.terminal': 'Терминал',
'logs.filter.remoteDesktop': 'Удалённый рабочий стол',
'logs.filter.recorded': 'С записью',
'logs.filter.emptyTitle': 'Нет подходящих журналов',
'logs.filter.emptyDesc': 'Для выбранного фильтра пока нет записей подключений.',
// Settings -> System -> Remote Desktop Recordings
'settings.remoteDesktopRecordings.title': 'Записи удалённого рабочего стола',
'settings.remoteDesktopRecordings.autoRecord': 'Автозапись сессий удалённого рабочего стола',
'settings.remoteDesktopRecordings.autoRecordDesc': 'Автоматически начинать запись RDP и VNC после подключения (выключено по умолчанию для экономии места).',
'settings.remoteDesktopRecordings.fps': 'Частота кадров записи',
'settings.remoteDesktopRecordings.fpsDesc': 'Более высокая частота делает видео плавнее, но увеличивает нагрузку на ЦП и размер файлов.',
'settings.remoteDesktopRecordings.fpsOption': '{fps} кадр/с',
'settings.remoteDesktopRecordings.includeAudio': 'Включать звук RDP',
'settings.remoteDesktopRecordings.includeAudioDesc': 'Записывать звук удалённого рабочего стола в видео .webm, если он доступен.',
'settings.remoteDesktopRecordings.maxStorage': 'Лимит места на диске',
'settings.remoteDesktopRecordings.maxStorageDesc': 'Самые старые несохранённые записи автоматически удаляются при превышении лимита.',
'settings.remoteDesktopRecordings.retentionDays': 'Срок хранения',
'settings.remoteDesktopRecordings.retentionDaysDesc': 'Автоматически удалять несохранённые записи старше указанного срока.',
'settings.remoteDesktopRecordings.retentionDaysOption': '{days} дн.',
'settings.remoteDesktopRecordings.retentionUnlimited': 'Без ограничений',
'settings.remoteDesktopRecordings.storageUsage': 'Локальное хранилище записей',
'settings.remoteDesktopRecordings.storageUsageSummary': 'Файлов: {count} · {size}',
'settings.remoteDesktopRecordings.storageUsageLoading': 'Подсчёт занятого места...',
'settings.remoteDesktopRecordings.refresh': 'Обновить статистику',
'settings.remoteDesktopRecordings.openFolder': 'Открыть папку',
'settings.remoteDesktopRecordings.clearAll': 'Очистить все записи',
'settings.remoteDesktopRecordings.clearAllConfirmTitle': 'Очистить все записи удалённого рабочего стола?',
'settings.remoteDesktopRecordings.clearAllConfirmDesc': 'С этого устройства будут безвозвратно удалены файлы .webm ({count}).',
'settings.remoteDesktopRecordings.clearResult': 'Удалено файлов записей: {count}.',
'settings.remoteDesktopRecordings.hint': 'Записи хранятся только локально на этом устройстве и не синхронизируются с облаком. Закреплённые журналы защищены от автоматической очистки.',
'sftp.context.openInExternalEditor': 'Открыть в {editor}',
'hostDetails.externalEditorShellIntegration': 'Включить команды внешнего редактора в этой сессии',
'hostDetails.externalEditorShellIntegration.desc': 'Добавляет `zed` / `ncedit` из ~/.netcatty/bin в PATH только для этой сессии терминала Netcatty (включая tmux), не изменяя ~/.bashrc и ~/.zshrc.',
};
@@ -304,20 +304,3 @@ test("localized settings include SFTP tree folder double-click labels across all
}
}
});
test("localized settings include autocomplete show code snippets labels across all locales", () => {
const keys = [
"settings.terminal.autocomplete.showSnippets",
"settings.terminal.autocomplete.showSnippets.desc",
];
for (const locale of ALL_SETTINGS_LOCALES) {
const missing = keys.filter((key) => !locale.messages[key]);
assert.deepEqual(missing, [], `${locale.name} is missing autocomplete showSnippets labels`);
if (locale.name !== "en") {
for (const key of keys) {
assert.notEqual(locale.messages[key], en[key], `${locale.name}: ${key} should be translated`);
}
}
}
});
-71
View File
@@ -117,9 +117,6 @@ export const zhCNAiMessages: Messages = {
'ai.codex.appServer.available': '当前 Codex CLI 支持 App Server。',
'ai.codex.appServer.modelCatalogWarning': 'Codex 动态模型目录暂不可用,当前将使用内置模型列表。',
'ai.codex.appServer.approval.allowSession': '本会话允许',
'ai.planReview.title': '审核实施方案',
'ai.planReview.keepPlanning': '继续规划',
'ai.planReview.approveAndImplement': '批准并实施',
'ai.codex.appServer.userInput.title': 'Codex 需要你的输入',
'ai.codex.appServer.userInput.description': '回答以下问题以继续当前任务。',
'ai.codex.appServer.userInput.other': '输入其他答案',
@@ -308,16 +305,6 @@ export const zhCNAiMessages: Messages = {
'ai.opencode.v2.mcpSkipped': 'OpenCode 2 无法接入 MCP 工具,对话会继续,但没有该工具。',
// AI MiMo Code(小米 MiMo Code CLI,OpenCode 分支)
'ai.agy.title': 'Antigravity CLI(Beta)',
'ai.agy.description': 'Beta 测试中:通过官方 Agent Client Protocol(agy acp --stdio)接入 Google Antigravity CLI。当前支持程度有限且未经充分测试,使用请自担风险。请在终端完成 agy 登录后再作为外部编程 Agent 使用。',
'ai.agy.detecting': '检测中...',
'ai.agy.detected': '已检测到',
'ai.agy.notFound': '未找到',
'ai.agy.path': '路径:',
'ai.agy.notFoundHint': '在 PATH 中未找到 agy。请安装 Antigravity CLI 或在下方指定可执行文件路径。',
'ai.agy.customPathPlaceholder': '例如 /usr/local/bin/agy',
'ai.agy.check': '检查',
'ai.agy.resetPath': '重置',
'ai.mimo.title': 'MiMo Code',
'ai.mimo.description': '小米 MiMo Code CLI(OpenCode 分支)。安装后在它自己的配置里配置 provider 和密钥,检测到后即可作为外部编程 Agent 使用。',
'ai.mimo.detecting': '检测中...',
@@ -341,9 +328,6 @@ export const zhCNAiMessages: Messages = {
'ai.grok.check': '检查',
'ai.grok.resetPath': '重置',
'ai.grok.runtime.acp.title': '使用 Grok ACP(agent stdio)',
'ai.grok.userQuestion.title': 'Grok 正在等待你的回答',
'ai.grok.userQuestion.description': '回答不会改变权限。请勿填写密码或令牌。',
'ai.grok.userQuestion.submit': '发送回答',
'ai.grok.runtime.acp.default': '默认',
'ai.grok.runtime.acp.description':
'通过 Agent Client Protocol(grok agent stdio)接入 Grok。在 session/new 注入 Netcatty MCP。关闭后使用原始 headless streaming-json CLI 路径。',
@@ -645,25 +629,12 @@ export const zhCNAiMessages: Messages = {
'ai.chat.managerRebindPick': '选择目标终端或工作区…',
'ai.chat.managerRebindHere': '当前面板',
'ai.chat.managerRebindDone': '已将“{title}”移动到 {target}。',
'ai.chat.managerToggleSelection': '选择会话',
'ai.chat.managerSelectAll': '全选',
'ai.chat.managerSelectedCount': '已选 {n} 个',
'ai.chat.managerSelectRow': '选择此会话',
'ai.chat.managerRegenerateTitle': '用 AI 重新生成标题',
'ai.chat.managerRegenerateTitleUpdated': '会话标题已更新。',
'ai.chat.managerRegenerateTitleUnchanged': '会话标题已是最新。',
'ai.chat.managerRegenerateTitleNoModel': '未配置用于生成标题的 AI 模型,请在 AI 设置中配置提供商或标题模型。',
'ai.chat.managerRegenerateTitleFailed': '重新生成标题失败:{error}',
'ai.chat.managerRegenerateTitleBatchDone': '已更新 {n} 个会话标题。',
'ai.chat.managerRegenerateTitleBatchPartial': '已更新 {updated} 个标题,{failed} 个失败。',
'ai.chat.managerExportOne': '导出此会话',
'ai.chat.managerBadgeActive': '使用中',
'ai.chat.managerBadgeIdle': '空闲',
'ai.chat.managerMessagesCount': '{n} 条消息',
'ai.chat.managerDeleteTitle': '删除此会话?',
'ai.chat.managerDeleteMessage': '“{title}”及其消息将从所有面板中移除,且无法撤销。',
'ai.chat.managerBulkDeleteTitle': '删除选中的 {n} 个会话?',
'ai.chat.managerBulkDeleteMessage': '选中的 {n} 个会话及其消息将从所有面板中移除,且无法撤销。',
'ai.chat.justNow': '刚刚',
'ai.chat.minutesAgo': '{n}分钟前',
'ai.chat.hoursAgo': '{n}小时前',
@@ -714,25 +685,9 @@ export const zhCNAiMessages: Messages = {
'ai.chatShortcuts.selectionAction': '选中终端内容时显示“添加到对话”',
'ai.chatShortcuts.selectionAction.description': '在终端里选中文本后显示 AI 快捷按钮。',
'ai.chatHistory.title': '聊天历史',
'ai.chatHistory.storageUsage': '本地聊天历史大小',
'ai.chatHistory.storageUsage.description': '按 UTF-8 JSON 估算已保存的聊天记录大小。',
'ai.chatHistory.storageUsage.measure': '估算',
'ai.chatHistory.storageUsage.measuring': '正在估算…',
'ai.chatHistory.storageUsage.result': '已保存 {count} 条记录,JSON 大小约为 {size}。',
'ai.chatHistory.storageUsage.partial': '其中 {count} 条记录未计入大小估算。',
'ai.chatHistory.storageUsage.error': '无法读取本地聊天历史,请重试。',
'ai.chatHistory.messageCap': '每个会话保留的消息数',
'ai.chatHistory.messageCap.description': '每个会话最多存储的消息条数(50–2000)。调低后会在下一次写入时从存储中丢弃最旧的消息。数值越大,存储占用和云同步体积也越大。',
'ai.chatHistory.messageCap.unit': '条消息',
'ai.chatHistory.autoLlmTitle': '自动生成会话标题',
'ai.chatHistory.autoLlmTitle.description': '首条消息后用一次轻量 LLM 调用生成简短标题;不可用时回退为首句。仅本机生效。',
'ai.chatHistory.titleModel': '标题模型',
'ai.chatHistory.titleModel.description': '用于生成会话标题的 provider 和模型,建议选小巧便宜的模型。默认使用当前 Catty 模型。',
'ai.chatHistory.titleModel.none': '没有可用的 provider。',
'ai.chatHistory.titleModel.useCurrentCatty': '使用当前 Catty 模型',
'ai.chatHistory.titleModel.unavailable': '不可用',
'ai.chatHistory.titleModel.providerPlaceholder': '选择 provider',
'ai.chatHistory.titleModel.modelPlaceholder': '选择模型',
// AI Error
'ai.codex.bridgeError': 'Codex 主进程处理器尚未加载。请完全重启 Netcatty 或重启 Electron 开发进程,然后重试。',
@@ -880,15 +835,6 @@ export const zhCNAiMessages: Messages = {
'ai.chat.artifact.scriptRunPaused': '脚本运行已暂停',
'ai.chat.artifact.scriptRunResumed': '脚本运行已恢复',
'ai.chat.artifact.scriptReference': 'nct API 参考',
'ai.chat.artifact.rdScreenRead': '读取远程屏幕',
'ai.chat.artifact.rdScreenGrid': '读取远程屏幕(坐标网格)',
'ai.chat.artifact.rdScreenCropped': '局部放大截屏',
'ai.chat.artifact.rdActionExecuted': '已执行 {count} 步远程操作',
'ai.chat.artifact.rdActionCount': '{count} 个操作',
'ai.chat.artifact.rdActionPreempted': '远程操作已由用户接管',
'ai.chat.artifact.rdScreenFailed': '远程截屏失败',
'ai.chat.artifact.rdActionFailed': '远程桌面操作失败',
'ai.chat.artifact.rdPreviewScreen': '预览截取的画面',
'zmodem.waitingForRemote': '等待远端...',
'zmodem.uploading': '上传中',
'zmodem.downloading': '下载中',
@@ -922,21 +868,4 @@ export const zhCNAiMessages: Messages = {
"ai.toolSettings.conflict": "设置已在另一窗口更改,当前草稿已保留。请取消并重新打开以加载已保存的设置。",
"ai.toolSettings.retry": "重试",
"ai.toolSettings.applyingHttp": "正在应用 HTTP 配置…",
"ai.vision.quickPrompt.explainError": "解释当前报错",
"ai.vision.quickPrompt.diagnoseUi": "诊断界面问题",
"ai.vision.quickPrompt.summarizeScreen": "总结屏幕内容",
"ai.vision.unsupportedModelWarning": "当前模型({model})不支持图片输入,切换至支持视觉的模型即可看图读屏。",
"ai.vision.switchModel": "切换模型",
"ai.vision.modelSupportsVision": "支持图片输入",
"ai.vision.snip.hint": "拖拽框选区域 · 按 Esc 取消",
"ai.vision.snip.cancel": "取消框选",
"ai.vision.snip.ariaLabel": "框选远程桌面画面区域",
"ai.vision.privacyBlocked": "当前会话已禁止 AI 读屏。",
"ai.vision.viewingScreen": "Catty 正在查看桌面",
"ai.vision.askAi": "问 AI",
"ai.vision.captureFullAndAsk": "一键截屏问 AI",
"ai.vision.snipRegionAndAsk": "框选区域问 AI",
"ai.vision.openAiChat": "打开 AI 助手",
"ai.vision.privacyLockOn": "已禁止 AI 读屏",
"ai.vision.privacyLockOff": "允许 AI 读屏",
};
+2 -61
View File
@@ -8,7 +8,7 @@ export const zhCNCoreMessages: Messages = {
"settings.plugins.github.busy": "正在下载、验证或安装插件包…",
"settings.plugins.github.review": "确认仓库来源并通过完整性校验,并不代表发布者值得信任。安装过程不会运行构建脚本,插件安装后默认禁用。启用前,请确认来源可信并检查各项权限的授权方式。",
"settings.plugins.github.accept": "已审查并信任此仓库,且已查看声明的权限。",
"settings.plugins.github.confirm": "安装",
"settings.plugins.github.confirm": "安装并保持禁用",
"settings.plugins.github.download": "下载并审查",
"settings.plugins.github.error.invalidRepository": "请输入 https://github.com/owner/repo、github.com/owner/repo 或 owner/repo。请只填写仓库地址,不要包含账号密码、查询参数、片段或额外路径。",
"settings.plugins.github.error.unavailable": "当前会话无法从 GitHub 安装插件。",
@@ -438,8 +438,6 @@ export const zhCNCoreMessages: Messages = {
'settings.vault.showSftpTab': '显示 SFTP 标签页',
'settings.vault.showSftpTabDesc': '在顶部标签栏显示独立的 SFTP 视图。关闭后可改用会话内左侧的 SFTP 侧栏。',
'settings.vault.showHostTreeSidebar': '显示主机列表侧栏',
'settings.vault.removeTopTabsDragArea': '移除顶部窗口拖动区域',
'settings.vault.removeTopTabsDragAreaDesc': '开启后移除标签页上方的拖动空白区域,让顶部可用于点击标签页和窗口按钮。',
'settings.vault.showHostTreeSidebarDesc': '在终端和编辑器标签页显示主机列表侧栏及顶部开关。',
'settings.vault.autoImportSystemKnownHosts': '自动导入系统 known_hosts',
'settings.vault.autoImportSystemKnownHostsDesc': '打开主机库时静默导入 OpenSSH known_hosts 中的记录。关闭后,Netcatty 已知主机与系统信任库保持独立;仍可通过「扫描系统」手动导入。',
@@ -736,16 +734,6 @@ Vaults 标签保持扁平,不使用这块背景。
'vault.nav.notes': '笔记',
'vault.nav.knownHosts': '已知主机',
'vault.nav.logs': '日志',
'vault.nav.customize': '自定义侧边栏',
'vault.nav.customizeHint': '拖动项目以调整顺序,或切换显示状态。',
'vault.nav.hideItem': '隐藏「{label}」',
'vault.nav.moveUp': '上移',
'vault.nav.moveDown': '下移',
'vault.nav.resetDefault': '恢复默认',
'vault.nav.alwaysVisible': '始终显示',
'vault.nav.pluginBadge': '插件',
'vault.nav.dragToReorder': '拖动以调整「{label}」的顺序',
'vault.nav.toggleVisibility': '切换「{label}」的显示状态',
'proxyProfiles.action.add': '添加代理',
'proxyProfiles.search.placeholder': '搜索代理…',
@@ -797,10 +785,7 @@ Vaults 标签保持扁平,不使用这块背景。
'vault.groups.details': '分组详情',
'vault.groups.details.general': '常规',
'vault.groups.details.ssh': 'SSH',
'vault.groups.details.rdp': 'RDP',
'vault.groups.details.vnc': 'VNC',
'vault.groups.details.telnet': 'Telnet',
'vault.groups.details.protocolNotEnabledDesc': '当前分组尚未配置 {protocol} 默认协议设置。',
'vault.groups.details.advanced': '高级',
'vault.groups.details.appearance': '外观',
'vault.groups.details.mosh': 'Mosh',
@@ -1249,12 +1234,7 @@ Vaults 标签保持扁平,不使用这块背景。
"plugins.sidebar.selectTerminal": "请先选择已打开的终端。",
"plugins.sidebar.loading": "正在加载扩展页面…",
"plugins.vault.loading": "正在加载插件页面…",
"plugins.vault.viewError": "插件页面渲染失败。",
"plugins.vault.retry": "重试",
"plugins.interaction.title": "插件请求",
"plugins.interaction.openUrlTitle": "打开外部链接?",
"plugins.interaction.openUrlNote": "此插件请求在默认浏览器中打开以下 HTTPS 链接:",
"plugins.interaction.openUrlAction": "打开链接",
"plugins.interaction.sharing": "分享的文本将交给此插件及其已授权的能力(包括网络访问)。读取文本不代表批准新的网络目标。",
"plugins.interaction.input": "输入文本",
"plugins.interaction.filter": "筛选选项",
@@ -1328,10 +1308,7 @@ Vaults 标签保持扁平,不使用这块背景。
"settings.plugins.market.title": "插件市场",
"settings.plugins.market.note": "精选开源插件。审核不代表安全认证,更新由你手动确认。",
"settings.plugins.market.back": "所有插件",
"settings.plugins.market.install": "安装",
"settings.plugins.market.installing": "安装中...",
"settings.plugins.market.update": "更新",
"settings.plugins.market.updating": "更新中...",
"settings.plugins.market.install": "安装此版本(保持停用)",
"settings.plugins.market.installNote": "这会替换并停止已安装版本。请在已安装列表检查权限后再启用。",
"settings.plugins.market.sourceOnly": "第一方源码示例。请用本地 CLI 构建并导入 .ncpkg;尚未发布可下载发行包。",
"settings.plugins.market.readmeNote": "固定到上面的提交。HTML 不执行,远程图片不加载。内容由插件作者提供。",
@@ -1417,41 +1394,5 @@ Vaults 标签保持扁平,不使用这块背景。
'plugins.hostActions.managedUnsupported': '受管理的 SSH 配置变更需在 Vault 主机编辑器中完成。',
'plugins.hostActions.failed': '请求已过期、被撤销或主机已改变。请重新选择主机。',
'plugins.hostActions.selectionLimit': '最多选择 50 个当前主机。',
'settings.externalEditor.title': '外部远程编辑器',
'settings.externalEditor.desc': '直接在本地编辑器(如 Zed、VS Code 或 Cursor)中打开远程 SSH 项目和文件。',
'settings.externalEditor.preferredEditor': '首选编辑器',
'settings.externalEditor.preferredEditor.desc': 'SFTP 右键菜单和终端打开请求默认使用的本地编辑器。',
'settings.externalEditor.executablePath': '编辑器可执行文件',
'settings.externalEditor.executablePath.desc': '留空以自动检测,或手动选择本地程序路径。',
'settings.externalEditor.executablePath.placeholder': '自动检测可执行文件路径',
'settings.externalEditor.status.configured': '已自定义路径',
'settings.externalEditor.status.detected': '已自动检测',
'settings.externalEditor.status.notFound': '未检测到',
'settings.externalEditor.browse': '浏览…',
'settings.externalEditor.resetPath': '重置为自动检测',
'settings.externalEditor.redetect': '重新检测已安装的编辑器',
'settings.externalEditor.customArgs': '自定义参数',
'settings.externalEditor.customArgs.desc': '以空格分隔的参数列表(支持占位符:{sshUri}、{sshTarget}、{remotePath}、{encodedPath}、{kind})。',
'settings.externalEditor.connectionMode': 'SSH 连接模式',
'settings.externalEditor.connectionMode.desc': 'Netcatty SSH 桥接会直接复用当前已认证会话,无需向磁盘导出私钥或主机列表。',
'settings.externalEditor.connectionMode.bridge': 'Netcatty SSH 桥接 (*.netcatty)',
'settings.externalEditor.connectionMode.direct': '直连 OpenSSH (user@host:port)',
'settings.externalEditor.sshBridge.title': 'OpenSSH *.netcatty 桥接规则',
'settings.externalEditor.sshBridge.desc': '仅在 OpenSSH 配置中写入单个静态 Host *.netcatty 规则块,不包含任何主机名、私钥或密码。',
'settings.externalEditor.sshBridge.install': '安装桥接规则',
'settings.externalEditor.sshBridge.reinstall': '重新安装规则',
'settings.externalEditor.sshBridge.update': '更新规则',
'settings.externalEditor.sshBridge.remove': '移除规则',
'settings.externalEditor.terminalRequests': '允许终端发起打开请求 (OSC 7337)',
'settings.externalEditor.terminalRequests.desc': '允许远程 Shell 通过 `zed .` 等命令在本地编辑器中打开远程路径。',
'settings.externalEditor.autoSetup': '仅在 Netcatty 会话中启用远程编辑器命令',
'settings.externalEditor.autoSetup.desc': '将 `zed` / `ncedit` 脚本安装到 ~/.netcatty/bin,并仅在当前 Netcatty 终端会话的 PATH 中生效,不修改 ~/.bashrc 或 ~/.zshrc(也可按主机单独开关)。',
'settings.externalEditor.defaultTrust': '默认主机信任策略',
'settings.externalEditor.defaultTrust.desc': '未单独配置信任规则的远程主机发起打开编辑器请求时的处理方式。',
'settings.externalEditor.trust.ask': '每次询问',
'settings.externalEditor.trust.allow': '始终允许',
'settings.externalEditor.trust.deny': '始终拒绝',
'settings.externalEditor.trustedHosts.host': '主机',
'settings.externalEditor.trustedHosts.policy': '策略',
};
-12
View File
@@ -101,16 +101,4 @@ export const zhCNMonitorMessages = {
"monitor.status.disconnected": "已断开",
"monitor.status.stale": "读数过期",
"monitor.status.missing": "主机已删除",
"monitor.status.online": "在线",
"monitor.status.offline": "离线",
"monitor.checkNow": "立即检测",
"monitor.openRemoteDesktop": "打开 {protocol}",
"monitor.latencyTrend": "延迟趋势",
"monitor.bannerVerified": "协议已校验",
"monitor.bannerUnverified": "端口已开放(未校验协议)",
"monitor.companionDesktops": "伴生远程桌面服务",
"monitor.reachabilityOnly": "仅在线与延迟探测",
"monitor.viaSsh": "经由 SSH",
"monitor.direct": "直连",
"monitor.rttStats": "最小 / 平均 / 最大",
};
@@ -214,25 +214,6 @@ export const zhCnSystemManagerMessages: Messages = {
'systemManager.ports.unknownProcess': '未知进程',
'systemManager.ports.terminate': '结束进程',
'systemManager.ports.confirmTerminate': '向占用该端口的进程 {{pid}} 发送 SIGTERM?',
'systemManager.ports.forwardedMeta': '{{count}} 个已转发',
'systemManager.ports.forward': '转发到本地端口',
'systemManager.ports.stopForward': '停止端口转发',
'systemManager.ports.forwardTitle': '转发端口到本地',
'systemManager.ports.forwardDesc': '通过 SSH 将此远程监听端口转发到本地端口。',
'systemManager.ports.forwardDescWithHost': '通过 SSH 将 {{host}} 上的此监听端口转发到本地端口。',
'systemManager.ports.forwardLocalPort': '本地端口',
'systemManager.ports.forwardBindAddress': '绑定地址',
'systemManager.ports.forwardAction': '开始转发',
'systemManager.ports.forwarding': '转发中…',
'systemManager.ports.forwardInvalidPort': '请输入 1 到 65535 之间的有效端口号。',
'systemManager.ports.forwardInvalidBindAddress': '请输入有效的绑定地址(如 127.0.0.1 或 0.0.0.0)。',
'systemManager.ports.forwardPortInUse': '本地端口 {{port}} 已被「{{label}}」占用。',
'systemManager.ports.forwardFailed': '启动端口转发失败。',
'systemManager.ports.forwardStarted': '已开始转发 {{local}} → {{remote}}',
'systemManager.ports.forwardStopped': '已停止转发 {{local}}',
'systemManager.ports.copiedEndpoint': '已复制 {{endpoint}}',
'systemManager.ports.copyEndpointAria': '复制本地地址 {{endpoint}}',
'systemManager.ports.clickToCopy': '点击复制本地地址',
'systemManager.services.unavailable': '此主机未检测到 systemctl。',
'systemManager.services.loading': '正在加载 systemd 服务…',
@@ -2,14 +2,6 @@ import type { Messages } from '../types';
export const zhCNTerminalMessages: Messages = {
'terminal.directory.open': '当前目录:{path}。更改目录',
'terminal.gitBranch.current': 'Git 分支:{{value}}',
'terminal.gitBranch.detached': '分离的 HEAD:{{value}}',
'terminal.gitBranch.search': '搜索本地分支…',
'terminal.gitBranch.branches': '本地分支',
'terminal.gitBranch.loading': '正在读取分支…',
'terminal.gitBranch.empty': '还没有本地分支',
'terminal.gitBranch.noMatches': '没有匹配的分支',
'terminal.gitBranch.unavailable': '无法读取此会话的分支。',
'terminal.directory.unknown': '目录未知',
'terminal.directory.search': '搜索当前目录下的文件夹…',
'terminal.directory.directories': '目录',
@@ -23,8 +15,6 @@ export const zhCNTerminalMessages: Messages = {
'terminal.directory.integrationUnavailable': 'PowerShell 目录集成未就绪,启动参数或执行策略可能阻止了加载。',
'terminal.directory.cmdIntegrationUnavailable': '正在等待原 CMD 会话报告当前目录。',
'terminal.directory.gitBashIntegrationUnavailable': '正在等待原 Git Bash 会话中的可访问目录。',
'terminal.directory.wslIntegrationUnavailable': '正在等待所选 WSL 发行版中的 Bash 返回空闲提示符。',
'terminal.directory.cygwinIntegrationUnavailable': '正在等待 Cygwin Bash 返回空闲提示符。',
'terminal.directory.nonFilesystem': '当前 PowerShell 位置不是文件系统目录。',
'terminal.directory.accessDenied': '没有权限列出此目录。',
'terminal.directory.busy': '请等待终端回到空命令提示符。',
@@ -580,9 +570,6 @@ export const zhCNTerminalMessages: Messages = {
'选择自动补全的历史建议来自当前主机,还是所有主机上执行过的命令。',
'settings.terminal.autocomplete.historyScope.host': '当前主机',
'settings.terminal.autocomplete.historyScope.global': '全部主机',
'settings.terminal.autocomplete.showSnippets': '显示代码片段',
'settings.terminal.autocomplete.showSnippets.desc':
'在补全列表中显示匹配的代码片段。若片段较多、排在列表前面,可关闭此项。',
'settings.terminal.section.passwordPromptAssist': '密码提示辅助',
'settings.terminal.passwordPromptAssist.mode': '辅助模式',
'settings.terminal.passwordPromptAssist.mode.desc':
@@ -609,9 +596,6 @@ export const zhCNTerminalMessages: Messages = {
'settings.shortcuts.recording': '请按键...',
'settings.shortcuts.none': '无',
'settings.shortcuts.setDisabled': '设为禁用',
'settings.shortcuts.addExtra': '添加快捷键',
'settings.shortcuts.additional': '附加快捷键',
'settings.shortcuts.removeExtra': '移除快捷键',
'settings.shortcuts.category.tabs': '标签页',
'settings.shortcuts.category.terminal': '终端',
'settings.shortcuts.category.navigation': '导航',
@@ -645,7 +629,6 @@ export const zhCNTerminalMessages: Messages = {
'settings.shortcuts.binding.command-palette': '打开命令面板',
'settings.shortcuts.binding.quick-switch': '快速切换',
'settings.shortcuts.binding.new-workspace': '新建工作区',
'settings.shortcuts.binding.add-session-to-workspace': '添加会话到工作区',
'settings.shortcuts.binding.snippets': '打开代码片段',
'settings.shortcuts.binding.broadcast': '切换广播模式',
'settings.shortcuts.binding.toggle-opacity': '切换窗口透明度',
@@ -735,8 +718,6 @@ export const zhCNTerminalMessages: Messages = {
'keychain.export.script': '脚本 *',
'keychain.export.scriptPlaceholder': '导出脚本...',
'keychain.export.missingCredentials': '主机未保存密码或密钥。请先为该主机添加密码凭据。',
'keychain.export.missingPublicKey': '此密钥没有公钥。请先在编辑页粘贴公钥,然后再试「导出并绑定」。',
'keychain.export.missingPublicKeyNote': '此密钥没有公钥。请先在密钥编辑页粘贴公钥,然后再导出。',
'keychain.export.successTitle': '导出成功',
'keychain.export.successMessage': '已导出公钥并绑定到 {host}',
'keychain.export.failedTitle': '导出失败',
@@ -813,7 +794,6 @@ export const zhCNTerminalMessages: Messages = {
'tabs.logPrefix': '日志:',
'tabs.logLocal': '本地',
'tabs.copyTab': '复制标签页',
'tabs.addSessionToWorkspace': '在此工作区添加会话',
'tabs.duplicateSession': '复制会话',
'tabs.copyTabToNewWindow': '复制标签页到新窗口',
'tabs.copyTabToNewWindowFailed': '无法在新窗口打开标签页',
@@ -1107,12 +1087,4 @@ export const zhCNTerminalMessages: Messages = {
'terminal.browser.allScopeHint': '在每台主机的浏览器中显示。',
'terminal.browser.downloadLocation': '文件保存在系统“下载”文件夹',
'terminal.browser.saveAs': '另存为…',
'terminal.externalEditor.opened': '已在 {editor} 中打开 {path}',
'terminal.externalEditor.failed': '无法在 {editor} 中打开',
'terminal.externalEditor.prompt.title': '在 {editor} 中打开?',
'terminal.externalEditor.prompt.desc': '远程主机 {host} 请求在 {editor} 中打开以下远程路径:',
'terminal.externalEditor.prompt.deny': '拒绝',
'terminal.externalEditor.prompt.allowOnce': '仅允许本次',
'terminal.externalEditor.prompt.alwaysTrust': '始终信任此主机',
'terminal.externalEditor.autoSetupConfigured': '已配置远程编辑器命令 ({editor})',
};
+1 -378
View File
@@ -109,7 +109,6 @@ export const zhCNVaultMessages: Messages = {
// Protocol select dialog
'protocolSelect.chooseProtocol': '选择协议',
'protocolSelect.rememberDefault': '记住为默认连接(下次不再询问)',
'protocolSelect.port': '端口:',
// Host Details
'hostDetails.title.details': '主机详情',
@@ -380,22 +379,7 @@ export const zhCNVaultMessages: Messages = {
'hostDetails.startupCommand.runMode.help': '选择连接后如何发送多行启动命令。',
'hostDetails.startupCommand.runMode.lineDelay': '逐行发送',
'hostDetails.startupCommand.runMode.paste': '一次性发送',
'hostDetails.otherProtocols': '附加协议',
'hostDetails.otherProtocolsHint': '为当前 SSH 主机挂载辅助连接方式,不影响默认连接',
'hostDetails.protocol.defaultHint': '双击默认使用 {protocol}',
'hostDetails.protocol.secondaryHint': '已作为附加协议启用',
'hostDetails.protocol.setDefault': '设为默认',
'hostDetails.protocol.remove': '移除',
'hostDetails.protocol.doubleClick': '双击连接',
'hostDetails.protocol.connectOptionDefault': '默认 {protocol}',
'hostDetails.protocol.connectOptionAsk': '每次询问',
'hostDetails.protocol.alsoEnable': '同时启用',
'hostDetails.protocol.removeProtocol': '移除 {protocol}',
'hostDetails.protocol.addProtocol': '添加 {protocol}',
'hostDetails.section.connectBehavior': '连接行为',
'hostDetails.protocol.notEnabledDesc': '当前主机尚未启用 {protocol} 协议。',
'hostDetails.protocol.addSecondary': '添加 {protocol}(保留 {defaultProtocol} 默认)',
'hostDetails.protocol.switchOnly': '仅使用 {protocol}',
'hostDetails.otherProtocols': '其他协议',
'hostDetails.telnetOn': 'Telnet on',
'hostDetails.port': '端口',
'hostDetails.telnet.credentials': '凭据',
@@ -848,7 +832,6 @@ export const zhCNVaultMessages: Messages = {
'cloudSync.localBackups.reason.beforeRestore': '恢复前',
'cloudSync.localBackups.versionChange': '{from} -> {to}',
'cloudSync.localBackups.counts': '{hosts} 台主机,{keys} 个密钥,{snippets} 个代码片段,{notes} 条笔记',
'cloudSync.localBackups.aiCounts': '{sessions} 个 AI 会话,{settings} 项设置',
'cloudSync.localBackups.restore': '恢复',
'cloudSync.localBackups.restoreSuccess': '已恢复本地备份。',
'cloudSync.localBackups.restoreFailedTitle': '恢复失败',
@@ -1072,364 +1055,4 @@ export const zhCNVaultMessages: Messages = {
'vault.import.plugins.moreItems': '本次导入还包含 {count} 个项目。',
'vault.import.plugins.moreDiagnostics': '预览中省略了另外 {count} 条诊断信息。',
// Remote Desktop (VNC / RDP / JumpServer RDP)
'vault.hosts.newRdpHost': '新建 RDP 主机',
'vault.hosts.newVncHost': '新建 VNC 主机',
'vault.hosts.connectRdp': '连接 RDP',
'vault.hosts.connectSsh': '连接 SSH',
'vault.hosts.connectVnc': '连接 VNC',
'vault.hosts.openInSystemRdp': '在系统 RDP 客户端中打开',
'vault.hosts.openInSystemVnc': '在系统屏幕共享中打开',
'settings.jmsDeepLink.rdpLaunchMode': 'JumpServer RDP 打开方式',
'settings.jmsDeepLink.rdpLaunchModeDesc': '选择通过 JumpServer jms:// 启动 Windows RDP 会话时使用 Netcatty 内置客户端还是系统 RDP 客户端。',
'settings.jmsDeepLink.rdpLaunchMode.builtin': '内置客户端',
'settings.jmsDeepLink.rdpLaunchMode.system': '系统 RDP 客户端',
'vault.import.rdp.label': 'RDP (.rdp)',
'vault.import.rdp.hint': '导入单个或多个 Microsoft / JumpServer .rdp 文件。',
'vault.import.remoteDesktopTip': 'MobaXterm、CSV 与 .rdp 导入均支持 RDP 和 VNC 主机。',
'keychain.identity.domain': '域 (RDP,可选)',
'keychain.identity.domainPlaceholder': 'CORP 或 AD 域名',
'quickConnect.rdp.domain': '域(可选)',
'quickConnect.rdp.domainPlaceholder': 'CORP 或留空使用本地账户',
'quickConnect.vnc.optionalUsername': '用户名(可选,用于 Apple ARD / VeNCrypt)',
'quickConnect.vnc.optionalUsernameHint': '大多数 VNC 服务器仅需密码认证。',
'quickConnect.vnc.passwordHint': '如果 VNC 服务器无需密码,可留空直接连接。',
'quickConnect.vnc.displayHelper': '显示器 {display}',
'hostDetails.protocol.label': '协议',
'hostDetails.rdp.portLabel': 'RDP 端口',
'hostDetails.vnc.portLabel': 'VNC 端口',
'hostDetails.vnc.displayHint': '显示器 {display}',
'hostDetails.vnc.displayPlaceholder': '5900 或 :0',
'hostDetails.rdp.domain': '域(可选)',
'hostDetails.rdp.domainPlaceholder': 'CORP(可选)',
'hostDetails.rdp.domainLabel': '域',
'hostDetails.rdp.usernamePlaceholder': '用户名、DOMAIN\\user 或 JumpServer user|uuid',
'hostDetails.vnc.optionalUsername': '用户名(Apple ARD / VeNCrypt)',
'hostDetails.vnc.optionalUsernameHint': '可选。标准 VNC 服务器仅使用密码认证。',
'hostDetails.vnc.usernamePlaceholder': '用户名(可选)',
'hostDetails.remoteDesktop.sectionTitle': '远程桌面显示与选项',
'hostDetails.rdp.resolutionMode': '分辨率模式',
'hostDetails.rdp.resolutionMode.dynamic': '动态自适应',
'hostDetails.rdp.resolutionMode.fit': '适应窗口',
'hostDetails.rdp.resolutionMode.fixed': '固定尺寸',
'hostDetails.rdp.width': '宽度',
'hostDetails.rdp.height': '高度',
'hostDetails.rdp.dimensionHint': '请输入 200 到 8192 之间的整数。',
'hostDetails.rdp.colorDepth': '色深',
'hostDetails.rdp.audio': '音频输出',
'hostDetails.rdp.audioDesc': '在本地播放远程桌面声音',
'hostDetails.rdp.clipboard': '剪贴板同步',
'hostDetails.rdp.clipboardDesc': '与远程桌面共享文本与图片',
'hostDetails.rdp.clipboardFiles': '剪贴板文件传输',
'hostDetails.rdp.clipboardFilesDesc': '允许通过剪贴板复制和拖拽传输文件',
'hostDetails.rdp.securityMode': '安全模式',
'hostDetails.rdp.securityMode.auto': '自动',
'hostDetails.rdp.securityMode.nla': 'NLA (CredSSP)',
'hostDetails.rdp.securityMode.tls': 'TLS',
'hostDetails.rdp.securityMode.rdp': '标准 RDP',
'hostDetails.rdp.ignoreCertErrors': '忽略证书错误',
'hostDetails.rdp.ignoreCertErrorsDesc': '跳过 TLS 证书信任提示(不推荐)',
'hostDetails.rdp.advanced': '高级 RDP 选项',
'hostDetails.rdp.loadBalanceInfo': '负载均衡信息 (Load Balance Info)',
'hostDetails.rdp.loadBalanceInfoPlaceholder': 'tsv://MS Terminal Services Plugin.1.Collection',
'hostDetails.rdp.alternateShell': '启动程序 (Alternate Shell)',
'hostDetails.rdp.alternateShellPlaceholder': '可选的启动程序路径',
'hostDetails.rdp.shellWorkingDir': '工作目录',
'hostDetails.rdp.shellWorkingDirPlaceholder': '可选的启动工作目录',
'hostDetails.vnc.scalingMode': '缩放模式',
'hostDetails.vnc.scalingMode.fit': '适应窗口',
'hostDetails.vnc.scalingMode.actual': '原始比例 (1:1)',
'hostDetails.vnc.scalingMode.stretch': '拉伸填充',
'hostDetails.vnc.scalingMode.dynamic': '动态自适应',
'hostDetails.vnc.quality': '画质等级',
'hostDetails.vnc.compression': '压缩等级',
'hostDetails.vnc.viewOnly': '只读模式',
'hostDetails.vnc.viewOnlyDesc': '禁止向远端发送鼠标和键盘输入',
'hostDetails.vnc.sharedSession': '共享会话',
'hostDetails.vnc.sharedSessionDesc': '连接时保持其他 VNC 客户端不断开',
'hostDetails.vnc.clipboard': '剪贴板同步',
'hostDetails.vnc.clipboardDesc': '与远程桌面同步 UTF-8 剪贴板文本',
'hostDetails.vnc.showRemoteCursor': '显示远程光标',
'hostDetails.vnc.showRemoteCursorDesc': '渲染服务端下发的光标样式',
'hostDetails.companion.addVnc': '添加 VNC',
'hostDetails.companion.addRdp': '添加 RDP',
'hostDetails.companion.tunnelViaSsh': '通过当前主机 SSH 隧道直连',
'hostDetails.companion.tunnelViaSshDesc': '自动经由当前主机的 SSH 连接转发端口',
'hostDetails.companion.tunnelTargetHost': '远端目标地址',
'hostDetails.companion.credentialsSource': '凭证来源',
'hostDetails.companion.credentials.host': '复用主机 SSH 凭证',
'hostDetails.companion.credentials.manual': '独立用户名 / 密码',
'hostDetails.companion.credentials.manualHint': '保存主机时自动加密存入钥匙串',
'hostDetails.companion.credentials.identity': '钥匙串身份',
'hostDetails.companion.credentials.ask': '每次连接时询问',
'hostDetails.companion.identityPlaceholder': '选择已保存的身份',
'hostDetails.companion.saveAsIdentity': '保存为身份',
'hostDetails.companion.saveIdentityAction': '创建并选择身份',
'hostDetails.companion.identityLabelPlaceholder': '身份名称(如 Desktop VNC)',
'hostDetails.companion.identitySaved': '已保存并选中该身份。',
'hostDetails.companion.setDefaultRdp': '默认使用 RDP 连接',
'hostDetails.companion.setDefaultVnc': '默认使用 VNC 连接',
// Known Hosts — Remote Desktop TLS Certificates
'knownHosts.tabs.ssh': 'SSH 主机密钥',
'knownHosts.tabs.remoteDesktopCerts': '远程桌面证书',
'knownHosts.certs.clearAll': '全部清空',
'knownHosts.certs.expired': '已过期',
'knownHosts.certs.expiredNotice': '该证书已超过有效期。',
'knownHosts.certs.copied': '已复制 SHA-256 指纹',
'knownHosts.certs.action.inspect': '查看证书详情',
'knownHosts.certs.action.copyFingerprint': '复制 SHA-256',
'knownHosts.certs.action.revoke': '吊销信任',
'knownHosts.certs.empty.title': '暂无已信任的远程桌面证书',
'knownHosts.certs.empty.desc': '连接 RDP 或 VeNCrypt VNC 主机并选择信任的 TLS 证书将显示在此处。',
'knownHosts.certs.empty.searchTitle': '未找到匹配的证书',
'knownHosts.certs.empty.searchDesc': '请尝试搜索其他主机名、端口、协议或 SHA-256 指纹。',
'knownHosts.certs.detail.subtitle': '本设备已固定信任的 TLS 证书(TOFU)',
'knownHosts.certs.detail.fingerprint': 'SHA-256 指纹',
'knownHosts.certs.detail.subject': '颁发给 (Subject)',
'knownHosts.certs.detail.issuer': '颁发者 (Issuer)',
'knownHosts.certs.detail.validFrom': '生效时间',
'knownHosts.certs.detail.validTo': '过期时间',
'knownHosts.certs.detail.trustedAt': '首次信任',
'knownHosts.certs.detail.lastSeen': '最近连接',
'knownHosts.certs.revokeConfirm.title': '吊销 {endpoint} 的证书信任?',
'knownHosts.certs.revokeConfirm.desc': '下次连接该服务器时将重新要求验证其 TLS 证书指纹。',
'knownHosts.certs.clearAllConfirm.title': '清空所有已信任的远程桌面证书?',
'knownHosts.certs.clearAllConfirm.desc': '将吊销本设备上全部 {count} 条已固定的 RDP/VNC 证书信任记录。',
'knownHosts.certs.toast.revoked': '已吊销证书信任',
'knownHosts.certs.toast.clearedAll': '已清空 {count} 条远程桌面证书',
// Host Connection Test — RDP / VNC Probe
'hostDetails.connectionTest.rdp': '测试 RDP',
'hostDetails.connectionTest.vnc': '测试 VNC',
'hostDetails.connectionTest.probe.rtt': '网络延迟 (RTT)',
'hostDetails.connectionTest.probe.protocol': '协议',
'hostDetails.connectionTest.probe.security': '协商安全模式',
'hostDetails.connectionTest.probe.rfbVersion': 'RFB 版本',
'hostDetails.connectionTest.probe.securityTypes': '支持的安全类型',
'hostDetails.connectionTest.probe.tls': 'TLS',
'hostDetails.connectionTest.probe.fingerprint': 'SHA-256 指纹',
'hostDetails.connectionTest.probe.trustStatus.trusted': '已信任',
'hostDetails.connectionTest.probe.trustStatus.firstSeen': '首次见到',
'hostDetails.connectionTest.probe.trustStatus.changed': '指纹已变更',
'hostDetails.connectionTest.probe.trustFingerprint': '信任此指纹',
'hostDetails.connectionTest.probe.fingerprintTrusted': '已信任该证书指纹',
// Remote Desktop Toolbar — SFTP, CLIPRDR, Recording, Ask AI
'remoteDesktop.toolbar.keysLocal': '快捷键:本地',
'remoteDesktop.toolbar.keysRemote': '快捷键:远端',
'remoteDesktop.toolbar.keysLocalTip': '当前保留本地标签/窗口快捷键,点击可将组合键转发至远程桌面。',
'remoteDesktop.toolbar.keysRemoteTip': '快捷键已转发至远程桌面。按 Ctrl+Alt+Shift 或双击右 Alt/Option 释放。',
'remoteDesktop.toolbar.sendKeys': '发送按键',
'remoteDesktop.toolbar.specialKeys': '常用组合键',
'remoteDesktop.toolbar.typeClipboard': '将剪贴板按键盘输入',
'remoteDesktop.toolbar.linuxTty': 'Linux 虚拟终端',
'remoteDesktop.toolbar.osChordNote': '系统保留组合键(如 Alt+Tab、Cmd+Tab、Ctrl+Alt+Del)会被本机拦截,请通过此菜单发送。',
'remoteDesktop.toolbar.display': '显示缩放',
'remoteDesktop.toolbar.sshTunneled': '通过 SSH 隧道加密转发',
'remoteDesktop.toolbar.encrypted': 'TLS 加密连接',
'remoteDesktop.toolbar.standardRdpSecurity': '标准 RDP 安全层({{cipher}})',
'remoteDesktop.rdp.fallbackStandardRdp': '已回退并使用标准 RDP 安全层连接。',
'remoteDesktop.rdp.fallbackStandardRdpWithCipher': '已回退并使用标准 RDP 安全层连接({{cipher}})。',
'remoteDesktop.toolbar.viewOnly': '只读模式',
'remoteDesktop.toolbar.viewOnlyBadge': '只读',
'remoteDesktop.toolbar.audio': 'RDP 音频',
'remoteDesktop.toolbar.mute': '静音',
'remoteDesktop.toolbar.unmute': '取消静音',
'remoteDesktop.toolbar.clipboard': '剪贴板同步',
'remoteDesktop.toolbar.clipboardSync': '同步剪贴板',
'remoteDesktop.toolbar.clipboardFiles': 'RDP 剪贴板文件',
'remoteDesktop.toolbar.clipboardFilesHint': '在远程复制文件后可在此下载,或直接拖拽本地文件到画布中粘贴。',
'remoteDesktop.toolbar.saveFile': '保存文件',
'remoteDesktop.toolbar.options': '画质与输入选项',
'remoteDesktop.toolbar.quality': '画面编码质量',
'remoteDesktop.toolbar.screenshot': '截屏',
'remoteDesktop.toolbar.copyScreenshot': '复制 PNG 到剪贴板',
'remoteDesktop.toolbar.saveScreenshot': '保存 PNG 截图',
'remoteDesktop.toolbar.fullscreen': '全屏',
'remoteDesktop.toolbar.exitFullscreen': '退出全屏',
'remoteDesktop.toolbar.pin': '固定工具栏',
'remoteDesktop.toolbar.unpin': '取消固定工具栏',
'remoteDesktop.toolbar.popOut': '在新窗口中打开',
'remoteDesktop.toolbar.reconnect': '重新连接',
'remoteDesktop.toolbar.disconnect': '断开连接',
'remoteDesktop.toolbar.openSystemRdp': '使用系统 RDP 打开',
'remoteDesktop.toolbar.openSystemVnc': '使用系统屏幕共享打开',
'remoteDesktop.display.dynamic': '动态自适应',
'remoteDesktop.display.fit': '适应窗口',
'remoteDesktop.display.actual': '1:1 原始尺寸',
'remoteDesktop.display.stretch': '拉伸填充',
'remoteDesktop.display.highDpi': 'Retina 高清缩放',
'remoteDesktop.display.unsupported': '服务端不支持',
'remoteDesktop.toolbar.mapCmdToCtrl': 'Cmd 映射为 Ctrl',
'remoteDesktop.toolbar.showRemoteCursor': '显示远程光标',
'remoteDesktop.toolbar.refreshScreen': '强制刷新整屏画面',
'remoteDesktop.xvp.title': '远程电源控制 (XVP)',
'remoteDesktop.xvp.reboot': '重启',
'remoteDesktop.xvp.shutdown': '关机',
'remoteDesktop.xvp.reset': '强制复位',
'remoteDesktop.vnc.bell': '远程桌面响铃提示',
'remoteDesktop.toolbar.moreActions': '更多操作',
'remoteDesktop.clipboard.pushNow': '立即推送本机剪贴板',
'remoteDesktop.clipboard.pushed': '已同步本机剪贴板到远程桌面',
'remoteDesktop.disconnected.title': '远程桌面会话已断开',
'remoteDesktop.auth.reenter': '修改凭证',
'remoteDesktop.auth.cancelled': '已取消身份验证。',
'remoteDesktop.cert.rejected': '已拒绝该 TLS 证书。',
'remoteDesktop.step.bastion': '跳板隧道',
'remoteDesktop.step.network': '网络连接',
'remoteDesktop.step.nla': 'NLA 验证',
'remoteDesktop.step.rfb': 'RFB 验证',
'remoteDesktop.step.desktop': '桌面会话',
'remoteDesktop.toolbar.openSftp': 'SFTP',
'remoteDesktop.toolbar.record': '录制会话',
'remoteDesktop.toolbar.stopRecording': '停止录制',
'remoteDesktop.toolbar.savingRecording': '保存中...',
'remoteDesktop.toolbar.recording': '录制中',
'remoteDesktop.toolbar.askAi': '问 AI',
'remoteDesktop.toolbar.askAiFull': '截全屏问 AI',
'remoteDesktop.toolbar.askAiRegion': '框选区域问 AI',
'remoteDesktop.toolbar.aiReadAllowed': '允许 AI 读取屏幕',
'remoteDesktop.toolbar.aiReadBlocked': '已禁止 AI 读取当前会话屏幕',
'remoteDesktop.toolbar.aiReadingBanner': 'AI 正在查看画面',
'remoteDesktop.clipboard.dropTitle': '拖放文件以发送到远程剪贴板 (CLIPRDR)',
'remoteDesktop.clipboard.dropSubtitle': '松手后,在远程桌面中按 Ctrl+V 即可粘贴',
'remoteDesktop.clipboard.dropFileCount': '{count} 个文件',
'remoteDesktop.clipboard.dropBlockedViewOnly': '只读模式下无法拖放文件',
'remoteDesktop.clipboard.dropBlockedDisabled': '该主机未启用剪贴板文件传输',
'remoteDesktop.clipboard.dropFolderUnsupported': 'RDP 剪贴板不支持直接发送文件夹,请改用 SFTP 或压缩为 .zip 后发送。',
'remoteDesktop.clipboard.stagedPill': '{count} 个文件 · Ctrl+V',
'remoteDesktop.clipboard.sendLocalFiles': '选择本地文件发送...',
'remoteDesktop.clipboard.uploading': '正在通过剪贴板发送',
'remoteDesktop.clipboard.downloading': '正在通过剪贴板接收',
'remoteDesktop.clipboard.transferCompleted': '剪贴板文件传输完成',
'remoteDesktop.clipboard.transferFailed': '剪贴板文件传输失败',
'remoteDesktop.recording.started': '已开始录制会话',
'remoteDesktop.recording.saved': '会话录屏已保存到连接日志',
'remoteDesktop.recording.failed': '会话录制失败',
'remoteDesktop.recording.unsupported': '当前环境不支持会话录制',
// Remote Desktop — Resolution Presets, Multi-Monitor, RDPDR Shared Folders, Network Telemetry, AI Computer Use
'remoteDesktop.display.resolutionPresets': '分辨率预设',
'remoteDesktop.display.customWidth': '宽度',
'remoteDesktop.display.customHeight': '高度',
'remoteDesktop.display.applyResolution': '应用',
'remoteDesktop.display.multiMonitor': '多显示器布局',
'remoteDesktop.display.monitorSingle': '单显示器',
'remoteDesktop.display.monitorDual': '双屏并排',
'remoteDesktop.display.monitorAllLocal': '匹配本机显示器',
'remoteDesktop.display.monitorAllLocalCount': '匹配本机显示器 ({count})',
'remoteDesktop.display.monitorSwitcher': '切换当前显示器',
'remoteDesktop.display.monitorAll': '全部',
'remoteDesktop.sharedFolders.title': '共享文件夹 (RDPDR)',
'remoteDesktop.sharedFolders.add': '添加文件夹',
'remoteDesktop.sharedFolders.empty': '将本机文件夹挂载为远程 Windows 桌面上的虚拟磁盘。',
'remoteDesktop.sharedFolders.remove': '移除文件夹',
'remoteDesktop.sharedFolders.readOnly': '只读',
'remoteDesktop.sharedFolders.hint': 'Windows:此电脑 → Netcatty 上的 <文件夹> (\\\\tsclient\\<名称>)。仅保存在本机,不参与云同步。',
'remoteDesktop.sharedFolders.duplicate': '该文件夹已在共享列表中',
'remoteDesktop.sharedFolders.mounted': '已在远程桌面挂载「{name}」',
'remoteDesktop.sharedFolders.unmounted': '已取消挂载「{name}」',
'remoteDesktop.network.title': '连接遥测',
'remoteDesktop.network.latency': '延迟',
'remoteDesktop.network.resolution': '分辨率',
'remoteDesktop.network.downlink': '下行 (RX)',
'remoteDesktop.network.uplink': '上行 (TX)',
'remoteDesktop.network.totalRx': '总接收',
'remoteDesktop.network.totalTx': '总发送',
'remoteDesktop.network.tlsEncrypted': 'TLS',
'remoteDesktop.network.quality.excellent': '极佳',
'remoteDesktop.network.quality.good': '良好',
'remoteDesktop.network.quality.fair': '一般',
'remoteDesktop.network.quality.poor': '较差',
'remoteDesktop.network.quality.unknown': '测量中',
'remoteDesktop.ai.controllingBanner': 'Catty 控制中 · 点击桌面或按 Esc 立即接管',
'remoteDesktop.ai.stopControl': '停止',
'remoteDesktop.ai.preempted': '已暂停 AI 控制 — 您已接管桌面',
'remoteDesktop.ai.preemptedStopped': '已停止 AI 控制 — 您已接管桌面',
'remoteDesktop.ai.audit.menuItem': 'AI 操控审计日志',
'remoteDesktop.ai.audit.title': 'AI 桌面操控审计日志',
'remoteDesktop.ai.audit.subtitleHost': '记录此远程桌面上执行的 AI 鼠标与键盘操作。',
'remoteDesktop.ai.audit.subtitleAll': '本地记录最近 500 条 AI 远程桌面操控记录(敏感文本已脱敏)。',
'remoteDesktop.ai.audit.searchPlaceholder': '按操作、主机或错误码筛选...',
'remoteDesktop.ai.audit.scopeSession': '当前会话',
'remoteDesktop.ai.audit.scopeAll': '全部',
'remoteDesktop.ai.audit.filterAll': '全部',
'remoteDesktop.ai.audit.filterOk': '成功',
'remoteDesktop.ai.audit.filterPreempted': '接管',
'remoteDesktop.ai.audit.filterIssues': '拦截/错误',
'remoteDesktop.ai.audit.empty': '暂无 AI 远程桌面操控记录。',
'remoteDesktop.ai.audit.outcomeOk': '成功',
'remoteDesktop.ai.audit.outcomePreempted': '已接管',
'remoteDesktop.ai.audit.outcomeBlocked': '已拦截',
'remoteDesktop.ai.audit.outcomeDenied': '已拒绝',
'remoteDesktop.ai.audit.outcomeError': '失败',
'remoteDesktop.ai.audit.copyJson': '复制 JSON',
'remoteDesktop.ai.audit.copied': '已复制',
'remoteDesktop.ai.audit.clear': '清空',
// LogView — Remote Desktop Recordings & Metadata
'logView.recording.download': '下载 .webm',
'logView.recording.delete': '删除录屏',
'logView.recording.loading': '正在加载会话录屏...',
'logView.recording.withAudio': '含音频',
'logView.recording.missingTitle': '录屏文件已不在磁盘上',
'logView.recording.missingDesc': '该 .webm 文件已被删除、因保留策略自动清理或被移出录屏目录。',
'logView.recording.playbackErrorTitle': '无法播放录屏',
'logView.recording.playbackErrorDesc': '视频文件可能不完整,或内置播放器不支持该编码格式。',
'logView.recording.exportSuccess': '已导出录屏文件',
'logView.recording.exportFailed': '导出录屏失败',
'logView.recording.deleted': '已删除录屏',
'logView.recording.deleteFailed': '删除录屏失败',
'logView.recording.deleteConfirmTitle': '删除这条会话录屏?',
'logView.recording.deleteConfirmDesc': '磁盘上的 .webm 视频文件将被永久删除,连接日志记录本身会保留。',
'logView.remoteDesktop.noRecordingSubtitle': '此次远程桌面会话未录制视频',
'logView.remoteDesktop.host': '主机',
'logView.remoteDesktop.protocol': '协议',
'logView.remoteDesktop.user': '用户名',
'logView.remoteDesktop.started': '开始时间',
'logView.remoteDesktop.ended': '结束时间',
'logView.remoteDesktop.duration': '持续时长',
'logView.remoteDesktop.resolution': '分辨率',
'logView.remoteDesktop.security': '安全协议',
'logView.remoteDesktop.disconnectReason': '断开原因',
'logView.remoteDesktop.timeline': '会话时间轴',
'logView.remoteDesktop.recordingTip': '点击远程桌面工具栏的录制按钮,或在「设置 → 系统」中开启自动录制,即可在此回放 .webm 录屏。',
'logs.recording.clipsCount': '{count} 段',
'logs.filter.all': '全部',
'logs.filter.terminal': '终端',
'logs.filter.remoteDesktop': '远程桌面',
'logs.filter.recorded': '有录屏',
'logs.filter.emptyTitle': '没有匹配的日志',
'logs.filter.emptyDesc': '当前筛选条件下暂无连接日志记录。',
// Settings -> System -> Remote Desktop Recordings
'settings.remoteDesktopRecordings.title': '远程桌面录屏',
'settings.remoteDesktopRecordings.autoRecord': '自动录制远程桌面会话',
'settings.remoteDesktopRecordings.autoRecordDesc': 'RDP/VNC 会话连接成功后自动开始录制(默认关闭以节省磁盘空间)。',
'settings.remoteDesktopRecordings.fps': '录制帧率',
'settings.remoteDesktopRecordings.fpsDesc': '帧率越高画面越流畅,但会占用更多 CPU 和磁盘空间。',
'settings.remoteDesktopRecordings.fpsOption': '{fps} FPS',
'settings.remoteDesktopRecordings.includeAudio': '包含 RDP 音频',
'settings.remoteDesktopRecordings.includeAudioDesc': '在可用时将远程桌面音频合并录制到 .webm 视频中。',
'settings.remoteDesktopRecordings.maxStorage': '最大存储空间上限',
'settings.remoteDesktopRecordings.maxStorageDesc': '总占用超出上限时,自动优先清理最早的未收藏会话录屏。',
'settings.remoteDesktopRecordings.retentionDays': '录屏保留天数',
'settings.remoteDesktopRecordings.retentionDaysDesc': '自动删除超过保留期的未收藏会话录屏。',
'settings.remoteDesktopRecordings.retentionDaysOption': '{days} 天',
'settings.remoteDesktopRecordings.retentionUnlimited': '不限制',
'settings.remoteDesktopRecordings.storageUsage': '本地录屏存储占用',
'settings.remoteDesktopRecordings.storageUsageSummary': '{count} 个文件 · {size}',
'settings.remoteDesktopRecordings.storageUsageLoading': '正在计算磁盘占用...',
'settings.remoteDesktopRecordings.refresh': '刷新存储统计',
'settings.remoteDesktopRecordings.openFolder': '打开文件夹',
'settings.remoteDesktopRecordings.clearAll': '清空全部录屏',
'settings.remoteDesktopRecordings.clearAllConfirmTitle': '清空全部远程桌面录屏?',
'settings.remoteDesktopRecordings.clearAllConfirmDesc': '将从此设备永久删除 {count} 个 .webm 录屏文件。',
'settings.remoteDesktopRecordings.clearResult': '已删除 {count} 个录屏文件。',
'settings.remoteDesktopRecordings.hint': '录屏文件仅保存在本设备本地,绝不上传云同步;已收藏的连接日志录屏不会在自动清理中被删除。',
'sftp.context.openInExternalEditor': '在 {editor} 中打开',
'hostDetails.externalEditorShellIntegration': '在此会话中启用外部编辑器命令',
'hostDetails.externalEditorShellIntegration.desc': '通过 ~/.netcatty/bin 仅在当前 Netcatty 终端会话中启用 `zed` / `ncedit`(支持 tmux),不修改 ~/.bashrc 或 ~/.zshrc。',
};
-71
View File
@@ -117,9 +117,6 @@ export const zhTWAiMessages: Messages = {
'ai.codex.appServer.available': '目前 Codex CLI 支援 App Server。',
'ai.codex.appServer.modelCatalogWarning': 'Codex 動態模型目錄暫時無法使用,目前將使用內建模型清單。',
'ai.codex.appServer.approval.allowSession': '本工作階段允許',
'ai.planReview.title': '審核實作方案',
'ai.planReview.keepPlanning': '繼續規劃',
'ai.planReview.approveAndImplement': '批准並實作',
'ai.codex.appServer.userInput.title': 'Codex 需要你的輸入',
'ai.codex.appServer.userInput.description': '回答以下問題以繼續目前任務。',
'ai.codex.appServer.userInput.other': '輸入其他答案',
@@ -308,16 +305,6 @@ export const zhTWAiMessages: Messages = {
'ai.opencode.v2.mcpSkipped': 'OpenCode 2 無法掛接 MCP 工具,對話會繼續,但沒有該工具。',
// AI MiMo Code(小米 MiMo Code CLI,OpenCode 分支)
'ai.agy.title': 'Antigravity CLI(Beta)',
'ai.agy.description': 'Beta 測試中:透過官方 Agent Client Protocol(agy acp --stdio)接入 Google Antigravity CLI。目前支援程度有限且未經充分測試,使用請自負風險。請在終端完成 agy 登入後再作為外部程式設計 Agent 使用。',
'ai.agy.detecting': '偵測中...',
'ai.agy.detected': '已偵測到',
'ai.agy.notFound': '未找到',
'ai.agy.path': '路徑:',
'ai.agy.notFoundHint': '在 PATH 中未找到 agy。請安裝 Antigravity CLI 或在下方指定執行檔路徑。',
'ai.agy.customPathPlaceholder': '例如 /usr/local/bin/agy',
'ai.agy.check': '檢查',
'ai.agy.resetPath': '重設',
'ai.mimo.title': 'MiMo Code',
'ai.mimo.description': '小米 MiMo Code CLI(OpenCode 分支)。安裝後在它自己的設定裡設定 provider 和金鑰,偵測到後即可作為外部程式設計 Agent 使用。',
'ai.mimo.detecting': '偵測中...',
@@ -341,9 +328,6 @@ export const zhTWAiMessages: Messages = {
'ai.grok.check': '檢查',
'ai.grok.resetPath': '重設',
'ai.grok.runtime.acp.title': '使用 Grok ACP(agent stdio)',
'ai.grok.userQuestion.title': 'Grok 正在等待你的回答',
'ai.grok.userQuestion.description': '回答不會變更權限。請勿填寫密碼或權杖。',
'ai.grok.userQuestion.submit': '傳送回答',
'ai.grok.runtime.acp.default': '預設',
'ai.grok.runtime.acp.description':
'透過 Agent Client Protocol(grok agent stdio)接入 Grok。在 session/new 注入 Netcatty MCP。關閉後使用原始 headless streaming-json CLI 路徑。',
@@ -644,25 +628,12 @@ export const zhTWAiMessages: Messages = {
'ai.chat.managerRebindPick': '選擇目標終端或工作區…',
'ai.chat.managerRebindHere': '目前面板',
'ai.chat.managerRebindDone': '已將「{title}」移動到 {target}。',
'ai.chat.managerToggleSelection': '選擇工作階段',
'ai.chat.managerSelectAll': '全選',
'ai.chat.managerSelectedCount': '已選 {n} 個',
'ai.chat.managerSelectRow': '選擇此工作階段',
'ai.chat.managerRegenerateTitle': '用 AI 重新產生標題',
'ai.chat.managerRegenerateTitleUpdated': '會話標題已更新。',
'ai.chat.managerRegenerateTitleUnchanged': '會話標題已是最新。',
'ai.chat.managerRegenerateTitleNoModel': '未設定用於產生標題的 AI 模型,請在 AI 設定中設定供應商或標題模型。',
'ai.chat.managerRegenerateTitleFailed': '重新產生標題失敗:{error}',
'ai.chat.managerRegenerateTitleBatchDone': '已更新 {n} 個會話標題。',
'ai.chat.managerRegenerateTitleBatchPartial': '已更新 {updated} 個標題,{failed} 個失敗。',
'ai.chat.managerExportOne': '匯出此會話',
'ai.chat.managerBadgeActive': '使用中',
'ai.chat.managerBadgeIdle': '閒置',
'ai.chat.managerMessagesCount': '{n} 則訊息',
'ai.chat.managerDeleteTitle': '刪除此會話?',
'ai.chat.managerDeleteMessage': '「{title}」及其訊息將從所有面板中移除,且無法復原。',
'ai.chat.managerBulkDeleteTitle': '刪除選取的 {n} 個工作階段?',
'ai.chat.managerBulkDeleteMessage': '選取的 {n} 個工作階段及其訊息將從所有面板中移除,且無法復原。',
'ai.chat.justNow': '剛剛',
'ai.chat.minutesAgo': '{n}分鐘前',
'ai.chat.hoursAgo': '{n}小時前',
@@ -713,25 +684,9 @@ export const zhTWAiMessages: Messages = {
'ai.chatShortcuts.selectionAction': '選取終端內容時顯示「新增到對話」',
'ai.chatShortcuts.selectionAction.description': '在終端裡選取文字後顯示 AI 快捷按鈕。',
'ai.chatHistory.title': '聊天歷史',
'ai.chatHistory.storageUsage': '本機聊天記錄大小',
'ai.chatHistory.storageUsage.description': '以 UTF-8 JSON 估算已儲存的聊天記錄大小。',
'ai.chatHistory.storageUsage.measure': '估算',
'ai.chatHistory.storageUsage.measuring': '正在估算…',
'ai.chatHistory.storageUsage.result': '已儲存 {count} 筆記錄,JSON 大小約為 {size}。',
'ai.chatHistory.storageUsage.partial': '其中 {count} 筆記錄未計入大小估算。',
'ai.chatHistory.storageUsage.error': '無法讀取本機聊天記錄,請再試一次。',
'ai.chatHistory.messageCap': '每個會話保留的訊息數',
'ai.chatHistory.messageCap.description': '每個會話最多儲存的訊息數(50–2000)。調低後會在下一次寫入時從儲存中捨棄最舊的訊息。數值越大,儲存空間與雲端同步體積也越大。',
'ai.chatHistory.messageCap.unit': '則訊息',
'ai.chatHistory.autoLlmTitle': '自動產生工作階段標題',
'ai.chatHistory.autoLlmTitle.description': '首則訊息後以一次輕量 LLM 呼叫產生簡短標題;不可用時退回首行。僅本機生效。',
'ai.chatHistory.titleModel': '標題模型',
'ai.chatHistory.titleModel.description': '用於產生工作階段標題的 provider 與模型,建議選擇輕巧便宜的模型。預設使用目前的 Catty 模型。',
'ai.chatHistory.titleModel.none': '沒有可用的 provider。',
'ai.chatHistory.titleModel.useCurrentCatty': '使用目前的 Catty 模型',
'ai.chatHistory.titleModel.unavailable': '無法使用',
'ai.chatHistory.titleModel.providerPlaceholder': '選擇 provider',
'ai.chatHistory.titleModel.modelPlaceholder': '選擇模型',
// AI Error
'ai.codex.bridgeError': 'Codex 主行程處理器尚未載入。請完全重新啟動 Netcatty 或重新啟動 Electron 開發行程,然後重試。',
@@ -879,15 +834,6 @@ export const zhTWAiMessages: Messages = {
'ai.chat.artifact.scriptRunPaused': '指令碼執行已暫停',
'ai.chat.artifact.scriptRunResumed': '指令碼執行已恢復',
'ai.chat.artifact.scriptReference': 'nct API 參考',
'ai.chat.artifact.rdScreenRead': '讀取遠端畫面',
'ai.chat.artifact.rdScreenGrid': '讀取遠端畫面(座標網格)',
'ai.chat.artifact.rdScreenCropped': '局部放大截圖',
'ai.chat.artifact.rdActionExecuted': '已執行 {count} 步遠端操作',
'ai.chat.artifact.rdActionCount': '{count} 個操作',
'ai.chat.artifact.rdActionPreempted': '遠端操作已由使用者接管',
'ai.chat.artifact.rdScreenFailed': '遠端截圖失敗',
'ai.chat.artifact.rdActionFailed': '遠端桌面操作失敗',
'ai.chat.artifact.rdPreviewScreen': '預覽擷取的畫面',
'zmodem.waitingForRemote': '等待遠端...',
'zmodem.uploading': '上傳中',
'zmodem.downloading': '下載中',
@@ -921,21 +867,4 @@ export const zhTWAiMessages: Messages = {
"ai.toolSettings.conflict": "設定已在其他視窗變更,目前草稿已保留。請取消並重新開啟以載入已儲存的設定。",
"ai.toolSettings.retry": "重試",
"ai.toolSettings.applyingHttp": "正在套用 HTTP 設定…",
"ai.vision.quickPrompt.explainError": "解釋目前錯誤",
"ai.vision.quickPrompt.diagnoseUi": "診斷介面問題",
"ai.vision.quickPrompt.summarizeScreen": "總結畫面內容",
"ai.vision.unsupportedModelWarning": "目前模型({model})不支援圖片輸入,切換至支援視覺的模型即可看圖讀屏。",
"ai.vision.switchModel": "切換模型",
"ai.vision.modelSupportsVision": "支援圖片輸入",
"ai.vision.snip.hint": "拖曳框選區域 · 按 Esc 取消",
"ai.vision.snip.cancel": "取消框選",
"ai.vision.snip.ariaLabel": "框選遠端桌面畫面區域",
"ai.vision.privacyBlocked": "目前工作階段已禁止 AI 讀屏。",
"ai.vision.viewingScreen": "Catty 正在檢視桌面",
"ai.vision.askAi": "問 AI",
"ai.vision.captureFullAndAsk": "一鍵截圖問 AI",
"ai.vision.snipRegionAndAsk": "框選區域問 AI",
"ai.vision.openAiChat": "開啟 AI 助手",
"ai.vision.privacyLockOn": "已禁止 AI 讀屏",
"ai.vision.privacyLockOff": "允許 AI 讀屏",
};
+2 -61
View File
@@ -8,7 +8,7 @@ export const zhTWCoreMessages: Messages = {
"settings.plugins.github.busy": "正在下載、驗證或安裝套件…",
"settings.plugins.github.review": "確認儲存庫來源並通過完整性驗證,並不代表發布者值得信任。安裝過程不會執行建置指令碼,外掛安裝後預設停用。啟用前,請確認來源可信並檢查各項權限的授權方式。",
"settings.plugins.github.accept": "已審查並信任此儲存庫,且已查看宣告的權限。",
"settings.plugins.github.confirm": "安裝",
"settings.plugins.github.confirm": "安裝並保持停用",
"settings.plugins.github.download": "下載並審查",
"settings.plugins.github.error.invalidRepository": "請輸入 https://github.com/owner/repo、github.com/owner/repo 或 owner/repo。請只填寫儲存庫位址,不要包含帳號密碼、查詢參數、片段或額外路徑。",
"settings.plugins.github.error.unavailable": "目前的工作階段無法從 GitHub 安裝外掛。",
@@ -438,8 +438,6 @@ export const zhTWCoreMessages: Messages = {
'settings.vault.showSftpTab': '顯示 SFTP 分頁',
'settings.vault.showSftpTabDesc': '在頂部分頁列顯示獨立的 SFTP 檢視。關閉後可改用工作階段內左側的 SFTP 側欄。',
'settings.vault.showHostTreeSidebar': '顯示主機列表側欄',
'settings.vault.removeTopTabsDragArea': '移除頂部視窗拖曳區域',
'settings.vault.removeTopTabsDragAreaDesc': '開啟後移除分頁上方的拖曳空白區域,讓頂部可供點擊分頁與視窗按鈕。',
'settings.vault.showHostTreeSidebarDesc': '在終端和編輯器分頁顯示主機列表側欄及頂部開關。',
'settings.vault.autoImportSystemKnownHosts': '自動匯入系統 known_hosts',
'settings.vault.autoImportSystemKnownHostsDesc': '開啟主機庫時靜默匯入 OpenSSH known_hosts 中的記錄。關閉後,Netcatty 已知主機與系統信任庫保持獨立;仍可透過「掃描系統」手動匯入。',
@@ -736,16 +734,6 @@ Vaults 分頁維持扁平,不使用這塊背景。
'vault.nav.notes': '筆記',
'vault.nav.knownHosts': '已知主機',
'vault.nav.logs': '日誌',
'vault.nav.customize': '自訂側邊欄',
'vault.nav.customizeHint': '拖曳項目以調整順序,或切換顯示狀態。',
'vault.nav.hideItem': '隱藏「{label}」',
'vault.nav.moveUp': '上移',
'vault.nav.moveDown': '下移',
'vault.nav.resetDefault': '恢復預設',
'vault.nav.alwaysVisible': '始終顯示',
'vault.nav.pluginBadge': '外掛',
'vault.nav.dragToReorder': '拖曳以調整「{label}」的順序',
'vault.nav.toggleVisibility': '切換「{label}」的顯示狀態',
'proxyProfiles.action.add': '新增代理',
'proxyProfiles.search.placeholder': '搜尋代理…',
@@ -797,10 +785,7 @@ Vaults 分頁維持扁平,不使用這塊背景。
'vault.groups.details': '群組詳情',
'vault.groups.details.general': '常規',
'vault.groups.details.ssh': 'SSH',
'vault.groups.details.rdp': 'RDP',
'vault.groups.details.vnc': 'VNC',
'vault.groups.details.telnet': 'Telnet',
'vault.groups.details.protocolNotEnabledDesc': '目前群組尚未設定 {protocol} 預設協定設定。',
'vault.groups.details.advanced': '高階',
'vault.groups.details.appearance': '外觀',
'vault.groups.details.mosh': 'Mosh',
@@ -1250,12 +1235,7 @@ Vaults 分頁維持扁平,不使用這塊背景。
"plugins.sidebar.selectTerminal": "請先選擇已開啟的終端。",
"plugins.sidebar.loading": "正在載入擴充功能頁面…",
"plugins.vault.loading": "正在載入擴充功能頁面…",
"plugins.vault.viewError": "擴充功能頁面無法顯示。",
"plugins.vault.retry": "重試",
"plugins.interaction.title": "外掛請求",
"plugins.interaction.openUrlTitle": "開啟外部連結?",
"plugins.interaction.openUrlNote": "此外掛請求在預設瀏覽器中開啟以下 HTTPS 連結:",
"plugins.interaction.openUrlAction": "開啟連結",
"plugins.interaction.sharing": "分享的文字會交給此外掛及其已授權能力(包括網路存取)。讀取文字不代表核准新的網路目的地。",
"plugins.interaction.input": "輸入文字",
"plugins.interaction.filter": "篩選選項",
@@ -1358,10 +1338,7 @@ Vaults 分頁維持扁平,不使用這塊背景。
"settings.plugins.market.title": "外掛市集",
"settings.plugins.market.note": "精選開源外掛。審核不代表安全認證,更新由你手動確認。",
"settings.plugins.market.back": "所有外掛",
"settings.plugins.market.install": "安裝",
"settings.plugins.market.installing": "安裝中...",
"settings.plugins.market.update": "更新",
"settings.plugins.market.updating": "更新中...",
"settings.plugins.market.install": "安裝此版本(保持停用)",
"settings.plugins.market.installNote": "這會替換並停止已安裝版本。請在已安裝列表檢查權限後再啟用。",
"settings.plugins.market.sourceOnly": "第一方源碼示例。請用本地 CLI 構建並匯入 .ncpkg;尚未發佈可下載發行包。",
"settings.plugins.market.readmeNote": "固定到上面的提交。HTML 不執行,遠端圖片不載入。內容由外掛作者提供。",
@@ -1418,40 +1395,4 @@ Vaults 分頁維持扁平,不使用這塊背景。
'plugins.hostActions.managedUnsupported': '受管理的 SSH 設定變更需在 Vault 主機編輯器中完成。',
'plugins.hostActions.failed': '請求已過期、被撤銷或主機已變更。請重新選擇主機。',
'plugins.hostActions.selectionLimit': '最多選擇 50 部目前的主機。',
'settings.externalEditor.title': '外部遠端編輯器',
'settings.externalEditor.desc': '直接在本機編輯器(如 Zed、VS Code 或 Cursor)中開啟遠端 SSH 專案與檔案。',
'settings.externalEditor.preferredEditor': '偏好編輯器',
'settings.externalEditor.preferredEditor.desc': 'SFTP 右鍵選單與終端機開啟請求預設使用的本機編輯器。',
'settings.externalEditor.executablePath': '編輯器執行檔',
'settings.externalEditor.executablePath.desc': '留空以自動偵測,或手動選擇本機程式路徑。',
'settings.externalEditor.executablePath.placeholder': '自動偵測執行檔路徑',
'settings.externalEditor.status.configured': '已自訂路徑',
'settings.externalEditor.status.detected': '已自動偵測',
'settings.externalEditor.status.notFound': '未偵測到',
'settings.externalEditor.browse': '瀏覽…',
'settings.externalEditor.resetPath': '重設為自動偵測',
'settings.externalEditor.redetect': '重新偵測已安裝的編輯器',
'settings.externalEditor.customArgs': '自訂參數',
'settings.externalEditor.customArgs.desc': '以空白分隔的參數清單(支援預留位置:{sshUri}、{sshTarget}、{remotePath}、{encodedPath}、{kind})。',
'settings.externalEditor.connectionMode': 'SSH 連線模式',
'settings.externalEditor.connectionMode.desc': 'Netcatty SSH 橋接會直接重複使用目前已完成驗證的連線,無需將私鑰或主機清單匯出至磁碟。',
'settings.externalEditor.connectionMode.bridge': 'Netcatty SSH 橋接 (*.netcatty)',
'settings.externalEditor.connectionMode.direct': '直連 OpenSSH (user@host:port)',
'settings.externalEditor.sshBridge.title': 'OpenSSH *.netcatty 橋接規則',
'settings.externalEditor.sshBridge.desc': '僅在 OpenSSH 設定中寫入單一靜態 Host *.netcatty 規則區塊,不包含任何主機名稱、私鑰或密碼。',
'settings.externalEditor.sshBridge.install': '安裝橋接規則',
'settings.externalEditor.sshBridge.reinstall': '重新安裝規則',
'settings.externalEditor.sshBridge.update': '更新規則',
'settings.externalEditor.sshBridge.remove': '移除規則',
'settings.externalEditor.terminalRequests': '允許終端機發起開啟請求 (OSC 7337)',
'settings.externalEditor.terminalRequests.desc': '允許遠端 Shell 透過 `zed .` 等指令在本機編輯器中開啟遠端路徑。',
'settings.externalEditor.autoSetup': '僅在 Netcatty 工作階段啟用遠端編輯器指令',
'settings.externalEditor.autoSetup.desc': '將 `zed` / `ncedit` 指令稿安裝至 ~/.netcatty/bin,並僅於目前 Netcatty 終端機工作階段的 PATH 生效,不修改 ~/.bashrc 或 ~/.zshrc(亦可依主機個別切換)。',
'settings.externalEditor.defaultTrust': '預設主機信任原則',
'settings.externalEditor.defaultTrust.desc': '尚未單獨設定信任原則的遠端主機請求開啟編輯器時的處理方式。',
'settings.externalEditor.trust.ask': '每次詢問',
'settings.externalEditor.trust.allow': '一律允許',
'settings.externalEditor.trust.deny': '一律拒絕',
'settings.externalEditor.trustedHosts.host': '主機',
'settings.externalEditor.trustedHosts.policy': '原則',
};
-12
View File
@@ -101,16 +101,4 @@ export const zhTWMonitorMessages = {
"monitor.status.disconnected": "已中斷",
"monitor.status.stale": "讀數過期",
"monitor.status.missing": "主機已刪除",
"monitor.status.online": "線上",
"monitor.status.offline": "離線",
"monitor.checkNow": "立即檢測",
"monitor.openRemoteDesktop": "開啟 {protocol}",
"monitor.latencyTrend": "延遲趨勢",
"monitor.bannerVerified": "協定已驗證",
"monitor.bannerUnverified": "連接埠已開啟(未驗證協定)",
"monitor.companionDesktops": "伴生遠端桌面服務",
"monitor.reachabilityOnly": "僅線上與延遲探測",
"monitor.viaSsh": "經由 SSH",
"monitor.direct": "直連",
"monitor.rttStats": "最小 / 平均 / 最大",
};
@@ -214,25 +214,6 @@ export const zhTwSystemManagerMessages: Messages = {
'systemManager.ports.unknownProcess': '未知行程',
'systemManager.ports.terminate': '結束行程',
'systemManager.ports.confirmTerminate': '向佔用該連接埠的行程 {{pid}} 傳送 SIGTERM?',
'systemManager.ports.forwardedMeta': '{{count}} 個已轉發',
'systemManager.ports.forward': '轉發至本機連接埠',
'systemManager.ports.stopForward': '停止連接埠轉發',
'systemManager.ports.forwardTitle': '轉發連接埠至本機',
'systemManager.ports.forwardDesc': '透過 SSH 將此遠端監聽連接埠轉發至本機連接埠。',
'systemManager.ports.forwardDescWithHost': '透過 SSH 將 {{host}} 上的此監聽連接埠轉發至本機連接埠。',
'systemManager.ports.forwardLocalPort': '本機連接埠',
'systemManager.ports.forwardBindAddress': '繫結位址',
'systemManager.ports.forwardAction': '開始轉發',
'systemManager.ports.forwarding': '轉發中…',
'systemManager.ports.forwardInvalidPort': '請輸入 1 到 65535 之間的有效連接埠號碼。',
'systemManager.ports.forwardInvalidBindAddress': '請輸入有效的繫結位址(例如 127.0.0.1 或 0.0.0.0)。',
'systemManager.ports.forwardPortInUse': '本機連接埠 {{port}} 已被「{{label}}」佔用。',
'systemManager.ports.forwardFailed': '啟動連接埠轉發失敗。',
'systemManager.ports.forwardStarted': '已開始轉發 {{local}} → {{remote}}',
'systemManager.ports.forwardStopped': '已停止轉發 {{local}}',
'systemManager.ports.copiedEndpoint': '已複製 {{endpoint}}',
'systemManager.ports.copyEndpointAria': '複製本機位址 {{endpoint}}',
'systemManager.ports.clickToCopy': '點擊複製本機位址',
'systemManager.services.unavailable': '此主機未偵測到 systemctl。',
'systemManager.services.loading': '正在載入 systemd 服務…',
@@ -2,14 +2,6 @@ import type { Messages } from '../types';
export const zhTWTerminalMessages: Messages = {
'terminal.directory.open': '目前目錄:{path}。變更目錄',
'terminal.gitBranch.current': 'Git 分支:{{value}}',
'terminal.gitBranch.detached': '分離的 HEAD:{{value}}',
'terminal.gitBranch.search': '搜尋本機分支…',
'terminal.gitBranch.branches': '本機分支',
'terminal.gitBranch.loading': '正在讀取分支…',
'terminal.gitBranch.empty': '還沒有本機分支',
'terminal.gitBranch.noMatches': '沒有符合的分支',
'terminal.gitBranch.unavailable': '無法讀取此工作階段的分支。',
'terminal.directory.unknown': '目錄未知',
'terminal.directory.search': '搜尋目前目錄下的資料夾…',
'terminal.directory.directories': '目錄',
@@ -23,8 +15,6 @@ export const zhTWTerminalMessages: Messages = {
'terminal.directory.integrationUnavailable': 'PowerShell 目錄整合尚未就緒,啟動參數或執行原則可能阻止載入。',
'terminal.directory.cmdIntegrationUnavailable': '正在等待原 CMD 工作階段回報目前目錄。',
'terminal.directory.gitBashIntegrationUnavailable': '正在等待原 Git Bash 工作階段中的可存取目錄。',
'terminal.directory.wslIntegrationUnavailable': '正在等待所選 WSL 發行版本中的 Bash 返回閒置提示字元。',
'terminal.directory.cygwinIntegrationUnavailable': '正在等待 Cygwin Bash 返回閒置提示字元。',
'terminal.directory.nonFilesystem': '目前 PowerShell 位置不是檔案系統目錄。',
'terminal.directory.accessDenied': '沒有權限列出此目錄。',
'terminal.directory.busy': '請等待終端回到空白命令提示字元。',
@@ -580,9 +570,6 @@ export const zhTWTerminalMessages: Messages = {
'選擇自動補全的歷史建議來自目前主機,還是所有主機上執行過的指令。',
'settings.terminal.autocomplete.historyScope.host': '目前主機',
'settings.terminal.autocomplete.historyScope.global': '全部主機',
'settings.terminal.autocomplete.showSnippets': '顯示程式碼片段',
'settings.terminal.autocomplete.showSnippets.desc':
'在補全列表中顯示符合的程式碼片段。若片段較多、排在列表前面,可關閉此項。',
'settings.terminal.section.passwordPromptAssist': '密碼提示輔助',
'settings.terminal.passwordPromptAssist.mode': '輔助模式',
'settings.terminal.passwordPromptAssist.mode.desc':
@@ -609,9 +596,6 @@ export const zhTWTerminalMessages: Messages = {
'settings.shortcuts.recording': '請按鍵...',
'settings.shortcuts.none': '無',
'settings.shortcuts.setDisabled': '設為停用',
'settings.shortcuts.addExtra': '新增快速鍵',
'settings.shortcuts.additional': '附加快速鍵',
'settings.shortcuts.removeExtra': '移除快速鍵',
'settings.shortcuts.category.tabs': '分頁',
'settings.shortcuts.category.terminal': '終端',
'settings.shortcuts.category.navigation': '導航',
@@ -645,7 +629,6 @@ export const zhTWTerminalMessages: Messages = {
'settings.shortcuts.binding.command-palette': '開啟指令面板',
'settings.shortcuts.binding.quick-switch': '快速切換',
'settings.shortcuts.binding.new-workspace': '新增工作區',
'settings.shortcuts.binding.add-session-to-workspace': '新增工作階段至工作區',
'settings.shortcuts.binding.snippets': '開啟程式碼片段',
'settings.shortcuts.binding.broadcast': '切換廣播模式',
'settings.shortcuts.binding.toggle-opacity': '切換視窗透明度',
@@ -735,8 +718,6 @@ export const zhTWTerminalMessages: Messages = {
'keychain.export.script': '指令碼 *',
'keychain.export.scriptPlaceholder': '匯出指令碼...',
'keychain.export.missingCredentials': '主機未儲存密碼或金鑰。請先為該主機新增密碼憑證。',
'keychain.export.missingPublicKey': '此金鑰沒有公鑰。請先在編輯頁貼上公鑰,然後再試「匯出並繫結」。',
'keychain.export.missingPublicKeyNote': '此金鑰沒有公鑰。請先在金鑰編輯頁貼上公鑰,然後再匯出。',
'keychain.export.successTitle': '匯出成功',
'keychain.export.successMessage': '已匯出公鑰並繫結到 {host}',
'keychain.export.failedTitle': '匯出失敗',
@@ -813,7 +794,6 @@ export const zhTWTerminalMessages: Messages = {
'tabs.logPrefix': '日誌:',
'tabs.logLocal': '本機',
'tabs.copyTab': '複製分頁',
'tabs.addSessionToWorkspace': '新增工作階段至此工作區',
'tabs.duplicateSession': '複製工作階段',
'tabs.copyTabToNewWindow': '複製分頁到新視窗',
'tabs.copyTabToNewWindowFailed': '無法在新視窗開啟分頁',
@@ -1107,12 +1087,4 @@ export const zhTWTerminalMessages: Messages = {
'terminal.browser.allScopeHint': '在每台主機的瀏覽器中顯示。',
'terminal.browser.downloadLocation': '檔案儲存在系統「下載項目」資料夾',
'terminal.browser.saveAs': '另存新檔…',
'terminal.externalEditor.opened': '已在 {editor} 中開啟 {path}',
'terminal.externalEditor.failed': '無法在 {editor} 中開啟',
'terminal.externalEditor.prompt.title': '在 {editor} 中開啟?',
'terminal.externalEditor.prompt.desc': '遠端主機 {host} 請求在 {editor} 中開啟以下遠端路徑:',
'terminal.externalEditor.prompt.deny': '拒絕',
'terminal.externalEditor.prompt.allowOnce': '僅允許這次',
'terminal.externalEditor.prompt.alwaysTrust': '一律信任此主機',
'terminal.externalEditor.autoSetupConfigured': '已設定遠端編輯器指令 ({editor})',
};
+1 -378
View File
@@ -109,7 +109,6 @@ export const zhTWVaultMessages: Messages = {
// Protocol select dialog
'protocolSelect.chooseProtocol': '選擇協定',
'protocolSelect.rememberDefault': '記住為預設連線(下次不再詢問)',
'protocolSelect.port': '埠:',
// Host Details
'hostDetails.title.details': '主機詳情',
@@ -380,22 +379,7 @@ export const zhTWVaultMessages: Messages = {
'hostDetails.startupCommand.runMode.help': '選擇連線後如何傳送多行啟動指令。',
'hostDetails.startupCommand.runMode.lineDelay': '逐行傳送',
'hostDetails.startupCommand.runMode.paste': '一次性傳送',
'hostDetails.otherProtocols': '附加協定',
'hostDetails.otherProtocolsHint': '為目前 SSH 主機掛載輔助連線方式,不影響預設連線',
'hostDetails.protocol.defaultHint': '雙擊預設使用 {protocol}',
'hostDetails.protocol.secondaryHint': '已作為附加協定啟用',
'hostDetails.protocol.setDefault': '設為預設',
'hostDetails.protocol.remove': '移除',
'hostDetails.protocol.doubleClick': '雙擊連線',
'hostDetails.protocol.connectOptionDefault': '預設 {protocol}',
'hostDetails.protocol.connectOptionAsk': '每次詢問',
'hostDetails.protocol.alsoEnable': '同時啟用',
'hostDetails.protocol.removeProtocol': '移除 {protocol}',
'hostDetails.protocol.addProtocol': '新增 {protocol}',
'hostDetails.section.connectBehavior': '連線行為',
'hostDetails.protocol.notEnabledDesc': '目前主機尚未啟用 {protocol} 協定。',
'hostDetails.protocol.addSecondary': '新增 {protocol}(保留 {defaultProtocol} 預設)',
'hostDetails.protocol.switchOnly': '僅使用 {protocol}',
'hostDetails.otherProtocols': '其他協定',
'hostDetails.telnetOn': 'Telnet on',
'hostDetails.port': '埠',
'hostDetails.telnet.credentials': '憑證',
@@ -848,7 +832,6 @@ export const zhTWVaultMessages: Messages = {
'cloudSync.localBackups.reason.beforeRestore': '恢復前',
'cloudSync.localBackups.versionChange': '{from} -> {to}',
'cloudSync.localBackups.counts': '{hosts} 台主機,{keys} 個金鑰,{snippets} 個程式碼片段,{notes} 條筆記',
'cloudSync.localBackups.aiCounts': '{sessions} 個 AI 工作階段,{settings} 項設定',
'cloudSync.localBackups.restore': '恢復',
'cloudSync.localBackups.restoreSuccess': '已恢復本機備份。',
'cloudSync.localBackups.restoreFailedTitle': '恢復失敗',
@@ -1072,364 +1055,4 @@ export const zhTWVaultMessages: Messages = {
'vault.import.plugins.moreItems': '本次匯入還包含 {count} 個項目。',
'vault.import.plugins.moreDiagnostics': '預覽中省略了另外 {count} 則診斷資訊。',
// Remote Desktop (VNC / RDP / JumpServer RDP)
'vault.hosts.newRdpHost': '新增 RDP 主機',
'vault.hosts.newVncHost': '新增 VNC 主機',
'vault.hosts.connectRdp': '連線 RDP',
'vault.hosts.connectSsh': '連線 SSH',
'vault.hosts.connectVnc': '連線 VNC',
'vault.hosts.openInSystemRdp': '在系統 RDP 用戶端中開啟',
'vault.hosts.openInSystemVnc': '在系統螢幕共享中開啟',
'settings.jmsDeepLink.rdpLaunchMode': 'JumpServer RDP 開啟方式',
'settings.jmsDeepLink.rdpLaunchModeDesc': '選擇透過 JumpServer jms:// 啟動 Windows RDP 工作階段時使用 Netcatty 內建用戶端或系統 RDP 用戶端。',
'settings.jmsDeepLink.rdpLaunchMode.builtin': '內建用戶端',
'settings.jmsDeepLink.rdpLaunchMode.system': '系統 RDP 用戶端',
'vault.import.rdp.label': 'RDP (.rdp)',
'vault.import.rdp.hint': '匯入單一或多個 Microsoft / JumpServer .rdp 檔案。',
'vault.import.remoteDesktopTip': 'MobaXterm、CSV 與 .rdp 匯入皆支援 RDP 與 VNC 主機。',
'keychain.identity.domain': '網域 (RDP,選填)',
'keychain.identity.domainPlaceholder': 'CORP 或 AD 網域',
'quickConnect.rdp.domain': '網域(選填)',
'quickConnect.rdp.domainPlaceholder': 'CORP 或留空使用本機帳戶',
'quickConnect.vnc.optionalUsername': '使用者名稱(選填,用於 Apple ARD / VeNCrypt)',
'quickConnect.vnc.optionalUsernameHint': '多數 VNC 伺服器僅需密碼驗證。',
'quickConnect.vnc.passwordHint': '若 VNC 伺服器不需密碼,可留空直接連線。',
'quickConnect.vnc.displayHelper': '顯示器 {display}',
'hostDetails.protocol.label': '通訊協定',
'hostDetails.rdp.portLabel': 'RDP 連接埠',
'hostDetails.vnc.portLabel': 'VNC 連接埠',
'hostDetails.vnc.displayHint': '顯示器 {display}',
'hostDetails.vnc.displayPlaceholder': '5900 或 :0',
'hostDetails.rdp.domain': '網域(選填)',
'hostDetails.rdp.domainPlaceholder': 'CORP(選填)',
'hostDetails.rdp.domainLabel': '網域',
'hostDetails.rdp.usernamePlaceholder': '使用者名稱、DOMAIN\\user 或 JumpServer user|uuid',
'hostDetails.vnc.optionalUsername': '使用者名稱(Apple ARD / VeNCrypt)',
'hostDetails.vnc.optionalUsernameHint': '選填。標準 VNC 伺服器僅使用密碼驗證。',
'hostDetails.vnc.usernamePlaceholder': '使用者名稱(選填)',
'hostDetails.remoteDesktop.sectionTitle': '遠端桌面顯示與選項',
'hostDetails.rdp.resolutionMode': '解析度模式',
'hostDetails.rdp.resolutionMode.dynamic': '動態自適應',
'hostDetails.rdp.resolutionMode.fit': '符合視窗',
'hostDetails.rdp.resolutionMode.fixed': '固定尺寸',
'hostDetails.rdp.width': '寬度',
'hostDetails.rdp.height': '高度',
'hostDetails.rdp.dimensionHint': '請輸入 200 到 8192 之間的整數。',
'hostDetails.rdp.colorDepth': '色彩深度',
'hostDetails.rdp.audio': '音訊輸出',
'hostDetails.rdp.audioDesc': '在本機播放遠端桌面音效',
'hostDetails.rdp.clipboard': '剪貼簿同步',
'hostDetails.rdp.clipboardDesc': '與遠端桌面共用文字與圖片',
'hostDetails.rdp.clipboardFiles': '剪貼簿檔案傳輸',
'hostDetails.rdp.clipboardFilesDesc': '允許透過剪貼簿複製與拖曳傳輸檔案',
'hostDetails.rdp.securityMode': '安全性模式',
'hostDetails.rdp.securityMode.auto': '自動',
'hostDetails.rdp.securityMode.nla': 'NLA (CredSSP)',
'hostDetails.rdp.securityMode.tls': 'TLS',
'hostDetails.rdp.securityMode.rdp': '標準 RDP',
'hostDetails.rdp.ignoreCertErrors': '忽略憑證錯誤',
'hostDetails.rdp.ignoreCertErrorsDesc': '略過 TLS 憑證信任提示(不建議)',
'hostDetails.rdp.advanced': '進階 RDP 選項',
'hostDetails.rdp.loadBalanceInfo': '負載平衡資訊 (Load Balance Info)',
'hostDetails.rdp.loadBalanceInfoPlaceholder': 'tsv://MS Terminal Services Plugin.1.Collection',
'hostDetails.rdp.alternateShell': '啟動程式 (Alternate Shell)',
'hostDetails.rdp.alternateShellPlaceholder': '選填的啟動程式路徑',
'hostDetails.rdp.shellWorkingDir': '工作目錄',
'hostDetails.rdp.shellWorkingDirPlaceholder': '選填的啟動工作目錄',
'hostDetails.vnc.scalingMode': '縮放模式',
'hostDetails.vnc.scalingMode.fit': '符合視窗',
'hostDetails.vnc.scalingMode.actual': '原始比例 (1:1)',
'hostDetails.vnc.scalingMode.stretch': '延展填滿',
'hostDetails.vnc.scalingMode.dynamic': '動態自適應',
'hostDetails.vnc.quality': '畫質等級',
'hostDetails.vnc.compression': '壓縮等級',
'hostDetails.vnc.viewOnly': '唯讀模式',
'hostDetails.vnc.viewOnlyDesc': '停用傳送滑鼠與鍵盤輸入',
'hostDetails.vnc.sharedSession': '共用工作階段',
'hostDetails.vnc.sharedSessionDesc': '連線時保持其他 VNC 用戶端不斷線',
'hostDetails.vnc.clipboard': '剪貼簿同步',
'hostDetails.vnc.clipboardDesc': '與遠端桌面同步 UTF-8 剪貼簿文字',
'hostDetails.vnc.showRemoteCursor': '顯示遠端游標',
'hostDetails.vnc.showRemoteCursorDesc': '呈現伺服器提供的游標形狀',
'hostDetails.companion.addVnc': '新增 VNC',
'hostDetails.companion.addRdp': '新增 RDP',
'hostDetails.companion.tunnelViaSsh': '透過此主機 SSH 通道連線',
'hostDetails.companion.tunnelViaSshDesc': '自動經由此主機的 SSH 連線轉發連接埠',
'hostDetails.companion.tunnelTargetHost': '遠端目標位址',
'hostDetails.companion.credentialsSource': '憑證來源',
'hostDetails.companion.credentials.host': '沿用主機 SSH 憑證',
'hostDetails.companion.credentials.manual': '獨立使用者名稱 / 密碼',
'hostDetails.companion.credentials.manualHint': '儲存主機時自動加密存入鑰匙圈',
'hostDetails.companion.credentials.identity': '鑰匙圈身分',
'hostDetails.companion.credentials.ask': '每次連線時詢問',
'hostDetails.companion.identityPlaceholder': '選擇已儲存的身分',
'hostDetails.companion.saveAsIdentity': '儲存為身分',
'hostDetails.companion.saveIdentityAction': '建立並選擇身分',
'hostDetails.companion.identityLabelPlaceholder': '身分名稱(如 Desktop VNC)',
'hostDetails.companion.identitySaved': '已儲存並選取該身分。',
'hostDetails.companion.setDefaultRdp': '預設使用 RDP 連線',
'hostDetails.companion.setDefaultVnc': '預設使用 VNC 連線',
// Known Hosts — Remote Desktop TLS Certificates
'knownHosts.tabs.ssh': 'SSH 主機金鑰',
'knownHosts.tabs.remoteDesktopCerts': '遠端桌面憑證',
'knownHosts.certs.clearAll': '全部清除',
'knownHosts.certs.expired': '已過期',
'knownHosts.certs.expiredNotice': '此憑證已超過有效期限。',
'knownHosts.certs.copied': '已複製 SHA-256 指紋',
'knownHosts.certs.action.inspect': '檢視憑證詳情',
'knownHosts.certs.action.copyFingerprint': '複製 SHA-256',
'knownHosts.certs.action.revoke': '撤銷信任',
'knownHosts.certs.empty.title': '尚無已信任的遠端桌面憑證',
'knownHosts.certs.empty.desc': '連線至 RDP 或 VeNCrypt VNC 主機並選擇信任的 TLS 憑證將顯示於此處。',
'knownHosts.certs.empty.searchTitle': '找不到符合的憑證',
'knownHosts.certs.empty.searchDesc': '請嘗試搜尋其他主機名稱、連接埠、通訊協定或 SHA-256 指紋。',
'knownHosts.certs.detail.subtitle': '本裝置已固定信任的 TLS 憑證(TOFU)',
'knownHosts.certs.detail.fingerprint': 'SHA-256 指紋',
'knownHosts.certs.detail.subject': '主體 (Subject)',
'knownHosts.certs.detail.issuer': '簽發者 (Issuer)',
'knownHosts.certs.detail.validFrom': '生效時間',
'knownHosts.certs.detail.validTo': '到期時間',
'knownHosts.certs.detail.trustedAt': '首次信任',
'knownHosts.certs.detail.lastSeen': '最近連線',
'knownHosts.certs.revokeConfirm.title': '要撤銷 {endpoint} 的憑證信任嗎?',
'knownHosts.certs.revokeConfirm.desc': '下次連線至此伺服器時將重新要求驗證其 TLS 憑證指紋。',
'knownHosts.certs.clearAllConfirm.title': '要清除所有已信任的遠端桌面憑證嗎?',
'knownHosts.certs.clearAllConfirm.desc': '這將撤銷本裝置上全部 {count} 筆已固定的 RDP/VNC 憑證信任紀錄。',
'knownHosts.certs.toast.revoked': '已撤銷憑證信任',
'knownHosts.certs.toast.clearedAll': '已清除 {count} 筆遠端桌面憑證',
// Host Connection Test — RDP / VNC Probe
'hostDetails.connectionTest.rdp': '測試 RDP',
'hostDetails.connectionTest.vnc': '測試 VNC',
'hostDetails.connectionTest.probe.rtt': '網路延遲 (RTT)',
'hostDetails.connectionTest.probe.protocol': '通訊協定',
'hostDetails.connectionTest.probe.security': '協商安全模式',
'hostDetails.connectionTest.probe.rfbVersion': 'RFB 版本',
'hostDetails.connectionTest.probe.securityTypes': '支援的安全類型',
'hostDetails.connectionTest.probe.tls': 'TLS',
'hostDetails.connectionTest.probe.fingerprint': 'SHA-256 指紋',
'hostDetails.connectionTest.probe.trustStatus.trusted': '已信任',
'hostDetails.connectionTest.probe.trustStatus.firstSeen': '首次見到',
'hostDetails.connectionTest.probe.trustStatus.changed': '指紋已變更',
'hostDetails.connectionTest.probe.trustFingerprint': '信任此指紋',
'hostDetails.connectionTest.probe.fingerprintTrusted': '已信任此憑證指紋',
// Remote Desktop Toolbar — SFTP, CLIPRDR, Recording, Ask AI
'remoteDesktop.toolbar.openSftp': 'SFTP',
'remoteDesktop.toolbar.record': '錄製工作階段',
'remoteDesktop.toolbar.stopRecording': '停止錄製',
'remoteDesktop.toolbar.savingRecording': '儲存中...',
'remoteDesktop.toolbar.recording': '錄製中',
'remoteDesktop.toolbar.askAi': '詢問 AI',
'remoteDesktop.toolbar.askAiFull': '擷取全螢幕詢問 AI',
'remoteDesktop.toolbar.askAiRegion': '框選區域詢問 AI',
'remoteDesktop.toolbar.aiReadAllowed': '允許 AI 讀取畫面',
'remoteDesktop.toolbar.aiReadBlocked': '已禁止 AI 讀取此工作階段畫面',
'remoteDesktop.toolbar.aiReadingBanner': 'AI 正在檢視畫面',
'remoteDesktop.clipboard.dropTitle': '拖放檔案以傳送到遠端剪貼簿 (CLIPRDR)',
'remoteDesktop.clipboard.dropSubtitle': '放開後,在遠端桌面中按 Ctrl+V 即可貼上',
'remoteDesktop.clipboard.dropFileCount': '{count} 個檔案',
'remoteDesktop.clipboard.dropBlockedViewOnly': '唯讀模式下無法拖放檔案',
'remoteDesktop.clipboard.dropBlockedDisabled': '此主機未啟用剪貼簿檔案傳輸',
'remoteDesktop.clipboard.dropFolderUnsupported': 'RDP 剪貼簿不支援直接傳送資料夾,請改用 SFTP 或壓縮為 .zip 後再傳送。',
'remoteDesktop.clipboard.stagedPill': '{count} 個檔案 · Ctrl+V',
'remoteDesktop.clipboard.sendLocalFiles': '選擇本機檔案傳送...',
'remoteDesktop.clipboard.uploading': '正在透過剪貼簿傳送',
'remoteDesktop.clipboard.downloading': '正在透過剪貼簿接收',
'remoteDesktop.clipboard.transferCompleted': '剪貼簿檔案傳輸完成',
'remoteDesktop.clipboard.transferFailed': '剪貼簿檔案傳輸失敗',
'remoteDesktop.recording.started': '已開始錄製工作階段',
'remoteDesktop.recording.saved': '工作階段錄影已儲存至連線日誌',
'remoteDesktop.recording.failed': '工作階段錄製失敗',
'remoteDesktop.recording.unsupported': '目前環境不支援工作階段錄製',
// LogView — Remote Desktop Recordings & Metadata
'remoteDesktop.toolbar.keysLocal': '快速鍵:本機',
'remoteDesktop.toolbar.keysRemote': '快速鍵:遠端',
'remoteDesktop.toolbar.keysLocalTip': '本機分頁與視窗快速鍵維持啟用。點擊可擷取快速鍵並傳送至遠端桌面。',
'remoteDesktop.toolbar.keysRemoteTip': '應用程式快速鍵會轉送至遠端。按 Ctrl+Alt+Shift 或連按兩下右 Alt/Option 即可釋放。',
'remoteDesktop.toolbar.sendKeys': '傳送按鍵',
'remoteDesktop.toolbar.specialKeys': '特殊組合鍵',
'remoteDesktop.toolbar.typeClipboard': '以鍵盤輸入剪貼簿內容',
'remoteDesktop.toolbar.linuxTty': 'Linux 虛擬主控台',
'remoteDesktop.toolbar.osChordNote': '作業系統保留的組合鍵(Alt+Tab、Cmd+Tab、Ctrl+Alt+Del)會由本機系統攔截,請由此選單傳送。',
'remoteDesktop.toolbar.display': '顯示縮放',
'remoteDesktop.toolbar.sshTunneled': '透過 SSH 通道連線',
'remoteDesktop.toolbar.encrypted': 'TLS 加密連線',
'remoteDesktop.toolbar.standardRdpSecurity': '標準 RDP 安全層({{cipher}})',
'remoteDesktop.rdp.fallbackStandardRdp': '已回退並使用標準 RDP 安全層連線。',
'remoteDesktop.rdp.fallbackStandardRdpWithCipher': '已回退並使用標準 RDP 安全層連線({{cipher}})。',
'remoteDesktop.toolbar.viewOnly': '唯讀檢視模式',
'remoteDesktop.toolbar.viewOnlyBadge': '檢視',
'remoteDesktop.toolbar.audio': 'RDP 音訊',
'remoteDesktop.toolbar.mute': '靜音',
'remoteDesktop.toolbar.unmute': '取消靜音',
'remoteDesktop.toolbar.clipboard': '剪貼簿同步',
'remoteDesktop.toolbar.clipboardSync': '剪貼簿同步',
'remoteDesktop.toolbar.clipboardFiles': 'RDP 剪貼簿檔案',
'remoteDesktop.toolbar.clipboardFilesHint': '在遠端複製檔案即可在此下載,或將本機檔案拖放至桌面進行複製。',
'remoteDesktop.toolbar.saveFile': '儲存檔案',
'remoteDesktop.toolbar.options': '畫質與輸入選項',
'remoteDesktop.toolbar.quality': '編碼畫質',
'remoteDesktop.toolbar.screenshot': '擷取畫面',
'remoteDesktop.toolbar.copyScreenshot': '複製 PNG 至剪貼簿',
'remoteDesktop.toolbar.saveScreenshot': '儲存 PNG 截圖',
'remoteDesktop.toolbar.fullscreen': '全螢幕',
'remoteDesktop.toolbar.exitFullscreen': '離開全螢幕',
'remoteDesktop.toolbar.pin': '釘選工具列',
'remoteDesktop.toolbar.unpin': '取消釘選工具列',
'remoteDesktop.toolbar.popOut': '在新視窗中開啟',
'remoteDesktop.toolbar.reconnect': '重新連線',
'remoteDesktop.toolbar.disconnect': '中斷連線',
'remoteDesktop.toolbar.openSystemRdp': '以系統 RDP 開啟',
'remoteDesktop.toolbar.openSystemVnc': '以系統螢幕共享開啟',
'remoteDesktop.display.dynamic': '動態調整大小',
'remoteDesktop.display.fit': '符合視窗',
'remoteDesktop.display.actual': '1:1 原始大小',
'remoteDesktop.display.stretch': '延展填滿',
'remoteDesktop.display.highDpi': 'Retina 高解析縮放',
'remoteDesktop.display.unsupported': '伺服器不支援',
'remoteDesktop.toolbar.mapCmdToCtrl': '將 Cmd 對應至 Ctrl',
'remoteDesktop.toolbar.showRemoteCursor': '顯示遠端游標',
'remoteDesktop.toolbar.refreshScreen': '強制重新整理整個畫面',
'remoteDesktop.xvp.title': '遠端電源控制 (XVP)',
'remoteDesktop.xvp.reboot': '重新啟動',
'remoteDesktop.xvp.shutdown': '關機',
'remoteDesktop.xvp.reset': '強制重設',
'remoteDesktop.vnc.bell': '遠端桌面響鈴提示',
'remoteDesktop.toolbar.moreActions': '更多動作',
'remoteDesktop.clipboard.pushNow': '立即推送本機剪貼簿',
'remoteDesktop.clipboard.pushed': '已將本機剪貼簿同步至遠端',
'remoteDesktop.disconnected.title': '工作階段已中斷連線',
'remoteDesktop.auth.reenter': '憑證',
'remoteDesktop.auth.cancelled': '已取消身分驗證。',
'remoteDesktop.cert.rejected': '使用者已拒絕 TLS 憑證。',
'remoteDesktop.step.bastion': '跳板通道',
'remoteDesktop.step.network': '網路連線',
'remoteDesktop.step.nla': 'NLA 驗證',
'remoteDesktop.step.rfb': 'RFB 驗證',
'remoteDesktop.step.desktop': '桌面',
'remoteDesktop.display.resolutionPresets': '解析度預設',
'remoteDesktop.display.customWidth': '寬度',
'remoteDesktop.display.customHeight': '高度',
'remoteDesktop.display.applyResolution': '套用',
'remoteDesktop.display.multiMonitor': '多顯示器配置',
'remoteDesktop.display.monitorSingle': '單顯示器',
'remoteDesktop.display.monitorDual': '雙螢幕並排',
'remoteDesktop.display.monitorAllLocal': '符合本機顯示器',
'remoteDesktop.display.monitorAllLocalCount': '符合本機顯示器 ({count})',
'remoteDesktop.display.monitorSwitcher': '切換目前顯示器',
'remoteDesktop.display.monitorAll': '全部',
'remoteDesktop.sharedFolders.title': '共享資料夾 (RDPDR)',
'remoteDesktop.sharedFolders.add': '新增資料夾',
'remoteDesktop.sharedFolders.empty': '將本機資料夾掛載為遠端 Windows 桌面上的虛擬磁碟機。',
'remoteDesktop.sharedFolders.remove': '移除資料夾',
'remoteDesktop.sharedFolders.readOnly': '唯讀',
'remoteDesktop.sharedFolders.hint': 'Windows:本機 → Netcatty 上的 <資料夾> (\\\\tsclient\\<名稱>)。僅儲存於本機,不會同步至雲端。',
'remoteDesktop.sharedFolders.duplicate': '此資料夾已在共享清單中',
'remoteDesktop.sharedFolders.mounted': '已在遠端桌面掛載「{name}」',
'remoteDesktop.sharedFolders.unmounted': '已卸載「{name}」',
'remoteDesktop.network.title': '連線遙測',
'remoteDesktop.network.latency': '延遲',
'remoteDesktop.network.resolution': '解析度',
'remoteDesktop.network.downlink': '下載 (RX)',
'remoteDesktop.network.uplink': '上傳 (TX)',
'remoteDesktop.network.totalRx': '總接收',
'remoteDesktop.network.totalTx': '總傳送',
'remoteDesktop.network.tlsEncrypted': 'TLS',
'remoteDesktop.network.quality.excellent': '極佳',
'remoteDesktop.network.quality.good': '良好',
'remoteDesktop.network.quality.fair': '一般',
'remoteDesktop.network.quality.poor': '較差',
'remoteDesktop.network.quality.unknown': '量測中',
'remoteDesktop.ai.controllingBanner': 'Catty 控制中 · 點擊桌面或按 Esc 立即接管',
'remoteDesktop.ai.stopControl': '停止',
'remoteDesktop.ai.preempted': '已暫停 AI 控制 — 您已接管桌面',
'remoteDesktop.ai.preemptedStopped': '已停止 AI 控制 — 您已接管桌面',
'remoteDesktop.ai.audit.menuItem': 'AI 操控稽核日誌',
'remoteDesktop.ai.audit.title': 'AI 桌面操控稽核日誌',
'remoteDesktop.ai.audit.subtitleHost': '記錄此遠端桌面上執行的 AI 滑鼠與鍵盤操作。',
'remoteDesktop.ai.audit.subtitleAll': '本機記錄最近 500 筆 AI 遠端桌面操控紀錄(敏感文字已去識別化)。',
'remoteDesktop.ai.audit.searchPlaceholder': '依操作、主機或錯誤碼篩選...',
'remoteDesktop.ai.audit.scopeSession': '此工作階段',
'remoteDesktop.ai.audit.scopeAll': '全部',
'remoteDesktop.ai.audit.filterAll': '全部',
'remoteDesktop.ai.audit.filterOk': '成功',
'remoteDesktop.ai.audit.filterPreempted': '已接管',
'remoteDesktop.ai.audit.filterIssues': '封鎖/錯誤',
'remoteDesktop.ai.audit.empty': '尚無 AI 遠端桌面操控紀錄。',
'remoteDesktop.ai.audit.outcomeOk': '成功',
'remoteDesktop.ai.audit.outcomePreempted': '已接管',
'remoteDesktop.ai.audit.outcomeBlocked': '已封鎖',
'remoteDesktop.ai.audit.outcomeDenied': '已拒絕',
'remoteDesktop.ai.audit.outcomeError': '失敗',
'remoteDesktop.ai.audit.copyJson': '複製 JSON',
'remoteDesktop.ai.audit.copied': '已複製',
'remoteDesktop.ai.audit.clear': '清除',
// LogView — Remote Desktop Recordings & Metadata
'logView.recording.download': '下載 .webm',
'logView.recording.delete': '刪除錄影',
'logView.recording.loading': '正在載入工作階段錄影...',
'logView.recording.withAudio': '含音訊',
'logView.recording.missingTitle': '錄影檔案已不在磁碟上',
'logView.recording.missingDesc': '此 .webm 檔案已被刪除、因保留設定自動清理或移出錄影資料夾。',
'logView.recording.playbackErrorTitle': '無法播放錄影',
'logView.recording.playbackErrorDesc': '影片檔案可能不完整,或內建播放器不支援此編碼格式。',
'logView.recording.exportSuccess': '已匯出錄影檔案',
'logView.recording.exportFailed': '匯出錄影失敗',
'logView.recording.deleted': '已刪除錄影',
'logView.recording.deleteFailed': '刪除錄影失敗',
'logView.recording.deleteConfirmTitle': '要刪除此工作階段錄影嗎?',
'logView.recording.deleteConfirmDesc': '磁碟上的 .webm 影片檔案將被永久刪除,連線日誌紀錄本身會保留。',
'logView.remoteDesktop.noRecordingSubtitle': '此遠端桌面工作階段未錄製影片',
'logView.remoteDesktop.host': '主機',
'logView.remoteDesktop.protocol': '通訊協定',
'logView.remoteDesktop.user': '使用者名稱',
'logView.remoteDesktop.started': '開始時間',
'logView.remoteDesktop.ended': '結束時間',
'logView.remoteDesktop.duration': '持續時間',
'logView.remoteDesktop.resolution': '解析度',
'logView.remoteDesktop.security': '安全協定',
'logView.remoteDesktop.disconnectReason': '斷線原因',
'logView.remoteDesktop.timeline': '工作階段時間軸',
'logView.remoteDesktop.recordingTip': '點擊遠端桌面工具列的錄製按鈕,或在「設定 → 系統」中開啟自動錄製,即可在此重播 .webm 錄影。',
'logs.recording.clipsCount': '{count} 段',
'logs.filter.all': '全部',
'logs.filter.terminal': '終端機',
'logs.filter.remoteDesktop': '遠端桌面',
'logs.filter.recorded': '含錄影',
'logs.filter.emptyTitle': '沒有符合的日誌',
'logs.filter.emptyDesc': '目前篩選條件下尚無連線日誌記錄。',
// Settings -> System -> Remote Desktop Recordings
'settings.remoteDesktopRecordings.title': '遠端桌面錄影',
'settings.remoteDesktopRecordings.autoRecord': '自動錄製遠端桌面工作階段',
'settings.remoteDesktopRecordings.autoRecordDesc': 'RDP/VNC 工作階段連線成功後自動開始錄製(預設關閉以節省磁碟空間)。',
'settings.remoteDesktopRecordings.fps': '錄製影格率',
'settings.remoteDesktopRecordings.fpsDesc': '影格率越高畫面越流暢,但會佔用較多 CPU 與磁碟空間。',
'settings.remoteDesktopRecordings.fpsOption': '{fps} FPS',
'settings.remoteDesktopRecordings.includeAudio': '包含 RDP 音訊',
'settings.remoteDesktopRecordings.includeAudioDesc': '在可用時將遠端桌面音訊合併錄製至 .webm 影片中。',
'settings.remoteDesktopRecordings.maxStorage': '最大儲存空間上限',
'settings.remoteDesktopRecordings.maxStorageDesc': '總使用量超出上限時,自動優先清理最早的未收藏工作階段錄影。',
'settings.remoteDesktopRecordings.retentionDays': '錄影保留天數',
'settings.remoteDesktopRecordings.retentionDaysDesc': '自動刪除超過保留期限的未收藏工作階段錄影。',
'settings.remoteDesktopRecordings.retentionDaysOption': '{days} 天',
'settings.remoteDesktopRecordings.retentionUnlimited': '不限制',
'settings.remoteDesktopRecordings.storageUsage': '本機錄影儲存使用量',
'settings.remoteDesktopRecordings.storageUsageSummary': '{count} 個檔案 · {size}',
'settings.remoteDesktopRecordings.storageUsageLoading': '正在計算磁碟使用量...',
'settings.remoteDesktopRecordings.refresh': '重新整理儲存統計',
'settings.remoteDesktopRecordings.openFolder': '開啟資料夾',
'settings.remoteDesktopRecordings.clearAll': '清除全部錄影',
'settings.remoteDesktopRecordings.clearAllConfirmTitle': '要清除全部遠端桌面錄影嗎?',
'settings.remoteDesktopRecordings.clearAllConfirmDesc': '將從此裝置永久刪除 {count} 個 .webm 錄影檔案。',
'settings.remoteDesktopRecordings.clearResult': '已刪除 {count} 個錄影檔案。',
'settings.remoteDesktopRecordings.hint': '錄影檔案僅儲存在本裝置本機,絕不上傳雲端同步;已收藏的連線日誌錄影不會在自動清理中被刪除。',
'sftp.context.openInExternalEditor': '在 {editor} 中開啟',
'hostDetails.externalEditorShellIntegration': '於此工作階段啟用外部編輯器指令',
'hostDetails.externalEditorShellIntegration.desc': '透過 ~/.netcatty/bin 僅於目前 Netcatty 終端機工作階段啟用 `zed` / `ncedit`(支援 tmux),不修改 ~/.bashrc 或 ~/.zshrc。',
};
-38
View File
@@ -79,44 +79,6 @@ test('prepared apply callback runs after the snapshot with sentinel protection',
assert.equal(readInterruptedVaultApply(), null);
});
test('protected sync does not apply anything if storage cannot persist its interruption marker', async (t) => {
const storage = globalThis.localStorage;
const originalSetItem = storage.setItem;
t.after(() => { storage.setItem = originalSetItem; });
storage.setItem = () => { throw new DOMException('No storage space', 'QuotaExceededError'); };
let applied = false;
await assert.rejects(() => applyProtectedSyncPayload({
buildPreApplyPayload: emptyPayload,
applyPayload: () => { applied = true; },
translateProtectiveBackupFailure: (message) => message,
}), /interruption marker/);
assert.equal(applied, false);
assert.equal(readInterruptedVaultApply(), null);
});
test('protected sync rejects a missing backup even when the backup bridge resolves', async (t) => {
const previousWindow = Object.getOwnPropertyDescriptor(globalThis, 'window');
t.after(() => {
if (previousWindow) Object.defineProperty(globalThis, 'window', previousWindow);
else Reflect.deleteProperty(globalThis, 'window');
});
Object.defineProperty(globalThis, 'window', { configurable: true, value: {
netcatty: { createVaultBackup: async () => ({ backup: null }) },
} });
let applied = false;
await assert.rejects(() => applyProtectedSyncPayload({
buildPreApplyPayload: () => ({ ...emptyPayload(), settings: { theme: 'light' } }),
applyPayload: () => { applied = true; },
translateProtectiveBackupFailure: (message) => message,
}), /no recoverable backup/);
assert.equal(applied, false);
assert.equal(readInterruptedVaultApply(), null);
});
for (const localRestore of [false, true]) {
for (const encryptionFails of [false, true]) {
test(`protected header preparation (${localRestore ? 'restore' : 'sync'}, ${encryptionFails ? 'failure' : 'success'})`, async () => {
+11 -12
View File
@@ -57,9 +57,6 @@ export interface LocalVaultBackupPreview {
noteCount: number;
identityCount: number;
portForwardingRuleCount: number;
/** Optional so backups written before these counters existed still load. */
aiSessionCount?: number;
settingCount?: number;
};
}
@@ -241,10 +238,7 @@ export async function createRequiredProtectiveLocalVaultBackup(
reason: 'before_restore',
maxCount: getLocalVaultBackupMaxCount(),
});
if (!result?.backup?.id) {
throw new Error('Vault backup service returned no recoverable backup');
}
return result.backup;
return result?.backup ?? null;
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
throw new ProtectiveBackupUnavailableError(message);
@@ -384,11 +378,16 @@ export function clearInterruptedVaultApply(): void {
}
function writeApplyInProgressSentinel(record: VaultApplyInProgressRecord): void {
if (!localStorageAdapter.writeString(
STORAGE_KEY_VAULT_APPLY_IN_PROGRESS,
JSON.stringify(record),
)) {
throw new Error('Cannot persist the sync interruption marker; local data was not changed');
try {
localStorageAdapter.writeString(
STORAGE_KEY_VAULT_APPLY_IN_PROGRESS,
JSON.stringify(record),
);
} catch (error) {
// Sentinel write is best-effort: a failure here means a later crash
// won't be detected, but does NOT compromise the apply itself.
// Log so a systematic storage outage is diagnosable.
console.warn('[localVaultBackups] Failed to set apply-in-progress sentinel:', error);
}
}
+1 -5
View File
@@ -70,11 +70,7 @@ export function pruneInactiveScopedSessions(
orphanedSessionIds: string[];
} {
const orphanedSessionIds = sessions
.filter((session) => (
(session.scope.type === "terminal" || session.scope.type === "workspace")
&& session.scope.targetId
&& !activeTargetIds.has(session.scope.targetId)
))
.filter((session) => session.scope.targetId && !activeTargetIds.has(session.scope.targetId))
.filter((session) => !activeSessionIds.has(session.id))
.map((session) => session.id);
@@ -15,7 +15,6 @@ import {
idbPutSessions,
isIndexedDbAvailable,
loadOrMigrateAiSessions,
measureAiSessionStorageUsage,
mirrorActiveSessionMapToIdb,
openAiSessionsIdb,
readActiveSessionMapFromIdb,
@@ -58,27 +57,6 @@ test('module wrapper roundtrips sessions through the object stores', async () =>
}
});
test('usage reads UTF-8 JSON sizes without changing unreadable or healthy records', async () => {
const idb = installFakeIndexedDb();
try {
const signal = new AbortController().signal;
assert.deepEqual(await measureAiSessionStorageUsage(signal), { recordCount: 0, jsonBytes: 0, unmeasuredCount: 0 });
const db = await openAiSessionsIdb();
const session = { ...makeSession('old-chat', 1), title: '旧聊天 🐈' };
const bad = { ...makeSession('cycle', 2), data: {} };
bad.data = bad;
await idbPutSessions(db, [session, bad]);
assert.deepEqual(await measureAiSessionStorageUsage(signal), {
recordCount: 2, jsonBytes: Buffer.byteLength(JSON.stringify(session)), unmeasuredCount: 1,
});
assert.deepEqual(idb.db.opCounts.get('sessions'), { put: 2, delete: 0 });
await assert.rejects(measureAiSessionStorageUsage(AbortSignal.abort()), { name: 'AbortError' });
} finally {
idb.restore();
resetAiSessionsIdbForTests();
}
});
test('meta store roundtrips schema and active-map records', async () => {
const idb = installFakeIndexedDb();
try {
-41
View File
@@ -108,47 +108,6 @@ export async function idbGetAllSessions(db?: IDBDatabase): Promise<AISession[]>
return Array.isArray(result) ? result : [];
}
export interface AiSessionStorageUsage {
recordCount: number;
jsonBytes: number;
unmeasuredCount: number;
}
/** Size of the JSON payloads in a consistent read-only snapshot of local history. */
export async function measureAiSessionStorageUsage(signal: AbortSignal): Promise<AiSessionStorageUsage> {
signal.throwIfAborted();
const db = await openAiSessionsIdb();
signal.throwIfAborted();
const tx = db.transaction(AI_SESSIONS_IDB_SESSION_STORE, 'readonly');
const request = tx.objectStore(AI_SESSIONS_IDB_SESSION_STORE).openCursor();
const usage = { recordCount: 0, jsonBytes: 0, unmeasuredCount: 0 };
const encoder = new TextEncoder();
return new Promise((resolve, reject) => {
tx.onabort = () => reject(tx.error ?? new Error('History scan aborted'));
request.onerror = () => reject(request.error);
request.onsuccess = () => {
if (signal.aborted) {
reject(signal.reason);
return;
}
const cursor = request.result;
if (!cursor) {
resolve(usage);
return;
}
usage.recordCount++;
try {
usage.jsonBytes += encoder.encode(JSON.stringify(cursor.value)).byteLength;
} catch {
// Structured clone also accepts cycles and BigInts, which JSON cannot represent.
usage.unmeasuredCount++;
}
cursor.continue();
};
});
}
export async function idbPutSessions(db: IDBDatabase, sessions: AISession[]): Promise<void> {
if (sessions.length === 0) return;
const transaction = db.transaction(AI_SESSIONS_IDB_SESSION_STORE, 'readwrite');
-3
View File
@@ -116,9 +116,6 @@ function isScopeKeyActive(scopeKey: string, activeTargetIds: Set<string>) {
const separatorIndex = scopeKey.indexOf(':');
if (separatorIndex === -1) return true;
const scopeType = scopeKey.slice(0, separatorIndex);
if (scopeType === 'global') return true;
const targetId = scopeKey.slice(separatorIndex + 1);
if (!targetId) return true;
+1 -1
View File
@@ -9,7 +9,7 @@ export type ConnectionLogsSnapshot = {
};
export type ConnectionLogsActions = {
updateConnectionLog: (id: string, updates: Partial<ConnectionLog>) => void | Promise<unknown>;
updateConnectionLog: (id: string, updates: Partial<ConnectionLog>) => void;
toggleConnectionLogSaved: (id: string) => void;
deleteConnectionLog: (id: string) => void;
clearUnsavedConnectionLogs: () => void;
+12 -3
View File
@@ -1,12 +1,21 @@
import type { ApprovalRequest } from '../../infrastructure/ai/shared/approvalGate';
import toolNameIndex from '../../infrastructure/ai/harness/generated/toolNameIndex.json';
import cattyToolSpecs from '../../infrastructure/ai/harness/generated/cattyToolSpecs.json';
import { netcattyBridge } from '../../infrastructure/services/netcattyBridge';
import {
readExternalMcpApprovalAlertMode,
type ExternalMcpApprovalAlertMode,
} from './useExternalMcpToggleState';
const mcpToolNameByRpcMethod = toolNameIndex.sidebarByRpcMethod as Record<string, string>;
type CatalogToolSpec = {
toolName?: string;
rpcMethod?: string | null;
};
const mcpToolNameByRpcMethod = new Map<string, string>();
for (const spec of cattyToolSpecs as CatalogToolSpec[]) {
if (!spec.rpcMethod || !spec.toolName || mcpToolNameByRpcMethod.has(spec.rpcMethod)) continue;
mcpToolNameByRpcMethod.set(spec.rpcMethod, spec.toolName);
}
/**
* Name shown on the External MCP approval card.
@@ -16,7 +25,7 @@ const mcpToolNameByRpcMethod = toolNameIndex.sidebarByRpcMethod as Record<string
export function externalMcpApprovalToolLabel(toolName: string | undefined): string {
const raw = toolName?.trim() || '';
if (!raw) return '';
return mcpToolNameByRpcMethod[raw] || raw;
return mcpToolNameByRpcMethod.get(raw) || raw;
}
export type ExternalMcpApprovalNotification = {
@@ -9,7 +9,7 @@ test('selected metadata projects only the allowlist and replacement invalidates
const resources = new PluginHostActionResources();
resources.observe([first]);
const metadata = resources.metadata(first.id);
assert.deepEqual(Object.keys(metadata), ['resourceId', 'revision', 'label', 'hostname', 'username', 'protocol', 'group', 'tags', 'os']);
assert.deepEqual(Object.keys(metadata), ['resourceId', 'revision', 'label', 'hostname', 'username', 'protocol', 'group', 'tags']);
assert.equal(JSON.stringify(metadata).includes('synthetic-password'), false);
resources.observe([first]);
assert.equal(resources.resolve(first.id, metadata.revision), first);
@@ -24,22 +24,11 @@ export class PluginHostActionResources {
const entry = this.entries.get(id);
if (!entry) throw new Error('Selected host is unavailable');
const host = entry.host;
const osValue = typeof host.os === 'string'
? Array.from(host.os).filter((ch) => {
const code = ch.charCodeAt(0);
return code >= 0x20 && code !== 0x7f;
}).join('').slice(0, 128)
: '';
const notesValue = typeof host.notes === 'string'
? host.notes.split('\0').join('').slice(0, 4096)
: '';
return {
resourceId: host.id, revision: entry.revision,
label: host.label, hostname: host.hostname, username: host.username,
...(host.port === undefined ? {} : { port: host.port }), protocol: host.protocol ?? 'ssh',
group: host.group ?? '', tags: [...host.tags],
...(osValue ? { os: osValue } : {}),
...(notesValue ? { notes: notesValue } : {}),
};
}
}
-406
View File
@@ -65,409 +65,3 @@ test('inserting a child into an existing void element fails the view', async ()
assert.equal(tree.isFailed(), true);
assert.deepEqual(tree.snapshot(), { children: [] });
});
test('duplicate insert of an existing id applies as a move or replace and keeps follow-up updates in sync', async () => {
const { createPluginRemoteTree } = await import('./pluginRemoteTree');
const tree = createPluginRemoteTree();
tree.apply([[0, '~', { id: 'a', type: 1, element: 'div', attributes: { class: 'first' }, children: [] }, 0]]);
// Inserting an existing id at a later sibling index replaces the existing node in place.
const replaced = tree.apply([
[3, 'a', 'class', 'stale'],
[0, '~', { id: 'a', type: 1, element: 'span', attributes: { class: 'replaced' }, children: [] }, 1],
]);
assert.equal(tree.isFailed(), false);
assert.deepEqual(replaced, {
children: [{ id: 'a', type: 1, element: 'span', attributes: { class: 'replaced' }, children: [] }],
});
// Follow-up mutations must apply against the replaced live node (desync gate).
const afterFollowUp = tree.apply([
[3, 'a', 'class', 'after-sort'],
[0, '~', { id: 'b', type: 1, element: 'div', attributes: {}, children: [{ id: 'b-text', type: 3, data: 'second' }] }, 1],
]);
assert.deepEqual(afterFollowUp, {
children: [
{ id: 'a', type: 1, element: 'span', attributes: { class: 'after-sort' }, children: [] },
{ id: 'b', type: 1, element: 'div', attributes: {}, children: [{ id: 'b-text', type: 3, data: 'second' }] },
],
});
// Moving an existing sibling forward adjusts the insert index after detaching the old slot.
const movedForward = tree.apply([
[0, '~', { id: 'a', type: 1, element: 'span', attributes: { class: 'moved-end' }, children: [] }, 2],
]);
assert.deepEqual(movedForward.children.map((node) => node.id), ['b', 'a']);
assert.deepEqual(movedForward.children[1], { id: 'a', type: 1, element: 'span', attributes: { class: 'moved-end' }, children: [] });
// Moving an existing sibling backward preserves index 0 and keeps subsequent updates working.
const movedBack = tree.apply([
[0, '~', { id: 'a', type: 1, element: 'span', attributes: { class: 'moved-start' }, children: [] }, 0],
]);
assert.deepEqual(movedBack.children.map((node) => node.id), ['a', 'b']);
const postMoveAttr = tree.apply([[2, 'b-text', 'updated-second'], [3, 'a', 'class', 'synced']]);
assert.deepEqual(postMoveAttr, {
children: [
{ id: 'a', type: 1, element: 'span', attributes: { class: 'synced' }, children: [] },
{ id: 'b', type: 1, element: 'div', attributes: {}, children: [{ id: 'b-text', type: 3, data: 'updated-second' }] },
],
});
});
test('inserting a parent whose subtree re-includes an already-present child detaches the child and preserves later updates', async () => {
const { createPluginRemoteTree } = await import('./pluginRemoteTree');
const tree = createPluginRemoteTree();
tree.apply([
[0, '~', {
id: 'old-parent',
type: 1,
element: 'div',
attributes: {},
children: [{
id: 'cell-1',
type: 1,
element: 'span',
attributes: { class: 'unsorted' },
children: [{ id: 'cell-text', type: 3, data: 'alpha' }],
}],
}, 0],
]);
// Parent insertion repeats already-attached descendant IDs without a preceding remove.
const reparented = tree.apply([
[0, '~', {
id: 'new-parent',
type: 1,
element: 'section',
attributes: {},
children: [{
id: 'cell-1',
type: 1,
element: 'span',
attributes: { class: 'sorted-asc' },
children: [{ id: 'cell-text', type: 3, data: 'alpha' }],
}],
}, 1],
]);
assert.equal(tree.isFailed(), false);
assert.deepEqual(reparented, {
children: [
{ id: 'old-parent', type: 1, element: 'div', attributes: {}, children: [] },
{
id: 'new-parent',
type: 1,
element: 'section',
attributes: {},
children: [{
id: 'cell-1',
type: 1,
element: 'span',
attributes: { class: 'sorted-asc' },
children: [{ id: 'cell-text', type: 3, data: 'alpha' }],
}],
},
],
});
// A subsequent sort-like incremental update on the moved child applies cleanly.
const secondSort = tree.apply([
[3, 'cell-1', 'class', 'sorted-desc'],
[2, 'cell-text', 'omega'],
]);
assert.deepEqual(secondSort.children[1], {
id: 'new-parent',
type: 1,
element: 'section',
attributes: {},
children: [{
id: 'cell-1',
type: 1,
element: 'span',
attributes: { class: 'sorted-desc' },
children: [{ id: 'cell-text', type: 3, data: 'omega' }],
}],
});
// Same-batch case: descendant inserted first, then a new parent serializing that descendant.
const sameBatch = tree.apply([
[0, 'old-parent', { id: 'child-2', type: 1, element: 'span', attributes: {}, children: [{ id: 'child-2-text', type: 3, data: 'one' }] }, 0],
[0, '~', {
id: 'wrapper',
type: 1,
element: 'div',
attributes: {},
children: [{ id: 'child-2', type: 1, element: 'span', attributes: {}, children: [{ id: 'child-2-text', type: 3, data: 'one' }] }],
}, 2],
]);
assert.equal(tree.isFailed(), false);
assert.deepEqual(sameBatch.children[0], { id: 'old-parent', type: 1, element: 'div', attributes: {}, children: [] });
assert.deepEqual(sameBatch.children[2], {
id: 'wrapper',
type: 1,
element: 'div',
attributes: {},
children: [{ id: 'child-2', type: 1, element: 'span', attributes: {}, children: [{ id: 'child-2-text', type: 3, data: 'one' }] }],
});
const afterSameBatch = tree.apply([[2, 'child-2-text', 'two']]);
assert.deepEqual(afterSameBatch.children[2], {
id: 'wrapper',
type: 1,
element: 'div',
attributes: {},
children: [{ id: 'child-2', type: 1, element: 'span', attributes: {}, children: [{ id: 'child-2-text', type: 3, data: 'two' }] }],
});
});
test('unrecoverable self-nesting duplicate throws without failing the tree or corrupting later updates', async () => {
const { createPluginRemoteTree } = await import('./pluginRemoteTree');
const tree = createPluginRemoteTree();
tree.apply([[0, '~', { id: 'a', type: 1, element: 'div', attributes: { class: 'first' }, children: [] }, 0]]);
assert.throws(
() => tree.apply([
[3, 'a', 'class', 'rejected'],
[0, 'a', { id: 'a', type: 1, element: 'span', attributes: {}, children: [] }, 0],
]),
/Duplicate view node/,
);
assert.equal(tree.isFailed(), false);
assert.deepEqual(tree.snapshot(), {
children: [{ id: 'a', type: 1, element: 'div', attributes: { class: 'first' }, children: [] }],
});
const updated = tree.apply([[0, '~', { id: 'b', type: 3, data: 'second' }, 1]]);
assert.deepEqual(updated, {
children: [
{ id: 'a', type: 1, element: 'div', attributes: { class: 'first' }, children: [] },
{ id: 'b', type: 3, data: 'second' },
],
});
});
test('a duplicate id combined with a forbidden mutation still hard-fails the view', async () => {
const { createPluginRemoteTree, isDuplicatePluginViewNodeError, assertDuplicateOnlyPluginRemoteTree } = await import('./pluginRemoteTree');
const tree = createPluginRemoteTree();
tree.apply([[0, '~', { id: 'input', type: 1, element: 'input', attributes: { type: 'text' }, children: [] }, 0]]);
// Mutation order matters for RemoteReceiver: the void-element child is applied first so the
// projected tree actually contains both the policy violation and a later duplicate id.
assert.throws(
() => tree.apply([
[0, 'input', { id: 'child', type: 3, data: 'invalid' }, 0],
[0, '~', { id: 'input', type: 1, element: 'div', attributes: {}, children: [] }, 1],
]),
/Void view elements/,
);
assert.equal(tree.isFailed(), true);
assert.deepEqual(tree.snapshot(), { children: [] });
// Even when the duplicate node appears earlier in root order than the void-element violation,
// unique-id revalidation must still hard-fail instead of rewriting the batch.
const duplicateFirstTree = createPluginRemoteTree();
duplicateFirstTree.apply([[0, '~', { id: 'input', type: 1, element: 'input', attributes: { type: 'text' }, children: [] }, 0]]);
assert.throws(
() => duplicateFirstTree.apply([
[0, 'input', { id: 'child', type: 3, data: 'invalid' }, 0],
[0, '~', { id: 'input', type: 1, element: 'div', attributes: {}, children: [] }, 0],
]),
/Void view elements/,
);
assert.equal(duplicateFirstTree.isFailed(), true);
assert.deepEqual(duplicateFirstTree.snapshot(), { children: [] });
// Defense in depth: if a projected tree already has both issues, unique-id revalidation
// must still surface the void-element violation instead of treating it as recoverable.
const mixed = {
children: [
{ id: 'input', type: 1 as const, element: 'input', attributes: { type: 'text' }, children: [{ id: 'child', type: 3 as const, data: 'invalid' }] },
{ id: 'input', type: 1 as const, element: 'div', attributes: {}, children: [] },
],
};
assert.equal(isDuplicatePluginViewNodeError(new TypeError('Duplicate view node')), true);
assert.throws(() => assertDuplicateOnlyPluginRemoteTree(mixed), /Void view elements/);
});
test('RemoteMutationObserver wrapping a sibling preserves kept siblings and follow-up text updates', async () => {
const dom = new JSDOM('<!doctype html><div id="remote"></div>', { url: 'http://localhost', pretendToBeVisual: true });
const saved = new Map<string, PropertyDescriptor | undefined>();
for (const key of ['window', 'document', 'navigator', 'HTMLElement', 'Element', 'Node', 'MutationObserver', 'Event', 'MouseEvent']) {
saved.set(key, Object.getOwnPropertyDescriptor(globalThis, key));
Object.defineProperty(globalThis, key, { configurable: true, writable: true, value: key === 'window' ? dom.window : dom.window[key as keyof typeof dom.window] });
}
const { RemoteMutationObserver } = await import('@remote-dom/core/elements');
const { createPluginRemoteTree } = await import('./pluginRemoteTree');
const staged = createPluginRemoteTree();
const batches: unknown[][][] = [];
const observer = new RemoteMutationObserver({
mutate(records) {
const cloned = JSON.parse(JSON.stringify(records)) as unknown[][];
batches.push(cloned);
staged.apply(cloned);
},
call() { throw new Error('Host method calls are unavailable'); },
});
const container = document.getElementById('remote')!;
observer.observe(container);
const flush = () => new Promise((resolve) => setTimeout(resolve, 10));
try {
const a = document.createElement('div');
a.id = 'a';
const aText = document.createTextNode('Alpha');
a.appendChild(aText);
const b = document.createElement('div');
b.id = 'b';
b.appendChild(document.createTextNode('Beta'));
container.appendChild(a);
container.appendChild(b);
await flush();
assert.equal(staged.isFailed(), false);
assert.equal(staged.snapshot().children.length, 2);
// Same-tick wrap: append wrapper and move b into it.
const wrapper = document.createElement('section');
wrapper.id = 'wrapper';
container.appendChild(wrapper);
wrapper.appendChild(b);
await flush();
assert.equal(staged.isFailed(), false);
const afterWrap = staged.snapshot();
assert.deepEqual(
afterWrap.children.map((node) => (node.type === 1 ? node.attributes.id : null)),
['a', 'wrapper'],
);
const [aNode, wrapperNode] = afterWrap.children;
assert.ok(aNode && aNode.type === 1, 'Expected sibling a first in host tree');
assert.ok(wrapperNode && wrapperNode.type === 1, 'Expected wrapper second in host tree');
assert.equal(aNode.children[0]?.type === 3 ? aNode.children[0].data : null, 'Alpha');
assert.deepEqual(
wrapperNode.children.map((node) => (node.type === 1 ? node.attributes.id : null)),
['b'],
);
const bNode = wrapperNode.children[0];
assert.ok(bNode && bNode.type === 1, 'Expected b inside wrapper');
assert.equal(bNode.children[0]?.type === 3 ? bNode.children[0].data : null, 'Beta');
// Desync gate: a subsequent text update to a must apply cleanly.
aText.data = 'Alpha updated';
await flush();
assert.equal(staged.isFailed(), false);
const afterText = staged.snapshot();
assert.deepEqual(
afterText.children.map((node) => (node.type === 1 ? node.attributes.id : null)),
['a', 'wrapper'],
);
const updatedANode = afterText.children[0];
assert.ok(updatedANode && updatedANode.type === 1);
assert.equal(updatedANode.children[0]?.type === 3 ? updatedANode.children[0].data : null, 'Alpha updated');
// Later turn: removing wrapper at index 1 must keep a and leave a updatable.
wrapper.remove();
await flush();
assert.equal(staged.isFailed(), false);
const afterRemove = staged.snapshot();
assert.deepEqual(
afterRemove.children.map((node) => (node.type === 1 ? node.attributes.id : null)),
['a'],
);
aText.data = 'Alpha after remove';
await flush();
assert.equal(staged.isFailed(), false);
const afterRemoveText = staged.snapshot();
const survivingANode = afterRemoveText.children[0];
assert.ok(survivingANode && survivingANode.type === 1);
assert.equal(survivingANode.children[0]?.type === 3 ? survivingANode.children[0].data : null, 'Alpha after remove');
assert.ok(batches.length >= 5);
} finally {
observer.disconnect();
for (const [key, value] of saved) {
if (value) Object.defineProperty(globalThis, key, value);
else Reflect.deleteProperty(globalThis, key);
}
dom.window.close();
}
});
test('rewriteDuplicateInsertBatch skips matched detaches and remaps subsequent producer removals', async () => {
const { createPluginRemoteTree } = await import('./pluginRemoteTree');
const tree = createPluginRemoteTree();
tree.apply([
[0, '~', { id: '0', type: 1, element: 'div', attributes: { id: 'a' }, children: [{ id: '1', type: 3, data: 'Alpha' }] }, 0],
[0, '~', { id: '2', type: 1, element: 'div', attributes: { id: 'b' }, children: [{ id: '3', type: 3, data: 'Beta' }] }, 1],
]);
// Exact mutation batch from RemoteMutationObserver when appending wrapper and moving b into it.
const wrapped = tree.apply([
[0, '~', {
id: '4',
type: 1,
element: 'section',
attributes: { id: 'wrapper' },
children: [{ id: '2', type: 1, element: 'div', attributes: { id: 'b' }, children: [{ id: '3', type: 3, data: 'Beta' }] }],
}, 0],
[1, '~', 1],
]);
assert.equal(tree.isFailed(), false);
assert.deepEqual(wrapped.children.map((node) => node.id), ['0', '4']);
const wrapperNode = wrapped.children[1];
assert.equal(wrapperNode.type, 1);
if (wrapperNode.type === 1) {
assert.deepEqual(wrapperNode.children.map((node) => node.id), ['2']);
}
// Subsequent text update to a must still apply.
const updated = tree.apply([[2, '1', 'Alpha updated']]);
assert.equal(tree.isFailed(), false);
assert.deepEqual(updated.children[0], {
id: '0',
type: 1,
element: 'div',
attributes: { id: 'a' },
children: [{ id: '1', type: 3, data: 'Alpha updated' }],
});
// Later producer remove of wrapper at index 1 must remove wrapper and keep a alive.
const afterRemove = tree.apply([[1, '~', 1]]);
assert.equal(tree.isFailed(), false);
assert.deepEqual(afterRemove.children.map((node) => node.id), ['0']);
const afterRemoveUpdate = tree.apply([[2, '1', 'Alpha after remove']]);
assert.equal(tree.isFailed(), false);
assert.deepEqual(afterRemoveUpdate, {
children: [{
id: '0',
type: 1,
element: 'div',
attributes: { id: 'a' },
children: [{ id: '1', type: 3, data: 'Alpha after remove' }],
}],
});
// Producer remove at a larger index after a rewrite detach at a smaller index remaps to the right sibling.
const remapTree = createPluginRemoteTree();
remapTree.apply([
[0, '~', { id: 'a', type: 1, element: 'div', attributes: {}, children: [] }, 0],
[0, '~', { id: 'b', type: 1, element: 'div', attributes: {}, children: [{ id: 'b-text', type: 3, data: 'keep' }] }, 1],
[0, '~', { id: 'c', type: 1, element: 'div', attributes: {}, children: [] }, 2],
]);
const remapped = remapTree.apply([
[0, '~', { id: 'wrap', type: 1, element: 'section', attributes: {}, children: [{ id: 'a', type: 1, element: 'div', attributes: {}, children: [] }] }, 3],
// Producer removes c (original index 2) while a (index 0) was already detached by the rewrite.
[1, '~', 2],
// Producer then removes a at original index 0 (already detached -> skipped).
[1, '~', 0],
]);
assert.equal(remapTree.isFailed(), false);
assert.deepEqual(remapped.children.map((node) => node.id), ['b', 'wrap']);
const followUp = remapTree.apply([[2, 'b-text', 'still-alive']]);
assert.deepEqual(followUp.children[0], {
id: 'b',
type: 1,
element: 'div',
attributes: {},
children: [{ id: 'b-text', type: 3, data: 'still-alive' }],
});
});
+5 -211
View File
@@ -6,201 +6,16 @@ type WireNode = { id: string; type: 3 | 8; data: string } | {
};
type WireTree = { children: WireNode[] };
const validatedTrees = new WeakSet<object>();
export function isValidatedPluginRemoteTree(tree: unknown): boolean {
return Boolean(tree && typeof tree === 'object' && validatedTrees.has(tree));
}
export function isDuplicatePluginViewNodeError(error: unknown): error is TypeError {
return error instanceof TypeError && error.message === 'Duplicate view node';
}
function withUniqueViewIds(tree: WireTree): WireTree {
let n = 0;
const rewrite = (node: WireNode): WireNode => {
const id = `n${n++}`;
if (node.type === 3 || node.type === 8) return { id, type: node.type, data: node.data };
return { id, type: 1, element: node.element, attributes: node.attributes, children: node.children.map(rewrite) };
};
return { children: tree.children.map(rewrite) };
}
/** If a projected tree has duplicate IDs, still hard-fail when other policy violations exist. */
export function assertDuplicateOnlyPluginRemoteTree(tree: WireTree): void {
validatePluginRemoteTree(withUniqueViewIds(tree));
}
type WorkingNode = {
id: string;
parentId: string | null;
children: WorkingNode[];
};
type RewriteDetach = {
parentId: string;
index: number;
id: string;
};
function collectSubtreeIds(node: WireNode, out: string[] = []): string[] {
out.push(node.id);
if (node.type === 1) {
for (const child of node.children) collectSubtreeIds(child, out);
}
return out;
}
function buildWorkingNode(node: WireNode, parentId: string, nodes: Map<string, WorkingNode>): WorkingNode {
const working: WorkingNode = { id: node.id, parentId, children: [] };
nodes.set(node.id, working);
if (node.type === 1) {
for (const child of node.children) {
working.children.push(buildWorkingNode(child, node.id, nodes));
}
}
return working;
}
function detachWorkingSubtree(node: WorkingNode, nodes: Map<string, WorkingNode>): void {
nodes.delete(node.id);
node.parentId = null;
for (const child of node.children) detachWorkingSubtree(child, nodes);
}
function hasAncestorInSet(startId: string, ids: Set<string>, nodes: Map<string, WorkingNode>): boolean {
let cursor: string | null = startId;
while (cursor !== null) {
if (ids.has(cursor)) return true;
cursor = nodes.get(cursor)?.parentId ?? null;
}
return false;
}
/**
* Normalizes a duplicate-only mutation batch so inserts referencing IDs already
* attached in the tree first emit explicit removals from their previous parents.
* Returns null if an insert would detach its own destination parent (cycle).
*/
function rewriteDuplicateInsertBatch(current: WireTree, batch: unknown[][]): unknown[][] | null {
const root: WorkingNode = { id: '~', parentId: null, children: [] };
const nodes = new Map<string, WorkingNode>([['~', root]]);
for (const child of current.children) {
root.children.push(buildWorkingNode(child, '~', nodes));
}
const rewritten: unknown[][] = [];
const rewriteDetaches: RewriteDetach[] = [];
for (const record of batch) {
const type = record[0];
if (type === 0) {
const parentId = record[1] as string;
const node = record[2] as WireNode;
let insertIndex = record[3] as number;
const parent = nodes.get(parentId);
if (!parent) {
// Detached parent: RemoteReceiver drops this insert as a no-op.
rewritten.push(record);
continue;
}
const subtreeIds = collectSubtreeIds(node);
if (hasAncestorInSet(parentId, new Set(subtreeIds), nodes)) {
return null;
}
for (const existingId of subtreeIds) {
const existing = nodes.get(existingId);
if (!existing || existing.parentId === null) continue;
const oldParent = nodes.get(existing.parentId);
if (!oldParent) continue;
const oldIndex = oldParent.children.indexOf(existing);
if (oldIndex < 0) continue;
rewritten.push([1, oldParent.id, oldIndex]);
rewriteDetaches.push({ parentId: oldParent.id, index: oldIndex, id: existing.id });
oldParent.children.splice(oldIndex, 1);
detachWorkingSubtree(existing, nodes);
if (oldParent.id === parentId) {
if (oldIndex < insertIndex) {
insertIndex -= 1;
} else if (existing.id !== node.id && oldIndex > insertIndex) {
insertIndex = oldIndex;
}
}
}
rewritten.push(insertIndex === record[3] ? record : [0, parentId, node, insertIndex]);
const inserted = buildWorkingNode(node, parentId, nodes);
if (insertIndex >= parent.children.length) {
parent.children.push(inserted);
} else {
parent.children.splice(insertIndex, 0, inserted);
}
} else if (type === 1) {
const parentId = record[1] as string;
const removeIndex = record[2] as number;
const exactMatchIndex = rewriteDetaches.findIndex(
(detach) => detach.parentId === parentId && detach.index === removeIndex,
);
if (exactMatchIndex !== -1) {
rewriteDetaches.splice(exactMatchIndex, 1);
continue;
}
let smallerCount = 0;
for (const detach of rewriteDetaches) {
if (detach.parentId === parentId && detach.index < removeIndex) {
smallerCount += 1;
}
}
const remappedIndex = removeIndex - smallerCount;
const parent = nodes.get(parentId);
if (!parent) {
if (smallerCount === 0) rewritten.push(record);
continue;
}
if (remappedIndex < 0 || remappedIndex >= parent.children.length) {
continue;
}
rewritten.push(remappedIndex === removeIndex ? record : [1, parentId, remappedIndex]);
const [removed] = parent.children.splice(remappedIndex, 1);
if (removed) detachWorkingSubtree(removed, nodes);
for (const detach of rewriteDetaches) {
if (detach.parentId === parentId && detach.index > removeIndex) {
detach.index -= 1;
}
}
} else {
rewritten.push(record);
}
}
return rewritten;
}
/** Data-only staging area: untrusted changes are never applied directly to the host DOM. */
export function createPluginRemoteTree() {
const receiver = new RemoteReceiver();
let current: WireTree = { children: [] };
validatedTrees.add(current);
let failed = false;
const project = (node: unknown): WireNode => {
const value = node as { id: string; type: number; data?: string; element?: string; attributes?: Record<string, string>; children?: unknown[] };
if (value.type === 3 || value.type === 8) return { id: value.id, type: value.type, data: value.data ?? '' };
return { id: value.id, type: 1, element: value.element ?? '', attributes: Object.fromEntries(Object.entries(value.attributes ?? {}).filter(([, attribute]) => attribute !== null)), children: (value.children ?? []).map(project) };
};
const applyToScratch = (records: unknown[][]): WireTree => {
const scratch = new RemoteReceiver();
if (current.children.length > 0) {
scratch.connection.mutate(
current.children.map((child, index) => [0, '~', child, index]) as unknown as Parameters<typeof scratch.connection.mutate>[0],
);
}
scratch.connection.mutate(records as unknown as Parameters<typeof scratch.connection.mutate>[0]);
return { children: scratch.root.children.map(project) };
};
return {
apply(input: unknown): WireTree {
if (failed) throw new Error('Plugin view has been closed after an invalid update');
@@ -209,35 +24,14 @@ export function createPluginRemoteTree() {
// Ordinary DOM attribute mutations do not specify a channel. RemoteReceiver
// defaults those to properties, so explicitly mark them as attributes.
const batch = (input as unknown[][]).map((record) => record[0] === 3 && record.length === 4 ? [...record, 2] : record);
let appliedBatch = batch;
let next = applyToScratch(batch);
try {
validatePluginRemoteTree(next);
} catch (error) {
if (!isDuplicatePluginViewNodeError(error)) throw error;
assertDuplicateOnlyPluginRemoteTree(next);
const rewritten = rewriteDuplicateInsertBatch(current, batch);
if (!rewritten) throw error;
const rewrittenNext = applyToScratch(rewritten);
try {
validatePluginRemoteTree(rewrittenNext);
} catch (rewrittenError) {
if (isDuplicatePluginViewNodeError(rewrittenError)) assertDuplicateOnlyPluginRemoteTree(rewrittenNext);
throw rewrittenError;
}
appliedBatch = rewritten;
next = rewrittenNext;
}
receiver.connection.mutate(appliedBatch as unknown as Parameters<typeof receiver.connection.mutate>[0]);
validatedTrees.add(next);
receiver.connection.mutate(batch as unknown as Parameters<typeof receiver.connection.mutate>[0]);
const next = { children: receiver.root.children.map(project) };
validatePluginRemoteTree(next);
current = next;
return next;
} catch (error) {
if (!isDuplicatePluginViewNodeError(error)) {
failed = true;
current = { children: [] };
validatedTrees.add(current);
}
failed = true;
current = { children: [] };
throw error;
}
},
@@ -1,269 +0,0 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import type { Host, PortForwardingRule } from '../../domain/models';
import { STORAGE_KEY_PORT_FORWARDING } from '../../infrastructure/config/storageKeys';
import { localStorageAdapter } from '../../infrastructure/persistence/localStorageAdapter';
import type { PortForwardingConnection } from '../../infrastructure/services/portForwardingService';
import {
handlePluginVaultDataRequest,
type PluginPortForwardRuntimeDeps,
type PluginVaultDataContext,
} from './pluginVaultDataHandlers';
function installMemoryLocalStorage() {
const store = new Map<string, string>();
const previous = (globalThis as Record<string, unknown>).localStorage;
const mockStorage = {
get length() { return store.size; },
clear() { store.clear(); },
getItem(key: string) { return store.has(key) ? store.get(key)! : null; },
key(index: number) { return Array.from(store.keys())[index] ?? null; },
removeItem(key: string) { store.delete(key); },
setItem(key: string, value: string) { store.set(key, String(value)); },
};
Object.defineProperty(globalThis, 'localStorage', {
value: mockStorage,
configurable: true,
writable: true,
});
return () => {
Object.defineProperty(globalThis, 'localStorage', {
value: previous,
configurable: true,
writable: true,
});
};
}
const sampleHost: Host = {
id: 'host-1',
label: 'Prod Bastion',
hostname: '10.0.0.10',
port: 22,
username: 'ubuntu',
os: 'linux',
group: '',
tags: [],
protocol: 'ssh',
};
const sampleRules: PortForwardingRule[] = [
{
id: 'rule-active',
label: 'DB Tunnel',
type: 'local',
localPort: 15432,
bindAddress: '127.0.0.1',
remoteHost: '127.0.0.1',
remotePort: 5432,
hostId: 'host-1',
status: 'inactive',
createdAt: 1000,
},
{
id: 'rule-err',
label: 'Redis Tunnel',
type: 'local',
localPort: 16379,
bindAddress: '127.0.0.1',
remoteHost: '127.0.0.1',
remotePort: 6379,
hostId: 'host-1',
status: 'inactive',
createdAt: 2000,
},
];
function makeContext(portForwardRuntime: PluginPortForwardRuntimeDeps): PluginVaultDataContext {
return {
getVault: () => ({
hosts: [sampleHost],
keys: [],
identities: [],
knownHosts: [],
groupConfigs: [],
proxyProfiles: [],
snippets: [],
customGroups: [],
updateHosts: () => {},
updateSnippets: () => {},
readCurrentHostActionState: () => ({
hosts: [sampleHost],
keys: [],
identities: [],
knownHosts: [],
groupConfigs: [],
proxyProfiles: [],
snippets: [],
customGroups: [],
}),
}) as never,
resources: {} as never,
portForwardRuntime,
};
}
test('portForward.list overlays live runtime status and error over persisted inactive rules', async () => {
const restore = installMemoryLocalStorage();
try {
localStorageAdapter.write(STORAGE_KEY_PORT_FORWARDING, sampleRules);
const activeConns = new Map<string, PortForwardingConnection>([
['rule-active', { ruleId: 'rule-active', tunnelId: 't-1', status: 'active' }],
]);
const runtimeRules: PortForwardingRule[] = [
{ ...sampleRules[0], status: 'active' },
{ ...sampleRules[1], status: 'error', error: 'EADDRINUSE: port 16379 busy' },
];
const ctx = makeContext({
getActiveConnection: (id) => activeConns.get(id),
getRuntimeRules: () => runtimeRules,
});
const result = await handlePluginVaultDataRequest('portForward.list', {}, ctx) as {
rules: Array<{ id: string; status: string; error?: string }>;
};
const byId = new Map(result.rules.map((r) => [r.id, r]));
assert.equal(byId.get('rule-active')?.status, 'active');
assert.equal(byId.get('rule-active')?.error, undefined);
assert.equal(byId.get('rule-err')?.status, 'error');
assert.equal(byId.get('rule-err')?.error, 'EADDRINUSE: port 16379 busy');
} finally {
restore();
}
});
test('portForward.start and portForward.stop return live runtime status instead of stripped storage inactive', async () => {
const restore = installMemoryLocalStorage();
try {
localStorageAdapter.write(STORAGE_KEY_PORT_FORWARDING, [sampleRules[0]]);
const activeConns = new Map<string, PortForwardingConnection>();
const appliedStatuses: Array<{ ruleId: string; status: string; error?: string }> = [];
let runtimeRules: PortForwardingRule[] = [{ ...sampleRules[0], status: 'inactive' }];
const ctx = makeContext({
getActiveConnection: (id) => activeConns.get(id),
getRuntimeRules: () => runtimeRules,
applyRuntimeStatus: (ruleId, status, error) => {
appliedStatuses.push({ ruleId, status, error });
runtimeRules = runtimeRules.map((r) => (r.id === ruleId ? { ...r, status, error } : r));
},
startPortForward: async (rule, _host, _hosts, _keys, _ids, onStatusChange) => {
onStatusChange?.('connecting');
activeConns.set(rule.id, { ruleId: rule.id, tunnelId: 't-live', status: 'active' });
onStatusChange?.('active');
return { success: true };
},
stopAndCleanupRule: async (ruleId) => {
activeConns.delete(ruleId);
return { success: true };
},
});
const started = await handlePluginVaultDataRequest(
'portForward.start',
{ ruleId: 'rule-active' },
ctx,
) as { ok: boolean; rule: { id: string; status: string; error?: string } };
assert.equal(started.ok, true);
assert.equal(started.rule.status, 'active');
assert.equal(started.rule.error, undefined);
assert.ok(appliedStatuses.some((entry) => entry.ruleId === 'rule-active' && entry.status === 'active'));
// Subsequent list also reports active
const listed = await handlePluginVaultDataRequest('portForward.list', {}, ctx) as {
rules: Array<{ id: string; status: string }>;
};
assert.equal(listed.rules[0]?.status, 'active');
// Stop transitions cleanly back to inactive
const stopped = await handlePluginVaultDataRequest(
'portForward.stop',
{ ruleId: 'rule-active' },
ctx,
) as { ok: boolean; rule: { id: string; status: string } };
assert.equal(stopped.ok, true);
assert.equal(stopped.rule.status, 'inactive');
} finally {
restore();
}
});
test('portForward.start surfaces live error status and message when tunnel start fails', async () => {
const restore = installMemoryLocalStorage();
try {
localStorageAdapter.write(STORAGE_KEY_PORT_FORWARDING, [sampleRules[1]]);
let runtimeRules: PortForwardingRule[] = [{ ...sampleRules[1], status: 'inactive' }];
const ctx = makeContext({
getActiveConnection: () => undefined,
getRuntimeRules: () => runtimeRules,
applyRuntimeStatus: (ruleId, status, error) => {
runtimeRules = runtimeRules.map((r) => (r.id === ruleId ? { ...r, status, error } : r));
},
startPortForward: async (_rule, _host, _hosts, _keys, _ids, onStatusChange) => {
onStatusChange?.('error', 'Connection refused');
return { success: false, error: 'Connection refused' };
},
});
const started = await handlePluginVaultDataRequest(
'portForward.start',
{ ruleId: 'rule-err' },
ctx,
) as { ok: boolean; rule: { id: string; status: string; error?: string }; error?: string };
assert.equal(started.ok, false);
assert.equal(started.rule.status, 'error');
assert.equal(started.rule.error, 'Connection refused');
assert.equal(started.error, 'Connection refused');
} finally {
restore();
}
});
test('views.open resolves visible contribution, triggers open without polluting context, and rejects missing/hidden views', async () => {
const opened: Array<{ viewId: string; context?: Record<string, unknown>; params?: unknown }> = [];
const queries: unknown[] = [];
const ctx: PluginVaultDataContext = {
...makeContext({}),
viewOpenRuntime: {
getPluginContributions: async (query) => {
queries.push(query);
return {
locale: 'en',
plugins: [{
id: 'com.example.db',
version: '1.0.0',
displayName: 'Database',
commands: [],
keybindings: [],
menus: [],
settings: [],
views: [
{ id: 'com.example.db.workbench', title: 'Database', location: 'vault-page', visible: true },
{ id: 'com.example.db.hidden', title: 'Hidden', location: 'vault-page', visible: false },
],
}],
};
},
requestOpenPluginView: (detail) => { opened.push(detail); },
},
};
const result = await handlePluginVaultDataRequest(
'views.open',
{ viewId: 'com.example.db.workbench', location: 'vault-page' },
ctx,
);
assert.deepEqual(result, { opened: true, focused: true, location: 'vault-page' });
assert.deepEqual(queries[0], { context: { 'netcatty.surface': 'vault-page' } });
assert.deepEqual(opened, [{ viewId: 'com.example.db.workbench' }]);
await assert.rejects(
() => handlePluginVaultDataRequest('views.open', { viewId: 'com.example.db.hidden', location: 'vault-page' }, ctx),
/not available/,
);
await assert.rejects(
() => handlePluginVaultDataRequest('views.open', { viewId: 'com.example.db.missing', location: 'vault-page' }, ctx),
/not available/,
);
assert.equal(opened.length, 1);
});
@@ -1,521 +0,0 @@
import type { Host, PortForwardingRule, Snippet } from '../../domain/models';
import { applyGroupDefaults, resolveGroupDefaults } from '../../domain/groupConfig';
import { materializeHostProxyProfile } from '../../domain/proxyProfiles';
import { resolveEffectiveTerminalProtocol } from '../../domain/terminalProtocol';
import {
migratePortForwardingRulesFromStorage,
toPersistedPortForwardingRules,
} from '../../domain/portForwardingPersistence';
import { STORAGE_KEY_PORT_FORWARDING } from '../../infrastructure/config/storageKeys';
import { localStorageAdapter } from '../../infrastructure/persistence/localStorageAdapter';
import { netcattyBridge } from '../../infrastructure/services/netcattyBridge';
import { preparePluginHostStream } from '../../infrastructure/services/pluginHostStreamService';
import {
getActiveConnection,
startPortForward,
stopAndCleanupRule,
} from '../../infrastructure/services/portForwardingService';
import { captureScreenSnapshot } from '../../infrastructure/scripts/screenSnapshotRegistry';
import { activeTabStore } from './activeTabStore';
import {
getAppSessionRuntime,
getAppSettingsRuntime,
type AppVaultRuntime,
} from './appRuntimeBridge';
import type { PluginHostActionResources } from './pluginHostActionResources';
import {
applyPortForwardingRuntimeStatus,
getPortForwardingRuntimeRules,
} from './usePortForwardingState';
import { requestOpenPluginView } from './usePluginViewLifecycle';
export interface PluginPortForwardRuntimeDeps {
startPortForward?: typeof startPortForward;
stopAndCleanupRule?: typeof stopAndCleanupRule;
getActiveConnection?: typeof getActiveConnection;
getRuntimeRules?: typeof getPortForwardingRuntimeRules;
applyRuntimeStatus?: typeof applyPortForwardingRuntimeStatus;
}
export interface PluginViewOpenRuntimeDeps {
getPluginContributions?: NonNullable<ReturnType<typeof netcattyBridge.get>>['getPluginContributions'];
requestOpenPluginView?: typeof requestOpenPluginView;
}
export type PluginVaultDataContext = {
getVault: () => AppVaultRuntime & ReturnType<AppVaultRuntime['readCurrentHostActionState']>;
resources: PluginHostActionResources;
portForwardRuntime?: PluginPortForwardRuntimeDeps;
viewOpenRuntime?: PluginViewOpenRuntimeDeps;
};
type PortForwardSummaryStatus = 'inactive' | 'connecting' | 'active' | 'error';
function normalizePortForwardSummaryStatus(
status: PortForwardingRule['status'] | undefined,
): PortForwardSummaryStatus {
if (status === 'active' || status === 'connecting' || status === 'error' || status === 'inactive') {
return status;
}
return 'inactive';
}
function overlayPortForwardRuntimeStatus(
rule: PortForwardingRule,
runtime?: PluginPortForwardRuntimeDeps,
): PortForwardingRule {
const resolveConnection = runtime?.getActiveConnection ?? getActiveConnection;
const liveConn = resolveConnection(rule.id);
if (liveConn) {
return {
...rule,
status: normalizePortForwardSummaryStatus(liveConn.status),
error: liveConn.error,
};
}
const runtimeRules = (runtime?.getRuntimeRules ?? getPortForwardingRuntimeRules)();
const runtimeRule = runtimeRules.find((candidate) => candidate.id === rule.id);
if (runtimeRule && (runtimeRule.status === 'active' || runtimeRule.status === 'connecting' || runtimeRule.status === 'error')) {
return {
...rule,
status: runtimeRule.status,
error: runtimeRule.error,
};
}
return {
...rule,
status: normalizePortForwardSummaryStatus(rule.status),
};
}
function readPortForwardRules(): PortForwardingRule[] {
const raw = localStorageAdapter.read<PortForwardingRule[]>(STORAGE_KEY_PORT_FORWARDING);
return migratePortForwardingRulesFromStorage(Array.isArray(raw) ? raw : []);
}
function writePortForwardRules(rules: PortForwardingRule[]): void {
localStorageAdapter.write(STORAGE_KEY_PORT_FORWARDING, toPersistedPortForwardingRules(rules));
}
function summarizePortForwardRule(rule: PortForwardingRule, hosts: readonly Host[]) {
const host = rule.hostId ? hosts.find((candidate) => candidate.id === rule.hostId) : undefined;
return {
id: rule.id,
label: rule.label,
type: rule.type,
localPort: rule.localPort,
bindAddress: rule.bindAddress || '127.0.0.1',
...(rule.remoteHost ? { remoteHost: rule.remoteHost } : {}),
...(typeof rule.remotePort === 'number' && rule.remotePort >= 1 ? { remotePort: rule.remotePort } : {}),
...(host?.label ? { hostLabel: host.label } : {}),
...(host?.hostname ? { hostname: host.hostname } : {}),
status: rule.status ?? 'inactive',
...(rule.error ? { error: rule.error.slice(0, 512) } : {}),
};
}
function summarizeSnippet(snippet: Snippet) {
return {
id: snippet.id,
label: snippet.label,
command: snippet.command,
...(snippet.package ? { package: snippet.package } : {}),
...(Array.isArray(snippet.tags) && snippet.tags.length > 0 ? { tags: [...snippet.tags] } : {}),
...(snippet.shortcut ? { shortcut: snippet.shortcut } : {}),
};
}
function effectiveHost(
host: Host,
vault: Pick<AppVaultRuntime, 'groupConfigs' | 'proxyProfiles'>,
): Host {
const validProxyProfileIds = new Set(vault.proxyProfiles.map((p) => p.id));
const defaults = host.group
? resolveGroupDefaults(host.group, vault.groupConfigs, { validProxyProfileIds })
: {};
return materializeHostProxyProfile(
applyGroupDefaults(host, defaults, { validProxyProfileIds }),
vault.proxyProfiles,
);
}
export async function handlePluginVaultDataRequest(
kind: string,
payload: Record<string, unknown>,
ctx: PluginVaultDataContext,
): Promise<unknown> {
const vault = ctx.getVault();
switch (kind) {
case 'resolveMetadata': {
const hostIds = Array.isArray(payload.hostIds) ? payload.hostIds : [];
const hosts: Record<string, Record<string, unknown>> = {};
for (const hostId of hostIds) {
if (typeof hostId !== 'string') continue;
const found = vault.hosts.find((candidate) => candidate.id === hostId);
if (!found) continue;
const { resourceId: _resourceId, revision: _revision, ...meta } = ctx.resources.metadata(found.id);
hosts[hostId] = meta;
}
return { hosts };
}
case 'prepareConnection': {
const hostId = typeof payload.hostId === 'string' ? payload.hostId : '';
const host = vault.hosts.find((candidate) => candidate.id === hostId);
if (!host) throw new Error('Saved SSH host no longer exists');
const settings = getAppSettingsRuntime();
if (!settings) throw new Error('Terminal settings unavailable');
const connectionOptions = await preparePluginHostStream(host, vault, settings.terminalSettings);
return { connectionOptions };
}
case 'prepareProbeTarget': {
const hostId = typeof payload.hostId === 'string' ? payload.hostId : '';
const rawHost = vault.hosts.find((candidate) => candidate.id === hostId);
if (!rawHost) throw new Error('Saved host no longer exists');
const host = effectiveHost(rawHost, vault);
const defaultProtocol = resolveEffectiveTerminalProtocol(host);
const rdpPort = host.rdpConfig?.port ?? (defaultProtocol === 'rdp' ? (host.port || 3389) : undefined);
const vncPort = host.vncConfig?.port ?? (defaultProtocol === 'vnc' ? (host.port || 5900) : undefined);
const isRemoteDesktopOnly = defaultProtocol === 'rdp' || defaultProtocol === 'vnc';
return {
hostname: host.hostname,
...(!isRemoteDesktopOnly ? { sshPort: host.port || 22 } : {}),
...(rdpPort ? { rdpPort } : {}),
...(vncPort ? { vncPort } : {}),
defaultProtocol,
...(host.rdpConfig?.securityMode ? { rdpSecurityMode: host.rdpConfig.securityMode } : {}),
};
}
case 'listGroups': {
const counts = new Map<string, number>();
for (const groupPath of vault.customGroups) {
if (groupPath) counts.set(groupPath, counts.get(groupPath) ?? 0);
}
for (const host of vault.hosts) {
if (host.group) counts.set(host.group, (counts.get(host.group) ?? 0) + 1);
}
const groups = [...counts.entries()]
.sort(([a], [b]) => a.localeCompare(b))
.slice(0, 1000)
.map(([path, hostCount]) => ({ path, hostCount }));
return { groups };
}
case 'updateHostNotes': {
const hostId = typeof payload.hostId === 'string' ? payload.hostId : '';
const notes = typeof payload.notes === 'string' ? payload.notes.slice(0, 4096) : '';
const host = vault.hosts.find((candidate) => candidate.id === hostId);
if (!host) throw new Error('Saved host no longer exists');
if (host.managedSourceId) throw new Error('Managed SSH config hosts cannot be edited directly');
vault.updateHosts((prev) => prev.map((item) => (item.id === hostId ? { ...item, notes } : item)));
return { updated: true };
}
case 'updateHostTags': {
const hostId = typeof payload.hostId === 'string' ? payload.hostId : '';
const tags = Array.isArray(payload.tags)
? payload.tags.filter((t): t is string => typeof t === 'string' && t.length > 0).slice(0, 128)
: [];
const host = vault.hosts.find((candidate) => candidate.id === hostId);
if (!host) throw new Error('Saved host no longer exists');
if (host.managedSourceId) throw new Error('Managed SSH config hosts cannot be edited directly');
vault.updateHosts((prev) => prev.map((item) => (item.id === hostId ? { ...item, tags } : item)));
return { updated: true };
}
case 'portForward.list': {
const rules = readPortForwardRules()
.slice(0, 500)
.map((rule) => overlayPortForwardRuntimeStatus(rule, ctx.portForwardRuntime));
return { rules: rules.map((rule) => summarizePortForwardRule(rule, vault.hosts)) };
}
case 'portForward.create': {
const hostId = typeof payload.hostId === 'string' ? payload.hostId : '';
const host = vault.hosts.find((candidate) => candidate.id === hostId);
if (!host) throw new Error('Bound host no longer exists');
const rule: PortForwardingRule = {
id: crypto.randomUUID(),
label: String(payload.label ?? '').slice(0, 256),
type: (payload.type === 'remote' || payload.type === 'dynamic' ? payload.type : 'local'),
localPort: Number(payload.localPort),
bindAddress: typeof payload.bindAddress === 'string' && payload.bindAddress ? payload.bindAddress : '127.0.0.1',
...(typeof payload.remoteHost === 'string' ? { remoteHost: payload.remoteHost } : {}),
...(typeof payload.remotePort === 'number' ? { remotePort: payload.remotePort } : {}),
hostId: host.id,
status: 'inactive',
createdAt: Date.now(),
};
const existing = readPortForwardRules();
writePortForwardRules([...existing, rule]);
return { ok: true, rule: summarizePortForwardRule(rule, vault.hosts) };
}
case 'portForward.start': {
const ruleId = typeof payload.ruleId === 'string' ? payload.ruleId : '';
const rules = readPortForwardRules();
const rule = rules.find((item) => item.id === ruleId);
if (!rule) return { ok: false, error: 'Port forwarding rule not found' };
const rawHost = rule.hostId ? vault.hosts.find((h) => h.id === rule.hostId) : undefined;
if (!rawHost) return { ok: false, error: 'Target host for port forwarding rule not found' };
const settings = getAppSettingsRuntime();
const resolvedHost = effectiveHost(rawHost, vault);
const resolvedHosts = vault.hosts.map((h) => effectiveHost(h, vault));
const pfStart = ctx.portForwardRuntime?.startPortForward ?? startPortForward;
const pfApplyStatus = ctx.portForwardRuntime?.applyRuntimeStatus ?? applyPortForwardingRuntimeStatus;
const pfGetConnection = ctx.portForwardRuntime?.getActiveConnection ?? getActiveConnection;
let observedStatus: PortForwardingRule['status'] | undefined;
let observedError: string | undefined;
const res = await pfStart(
rule,
resolvedHost,
resolvedHosts,
vault.keys,
vault.identities,
(status, error) => {
observedStatus = status;
observedError = error;
pfApplyStatus(ruleId, status, error);
},
false,
settings?.terminalSettings,
vault.knownHosts,
);
const liveConn = pfGetConnection(ruleId);
const fallbackStatus: PortForwardSummaryStatus = res.success ? 'active' : 'error';
const finalStatus = normalizePortForwardSummaryStatus(liveConn?.status ?? observedStatus ?? fallbackStatus);
const finalError = finalStatus === 'active'
? undefined
: (liveConn?.error ?? observedError ?? (res.error ? String(res.error) : undefined));
pfApplyStatus(ruleId, finalStatus, finalError);
const latestRule = readPortForwardRules().find((item) => item.id === ruleId) ?? rule;
const liveRule: PortForwardingRule = {
...latestRule,
status: finalStatus,
error: finalError,
};
return {
ok: Boolean(res.success),
rule: summarizePortForwardRule(liveRule, vault.hosts),
...(res.error ? { error: String(res.error).slice(0, 512) } : {}),
};
}
case 'portForward.stop': {
const ruleId = typeof payload.ruleId === 'string' ? payload.ruleId : '';
const rules = readPortForwardRules();
const rule = rules.find((item) => item.id === ruleId);
if (!rule) return { ok: false, error: 'Port forwarding rule not found' };
const pfStop = ctx.portForwardRuntime?.stopAndCleanupRule ?? stopAndCleanupRule;
const pfApplyStatus = ctx.portForwardRuntime?.applyRuntimeStatus ?? applyPortForwardingRuntimeStatus;
await pfStop(ruleId);
pfApplyStatus(ruleId, 'inactive', undefined);
const latestRules = readPortForwardRules();
const updated = overlayPortForwardRuntimeStatus(
latestRules.find((item) => item.id === ruleId) ?? { ...rule, status: 'inactive', error: undefined },
ctx.portForwardRuntime,
);
return { ok: true, rule: summarizePortForwardRule(updated, vault.hosts) };
}
case 'portForward.delete': {
const ruleId = typeof payload.ruleId === 'string' ? payload.ruleId : '';
const rules = readPortForwardRules();
if (!rules.some((item) => item.id === ruleId)) {
return { ok: false, error: 'Port forwarding rule not found' };
}
const pfStop = ctx.portForwardRuntime?.stopAndCleanupRule ?? stopAndCleanupRule;
await pfStop(ruleId).catch(() => {});
const latestRules = readPortForwardRules();
writePortForwardRules(latestRules.filter((item) => item.id !== ruleId));
return { ok: true };
}
case 'snippets.list': {
const query = typeof payload.query === 'string' ? payload.query.trim().toLowerCase() : '';
const tag = typeof payload.tag === 'string' ? payload.tag : '';
const pkg = typeof payload.package === 'string' ? payload.package : '';
const filtered = vault.snippets.filter((snippet) => {
if (pkg && snippet.package !== pkg) return false;
if (tag && !(snippet.tags ?? []).includes(tag)) return false;
if (query) {
const hay = `${snippet.label} ${snippet.command} ${(snippet.tags ?? []).join(' ')}`.toLowerCase();
if (!hay.includes(query)) return false;
}
return true;
});
return { snippets: filtered.slice(0, 1000).map(summarizeSnippet) };
}
case 'snippets.get': {
const id = typeof payload.id === 'string' ? payload.id : '';
const found = vault.snippets.find((item) => item.id === id);
return found ? { found: true, snippet: summarizeSnippet(found) } : { found: false };
}
case 'snippets.save': {
const id = typeof payload.id === 'string' && payload.id ? payload.id : crypto.randomUUID();
const existing = vault.snippets.find((item) => item.id === id);
const nextSnippet: Snippet = {
...(existing ?? {}),
id,
label: String(payload.label ?? '').slice(0, 256),
command: String(payload.command ?? '').slice(0, 65536),
...(typeof payload.package === 'string' ? { package: payload.package } : {}),
...(Array.isArray(payload.tags) ? { tags: payload.tags.filter((t): t is string => typeof t === 'string') } : {}),
...(typeof payload.shortcut === 'string' ? { shortcut: payload.shortcut } : {}),
};
const nextList = existing
? vault.snippets.map((item) => (item.id === id ? nextSnippet : item))
: [...vault.snippets, nextSnippet];
vault.updateSnippets(nextList);
return { snippet: summarizeSnippet(nextSnippet) };
}
case 'snippets.delete': {
const id = typeof payload.id === 'string' ? payload.id : '';
const exists = vault.snippets.some((item) => item.id === id);
if (exists) {
vault.updateSnippets(vault.snippets.filter((item) => item.id !== id));
}
return { deleted: exists };
}
case 'terminals.listSessions': {
const sessionRuntime = getAppSessionRuntime();
const activeId = activeTabStore.getActiveTabId();
const sessions = (sessionRuntime?.sessions ?? []).slice(0, 200).map((session) => ({
sessionId: session.id,
label: session.hostLabel || session.hostname || session.id,
hostname: session.hostname || '',
...(session.username ? { username: session.username } : {}),
protocol: session.protocol || 'ssh',
status: session.status || 'connecting',
...(session.workspaceId ? { workspaceId: session.workspaceId } : {}),
active: session.id === activeId || (Boolean(session.workspaceId) && session.workspaceId === activeId),
}));
return { sessions };
}
case 'terminals.readScreen': {
const sessionId = typeof payload.sessionId === 'string' ? payload.sessionId : '';
const maxRows = typeof payload.maxRows === 'number' ? Math.max(1, Math.min(300, payload.maxRows)) : 80;
const sessionRuntime = getAppSessionRuntime();
if (!sessionRuntime?.sessions.some((s) => s.id === sessionId)) {
throw new Error('Terminal session not found');
}
const snapshot = captureScreenSnapshot(sessionId);
const lines = (snapshot.lines ?? []).slice(-maxRows);
return {
sessionId,
rows: snapshot.rows ?? lines.length,
cols: snapshot.cols ?? 80,
lines,
};
}
case 'terminals.sendInput': {
const sessionId = typeof payload.sessionId === 'string' ? payload.sessionId : '';
const data = typeof payload.data === 'string' ? payload.data : '';
const sessionRuntime = getAppSessionRuntime();
if (!sessionRuntime?.sessions.some((s) => s.id === sessionId)) {
throw new Error('Terminal session not found');
}
const bridge = netcattyBridge.get();
if (!bridge?.writeToSession) throw new Error('Terminal input bridge is unavailable');
bridge.writeToSession(sessionId, data);
return { sent: true };
}
case 'terminals.openLocal': {
const sessionRuntime = getAppSessionRuntime();
if (!sessionRuntime?.createLocalTerminal) throw new Error('Local terminal is unavailable');
const sessionId = sessionRuntime.createLocalTerminal();
return { opened: true, ...(typeof sessionId === 'string' ? { sessionId } : {}) };
}
case 'workspace.listTabs': {
const sessionRuntime = getAppSessionRuntime();
const activeTabId = activeTabStore.getActiveTabId();
const tabs: Array<{ id: string; kind: 'vault' | 'sftp' | 'session' | 'workspace' | 'log'; title: string; active: boolean }> = [
{ id: 'vault', kind: 'vault', title: 'Vault', active: activeTabId === 'vault' },
{ id: 'sftp', kind: 'sftp', title: 'SFTP', active: activeTabId === 'sftp' },
];
for (const workspace of sessionRuntime?.workspaces ?? []) {
tabs.push({ id: workspace.id, kind: 'workspace', title: workspace.title || 'Workspace', active: activeTabId === workspace.id });
}
for (const session of sessionRuntime?.sessions ?? []) {
if (session.workspaceId) continue;
tabs.push({ id: session.id, kind: 'session', title: session.hostLabel || session.hostname || 'Terminal', active: activeTabId === session.id });
}
for (const logView of sessionRuntime?.logViews ?? []) {
tabs.push({ id: logView.id, kind: 'log', title: logView.title || 'Log', active: activeTabId === logView.id });
}
return { activeTabId, tabs: tabs.slice(0, 200) };
}
case 'workspace.focusTab': {
const tabId = typeof payload.tabId === 'string' ? payload.tabId : '';
const sessionRuntime = getAppSessionRuntime();
const known = new Set<string>(['vault', 'sftp']);
for (const workspace of sessionRuntime?.workspaces ?? []) known.add(workspace.id);
for (const session of sessionRuntime?.sessions ?? []) {
if (!session.workspaceId) known.add(session.id);
}
for (const logView of sessionRuntime?.logViews ?? []) known.add(logView.id);
let resolvedTabId = known.has(tabId) ? tabId : null;
if (!resolvedTabId) {
const memberSession = (sessionRuntime?.sessions ?? []).find((s) => s.id === tabId && s.workspaceId);
if (memberSession?.workspaceId && known.has(memberSession.workspaceId)) {
resolvedTabId = memberSession.workspaceId;
}
}
if (!resolvedTabId) return { focused: false };
if (sessionRuntime?.setActiveTabId) sessionRuntime.setActiveTabId(resolvedTabId);
else activeTabStore.setActiveTabId(resolvedTabId);
return { focused: true };
}
case 'views.open': {
const viewId = typeof payload.viewId === 'string' ? payload.viewId : '';
const location = typeof payload.location === 'string' ? payload.location : '';
if (!viewId) throw new Error('Plugin view ID is required');
const queryContext = location === 'vault-page'
? { 'netcatty.surface': 'vault-page' }
: location === 'terminal-sidebar'
? { 'netcatty.surface': 'terminal-sidebar' }
: { 'netcatty.surface': 'view' };
const getContributions = ctx.viewOpenRuntime?.getPluginContributions ?? netcattyBridge.get()?.getPluginContributions;
if (!getContributions) {
throw new Error('Plugin contributions are unavailable');
}
const snapshot = await getContributions({ context: queryContext });
const resolved = snapshot.plugins
.flatMap((plugin) => plugin.views)
.find((view) => view.id === viewId && view.visible);
if (!resolved) {
throw new Error(`Plugin view is not available: ${viewId}`);
}
if (resolved.location === 'terminal-sidebar') {
const sessionRuntime = getAppSessionRuntime();
const activeTabId = activeTabStore.getActiveTabId();
const isTerminalTab = Boolean(
sessionRuntime?.sessions.some((s) => s.id === activeTabId)
|| sessionRuntime?.workspaces.some((w) => w.id === activeTabId),
);
if (!isTerminalTab) {
throw new Error('An active terminal tab is required to open a terminal sidebar view');
}
}
const openView = ctx.viewOpenRuntime?.requestOpenPluginView ?? requestOpenPluginView;
openView({ viewId: resolved.id });
return { opened: true, focused: true, location: resolved.location };
}
default:
throw new Error(`Unsupported Vault data request: ${kind}`);
}
}
-338
View File
@@ -39,341 +39,3 @@ test('idle instances are evicted while active instances are never silently repla
assert.throws(() => store.acquire('two', f.bridge, request), /Too many/); first.release();
const second = store.acquire('two', f.bridge, request); assert.notEqual(second, first); assert.equal(f.closes.length, 1); store.dispose();
});
test('cssUnchanged updates retain previously validated stylesheet and peek returns live session synchronously', () => {
const f = fixture(); const store = new PluginViewSessions();
assert.equal(store.peek('view'), null);
const view = store.acquire('view', f.bridge, request); const id = f.opened[0].instanceId;
assert.equal(store.peek('view'), view);
f.update({ kind: 'host-ui.update', viewId: request.viewId, instanceId: id, sequence: 1, css: '.a{display:flex}', mutations: [] });
assert.equal(view.getSnapshot().css, '.a{display:flex}');
f.update({ kind: 'host-ui.update', viewId: request.viewId, instanceId: id, sequence: 2, css: '', cssUnchanged: true, mutations: [[0, '~', { id: 't', type: 3, data: 'hi' }, 0]] } as Update);
assert.equal(view.getSnapshot().css, '.a{display:flex}');
assert.deepEqual(view.getSnapshot().tree.children[0], { id: 't', type: 3, data: 'hi' });
store.dispose();
});
test('empty first update holds loading briefly to prevent blank-frame flash then completes cleanly', async () => {
const f = fixture(); const store = new PluginViewSessions();
const view = store.acquire('empty-grace', f.bridge, request); const id = f.opened[0].instanceId;
f.update({ kind: 'host-ui.update', viewId: request.viewId, instanceId: id, sequence: 1, css: '', mutations: [] });
assert.equal(view.getSnapshot().loading, true, 'empty first update holds loading briefly');
await new Promise((resolve) => setTimeout(resolve, 90));
assert.equal(view.getSnapshot().loading, false, 'truly empty view finishes loading after grace window');
store.dispose();
});
test('update and event failures warn concisely with error message before disposing without logging event payloads', async () => {
const warns: unknown[][] = [];
const originalWarn = console.warn;
console.warn = (...args: unknown[]) => { warns.push(args); };
try {
const f1 = fixture();
const store = new PluginViewSessions();
const view1 = store.acquire('bad-seq', f1.bridge, request);
f1.update({ kind: 'host-ui.update', viewId: request.viewId, instanceId: f1.opened[0].instanceId, sequence: 99, css: '', mutations: [] });
assert.equal(view1.getSnapshot().error, true);
assert.equal(warns.length, 1);
assert.match(String(warns[0][0]), /Invalid plugin update order/);
assert.ok(warns[0][1] instanceof Error);
const f2 = fixture();
f2.bridge.sendHostDrawnPluginViewEvent = async () => { throw new Error('IPC channel closed'); };
const view2 = store.acquire('bad-send', f2.bridge, request);
view2.send({ type: 'input', nodeId: 'field', value: 'secret@example.com' });
await Promise.resolve();
assert.equal(view2.getSnapshot().error, true);
assert.equal(warns.length, 2);
assert.match(String(warns[1][0]), /IPC channel closed/);
assert.doesNotMatch(warns[1].map(String).join(' '), /secret@example\.com/);
store.dispose();
} finally {
console.warn = originalWarn;
}
});
test('recoverable duplicate node update applies as a move and publishes the new tree without warning', () => {
const warns: unknown[][] = [];
const originalWarn = console.warn;
console.warn = (...args: unknown[]) => { warns.push(args); };
try {
const f = fixture();
const store = new PluginViewSessions();
const view = store.acquire('dup-move', f.bridge, request);
const id = f.opened[0].instanceId;
const initialNode = {
id: 'row-1',
type: 1 as const,
element: 'div',
attributes: { class: 'row' },
children: [{ id: 'cell-1', type: 3 as const, data: 'alpha' }],
};
f.update({ kind: 'host-ui.update', viewId: request.viewId, instanceId: id, sequence: 1, css: '.row{display:flex}', mutations: [[0, '~', initialNode, 0]] });
assert.equal(view.getSnapshot().loading, false);
assert.equal(view.getSnapshot().error, false);
assert.deepEqual(view.getSnapshot().tree.children, [initialNode]);
// Re-inserting an existing node (or wrapping it in a new parent without a remove)
// is normalized as a move and published immediately with zero warnings.
const movedNode = {
id: 'group-1',
type: 1 as const,
element: 'section',
attributes: { class: 'sorted' },
children: [{
id: 'row-1',
type: 1 as const,
element: 'div',
attributes: { class: 'row' },
children: [{ id: 'cell-1', type: 3 as const, data: 'alpha' }],
}],
};
f.update({
kind: 'host-ui.update',
viewId: request.viewId,
instanceId: id,
sequence: 2,
css: '.sorted{color:blue}',
mutations: [[0, '~', movedNode, 1]],
} as Update);
assert.equal(warns.length, 0);
assert.equal(view.getSnapshot().error, false);
assert.equal(view.getSnapshot().css.includes('blue'), true);
assert.deepEqual(view.getSnapshot().tree.children, [movedNode]);
assert.equal(f.closes.length, 0);
assert.equal(store.peek('dup-move'), view);
// A subsequent incremental update applies cleanly against the moved nodes.
f.update({
kind: 'host-ui.update',
viewId: request.viewId,
instanceId: id,
sequence: 3,
css: '',
cssUnchanged: true,
mutations: [
[2, 'cell-1', 'beta'],
[0, '~', { id: 'row-2', type: 3, data: 'second' }, 1],
],
} as Update);
assert.equal(warns.length, 0);
assert.equal(view.getSnapshot().error, false);
assert.deepEqual(view.getSnapshot().tree.children, [
{
...movedNode,
children: [{ ...initialNode, children: [{ id: 'cell-1', type: 3, data: 'beta' }] }],
},
{ id: 'row-2', type: 3, data: 'second' },
]);
// Forbidden mutations still dispose the session.
f.update({
kind: 'host-ui.update',
viewId: request.viewId,
instanceId: id,
sequence: 4,
css: '',
cssUnchanged: true,
mutations: [[3, 'row-1', 'onclick', 'attack()']],
} as Update);
assert.equal(view.getSnapshot().error, true);
assert.deepEqual(view.getSnapshot().tree.children, []);
store.dispose();
} finally {
console.warn = originalWarn;
}
});
test('unrecoverable duplicate node update warns without failing the session and accepts subsequent valid updates', () => {
const warns: unknown[][] = [];
const originalWarn = console.warn;
console.warn = (...args: unknown[]) => { warns.push(args); };
try {
const f = fixture();
const store = new PluginViewSessions();
const view = store.acquire('dup-recovery', f.bridge, request);
const id = f.opened[0].instanceId;
const initialNode = {
id: 'row-1',
type: 1 as const,
element: 'div',
attributes: { class: 'row' },
children: [{ id: 'cell-1', type: 3 as const, data: 'alpha' }],
};
f.update({ kind: 'host-ui.update', viewId: request.viewId, instanceId: id, sequence: 1, css: '.row{display:flex}', mutations: [[0, '~', initialNode, 0]] });
assert.equal(view.getSnapshot().loading, false);
assert.equal(view.getSnapshot().error, false);
assert.deepEqual(view.getSnapshot().tree.children, [initialNode]);
// Self-nesting cycle cannot be rewritten as a move; last-resort fallback preserves last good tree.
f.update({
kind: 'host-ui.update',
viewId: request.viewId,
instanceId: id,
sequence: 2,
css: '',
cssUnchanged: true,
mutations: [[0, 'row-1', { id: 'row-1', type: 1, element: 'div', attributes: {}, children: [] }, 0]],
} as Update);
assert.equal(warns.length, 1);
assert.match(String(warns[0][0]), /Duplicate view node/);
assert.equal(view.getSnapshot().error, false);
assert.deepEqual(view.getSnapshot().tree.children, [initialNode]);
assert.equal(f.closes.length, 0);
assert.equal(store.peek('dup-recovery'), view);
f.update({
kind: 'host-ui.update',
viewId: request.viewId,
instanceId: id,
sequence: 3,
css: '',
cssUnchanged: true,
mutations: [
[2, 'cell-1', 'beta'],
[0, '~', { id: 'row-2', type: 3, data: 'second' }, 1],
],
} as Update);
assert.equal(view.getSnapshot().error, false);
assert.deepEqual(view.getSnapshot().tree.children, [
{ ...initialNode, children: [{ id: 'cell-1', type: 3, data: 'beta' }] },
{ id: 'row-2', type: 3, data: 'second' },
]);
f.update({
kind: 'host-ui.update',
viewId: request.viewId,
instanceId: id,
sequence: 4,
css: '',
cssUnchanged: true,
mutations: [[3, 'row-1', 'onclick', 'attack()']],
} as Update);
assert.equal(view.getSnapshot().error, true);
assert.deepEqual(view.getSnapshot().tree.children, []);
store.dispose();
} finally {
console.warn = originalWarn;
}
});
test('pending CSS from a rejected unrecoverable duplicate update is published on the next accepted update', () => {
const originalWarn = console.warn;
console.warn = () => {};
try {
const f = fixture();
const store = new PluginViewSessions();
const view = store.acquire('css-pending', f.bridge, request);
const id = f.opened[0].instanceId;
const node = { id: 'row-1', type: 1 as const, element: 'div', attributes: { class: 'row' }, children: [] };
f.update({ kind: 'host-ui.update', viewId: request.viewId, instanceId: id, sequence: 1, css: '.row{color:red}', mutations: [[0, '~', node, 0]] });
assert.equal(view.getSnapshot().css.includes('red'), true);
f.update({
kind: 'host-ui.update',
viewId: request.viewId,
instanceId: id,
sequence: 2,
css: '.row{color:blue}',
mutations: [[0, 'row-1', { id: 'row-1', type: 1, element: 'span', attributes: {}, children: [] }, 0]],
} as Update);
assert.equal(view.getSnapshot().error, false);
assert.equal(view.getSnapshot().css.includes('red'), true, 'rejected update does not publish CSS immediately');
f.update({
kind: 'host-ui.update',
viewId: request.viewId,
instanceId: id,
sequence: 3,
css: '',
cssUnchanged: true,
mutations: [[3, 'row-1', 'class', 'ready']],
} as Update);
assert.equal(view.getSnapshot().error, false);
assert.equal(view.getSnapshot().css.includes('blue'), true, 'next accepted update publishes the stashed CSS');
store.dispose();
} finally {
console.warn = originalWarn;
}
});
test('explicit CSS matching the last committed value supersedes pending CSS', () => {
const originalWarn = console.warn;
console.warn = () => {};
try {
const f = fixture();
const store = new PluginViewSessions();
const view = store.acquire('css-supersede', f.bridge, request);
const id = f.opened[0].instanceId;
const node = { id: 'row-1', type: 1 as const, element: 'div', attributes: { class: 'row' }, children: [] };
f.update({ kind: 'host-ui.update', viewId: request.viewId, instanceId: id, sequence: 1, css: '.row{color:red}', mutations: [[0, '~', node, 0]] });
f.update({
kind: 'host-ui.update',
viewId: request.viewId,
instanceId: id,
sequence: 2,
css: '.row{color:blue}',
mutations: [[0, 'row-1', { id: 'row-1', type: 1, element: 'span', attributes: {}, children: [] }, 0]],
} as Update);
assert.equal(view.getSnapshot().css.includes('red'), true);
f.update({
kind: 'host-ui.update',
viewId: request.viewId,
instanceId: id,
sequence: 3,
css: '.row{color:red}',
mutations: [[3, 'row-1', 'class', 'ready']],
} as Update);
assert.equal(view.getSnapshot().error, false);
assert.equal(view.getSnapshot().css.includes('blue'), false);
assert.equal(view.getSnapshot().css.includes('red'), true, 'explicit red supersedes pending blue');
f.update({
kind: 'host-ui.update',
viewId: request.viewId,
instanceId: id,
sequence: 4,
css: '',
cssUnchanged: true,
mutations: [[3, 'row-1', 'class', 'again']],
} as Update);
assert.equal(view.getSnapshot().css.includes('red'), true);
assert.equal(view.getSnapshot().css.includes('blue'), false);
store.dispose();
} finally {
console.warn = originalWarn;
}
});
test('omitted css preserves previous stylesheet and apply failures emit diagnostics', () => {
const originalWarn = console.warn;
console.warn = () => {};
try {
const f = fixture();
const diagnostics: Array<{ source?: string; message: string; extra?: Record<string, unknown> }> = [];
const bridgeWithDiag = {
...f.bridge,
logDiagnostic: async (payload: { source?: string; message: string; extra?: Record<string, unknown> }) => {
diagnostics.push(payload);
return { success: true };
},
};
const store = new PluginViewSessions();
const view = store.acquire('diag-test', bridgeWithDiag, request);
const id = f.opened[0].instanceId;
const node = { id: 'n1', type: 1 as const, element: 'div', attributes: {}, children: [] };
f.update({ kind: 'host-ui.update', viewId: request.viewId, instanceId: id, sequence: 1, css: '.n{display:flex}', mutations: [[0, '~', node, 0]] });
f.update({ kind: 'host-ui.update', viewId: request.viewId, instanceId: id, sequence: 2, mutations: [[3, 'n1', 'class', 'n']] });
assert.equal(view.getSnapshot().css.includes('display:flex'), true);
assert.equal(view.getSnapshot().error, false);
// Duplicate-node recoverable errors should emit at most one diagnostic per session.
f.update({ kind: 'host-ui.update', viewId: request.viewId, instanceId: id, sequence: 3, mutations: [[0, 'n1', { id: 'n1', type: 1, element: 'span', attributes: {}, children: [] }, 0]] } as Update);
f.update({ kind: 'host-ui.update', viewId: request.viewId, instanceId: id, sequence: 4, mutations: [[0, 'n1', { id: 'n1', type: 1, element: 'span', attributes: {}, children: [] }, 0]] } as Update);
assert.equal(diagnostics.length, 1);
assert.equal(diagnostics[0].extra?.kind, 'duplicate-node-update');
// Trigger an out-of-order sequence failure and verify diagnostic is logged.
f.update({ kind: 'host-ui.update', viewId: request.viewId, instanceId: id, sequence: 99, mutations: [] });
assert.equal(view.getSnapshot().error, true);
assert.equal(diagnostics.length, 2);
assert.equal(diagnostics[1].source, 'plugin-view');
assert.match(diagnostics[1].message, /Invalid plugin update order/);
store.dispose();
} finally {
console.warn = originalWarn;
}
});
+6 -100
View File
@@ -1,24 +1,11 @@
import { createPluginRemoteTree, isDuplicatePluginViewNodeError } from './pluginRemoteTree';
import { createPluginRemoteTree } from './pluginRemoteTree';
import { registerLoadedPluginViewSessions } from './pluginViewSessionRegistry';
import { validatePluginStylesheet } from '@/domain/pluginViewStylePolicy.cjs';
import type { HostDrawnViewEvent } from '@netcatty/plugin-contract';
type NetcattyBridgeApi = NonNullable<ReturnType<typeof import('../../infrastructure/services/netcattyBridge').netcattyBridge.get>>;
type Bridge = Pick<NetcattyBridgeApi, 'openHostDrawnPluginView' | 'closeHostDrawnPluginView' | 'onHostDrawnPluginViewUpdate' | 'onPluginViewClosed' | 'sendHostDrawnPluginViewEvent' | 'getPluginViewResource'>
& Partial<Pick<NetcattyBridgeApi, 'logDiagnostic'>>;
type Bridge = Pick<NonNullable<ReturnType<typeof import('../../infrastructure/services/netcattyBridge').netcattyBridge.get>>, 'openHostDrawnPluginView' | 'closeHostDrawnPluginView' | 'onHostDrawnPluginViewUpdate' | 'onPluginViewClosed' | 'sendHostDrawnPluginViewEvent' | 'getPluginViewResource'>;
export type PluginViewSnapshot = { tree: ReturnType<ReturnType<typeof createPluginRemoteTree>['snapshot']>; css: string; loading: boolean; error: boolean; settled: boolean };
const empty = (): PluginViewSnapshot => ({ tree: { children: [] }, css: '', loading: true, error: false, settled: true });
const EMPTY_FIRST_FRAME_GRACE_MS = 60;
function hasRenderableTreeContent(tree: PluginViewSnapshot['tree']): boolean {
for (const child of tree.children) {
if (child.type === 3 && child.data.trim().length > 0) return true;
if (child.type === 1) {
if (child.element !== 'div' || child.children.length > 0) return true;
}
}
return false;
}
/** Owns a window's bounded, retained UI instances independently of React mounts. */
export class PluginViewSessions {
@@ -28,18 +15,13 @@ export class PluginViewSessions {
const id = crypto.randomUUID();
const tree = createPluginRemoteTree();
let state = empty(); let sequence = 1; let eventId = 0; let disposed = false; let users = 0;
let loggedDuplicateNode = false;
let lastRawCss: string | null = null;
let pendingCss: string | null = null;
let pendingRawCss: string | null = null;
let timer: ReturnType<typeof setTimeout> | undefined;
let emptyFrameTimer: ReturnType<typeof setTimeout> | undefined;
const listeners = new Set<() => void>();
const publish = (next: PluginViewSnapshot) => { state = next; for (const listener of listeners) listener(); };
const cleanup: Array<() => void> = [];
const dispose = (failed = false) => {
if (disposed) return;
disposed = true; clearTimeout(timer); clearTimeout(emptyFrameTimer); cleanup.forEach((stop) => stop());
disposed = true; clearTimeout(timer); cleanup.forEach((stop) => stop());
this.sessions.delete(key);
publish({ ...empty(), loading: false, error: failed });
void bridge.closeHostDrawnPluginView?.(id).catch(() => {});
@@ -47,72 +29,10 @@ export class PluginViewSessions {
if (!bridge.openHostDrawnPluginView || !bridge.onHostDrawnPluginViewUpdate || !bridge.onPluginViewClosed) throw new Error('Plugin views unavailable');
cleanup.push(bridge.onHostDrawnPluginViewUpdate((update) => {
if (disposed || update.kind !== 'host-ui.update' || update.instanceId !== id || update.viewId !== request.viewId) return;
let stagedCss: string | null = null;
let stagedRawCss: string | null = null;
try {
if (update.sequence !== sequence++) throw new Error('Invalid plugin update order');
if (update.cssUnchanged || update.css === undefined) {
// keep pending CSS, if any, for the nextCss fallback below
} else if (lastRawCss !== null && update.css === lastRawCss) {
// Explicit CSS equal to the last committed raw CSS supersedes any pending stylesheet.
pendingCss = null;
pendingRawCss = null;
} else {
stagedCss = validatePluginStylesheet(update.css);
stagedRawCss = update.css;
}
const nextCss = stagedCss ?? pendingCss ?? state.css;
const nextTree = tree.apply(update.mutations);
if (stagedRawCss !== null) lastRawCss = stagedRawCss;
else if (pendingRawCss !== null) lastRawCss = pendingRawCss;
pendingCss = null;
pendingRawCss = null;
const settled = (update.acknowledgedEvent ?? 0) >= eventId;
if (state.loading && !hasRenderableTreeContent(nextTree)) {
// Hold the host loading surface briefly while an older SDK flushes its
// initial React commit so users never see an empty blank frame flash.
publish({ tree: nextTree, css: nextCss, loading: true, error: false, settled });
if (emptyFrameTimer === undefined) {
emptyFrameTimer = setTimeout(() => {
emptyFrameTimer = undefined;
if (!disposed && state.loading) publish({ ...state, loading: false });
}, EMPTY_FIRST_FRAME_GRACE_MS);
}
return;
}
if (emptyFrameTimer !== undefined) {
clearTimeout(emptyFrameTimer);
emptyFrameTimer = undefined;
}
publish({ tree: nextTree, css: nextCss, loading: false, error: false, settled });
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
console.warn(`[PluginViewSession] Failed to apply update for ${request.viewId}: ${message}`, error);
const duplicateNode = isDuplicatePluginViewNodeError(error);
if (!duplicateNode || !loggedDuplicateNode) {
if (duplicateNode) loggedDuplicateNode = true;
void bridge.logDiagnostic?.({
source: 'plugin-view',
message: `Failed to apply update for ${request.viewId}: ${message}`,
extra: {
kind: duplicateNode ? 'duplicate-node-update' : 'apply-update-failed',
viewId: request.viewId,
sequence: update.sequence,
mutationCount: Array.isArray(update.mutations) ? update.mutations.length : null,
},
}).catch(() => {});
}
// Recoverable duplicate-only batches are normalized as moves in
// createPluginRemoteTree(); only unrecoverable duplicates reach here.
if (duplicateNode) {
if (stagedCss !== null && stagedRawCss !== null) {
pendingCss = stagedCss;
pendingRawCss = stagedRawCss;
}
return;
}
dispose(true);
}
publish({ tree: tree.apply(update.mutations), css: validatePluginStylesheet(update.css), loading: false, error: false, settled: (update.acknowledgedEvent ?? 0) >= eventId });
} catch { dispose(true); }
}));
cleanup.push(bridge.onPluginViewClosed((event) => { if (event.instanceId === id) dispose(true); }));
void bridge.openHostDrawnPluginView({ ...request, instanceId: id }).then(() => {
@@ -144,25 +64,11 @@ export class PluginViewSessions {
send: (event: HostDrawnViewEvent) => {
if (disposed || users === 0) return;
publish({ ...state, settled: false });
void bridge.sendHostDrawnPluginViewEvent?.(id, { ...event, eventId: ++eventId }).catch((error) => {
const message = error instanceof Error ? error.message : String(error);
console.warn(`[PluginViewSession] Failed to send event for ${request.viewId}: ${message}`);
if (!disposed) {
void bridge.logDiagnostic?.({
source: 'plugin-view',
message: `Failed to send event for ${request.viewId}: ${message}`,
extra: { kind: 'send-event-failed', viewId: request.viewId, eventType: event.type },
}).catch(() => {});
}
dispose(true);
});
void bridge.sendHostDrawnPluginViewEvent?.(id, { ...event, eventId: ++eventId }).catch(() => dispose(true));
},
dispose,
};
}
peek(key: string) {
return this.sessions.get(key) ?? null;
}
acquire(key: string, bridge: Bridge, request: Omit<import('@netcatty/plugin-contract').HostDrawnViewOpenRequest, 'instanceId'>) {
let session = this.sessions.get(key);
if (!session) {
@@ -1,5 +1,3 @@
import { netcattyBridge } from '../../infrastructure/services/netcattyBridge';
type CloseablePluginViewSessions = {
closeView(viewId: string): void;
};
@@ -18,7 +16,3 @@ export function registerLoadedPluginViewSessions(sessions: CloseablePluginViewSe
export function closePluginViewSessionIfLoaded(viewId: string): void {
loadedSessions?.closeView(viewId);
}
export function prewarmHostDrawnPluginView(viewId: string): void {
void netcattyBridge.get()?.prewarmHostDrawnPluginView?.(viewId)?.catch?.(() => {});
}
@@ -14,15 +14,11 @@ const getSession = (sessionId: string) => (
function createHarness() {
const changes: Change[] = [];
const nested: boolean[] = [];
const controller = createPromptHostnameSessionSignalController({
getSession,
onChange: (sessionId, hostname, options) => {
changes.push([sessionId, hostname]);
nested.push(options?.fromJumpServer === true);
},
onChange: (sessionId, hostname) => changes.push([sessionId, hostname]),
});
return { changes, controller, nested };
return { changes, controller };
}
test('prompt observations are independent of IP, alias, and matching connection addresses', () => {
@@ -56,56 +52,11 @@ test('prompt host controller observes the initial jumpserver prompt', () => {
});
test('prompt host controller publishes a nested target and de-duplicates it', () => {
const { changes, controller, nested } = createHarness();
controller.handleTerminalOutput('ssh-1', 'Welcome\r\nOpt> ');
const { changes, controller } = createHarness();
controller.handleTerminalOutput('ssh-1', '[root@jump.example.com ~]# ');
controller.handleTerminalOutput('ssh-1', 'ssh root@10.1.64.1\r\n[root@10.1.64.1 ~]# ');
controller.handleTerminalOutput('ssh-1', '\r\n[root@10.1.64.1 ~]# ');
assert.deepEqual(changes, [['ssh-1', '10.1.64.1']]);
assert.deepEqual(nested, [true]);
});
test('prompt host controller marks ordinary direct prompts as non-jump hosts', () => {
const { changes, controller, nested } = createHarness();
controller.handleTerminalOutput('ssh-1', 'Last login\r\n[root@vm-prod ~]# ');
assert.deepEqual(changes, [['ssh-1', 'vm-prod']]);
assert.deepEqual(nested, [false]);
});
test('prompt host controller tracks a JumpServer menu split across chunks', () => {
const { changes, controller, nested } = createHarness();
controller.handleTerminalOutput('ssh-1', 'Welcome\r\nO');
controller.handleTerminalOutput('ssh-1', 'pt> ');
controller.handleTerminalOutput('ssh-1', '10.1.64.1\r\n[root@k8s-10-1-64-1 ~]# ');
assert.deepEqual(changes, [['ssh-1', 'k8s-10-1-64-1']]);
assert.deepEqual(nested, [true]);
});
test('prompt host controller detects ANSI-styled JumpServer menus and upgrades matching hostnames', () => {
const { changes, controller, nested } = createHarness();
controller.handleTerminalOutput('ssh-1', '[root@app-01 ~]# ');
controller.handleTerminalOutput('ssh-1', 'ssh jump\r\n\x1b[32mOpt\x1b[0m> \r\n[root@app-01 ~]# ');
assert.deepEqual(changes, [['ssh-1', 'app-01'], ['ssh-1', 'app-01']]);
assert.deepEqual(nested, [false, true]);
});
test('prompt host controller detects consumed JumpServer prompts in coalesced output', () => {
for (const coalesced of [
'Welcome\r\nOpt> 42\r\n[root@target-01 ~]# ',
'Welcome\r\n[Host]> 10.1.64.1\r\n[root@target-01 ~]# ',
'Welcome\r\n\x1b[32mOpt> \x1b[0m42\r\n[root@target-01 ~]# ',
]) {
const { changes, controller, nested } = createHarness();
controller.handleTerminalOutput('ssh-1', coalesced);
assert.deepEqual(changes, [['ssh-1', 'target-01']], JSON.stringify(coalesced));
assert.deepEqual(nested, [true], JSON.stringify(coalesced));
}
// Also works when the consumed menu prompt is split across chunks.
const { changes, controller, nested } = createHarness();
controller.handleTerminalOutput('ssh-1', 'Welcome\r\nO');
controller.handleTerminalOutput('ssh-1', 'pt> 42\r\n[root@target-02 ~]# ');
assert.deepEqual(changes, [['ssh-1', 'target-02']]);
assert.deepEqual(nested, [true]);
assert.deepEqual(changes, [['ssh-1', getSession('ssh-1').hostname], ['ssh-1', '10.1.64.1']]);
});
test('prompt host controller observes the original host when returning from a target', () => {
@@ -1,17 +1,12 @@
import type { TerminalSession } from '../../domain/models';
import {
extractTerminalPromptHostname,
isJumpServerMenuLine,
isJumpServerMenuPrompt,
} from '../../domain/terminalPromptSecurity';
type PromptHostnameSessionSignalOptions = {
getSession: (sessionId: string) => Pick<TerminalSession, 'protocol'> | undefined;
onChange: (
sessionId: string,
hostname: string | null,
options: { fromJumpServer: boolean },
) => void;
onChange: (sessionId: string, hostname: string | null) => void;
maxTailChars?: number;
};
@@ -28,19 +23,17 @@ export function createPromptHostnameSessionSignalController({
}: PromptHostnameSessionSignalOptions) {
const tails = new Map<string, string>();
const published = new Map<string, string>();
const jumpServerSessions = new Set<string>();
const tailLimit = Math.max(256, maxTailChars);
const forgetSession = (sessionId: string): void => {
tails.delete(sessionId);
published.delete(sessionId);
jumpServerSessions.delete(sessionId);
};
return {
forgetSession,
pruneSessions(validSessionIds: ReadonlySet<string>): void {
for (const sessionId of [...tails.keys(), ...published.keys(), ...jumpServerSessions]) {
for (const sessionId of [...tails.keys(), ...published.keys()]) {
if (!validSessionIds.has(sessionId)) {
forgetSession(sessionId);
}
@@ -57,19 +50,12 @@ export function createPromptHostnameSessionSignalController({
const combined = `${tails.get(sessionId) ?? ''}${chunk}`;
const tail = combined.slice(-tailLimit);
tails.set(sessionId, tail);
if (
!jumpServerSessions.has(sessionId)
&& combined.includes('>')
&& combined.split(/\r\n|\r|\n/u).some((line) => isJumpServerMenuLine(line))
) {
jumpServerSessions.add(sessionId);
}
const detected = extractTerminalPromptHostname(tail);
if (!detected) {
if (isJumpServerMenuPrompt(tail) && published.has(sessionId)) {
published.delete(sessionId);
onChange(sessionId, null, { fromJumpServer: true });
onChange(sessionId, null);
}
return;
}
@@ -77,13 +63,11 @@ export function createPromptHostnameSessionSignalController({
const detectedKey = normalizedHostname(detected);
if (!detectedKey) return;
const fromJumpServer = jumpServerSessions.has(sessionId);
const publishKey = `${detectedKey}\0${fromJumpServer ? '1' : '0'}`;
// Observe the prompt, not whether its hostname matches an IP or DNS alias.
// The domain title policy decides if this presentation is shown.
if (published.get(sessionId) === publishKey) return;
published.set(sessionId, publishKey);
onChange(sessionId, detected, { fromJumpServer });
if (published.get(sessionId) === detectedKey) return;
published.set(sessionId, detectedKey);
onChange(sessionId, detected);
},
};
}
@@ -1,215 +0,0 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import { JSDOM } from 'jsdom';
import type { ConnectionLog } from '../../domain/models';
import { STORAGE_KEY_CONNECTION_LOGS } from '../../infrastructure/config/storageKeys';
import {
publishConnectionLogsSnapshot,
registerConnectionLogsActions,
} from './connectionLogsStore';
import {
clearAllRemoteDesktopRecordingsAndSyncLogs,
collectProtectedRemoteDesktopMediaIds,
} from './remoteDesktopLogActions';
import { withVaultImportLock } from './vaultManagedImportLock';
function installDomEnv() {
const dom = new JSDOM('', { url: 'http://localhost' });
const heldLocks = new Set<string>();
const fakeLocks = {
request: async <T>(name: string, cb: () => Promise<T>): Promise<T> => {
if (heldLocks.has(name)) {
throw new Error(`DEADLOCK: re-entrant lock acquisition on ${name}`);
}
heldLocks.add(name);
try {
return await cb();
} finally {
heldLocks.delete(name);
}
},
};
const keys = ['window', 'document', 'localStorage', 'navigator'] as const;
const previous = new Map<string, PropertyDescriptor | undefined>(
keys.map((key) => [key, Object.getOwnPropertyDescriptor(globalThis, key)]),
);
Object.defineProperties(globalThis, {
window: { value: dom.window, configurable: true },
document: { value: dom.window.document, configurable: true },
localStorage: { value: dom.window.localStorage, configurable: true },
navigator: { value: { locks: fakeLocks }, configurable: true },
});
return {
restore: () => {
dom.window.close();
for (const key of keys) {
const desc = previous.get(key);
if (desc) Object.defineProperty(globalThis, key, desc);
else Reflect.deleteProperty(globalThis, key);
}
},
};
}
test('clearAllRemoteDesktopRecordingsAndSyncLogs protects saved logs and clears unsaved metadata even in detached Settings window', async () => {
const env = installDomEnv();
const savedClipId = '11111111-1111-4111-8111-111111111111';
const unsavedClipId = '22222222-2222-4222-8222-222222222222';
const unsavedThumbId = '33333333-3333-4333-8333-333333333333';
const persistedLogs: ConnectionLog[] = [
{
id: 'log-saved',
hostId: 'h1',
hostLabel: 'Saved RDP',
hostname: '10.0.0.1',
username: 'admin',
protocol: 'rdp',
startTime: 1000,
endTime: 2000,
localUsername: 'u',
localHostname: 'l',
saved: true,
recordingId: savedClipId,
recordings: [
{
id: savedClipId,
startedAt: 1000,
endedAt: 2000,
durationMs: 1000,
bytes: 500,
mimeType: 'video/webm',
hasAudio: false,
},
],
},
{
id: 'log-unsaved',
hostId: 'h2',
hostLabel: 'Unsaved RDP',
hostname: '10.0.0.2',
username: 'admin',
protocol: 'rdp',
startTime: 3000,
endTime: 4000,
localUsername: 'u',
localHostname: 'l',
saved: false,
recordingId: unsavedClipId,
recordings: [
{
id: unsavedClipId,
startedAt: 3000,
endedAt: 4000,
durationMs: 1000,
bytes: 600,
mimeType: 'video/webm',
hasAudio: false,
},
],
remoteDesktopMeta: {
resolution: { width: 1920, height: 1080 },
thumbnailId: unsavedThumbId,
},
},
];
globalThis.localStorage.setItem(STORAGE_KEY_CONNECTION_LOGS, JSON.stringify(persistedLogs));
// Simulate detached Settings window: connectionLogsStore is unmounted/empty.
publishConnectionLogsSnapshot({ connectionLogs: [] });
registerConnectionLogsActions(null);
const clearAllCalls: Array<{ protectedIds?: string[] }> = [];
(globalThis.window as unknown as Record<string, unknown>).netcatty = {
remoteDesktopRecordings: {
clearAll: async (opts: { protectedIds?: string[] }) => {
clearAllCalls.push(opts);
return { deleted: 1 };
},
},
};
try {
assert.deepEqual(collectProtectedRemoteDesktopMediaIds(), [savedClipId]);
const res = await clearAllRemoteDesktopRecordingsAndSyncLogs();
assert.equal(res.deleted, 1);
assert.equal(clearAllCalls.length, 1);
assert.deepEqual(clearAllCalls[0].protectedIds, [savedClipId]);
const after = JSON.parse(
globalThis.localStorage.getItem(STORAGE_KEY_CONNECTION_LOGS) || '[]',
) as ConnectionLog[];
assert.equal(after.length, 2);
assert.equal(after[0].recordingId, savedClipId);
assert.equal(after[0].recordings?.length, 1);
assert.equal(after[1].recordingId, undefined);
assert.equal(after[1].recordings, undefined);
assert.equal(after[1].remoteDesktopMeta?.thumbnailId, undefined);
assert.deepEqual(after[1].remoteDesktopMeta?.resolution, { width: 1920, height: 1080 });
} finally {
registerConnectionLogsActions(null);
publishConnectionLogsSnapshot({ connectionLogs: [] });
env.restore();
}
});
test('clearAllRemoteDesktopRecordingsAndSyncLogs does not deadlock when updateConnectionLog acquires connection-logs lock', async () => {
const env = installDomEnv();
const unsavedClipId = '44444444-4444-4444-8444-444444444444';
const liveLog: ConnectionLog = {
id: 'log-live-unsaved',
hostId: 'h3',
hostLabel: 'Live RDP',
hostname: '10.0.0.3',
username: 'admin',
protocol: 'rdp',
startTime: 5000,
endTime: 6000,
localUsername: 'u',
localHostname: 'l',
saved: false,
recordingId: unsavedClipId,
recordings: [
{
id: unsavedClipId,
startedAt: 5000,
endedAt: 6000,
durationMs: 1000,
bytes: 700,
mimeType: 'video/webm',
hasAudio: false,
},
],
};
let updatedCount = 0;
publishConnectionLogsSnapshot({ connectionLogs: [liveLog] });
registerConnectionLogsActions({
updateConnectionLog: async () => {
await withVaultImportLock('connection-logs', async () => {
updatedCount += 1;
});
},
toggleConnectionLogSaved: () => {},
deleteConnectionLog: () => {},
clearUnsavedConnectionLogs: () => {},
});
(globalThis.window as unknown as Record<string, unknown>).netcatty = {
remoteDesktopRecordings: {
clearAll: async () => ({ deleted: 1 }),
},
};
try {
const res = await clearAllRemoteDesktopRecordingsAndSyncLogs();
assert.equal(res.deleted, 1);
assert.equal(updatedCount, 1);
} finally {
registerConnectionLogsActions(null);
publishConnectionLogsSnapshot({ connectionLogs: [] });
env.restore();
}
});
@@ -1,207 +0,0 @@
import { selectConnectionLogForTerminalDataCapture } from '../../domain/connectionLog';
import type {
ConnectionLog,
RemoteDesktopRecordingClip,
RemoteDesktopSessionEvent,
RemoteDesktopSessionMetadata,
} from '../../domain/models';
import {
buildAppendRecordingClipUpdate,
buildClearRecordingsUpdate,
getConnectionLogMediaIds,
} from '../../domain/remoteDesktopRecording';
import { STORAGE_KEY_CONNECTION_LOGS } from '../../infrastructure/config/storageKeys';
import { localStorageAdapter } from '../../infrastructure/persistence/localStorageAdapter';
import {
listRemoteDesktopAuditEntries,
subscribeRemoteDesktopAuditLog,
type RemoteDesktopAuditEntry,
} from '../../infrastructure/remoteDesktop/remoteDesktopAuditLog';
import {
netcattyBridge,
type RemoteDesktopRecordingsBridgeApi,
} from '../../infrastructure/services/netcattyBridge';
import {
getConnectionLogsActions,
getConnectionLogsSnapshot,
} from './connectionLogsStore';
import { withVaultImportLock } from './vaultManagedImportLock';
export type { RemoteDesktopAuditEntry };
export function getRemoteDesktopRecordingsBridge(): RemoteDesktopRecordingsBridgeApi | null {
return netcattyBridge.get()?.remoteDesktopRecordings ?? null;
}
export function registerSessionLogFinalizer(
finalize: () => void | Promise<void>,
): (() => void) | undefined {
const unsub = netcattyBridge.get()?.onFinalizeSessionLogs?.(finalize);
return typeof unsub === 'function' ? unsub : undefined;
}
export async function getSystemUserHostInfo(): Promise<{ username: string; hostname: string }> {
try {
const info = await netcattyBridge.get()?.getSystemInfo?.();
return {
username: info?.username || 'user',
hostname: info?.hostname || 'localhost',
};
} catch {
return { username: 'user', hostname: 'localhost' };
}
}
export function listRemoteDesktopSessionAuditEntries(
sessionId?: string,
): RemoteDesktopAuditEntry[] {
return listRemoteDesktopAuditEntries(sessionId);
}
export function subscribeRemoteDesktopSessionAuditLog(listener: () => void): () => void {
return subscribeRemoteDesktopAuditLog(listener);
}
function readPersistedConnectionLogs(): ConnectionLog[] {
try {
const stored = localStorageAdapter.read<ConnectionLog[]>(STORAGE_KEY_CONNECTION_LOGS);
return Array.isArray(stored) ? stored : [];
} catch {
return [];
}
}
/**
* Collect all protected media IDs (video clips + thumbnails) across bookmarked
* connection logs from BOTH the in-memory store and persisted localStorage.
* Works identically in the main window and detached Settings window.
*/
export function collectProtectedRemoteDesktopMediaIds(): string[] {
const protectedSet = new Set<string>();
const { connectionLogs } = getConnectionLogsSnapshot();
for (const log of connectionLogs) {
if (log.saved) {
for (const mediaId of getConnectionLogMediaIds(log)) {
protectedSet.add(mediaId);
}
}
}
for (const log of readPersistedConnectionLogs()) {
if (log.saved) {
for (const mediaId of getConnectionLogMediaIds(log)) {
protectedSet.add(mediaId);
}
}
}
return Array.from(protectedSet);
}
export async function appendRemoteDesktopClipToConnectionLog(
sessionId: string,
clip: RemoteDesktopRecordingClip,
options?: { stampEndTime?: boolean },
): Promise<boolean> {
const { connectionLogs } = getConnectionLogsSnapshot();
const actions = getConnectionLogsActions();
if (!actions?.updateConnectionLog) return false;
const matchingLog = selectConnectionLogForTerminalDataCapture(
[...connectionLogs],
{ sessionId },
);
if (!matchingLog) return false;
const updates = buildAppendRecordingClipUpdate(matchingLog, clip, {
stampEndTime: options?.stampEndTime ? Date.now() : undefined,
});
await Promise.resolve(actions.updateConnectionLog(matchingLog.id, updates));
return true;
}
export async function updateRemoteDesktopConnectionLogActivity(
sessionId: string,
updater: (current: {
events: RemoteDesktopSessionEvent[];
meta: RemoteDesktopSessionMetadata | undefined;
}) => {
events?: RemoteDesktopSessionEvent[];
meta?: RemoteDesktopSessionMetadata;
},
): Promise<boolean> {
const actions = getConnectionLogsActions();
if (!actions?.updateConnectionLog) return false;
const { connectionLogs } = getConnectionLogsSnapshot();
const matchingLog = selectConnectionLogForTerminalDataCapture(
[...connectionLogs],
{ sessionId },
);
if (!matchingLog) return false;
const next = updater({
events: Array.isArray(matchingLog.remoteDesktopEvents) ? matchingLog.remoteDesktopEvents : [],
meta: matchingLog.remoteDesktopMeta,
});
const patch: Partial<ConnectionLog> = {};
if (next.events) patch.remoteDesktopEvents = next.events;
if (next.meta) patch.remoteDesktopMeta = next.meta;
if (Object.keys(patch).length === 0) return false;
await Promise.resolve(actions.updateConnectionLog(matchingLog.id, patch));
return true;
}
export async function saveRemoteDesktopThumbnail(options: {
id?: string;
data: Uint8Array;
}): Promise<{ ok: boolean; id?: string; url?: string; bytes?: number } | null> {
const bridge = getRemoteDesktopRecordingsBridge();
if (!bridge?.saveThumbnail) return null;
return bridge.saveThumbnail(options);
}
/**
* Clear all unprotected remote desktop recordings on disk and atomically clear
* their references from connection logs. Safe to invoke from detached windows
* (such as Settings -> System) where `useVaultState` is not mounted.
*/
export async function clearAllRemoteDesktopRecordingsAndSyncLogs(): Promise<{ deleted: number }> {
const bridge = getRemoteDesktopRecordingsBridge();
if (!bridge?.clearAll) return { deleted: 0 };
const protectedIds = collectProtectedRemoteDesktopMediaIds();
const protectedSet = new Set(protectedIds);
const res = await bridge.clearAll({ protectedIds });
const actions = getConnectionLogsActions();
if (actions?.updateConnectionLog) {
// Call `actions.updateConnectionLog` OUTSIDE `withVaultImportLock('connection-logs')`
// because `useVaultState.commitConnectionLogs` acquires that same non-reentrant Web Lock.
const { connectionLogs } = getConnectionLogsSnapshot();
const persistedById = new Map(readPersistedConnectionLogs().map((log) => [log.id, log]));
const targets = new Map<string, ConnectionLog>();
for (const log of connectionLogs) targets.set(log.id, log);
for (const [id, log] of persistedById) {
if (!targets.has(id)) targets.set(id, log);
}
for (const log of targets.values()) {
const updates = buildClearRecordingsUpdate(log, protectedSet);
if (updates) {
await Promise.resolve(actions.updateConnectionLog(log.id, updates));
}
}
} else {
// Detached window (e.g. Settings -> System without Sync tab mounted): update
// localStorage atomically under the shared cross-window Web Lock.
await withVaultImportLock('connection-logs', async () => {
const persisted = readPersistedConnectionLogs();
let changed = false;
const nextPersisted = persisted.map((log) => {
const updates = buildClearRecordingsUpdate(log, protectedSet);
if (!updates) return log;
changed = true;
return { ...log, ...updates };
});
if (changed) {
localStorageAdapter.write(STORAGE_KEY_CONNECTION_LOGS, nextPersisted);
}
});
}
return { deleted: res?.deleted ?? 0 };
}
-65
View File
@@ -1,12 +1,4 @@
import type { Host, SerialConfig, TerminalSession } from "../../domain/models";
import {
DEFAULT_RDP_PORT,
DEFAULT_VNC_PORT,
isRemoteDesktopProtocol,
sanitizeRdpConfig,
sanitizeVncConfig,
type RemoteDesktopProtocol,
} from "../../domain/remoteDesktop";
import { classifyLocalShellType } from "../../lib/localShell";
export interface LocalTerminalOptions {
@@ -129,30 +121,6 @@ export const createHostTerminalSession = (
};
}
if (isRemoteDesktopProtocol(host.protocol)) {
const protocol = host.protocol;
const sanitizedRdp = protocol === "rdp" ? sanitizeRdpConfig(host.rdpConfig) : undefined;
const sanitizedVnc = protocol === "vnc" ? sanitizeVncConfig(host.vncConfig) : undefined;
const defaultPort = protocol === "rdp" ? DEFAULT_RDP_PORT : DEFAULT_VNC_PORT;
const resolvedPort =
(protocol === "rdp" ? sanitizedRdp?.port : sanitizedVnc?.port)
?? host.port
?? defaultPort;
return {
id: sessionId,
hostId: host.id,
hostLabel: host.label || host.hostname,
hostname: host.hostname,
username: host.username ?? "",
status: "connecting",
protocol,
port: resolvedPort,
...(sanitizedRdp ? { rdpConfig: sanitizedRdp } : {}),
...(sanitizedVnc ? { vncConfig: sanitizedVnc } : {}),
...(host.ephemeral ? { ephemeralHost: true } : {}),
};
}
return {
id: sessionId,
hostId: host.id,
@@ -197,39 +165,6 @@ export const createHostTerminalSession = (
};
};
export const createRemoteDesktopSession = (
sessionId: string,
host: Host,
protocol: RemoteDesktopProtocol,
options?: { workspaceId?: string },
): TerminalSession => {
const isCompanion = host.protocol !== protocol;
const sanitizedRdp = protocol === "rdp" ? sanitizeRdpConfig(host.rdpConfig) : undefined;
const sanitizedVnc = protocol === "vnc" ? sanitizeVncConfig(host.vncConfig) : undefined;
const defaultPort = protocol === "rdp" ? DEFAULT_RDP_PORT : DEFAULT_VNC_PORT;
const resolvedPort = isCompanion
? ((protocol === "rdp" ? sanitizedRdp?.port : sanitizedVnc?.port) ?? defaultPort)
: ((protocol === "rdp" ? sanitizedRdp?.port : sanitizedVnc?.port) ?? host.port ?? defaultPort);
const baseLabel = host.label || host.hostname;
const hostLabel = isCompanion ? `${baseLabel} (${protocol.toUpperCase()})` : baseLabel;
return {
id: sessionId,
hostId: host.id,
hostLabel,
hostname: host.hostname,
username: (protocol === "rdp" ? sanitizedRdp?.username : sanitizedVnc?.username) ?? host.username ?? "",
status: "connecting",
protocol,
port: resolvedPort,
...(sanitizedRdp ? { rdpConfig: sanitizedRdp } : {}),
...(sanitizedVnc ? { vncConfig: sanitizedVnc } : {}),
...(isCompanion ? { remoteDesktopCompanion: true } : {}),
...(host.ephemeral ? { ephemeralHost: true } : {}),
...(options?.workspaceId ? { workspaceId: options.workspaceId } : {}),
};
};
export const createWorkspaceHostTerminalSession = (
sessionId: string,
host: Host,
@@ -131,14 +131,13 @@ test('session snapshot distinguishes missing fields from null tombstones', () =>
test('prompt hostnames overlay as presentation without replacing configured hostname', () => {
sessionPresentationStore.clearSession('prompt-host');
publishSessionPromptHost('prompt-host', '10.1.64.1', { fromJumpServer: true });
publishSessionPromptHost('prompt-host', '10.1.64.1');
const merged = applySessionPresentation(session({
id: 'prompt-host',
hostLabel: 'jumpserver',
hostname: 'jumpserver.example.com',
}));
assert.equal(merged.promptHostname, '10.1.64.1');
assert.equal(merged.promptHostnameFromJumpServer, true);
assert.equal(merged.hostname, 'jumpserver.example.com');
sessionPresentationStore.clearSession('prompt-host');
});
+4 -19
View File
@@ -5,14 +5,13 @@ import type { CodingCliProviderId } from '../../domain/codingCliProviders';
export type SessionPresentation = {
dynamicTitle?: string | null;
promptHostname?: string | null;
promptHostnameFromJumpServer?: boolean | null;
codingCliProviderId?: CodingCliProviderId | null;
};
type Listener = () => void;
/** Encode undefined / null / present distinctly for useSyncExternalStore snapshots. */
function encodePresentationField(value: string | boolean | null | undefined): string {
function encodePresentationField(value: string | null | undefined): string {
if (value === undefined) return 'u';
if (value === null) return 'n';
return `v:${value}`;
@@ -43,7 +42,7 @@ class SessionPresentationStore {
getSessionSnapshot = (sessionId: string): string => {
const presentation = this.bySession.get(sessionId);
if (!presentation) return '';
return `${encodePresentationField(presentation.dynamicTitle)}\0${encodePresentationField(presentation.promptHostname)}\0${encodePresentationField(presentation.promptHostnameFromJumpServer)}\0${encodePresentationField(presentation.codingCliProviderId)}`;
return `${encodePresentationField(presentation.dynamicTitle)}\0${encodePresentationField(presentation.promptHostname)}\0${encodePresentationField(presentation.codingCliProviderId)}`;
};
subscribe = (listener: Listener): (() => void) => {
@@ -62,7 +61,6 @@ class SessionPresentationStore {
if (
prev.dynamicTitle === next.dynamicTitle
&& prev.promptHostname === next.promptHostname
&& prev.promptHostnameFromJumpServer === next.promptHostnameFromJumpServer
&& prev.codingCliProviderId === next.codingCliProviderId
) {
return;
@@ -106,22 +104,14 @@ export function publishSessionCodingCliProvider(
sessionPresentationStore.setPresentation(sessionId, { codingCliProviderId: providerId });
}
export function publishSessionPromptHost(
sessionId: string,
hostname: string | null,
options: { fromJumpServer?: boolean } = {},
): void {
sessionPresentationStore.setPresentation(sessionId, {
promptHostname: hostname,
promptHostnameFromJumpServer: hostname && options.fromJumpServer === true ? true : null,
});
export function publishSessionPromptHost(sessionId: string, hostname: string | null): void {
sessionPresentationStore.setPresentation(sessionId, { promptHostname: hostname });
}
type SessionWithPresentation = {
id: string;
dynamicTitle?: string;
promptHostname?: string;
promptHostnameFromJumpServer?: boolean;
codingCliProviderId?: CodingCliProviderId;
};
@@ -139,16 +129,12 @@ export function applySessionPresentation<T extends SessionWithPresentation>(sess
const nextPromptHost = presentation.promptHostname === undefined
? session.promptHostname
: (presentation.promptHostname ?? undefined);
const nextPromptHostFromJumpServer = presentation.promptHostnameFromJumpServer === undefined
? session.promptHostnameFromJumpServer
: (presentation.promptHostnameFromJumpServer ?? undefined);
const nextProvider = presentation.codingCliProviderId === undefined
? session.codingCliProviderId
: (presentation.codingCliProviderId ?? undefined);
if (
nextTitle === session.dynamicTitle
&& nextPromptHost === session.promptHostname
&& nextPromptHostFromJumpServer === session.promptHostnameFromJumpServer
&& nextProvider === session.codingCliProviderId
) {
return session;
@@ -157,7 +143,6 @@ export function applySessionPresentation<T extends SessionWithPresentation>(sess
...session,
dynamicTitle: nextTitle,
promptHostname: nextPromptHost,
promptHostnameFromJumpServer: nextPromptHostFromJumpServer,
codingCliProviderId: nextProvider,
};
}
@@ -84,7 +84,6 @@ test('session actions register and unregister', () => {
createLocalTerminal: noop,
createSerialSession: noop,
connectToHost: noop,
connectToHostRemoteDesktop: noop,
updateSessionStatus: noop,
updateSessionFontSize: noop,
clearSessionFontSizeOverride: noop,
@@ -51,7 +51,6 @@ export type SessionSnapshotActions = Pick<
| 'createLocalTerminal'
| 'createSerialSession'
| 'connectToHost'
| 'connectToHostRemoteDesktop'
| 'updateSessionStatus'
| 'updateSessionFontSize'
| 'clearSessionFontSizeOverride'
-3
View File
@@ -25,7 +25,6 @@ export type SettingsChromeSnapshot = {
windowOpacity: number;
showSftpTab: boolean;
showHostTreeSidebar: boolean;
removeTopTabsDragArea: boolean;
showRecentHosts: boolean;
hostClickBehavior: HostClickBehavior;
showOnlyUngroupedHostsInRoot: boolean;
@@ -60,7 +59,6 @@ export const DEFAULT_SETTINGS_CHROME_SNAPSHOT: SettingsChromeSnapshot = Object.f
windowOpacity: 1,
showSftpTab: true,
showHostTreeSidebar: true,
removeTopTabsDragArea: false,
showRecentHosts: true,
hostClickBehavior: 'connect',
showOnlyUngroupedHostsInRoot: false,
@@ -88,7 +86,6 @@ export function settingsChromeSnapshotsEqual(
&& a.windowOpacity === b.windowOpacity
&& a.showSftpTab === b.showSftpTab
&& a.showHostTreeSidebar === b.showHostTreeSidebar
&& a.removeTopTabsDragArea === b.removeTopTabsDragArea
&& a.showRecentHosts === b.showRecentHosts
&& a.hostClickBehavior === b.hostClickBehavior
&& a.showOnlyUngroupedHostsInRoot === b.showOnlyUngroupedHostsInRoot
-11
View File
@@ -72,11 +72,6 @@ import {
import { isTerminalSidePanelAutoOpenTab, type TerminalSidePanelAutoOpenTab } from '../../domain/terminalSidePanelAutoOpen';
import { isStartupLanding, type StartupLanding } from '../../domain/startupLanding';
import type { AppearanceSyncEvent } from './appearanceSync';
import {
isJumpServerRdpLaunchMode,
STORAGE_KEY_JUMPSERVER_RDP_LAUNCH_MODE,
type JumpServerRdpLaunchMode,
} from './settingsStorageSync';
interface UseSettingsIpcSyncParams {
enabled?: boolean;
@@ -99,7 +94,6 @@ interface UseSettingsIpcSyncParams {
setSshDebugLogsEnabled: Dispatch<SetStateAction<boolean>>;
setSshDeepLinkEnabledState: (enabled: boolean) => void;
setJmsDeepLinkEnabledState: (enabled: boolean) => void;
setJumpServerRdpLaunchModeState: Dispatch<SetStateAction<JumpServerRdpLaunchMode>>;
setExplorerContextMenuEnabledState: (enabled: boolean) => void;
setHotkeyScheme: Dispatch<SetStateAction<HotkeyScheme>>;
applyIncomingCustomKeyBindings: (incoming: { bindings: CustomKeyBindings; version: number; origin: string }) => void;
@@ -150,7 +144,6 @@ export function useSettingsIpcSync({
setSshDebugLogsEnabled,
setSshDeepLinkEnabledState,
setJmsDeepLinkEnabledState,
setJumpServerRdpLaunchModeState,
setExplorerContextMenuEnabledState,
setHotkeyScheme,
applyIncomingCustomKeyBindings,
@@ -268,9 +261,6 @@ export function useSettingsIpcSync({
if (key === STORAGE_KEY_JMS_DEEP_LINK_ENABLED && typeof value === 'boolean') {
setJmsDeepLinkEnabledState(value);
}
if (key === STORAGE_KEY_JUMPSERVER_RDP_LAUNCH_MODE && isJumpServerRdpLaunchMode(value)) {
setJumpServerRdpLaunchModeState((prev) => (prev === value ? prev : value));
}
if (key === STORAGE_KEY_EXPLORER_CONTEXT_MENU_ENABLED && typeof value === 'boolean') {
setExplorerContextMenuEnabledState(value);
}
@@ -397,7 +387,6 @@ export function useSettingsIpcSync({
setSessionLogsTimestampsEnabled,
setSshDeepLinkEnabledState,
setJmsDeepLinkEnabledState,
setJumpServerRdpLaunchModeState,
setExplorerContextMenuEnabledState,
setSshDebugLogsEnabled,
setSftpAutoOpenSidebar,
@@ -137,7 +137,6 @@ export type { HostClickBehavior } from '../../domain/hostClickBehavior';
export const DEFAULT_SHOW_ONLY_UNGROUPED_HOSTS_IN_ROOT = false;
export const DEFAULT_SHOW_SFTP_TAB = true;
export const DEFAULT_SHOW_HOST_TREE_SIDEBAR = true;
export const DEFAULT_REMOVE_TOP_TABS_DRAG_AREA = false;
export const DEFAULT_SHELL_ONLY_TAB_NUMBER_SHORTCUTS = false;
export const DEFAULT_SHOW_TAB_NUMBER_BADGES = true;
export const DEFAULT_DISABLE_TERMINAL_FONT_ZOOM = false;
+8 -120
View File
@@ -35,7 +35,6 @@ import {
STORAGE_KEY_HOST_CLICK_BEHAVIOR,
STORAGE_KEY_SHOW_SFTP_TAB,
STORAGE_KEY_SHOW_HOST_TREE_SIDEBAR,
STORAGE_KEY_REMOVE_TOP_TABS_DRAG_AREA,
STORAGE_KEY_TERMINAL_SIDE_PANEL_AUTO_OPEN,
STORAGE_KEY_TERMINAL_SIDE_PANEL_AUTO_OPEN_TAB,
STORAGE_KEY_LOCAL_SHELL_SIDE_PANEL_AUTO_OPEN,
@@ -56,11 +55,6 @@ import {
STORAGE_KEY_WINDOW_OPACITY,
STORAGE_KEY_WINDOW_BACKGROUND_BLUR,
STORAGE_KEY_APP_ICON_VARIANT,
STORAGE_KEY_REMOTE_DESKTOP_AUTO_RECORD,
STORAGE_KEY_REMOTE_DESKTOP_RECORDING_FPS,
STORAGE_KEY_REMOTE_DESKTOP_RECORDING_INCLUDE_AUDIO,
STORAGE_KEY_REMOTE_DESKTOP_RECORDING_MAX_MB,
STORAGE_KEY_REMOTE_DESKTOP_RECORDING_RETENTION_DAYS,
} from '../../infrastructure/config/storageKeys';
import { resolveAppIconVariant, type AppIconVariant } from '../../domain/appIconVariant';
import { resolveAppearanceStorageEvent } from './appearanceSync';
@@ -72,42 +66,6 @@ import { isTerminalSidePanelAutoOpenTab, type TerminalSidePanelAutoOpenTab } fro
import { isHostClickBehavior, type HostClickBehavior } from '../../domain/hostClickBehavior';
import { isStartupLanding, type StartupLanding } from '../../domain/startupLanding';
export type JumpServerRdpLaunchMode = 'builtin' | 'system';
export const STORAGE_KEY_JUMPSERVER_RDP_LAUNCH_MODE = 'netcatty_jumpserver_rdp_launch_mode_v1';
export const DEFAULT_JUMPSERVER_RDP_LAUNCH_MODE: JumpServerRdpLaunchMode = 'builtin';
export const isJumpServerRdpLaunchMode = (value: unknown): value is JumpServerRdpLaunchMode => (
value === 'builtin' || value === 'system'
);
export type RemoteDesktopRecordingFps = 5 | 10 | 15;
export const DEFAULT_REMOTE_DESKTOP_AUTO_RECORD = false;
export const DEFAULT_REMOTE_DESKTOP_RECORDING_FPS: RemoteDesktopRecordingFps = 10;
export const DEFAULT_REMOTE_DESKTOP_RECORDING_INCLUDE_AUDIO = true;
export const DEFAULT_REMOTE_DESKTOP_RECORDING_MAX_MB = 1024;
export const DEFAULT_REMOTE_DESKTOP_RECORDING_RETENTION_DAYS = 30;
export const normalizeRemoteDesktopRecordingFps = (value: unknown): RemoteDesktopRecordingFps => {
const num = typeof value === 'number' ? value : Number(value);
if (num === 5 || num === 10 || num === 15) return num;
return DEFAULT_REMOTE_DESKTOP_RECORDING_FPS;
};
export const normalizeRemoteDesktopRecordingMaxMb = (value: unknown): number => {
const num = typeof value === 'number' ? value : Number(value);
if (Number.isFinite(num) && num >= 64 && num <= 102400) return Math.round(num);
return DEFAULT_REMOTE_DESKTOP_RECORDING_MAX_MB;
};
export const normalizeRemoteDesktopRecordingRetentionDays = (value: unknown): number => {
const num = typeof value === 'number' ? value : Number(value);
if (Number.isFinite(num) && num >= 0 && num <= 3650) return Math.round(num);
return DEFAULT_REMOTE_DESKTOP_RECORDING_RETENTION_DAYS;
};
interface UseSettingsStorageSyncParams {
enabled?: boolean;
theme: 'dark' | 'light' | 'system';
@@ -137,7 +95,6 @@ interface UseSettingsStorageSyncParams {
showOnlyUngroupedHostsInRoot: boolean;
showSftpTab: boolean;
showHostTreeSidebar: boolean;
removeTopTabsDragArea: boolean;
terminalSidePanelAutoOpen: boolean;
terminalSidePanelAutoOpenTab: TerminalSidePanelAutoOpenTab;
localShellSidePanelAutoOpen: boolean;
@@ -153,15 +110,9 @@ interface UseSettingsStorageSyncParams {
sessionLogsDir: string;
sessionLogsFormat: SessionLogFormat;
sessionLogsTimestampsEnabled: boolean;
remoteDesktopAutoRecord: boolean;
remoteDesktopRecordingFps: RemoteDesktopRecordingFps;
remoteDesktopRecordingIncludeAudio: boolean;
remoteDesktopRecordingMaxMb: number;
remoteDesktopRecordingRetentionDays: number;
sshDebugLogsEnabled: boolean;
sshDeepLinkEnabled: boolean;
jmsDeepLinkEnabled: boolean;
jumpServerRdpLaunchMode: JumpServerRdpLaunchMode;
explorerContextMenuEnabled: boolean;
globalHotkeyEnabled: boolean;
autoUpdateEnabled: boolean;
@@ -196,7 +147,6 @@ interface UseSettingsStorageSyncParams {
setShowOnlyUngroupedHostsInRootState: Dispatch<SetStateAction<boolean>>;
setShowSftpTabState: Dispatch<SetStateAction<boolean>>;
setShowHostTreeSidebarState: Dispatch<SetStateAction<boolean>>;
setRemoveTopTabsDragAreaState: Dispatch<SetStateAction<boolean>>;
setTerminalSidePanelAutoOpenState: Dispatch<SetStateAction<boolean>>;
setTerminalSidePanelAutoOpenTabState: Dispatch<SetStateAction<TerminalSidePanelAutoOpenTab>>;
setLocalShellSidePanelAutoOpenState: Dispatch<SetStateAction<boolean>>;
@@ -212,15 +162,9 @@ interface UseSettingsStorageSyncParams {
setSessionLogsDir: Dispatch<SetStateAction<string>>;
setSessionLogsFormat: Dispatch<SetStateAction<SessionLogFormat>>;
setSessionLogsTimestampsEnabled: Dispatch<SetStateAction<boolean>>;
setRemoteDesktopAutoRecordState: Dispatch<SetStateAction<boolean>>;
setRemoteDesktopRecordingFpsState: Dispatch<SetStateAction<RemoteDesktopRecordingFps>>;
setRemoteDesktopRecordingIncludeAudioState: Dispatch<SetStateAction<boolean>>;
setRemoteDesktopRecordingMaxMbState: Dispatch<SetStateAction<number>>;
setRemoteDesktopRecordingRetentionDaysState: Dispatch<SetStateAction<number>>;
setSshDebugLogsEnabled: Dispatch<SetStateAction<boolean>>;
setSshDeepLinkEnabledState: (enabled: boolean) => void;
setJmsDeepLinkEnabledState: (enabled: boolean) => void;
setJumpServerRdpLaunchModeState: Dispatch<SetStateAction<JumpServerRdpLaunchMode>>;
setExplorerContextMenuEnabledState: (enabled: boolean) => void;
setGlobalHotkeyEnabled: Dispatch<SetStateAction<boolean>>;
setWindowOpacity: (raw: unknown) => void;
@@ -241,10 +185,8 @@ export function useSettingsStorageSync({
terminalThemeId, followAppTerminalTheme, terminalFontFamilyId, terminalFontSize,
sftpDoubleClickBehavior, sftpAutoSync, sftpShowHiddenFiles,
sftpUseCompressedUpload, sftpSkipUnchanged, sftpAutoOpenSidebar, sftpFollowTerminalCwd, sftpDefaultViewMode,
showRecentHosts, hostClickBehavior, showOnlyUngroupedHostsInRoot, showSftpTab, showHostTreeSidebar, removeTopTabsDragArea, terminalSidePanelAutoOpen, terminalSidePanelAutoOpenTab, localShellSidePanelAutoOpen, localShellSidePanelAutoOpenTab, shellOnlyTabNumberShortcuts, showTabNumberBadges, disableTerminalFontZoom, restorePreviousSession, restoreTerminalCwd, startupLanding,
editorWordWrap, sessionLogsEnabled, sessionLogsDir, sessionLogsFormat, sessionLogsTimestampsEnabled,
remoteDesktopAutoRecord, remoteDesktopRecordingFps, remoteDesktopRecordingIncludeAudio, remoteDesktopRecordingMaxMb, remoteDesktopRecordingRetentionDays,
sshDebugLogsEnabled, sshDeepLinkEnabled, jmsDeepLinkEnabled, jumpServerRdpLaunchMode, explorerContextMenuEnabled,
showRecentHosts, hostClickBehavior, showOnlyUngroupedHostsInRoot, showSftpTab, showHostTreeSidebar, terminalSidePanelAutoOpen, terminalSidePanelAutoOpenTab, localShellSidePanelAutoOpen, localShellSidePanelAutoOpenTab, shellOnlyTabNumberShortcuts, showTabNumberBadges, disableTerminalFontZoom, restorePreviousSession, restoreTerminalCwd, startupLanding,
editorWordWrap, sessionLogsEnabled, sessionLogsDir, sessionLogsFormat, sessionLogsTimestampsEnabled, sshDebugLogsEnabled, sshDeepLinkEnabled, jmsDeepLinkEnabled, explorerContextMenuEnabled,
globalHotkeyEnabled, autoUpdateEnabled, windowOpacity, windowBackgroundBlur, appIconVariant,
setTheme, setLightUiThemeId, setDarkUiThemeId, setAccentMode, applyIncomingCustomAccent,
setCustomCSS, setUiFontFamilyId, setHotkeyScheme, setUiLanguage,
@@ -252,10 +194,8 @@ export function useSettingsStorageSync({
setFollowAppTerminalThemeState, setTerminalFontFamilyId, setTerminalFontSize,
setSftpDoubleClickBehavior, setSftpAutoSync, setSftpShowHiddenFiles,
setSftpUseCompressedUpload, setSftpSkipUnchanged, setSftpAutoOpenSidebar, setSftpFollowTerminalCwd, setSftpDefaultViewMode,
setShowRecentHostsState, setHostClickBehaviorState, setShowOnlyUngroupedHostsInRootState, setShowSftpTabState, setShowHostTreeSidebarState, setRemoveTopTabsDragAreaState, setTerminalSidePanelAutoOpenState, setTerminalSidePanelAutoOpenTabState, setLocalShellSidePanelAutoOpenState, setLocalShellSidePanelAutoOpenTabState, setShellOnlyTabNumberShortcutsState, setShowTabNumberBadgesState, setDisableTerminalFontZoomState, setRestorePreviousSessionState, setRestoreTerminalCwdState, setStartupLandingState,
setEditorWordWrapState, setSessionLogsEnabled, setSessionLogsDir, setSessionLogsFormat, setSessionLogsTimestampsEnabled,
setRemoteDesktopAutoRecordState, setRemoteDesktopRecordingFpsState, setRemoteDesktopRecordingIncludeAudioState, setRemoteDesktopRecordingMaxMbState, setRemoteDesktopRecordingRetentionDaysState,
setSshDebugLogsEnabled, setSshDeepLinkEnabledState, setJmsDeepLinkEnabledState, setJumpServerRdpLaunchModeState, setExplorerContextMenuEnabledState,
setShowRecentHostsState, setHostClickBehaviorState, setShowOnlyUngroupedHostsInRootState, setShowSftpTabState, setShowHostTreeSidebarState, setTerminalSidePanelAutoOpenState, setTerminalSidePanelAutoOpenTabState, setLocalShellSidePanelAutoOpenState, setLocalShellSidePanelAutoOpenTabState, setShellOnlyTabNumberShortcutsState, setShowTabNumberBadgesState, setDisableTerminalFontZoomState, setRestorePreviousSessionState, setRestoreTerminalCwdState, setStartupLandingState,
setEditorWordWrapState, setSessionLogsEnabled, setSessionLogsDir, setSessionLogsFormat, setSessionLogsTimestampsEnabled, setSshDebugLogsEnabled, setSshDeepLinkEnabledState, setJmsDeepLinkEnabledState, setExplorerContextMenuEnabledState,
setGlobalHotkeyEnabled, setWindowOpacity, setWindowBackgroundBlur, setAppIconVariant, setAutoUpdateEnabled, setWorkspaceFocusStyleState,
setSftpTransferConcurrencyState, setSshTransportIdleTtlMsState,
applyIncomingCustomKeyBindings, mergeIncomingTerminalSettings,
@@ -269,10 +209,8 @@ export function useSettingsStorageSync({
terminalThemeId, followAppTerminalTheme, terminalFontFamilyId, terminalFontSize,
sftpDoubleClickBehavior, sftpAutoSync, sftpShowHiddenFiles,
sftpUseCompressedUpload, sftpSkipUnchanged, sftpAutoOpenSidebar, sftpFollowTerminalCwd, sftpDefaultViewMode,
showRecentHosts, hostClickBehavior, showOnlyUngroupedHostsInRoot, showSftpTab, showHostTreeSidebar, removeTopTabsDragArea, terminalSidePanelAutoOpen, terminalSidePanelAutoOpenTab, localShellSidePanelAutoOpen, localShellSidePanelAutoOpenTab, shellOnlyTabNumberShortcuts, showTabNumberBadges, disableTerminalFontZoom, restorePreviousSession, restoreTerminalCwd, startupLanding,
editorWordWrap, sessionLogsEnabled, sessionLogsDir, sessionLogsFormat, sessionLogsTimestampsEnabled,
remoteDesktopAutoRecord, remoteDesktopRecordingFps, remoteDesktopRecordingIncludeAudio, remoteDesktopRecordingMaxMb, remoteDesktopRecordingRetentionDays,
sshDebugLogsEnabled, sshDeepLinkEnabled, jmsDeepLinkEnabled, jumpServerRdpLaunchMode, explorerContextMenuEnabled,
showRecentHosts, hostClickBehavior, showOnlyUngroupedHostsInRoot, showSftpTab, showHostTreeSidebar, terminalSidePanelAutoOpen, terminalSidePanelAutoOpenTab, localShellSidePanelAutoOpen, localShellSidePanelAutoOpenTab, shellOnlyTabNumberShortcuts, showTabNumberBadges, disableTerminalFontZoom, restorePreviousSession, restoreTerminalCwd, startupLanding,
editorWordWrap, sessionLogsEnabled, sessionLogsDir, sessionLogsFormat, sessionLogsTimestampsEnabled, sshDebugLogsEnabled, sshDeepLinkEnabled, jmsDeepLinkEnabled, explorerContextMenuEnabled,
globalHotkeyEnabled, autoUpdateEnabled, windowOpacity, windowBackgroundBlur, appIconVariant,
});
settingsSnapshotRef.current = {
@@ -281,10 +219,8 @@ export function useSettingsStorageSync({
terminalThemeId, followAppTerminalTheme, terminalFontFamilyId, terminalFontSize,
sftpDoubleClickBehavior, sftpAutoSync, sftpShowHiddenFiles,
sftpUseCompressedUpload, sftpSkipUnchanged, sftpAutoOpenSidebar, sftpFollowTerminalCwd, sftpDefaultViewMode,
showRecentHosts, hostClickBehavior, showOnlyUngroupedHostsInRoot, showSftpTab, showHostTreeSidebar, removeTopTabsDragArea, terminalSidePanelAutoOpen, terminalSidePanelAutoOpenTab, localShellSidePanelAutoOpen, localShellSidePanelAutoOpenTab, shellOnlyTabNumberShortcuts, showTabNumberBadges, disableTerminalFontZoom, restorePreviousSession, restoreTerminalCwd, startupLanding,
editorWordWrap, sessionLogsEnabled, sessionLogsDir, sessionLogsFormat, sessionLogsTimestampsEnabled,
remoteDesktopAutoRecord, remoteDesktopRecordingFps, remoteDesktopRecordingIncludeAudio, remoteDesktopRecordingMaxMb, remoteDesktopRecordingRetentionDays,
sshDebugLogsEnabled, sshDeepLinkEnabled, jmsDeepLinkEnabled, jumpServerRdpLaunchMode, explorerContextMenuEnabled,
showRecentHosts, hostClickBehavior, showOnlyUngroupedHostsInRoot, showSftpTab, showHostTreeSidebar, terminalSidePanelAutoOpen, terminalSidePanelAutoOpenTab, localShellSidePanelAutoOpen, localShellSidePanelAutoOpenTab, shellOnlyTabNumberShortcuts, showTabNumberBadges, disableTerminalFontZoom, restorePreviousSession, restoreTerminalCwd, startupLanding,
editorWordWrap, sessionLogsEnabled, sessionLogsDir, sessionLogsFormat, sessionLogsTimestampsEnabled, sshDebugLogsEnabled, sshDeepLinkEnabled, jmsDeepLinkEnabled, explorerContextMenuEnabled,
globalHotkeyEnabled, autoUpdateEnabled, windowOpacity, windowBackgroundBlur, appIconVariant,
};
@@ -431,36 +367,6 @@ export function useSettingsStorageSync({
setSessionLogsTimestampsEnabled(newValue);
}
}
if (e.key === STORAGE_KEY_REMOTE_DESKTOP_AUTO_RECORD && e.newValue !== null) {
const newValue = e.newValue === 'true';
if (newValue !== s.remoteDesktopAutoRecord) {
setRemoteDesktopAutoRecordState(newValue);
}
}
if (e.key === STORAGE_KEY_REMOTE_DESKTOP_RECORDING_FPS && e.newValue !== null) {
const next = normalizeRemoteDesktopRecordingFps(e.newValue);
if (next !== s.remoteDesktopRecordingFps) {
setRemoteDesktopRecordingFpsState(next);
}
}
if (e.key === STORAGE_KEY_REMOTE_DESKTOP_RECORDING_INCLUDE_AUDIO && e.newValue !== null) {
const newValue = e.newValue === 'true';
if (newValue !== s.remoteDesktopRecordingIncludeAudio) {
setRemoteDesktopRecordingIncludeAudioState(newValue);
}
}
if (e.key === STORAGE_KEY_REMOTE_DESKTOP_RECORDING_MAX_MB && e.newValue !== null) {
const next = normalizeRemoteDesktopRecordingMaxMb(e.newValue);
if (next !== s.remoteDesktopRecordingMaxMb) {
setRemoteDesktopRecordingMaxMbState(next);
}
}
if (e.key === STORAGE_KEY_REMOTE_DESKTOP_RECORDING_RETENTION_DAYS && e.newValue !== null) {
const next = normalizeRemoteDesktopRecordingRetentionDays(e.newValue);
if (next !== s.remoteDesktopRecordingRetentionDays) {
setRemoteDesktopRecordingRetentionDaysState(next);
}
}
if (e.key === STORAGE_KEY_SSH_DEBUG_LOGS_ENABLED && e.newValue !== null) {
const newValue = e.newValue === 'true';
if (newValue !== s.sshDebugLogsEnabled) {
@@ -479,11 +385,6 @@ export function useSettingsStorageSync({
setJmsDeepLinkEnabledState(newValue);
}
}
if (e.key === STORAGE_KEY_JUMPSERVER_RDP_LAUNCH_MODE && e.newValue !== null) {
if (isJumpServerRdpLaunchMode(e.newValue) && e.newValue !== s.jumpServerRdpLaunchMode) {
setJumpServerRdpLaunchModeState(e.newValue);
}
}
if (e.key === STORAGE_KEY_EXPLORER_CONTEXT_MENU_ENABLED && e.newValue !== null) {
const newValue = e.newValue === 'true';
if (newValue !== s.explorerContextMenuEnabled) {
@@ -551,12 +452,6 @@ export function useSettingsStorageSync({
setShowHostTreeSidebarState(newValue);
}
}
if (e.key === STORAGE_KEY_REMOVE_TOP_TABS_DRAG_AREA && e.newValue !== null) {
const newValue = e.newValue === 'true';
if (newValue !== s.removeTopTabsDragArea) {
setRemoveTopTabsDragAreaState(newValue);
}
}
if (e.key === STORAGE_KEY_TERMINAL_SIDE_PANEL_AUTO_OPEN && e.newValue !== null) {
const newValue = e.newValue === 'true';
if (newValue !== s.terminalSidePanelAutoOpen) {
@@ -688,14 +583,8 @@ export function useSettingsStorageSync({
setSessionLogsEnabled,
setSessionLogsFormat,
setSessionLogsTimestampsEnabled,
setRemoteDesktopAutoRecordState,
setRemoteDesktopRecordingFpsState,
setRemoteDesktopRecordingIncludeAudioState,
setRemoteDesktopRecordingMaxMbState,
setRemoteDesktopRecordingRetentionDaysState,
setSshDeepLinkEnabledState,
setJmsDeepLinkEnabledState,
setJumpServerRdpLaunchModeState,
setExplorerContextMenuEnabledState,
setSshDebugLogsEnabled,
setSftpAutoOpenSidebar,
@@ -710,7 +599,6 @@ export function useSettingsStorageSync({
setSftpSkipUnchanged,
setShowOnlyUngroupedHostsInRootState,
setShowHostTreeSidebarState,
setRemoveTopTabsDragAreaState,
setTerminalSidePanelAutoOpenState,
setTerminalSidePanelAutoOpenTabState,
setLocalShellSidePanelAutoOpenState,
+3 -20
View File
@@ -1,38 +1,21 @@
import {
buildSftpDownloadDialogDirectoryOptions,
normalizeSftpDefaultDownloadDirectory,
type SftpDownloadDialogDirectoryOptions,
} from "../../../domain/sftpDownloadLocation";
import {
STORAGE_KEY_SFTP_DEFAULT_DOWNLOAD_DIR,
STORAGE_KEY_SFTP_LAST_DOWNLOAD_DIR,
} from "../../../infrastructure/config/storageKeys";
import { STORAGE_KEY_SFTP_DEFAULT_DOWNLOAD_DIR } from "../../../infrastructure/config/storageKeys";
import { localStorageAdapter } from "../../../infrastructure/persistence/localStorageAdapter";
/**
* Read the device-local download folders at call time so every SFTP
* Read the device-local default download folder at call time so every SFTP
* surface (main view, terminal side panel, other windows) sees the latest
* value without threading it through props.
*/
export const getSftpDownloadDialogDirectoryOptions = (): SftpDownloadDialogDirectoryOptions => {
let stored: string | null = null;
let lastUsed: string | null = null;
try {
stored = localStorageAdapter.readString(STORAGE_KEY_SFTP_DEFAULT_DOWNLOAD_DIR);
lastUsed = localStorageAdapter.readString(STORAGE_KEY_SFTP_LAST_DOWNLOAD_DIR);
} catch {
// Storage unavailable (non-browser host); fall back to system Downloads.
}
return buildSftpDownloadDialogDirectoryOptions(stored, lastUsed);
};
/** Remember a confirmed download destination without changing the setting. */
export const rememberSftpDownloadDirectory = (directory: string): void => {
const normalized = normalizeSftpDefaultDownloadDirectory(directory);
if (!normalized) return;
try {
localStorageAdapter.writeString(STORAGE_KEY_SFTP_LAST_DOWNLOAD_DIR, normalized);
} catch {
// Unavailable storage must not interrupt the download.
}
return buildSftpDownloadDialogDirectoryOptions(stored);
};
@@ -1022,9 +1022,6 @@ export const useSftpConnections = ({
id: connectionId,
hostId: host.id,
hostLabel: host.label,
hostname: host.hostname,
port: host.port,
username: host.username,
isLocal: false,
status: "connecting",
currentPath: normalizedCachedStartPath,
+2 -2
View File
@@ -1,4 +1,4 @@
import type { Host, TerminalSettings } from "../../domain/models";
import type { TerminalSettings } from "../../domain/models";
import { normalizeSshAutoReconnectInterval } from "../../domain/models/terminal";
import type { TerminalSessionExitEvent } from "./resolveTerminalSessionExitIntent";
@@ -11,7 +11,7 @@ export function getTerminalAutoReconnectDelayMs(
}
type AutoReconnectHost = {
protocol?: Host["protocol"];
protocol?: "ssh" | "telnet" | "local" | "serial" | "mosh" | "et";
hostname?: string;
moshEnabled?: boolean;
etEnabled?: boolean;
@@ -5,8 +5,6 @@ import { terminalCwdStore } from './terminalCwdStore';
import type { TerminalDirectoryIO } from '../../infrastructure/services/terminalDirectory';
import { directoryChangeCommand, COMPLETE_DIRECTORY_CAPABILITIES } from '../../domain/directoryPicker';
import { gitSwitchCommand } from '../../domain/terminalGitHead';
function setup(overrides: Partial<TerminalDirectoryIO> = {}) {
let cwd = '/old'; let ready = true; let current = true;
const writes: string[] = [];
@@ -49,7 +47,6 @@ test('Win32 adapters confirm actual native cwd and reject stale revisions or for
publish: value => terminalCwdStore.setCwd(id, value, 'backend-strict'),
});
t.after(() => controller.dispose());
assert.equal(await controller.refresh(), cwd);
const revision = terminalCwdStore.getSessionRevision(id);
terminalCwdStore.setCwd(id, 'C:\\other', 'backend-strict');
terminalCwdStore.setCwd(id, 'C:\\base', 'backend-strict');
@@ -210,7 +207,7 @@ for (const probe of ['fails', 'stalls'] as const) {
t.after(() => controller.dispose());
await controller.change('/next', new AbortController().signal, () => {});
assert.deepEqual(writes, ["cd -- '/next'\r"]);
assert.equal(controller.getConfirmedCwd(), '/next');
assert.equal(controller.hasConfirmedCwd(), true);
});
}
@@ -271,40 +268,3 @@ for (const cancellation of ['abort', 'dispose'] as const) {
await assert.rejects(controller.change('/next', abort.signal, () => {}), { code: 'unavailable' });
});
}
test('local command submission rechecks cwd and prompt readiness before writing', async t => {
const sessionId = 'local-command';
const writes: string[] = [];
let ready = true;
let finishCwd!: (cwd: string) => void;
const controller = createTerminalDirectoryController({
sessionId, localPosixSessionId: 'local-pty', isCurrent: () => true, isReady: () => ready,
io: { cwd: () => new Promise(resolve => { finishCwd = resolve; }), list: async () => ({ entries: [], home: null }),
realpath: async value => value, write: data => { writes.push(data); } },
publish() {},
});
terminalCwdStore.setCwd(sessionId, '/repo', 'osc7');
t.after(() => { controller.dispose(); terminalCwdStore.setCwd(sessionId, null); });
const command = gitSwitchCommand("/repo", "topic/it's-$special");
assert.ok(command);
const send = (signal = new AbortController().signal) => controller.sendLocalCommand(command, '/repo', signal);
const moved = send();
finishCwd('/other');
await assert.rejects(moved, { code: 'unavailable' });
const busy = send();
ready = false;
finishCwd('/repo');
await assert.rejects(busy, { code: 'busy' });
ready = true;
const request = new AbortController();
const cancelled = send(request.signal);
request.abort();
finishCwd('/repo');
await assert.rejects(cancelled, { code: 'unavailable' });
assert.deepEqual(writes, []);
const sent = send();
finishCwd('/repo');
await sent;
assert.deepEqual(writes, [command + '\r']);
});
@@ -1,5 +1,5 @@
import { DirectoryPickerError, directoryChangeCommand, COMPLETE_DIRECTORY_CAPABILITIES, type DirectoryCapabilities } from '../../domain/directoryPicker';
import { isAbsoluteDirectoryPath, sameDirectoryPath, type DirectoryTarget } from '../../domain/directoryPath';
import { DirectoryPickerError, directoryChangeCommand, isDirectoryPath, COMPLETE_DIRECTORY_CAPABILITIES, type DirectoryCapabilities } from '../../domain/directoryPicker';
import { sameDirectoryPath, type DirectoryTarget } from '../../domain/directoryPath';
import type { TerminalDirectoryIO } from '../../infrastructure/services/terminalDirectory';
import { terminalCwdStore } from './terminalCwdStore';
@@ -16,33 +16,19 @@ export function createTerminalDirectoryController(options: {
target?: DirectoryTarget;
capabilities?: DirectoryCapabilities;
buildChangeCommand?: (path: string) => string | null;
trustOsc7?: boolean;
localPosixSessionId?: string;
}) {
const target = Object.freeze({ ...options.target ?? { authority: `session:${options.sessionId}`, pathFlavor: 'posix' as const } });
const capabilities = Object.freeze({ ...options.capabilities ?? COMPLETE_DIRECTORY_CAPABILITIES });
const trustsOsc7 = target.pathFlavor === 'posix' && options.trustOsc7 !== false;
const valid = (path: string | null | undefined): path is string => isAbsoluteDirectoryPath(path, target.pathFlavor);
const valid = (path: string | null | undefined): path is string => isDirectoryPath(path, target.pathFlavor);
const same = (a: string, b: string) => sameDirectoryPath(a, b, target.pathFlavor);
let disposed = false;
let changing = false;
let verifiedCwd: string | null = null;
const cwdListeners = new Set<() => void>();
const notifyCwd = () => cwdListeners.forEach(listener => listener());
let confirmed = false;
let refreshing: Promise<string> | null = null;
let refreshAgain = false;
let cwdError: DirectoryPickerError | null = null;
const lifetime = new AbortController();
const current = () => !disposed && options.isCurrent();
function getConfirmedCwd(): string | null {
if (!current() || !capabilities.readCwd) return null;
const cwd = terminalCwdStore.getCwd(options.sessionId);
const source = terminalCwdStore.getSource(options.sessionId);
if (source === 'stale') return null;
if (trustsOsc7 && source === 'osc7' && valid(cwd)) return cwd;
if (options.trustOsc7 === false && target.pathFlavor === 'posix') return verifiedCwd;
return verifiedCwd !== null && cwd === verifiedCwd ? verifiedCwd : null;
}
function check(signal?: AbortSignal) {
if (!current() || signal?.aborted) throw new DirectoryPickerError('unavailable');
}
@@ -71,7 +57,7 @@ export function createTerminalDirectoryController(options: {
if (!capabilities.readCwd) throw new DirectoryPickerError('unavailable');
const activeShellCwd = () => {
const cwd = terminalCwdStore.getCwd(options.sessionId);
return trustsOsc7 && valid(cwd) && terminalCwdStore.getSource(options.sessionId) === 'osc7'
return target.pathFlavor === 'posix' && valid(cwd) && terminalCwdStore.getSource(options.sessionId) === 'osc7'
&& (submittedRevision === undefined || terminalCwdStore.getSessionRevision(options.sessionId) !== submittedRevision)
? cwd : null;
};
@@ -80,7 +66,7 @@ export function createTerminalDirectoryController(options: {
// events and picker remounts. Only a cd submission may probe past its own
// pre-write report while waiting for fresh confirmation.
const reported = activeShellCwd();
if (reported) { cwdError = null; return reported; }
if (reported) { confirmed = true; cwdError = null; return reported; }
if (refreshing) {
// Output may settle while a pre-cd query is still in flight. Keep one
// follow-up query so that its older result cannot be the last update.
@@ -93,24 +79,20 @@ export function createTerminalDirectoryController(options: {
cwd = await bounded(options.io.cwd());
if (!valid(cwd)) throw new DirectoryPickerError('unknown');
} catch (error) {
if (current() && !trustsOsc7) {
verifiedCwd = null;
if (current() && target.pathFlavor === 'win32') {
confirmed = false;
cwdError = error instanceof DirectoryPickerError ? error : new DirectoryPickerError('unknown');
options.publish('');
notifyCwd();
}
throw error;
}
check();
const reported = activeShellCwd();
const live = terminalCwdStore.getCwd(options.sessionId);
const verifiedCwdChanged = verifiedCwd !== cwd;
verifiedCwd = cwd;
confirmed = true;
cwdError = null;
if (reported) return reported;
if (live !== cwd || terminalCwdStore.getSource(options.sessionId) === 'stale'
|| verifiedCwdChanged) options.publish(cwd);
if (verifiedCwdChanged) notifyCwd();
if (live !== cwd || terminalCwdStore.getSource(options.sessionId) === 'stale') options.publish(cwd);
return cwd;
})();
refreshing = pending;
@@ -137,7 +119,7 @@ export function createTerminalDirectoryController(options: {
check(signal);
if (!valid(canonical)) throw new DirectoryPickerError('unsupportedPath');
ready(); // The shell can become busy while resolving a remote symlink.
if (expectedCwd && getConfirmedCwd() !== expectedCwd) throw new DirectoryPickerError('unavailable');
if (expectedCwd && terminalCwdStore.getCwd(options.sessionId) !== expectedCwd) throw new DirectoryPickerError('unavailable');
if (expectedRevision !== undefined && terminalCwdStore.getSessionRevision(options.sessionId) !== expectedRevision) throw new DirectoryPickerError('unavailable');
const submittedRevision = terminalCwdStore.getSessionRevision(options.sessionId);
options.io.write(command + '\r');
@@ -145,7 +127,7 @@ export function createTerminalDirectoryController(options: {
const deadline = Date.now() + (options.confirmationMs ?? 8000);
const hasFreshOsc7 = () => {
const cwd = terminalCwdStore.getCwd(options.sessionId);
return trustsOsc7 && valid(cwd) && terminalCwdStore.getSessionRevision(options.sessionId) !== submittedRevision
return target.pathFlavor === 'posix' && valid(cwd) && terminalCwdStore.getSessionRevision(options.sessionId) !== submittedRevision
&& terminalCwdStore.getSource(options.sessionId) === 'osc7'
&& (same(cwd, path) || same(cwd, canonical));
};
@@ -183,47 +165,15 @@ export function createTerminalDirectoryController(options: {
};
await Promise.race([confirmFromProbe(), confirmFromOsc7()]);
check(signal);
confirmed = true;
} finally { confirmationFinished = true; changing = false; }
}
async function sendLocalCommand(command: string, expectedCwd: string, signal: AbortSignal) {
ready();
check(signal);
if (!options.localPosixSessionId || getConfirmedCwd() !== expectedCwd) throw new DirectoryPickerError('unavailable');
if (changing) throw new DirectoryPickerError('busy');
changing = true;
try {
const revision = terminalCwdStore.getSessionRevision(options.sessionId);
const liveCwd = await bounded(options.io.cwd(), signal);
if (!same(liveCwd, expectedCwd)) {
const [livePath, expectedPath] = await bounded(Promise.all([
options.io.realpath(liveCwd, signal), options.io.realpath(expectedCwd, signal),
]), signal);
if (!same(livePath, expectedPath)) throw new DirectoryPickerError('unavailable');
}
check(signal);
ready();
if (getConfirmedCwd() !== expectedCwd || terminalCwdStore.getSessionRevision(options.sessionId) !== revision) {
throw new DirectoryPickerError('unavailable');
}
options.io.write(command + '\r');
} finally { changing = false; }
}
return {
target,
localPosixSessionId: options.localPosixSessionId,
capabilities,
getConfirmedCwd,
sendLocalCommand,
subscribeCwd(listener: () => void) {
const unsubscribe = terminalCwdStore.subscribe(listener);
cwdListeners.add(listener);
return () => {
unsubscribe();
cwdListeners.delete(listener);
};
},
getCwdError: () => cwdError?.code ?? null,
refresh: () => refresh(),
hasConfirmedCwd: () => confirmed,
async home() {
check();
const result = await bounded(options.io.home?.() ?? Promise.resolve(null));
+1 -16
View File
@@ -2,7 +2,6 @@ import type { TerminalDirectoryController } from './terminalDirectoryController'
const sessions = new Map<string, TerminalDirectoryController>();
const consumers = new Map<string, number>();
const refreshListeners = new Map<string, Set<() => void>>();
const scheduledRefreshes = new Map<string, ReturnType<typeof setTimeout>>();
const OUTPUT_SETTLE_MS = 150;
@@ -37,24 +36,10 @@ export function observeTerminalDirectory(id: string) {
else { consumers.delete(id); cancelScheduledRefresh(id); }
};
}
export function subscribeTerminalDirectoryRefresh(id: string, listener: () => void) {
const listeners = refreshListeners.get(id) ?? new Set<() => void>();
listeners.add(listener);
refreshListeners.set(id, listeners);
return () => {
listeners.delete(listener);
if (!listeners.size) refreshListeners.delete(id);
};
}
/** Called by the existing command completion path, only while chips are visible. */
export function refreshObservedTerminalDirectory(id: string) {
cancelScheduledRefresh(id);
const controller = consumers.has(id) ? sessions.get(id) : undefined;
if (!controller) return;
void controller.refresh().then(() => {
if (sessions.get(id) === controller) refreshListeners.get(id)?.forEach(listener => listener());
}).catch(() => {});
if (consumers.has(id)) void sessions.get(id)?.refresh().catch(() => {});
}
/**
+1 -19
View File
@@ -1,7 +1,7 @@
/**
* Minimal in-memory IndexedDB stub covering the exact subset used by
* `aiSessionIdbStorage.ts`: open + upgrade (createObjectStore), readonly
* getAll/get/openCursor, readwrite put/delete/clear, and meta-store records. Not a
* getAll/get, readwrite put/delete/clear, and meta-store records. Not a
* general-purpose IDB implementation — extend deliberately if the wrapper
* grows new usage.
*/
@@ -70,24 +70,6 @@ export class FakeObjectStore {
return new FakeRequest(this.records.get(String(key)));
}
openCursor() {
const entries = this.records.values();
type Cursor = { value: unknown; continue: () => void };
const next = (): Cursor | null => {
const entry = entries.next();
if (entry.done) return null;
return {
value: entry.value,
continue: () => queueMicrotask(() => {
request.result = next();
request.onsuccess?.(request);
}),
};
};
const request: FakeRequest<Cursor | null> = new FakeRequest(next());
return request;
}
getAll(): FakeRequest<unknown[]> {
return new FakeRequest(Array.from(this.records.values()));
}
+1 -3
View File
@@ -109,8 +109,7 @@ export interface UseAIChatStreamingReturn {
export interface SendToCattyContext {
activeProvider: ProviderConfig | undefined;
activeModelId: string;
reasoningEffort?: string;
scopeType: 'terminal' | 'workspace' | 'global';
scopeType: 'terminal' | 'workspace';
scopeTargetId?: string;
scopeLabel?: string;
globalPermissionMode: AIPermissionMode;
@@ -126,7 +125,6 @@ export interface SendToCattyContext {
selectedUserSkillSlugs?: string[];
permissionMode?: AIPermissionMode;
forceCompaction?: boolean;
pluginContext?: import('../../infrastructure/ai/pluginAiSidebarTypes').PluginAISidebarTurnContext | null;
}
export interface SendToExternalContext {
+19 -101
View File
@@ -1,4 +1,4 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { useCallback, useEffect, useMemo, useState } from 'react';
import { localStorageAdapter } from '../../infrastructure/persistence/localStorageAdapter';
import {
STORAGE_KEY_AI_PROVIDERS,
@@ -19,8 +19,6 @@ import {
STORAGE_KEY_AI_WEB_SEARCH,
STORAGE_KEY_AI_QUICK_MESSAGES,
STORAGE_KEY_AI_SHOW_TERMINAL_SELECTION_ACTION,
STORAGE_KEY_AI_AUTO_LLM_TITLE,
STORAGE_KEY_AI_TITLE_MODEL,
} from '../../infrastructure/config/storageKeys';
import type { AIQuickMessage } from '../../infrastructure/ai/quickMessages';
import { sanitizeQuickMessages } from '../../infrastructure/ai/quickMessages';
@@ -33,10 +31,8 @@ import type {
} from '../../infrastructure/ai/types';
import {
DEFAULT_COMMAND_TIMEOUT_SECONDS,
DEFAULT_MAX_ITERATIONS,
DEFAULT_RESPONSE_IDLE_TIMEOUT_SECONDS,
normalizeCommandTimeoutSeconds,
normalizeMaxIterations,
normalizeResponseIdleTimeoutSeconds,
} from '../../infrastructure/ai/types';
import { removeProviderReferences } from './aiProviderCleanup';
@@ -48,7 +44,6 @@ import {
DEFAULT_AI_TOOL_OUTPUT_MAX_CHARS,
normalizeAiToolOutputMaxChars,
} from '../../domain/aiToolOutputLimit';
import type { TitleModelConfig } from '../../domain/aiSessionTitle';
import { AI_STATE_CHANGED_EVENT, emitAIStateChanged } from './aiStateEvents';
import { getAIBridge } from './aiStateSnapshots';
import { useStoredBoolean } from './useStoredBoolean';
@@ -57,25 +52,6 @@ import {
readCommandBlocklistSetting,
} from './commandBlocklistSettings';
export type { TitleModelConfig };
function readTitleModelSetting(): TitleModelConfig | null {
const stored = localStorageAdapter.read<unknown>(STORAGE_KEY_AI_TITLE_MODEL);
if (!stored || typeof stored !== 'object') return null;
const providerId = (stored as TitleModelConfig).providerId;
const modelId = (stored as TitleModelConfig).modelId;
return typeof providerId === 'string' && providerId.trim()
&& typeof modelId === 'string' && modelId.trim()
? { providerId: providerId.trim(), modelId: modelId.trim() }
: null;
}
function readAgentStringMap(key: string): Record<string, string> {
const stored = localStorageAdapter.read<unknown>(key);
if (!stored || typeof stored !== 'object' || Array.isArray(stored)) return {};
return stored as Record<string, string>;
}
function readPermissionMode(): AIPermissionMode {
const stored = localStorageAdapter.readString(STORAGE_KEY_AI_PERMISSION_MODE);
if (stored === 'observer' || stored === 'confirm' || stored === 'auto') return stored;
@@ -156,9 +132,7 @@ export function useSharedAISettingsState(options?: SharedAISettingsStateOptions)
)
);
const [maxIterations, setMaxIterationsRaw] = useState<number>(() =>
normalizeMaxIterations(
localStorageAdapter.readNumber(STORAGE_KEY_AI_MAX_ITERATIONS) ?? DEFAULT_MAX_ITERATIONS,
)
localStorageAdapter.readNumber(STORAGE_KEY_AI_MAX_ITERATIONS) ?? 20
);
const [toolOutputMaxChars, setToolOutputMaxCharsRaw] = useState<number>(() =>
normalizeAiToolOutputMaxChars(
@@ -172,25 +146,6 @@ export function useSharedAISettingsState(options?: SharedAISettingsStateOptions)
const [quickMessages, setQuickMessagesRaw] = useState<AIQuickMessage[]>(() =>
sanitizeQuickMessages(localStorageAdapter.read<unknown>(STORAGE_KEY_AI_QUICK_MESSAGES)),
);
const [autoLlmTitle, setAutoLlmTitle] = useStoredBoolean(STORAGE_KEY_AI_AUTO_LLM_TITLE, true);
const [titleModel, setTitleModelRaw] = useState<TitleModelConfig | null>(() =>
readTitleModelSetting(),
);
const titleModelRef = useRef(titleModel);
titleModelRef.current = titleModel;
const setTitleModel = useCallback((config: TitleModelConfig | null) => {
const normalized = config
&& typeof config.providerId === 'string' && config.providerId.trim()
&& typeof config.modelId === 'string' && config.modelId.trim()
? { providerId: config.providerId.trim(), modelId: config.modelId.trim() }
: null;
titleModelRef.current = normalized;
setTitleModelRaw(normalized);
if (normalized) localStorageAdapter.write(STORAGE_KEY_AI_TITLE_MODEL, normalized);
else localStorageAdapter.remove(STORAGE_KEY_AI_TITLE_MODEL);
emitAIStateChanged(STORAGE_KEY_AI_TITLE_MODEL);
}, []);
const setProviders = useCallback((value: ProviderConfig[] | ((prev: ProviderConfig[]) => ProviderConfig[])) => {
setProvidersRaw((prev) => {
@@ -224,9 +179,6 @@ export function useSharedAISettingsState(options?: SharedAISettingsStateOptions)
localStorageAdapter.writeString(STORAGE_KEY_AI_ACTIVE_PROVIDER, '');
return '';
});
if (titleModelRef.current?.providerId === id) {
setTitleModel(null);
}
if (onRemoveProvider) {
onRemoveProvider(id);
@@ -240,13 +192,11 @@ export function useSharedAISettingsState(options?: SharedAISettingsStateOptions)
const cleanup = removeProviderReferences(id, agentProviderMap, agentModelMap);
if (cleanup.providerMapChanged) {
localStorageAdapter.write(STORAGE_KEY_AI_AGENT_PROVIDER_MAP, cleanup.agentProviderMap);
emitAIStateChanged(STORAGE_KEY_AI_AGENT_PROVIDER_MAP);
}
if (cleanup.modelMapChanged) {
localStorageAdapter.write(STORAGE_KEY_AI_AGENT_MODEL_MAP, cleanup.agentModelMap);
emitAIStateChanged(STORAGE_KEY_AI_AGENT_MODEL_MAP);
}
}, [onRemoveProvider, setProviders, setTitleModel]);
}, [onRemoveProvider, setProviders]);
const setActiveProviderId = useCallback((id: string) => {
setActiveProviderIdRaw(id);
@@ -303,10 +253,9 @@ export function useSharedAISettingsState(options?: SharedAISettingsStateOptions)
}, []);
const setMaxIterations = useCallback((value: number) => {
const normalizedValue = normalizeMaxIterations(value);
setMaxIterationsRaw(normalizedValue);
localStorageAdapter.writeNumber(STORAGE_KEY_AI_MAX_ITERATIONS, normalizedValue);
getAIBridge()?.aiMcpSetMaxIterations?.(normalizedValue);
setMaxIterationsRaw(value);
localStorageAdapter.writeNumber(STORAGE_KEY_AI_MAX_ITERATIONS, value);
getAIBridge()?.aiMcpSetMaxIterations?.(value);
}, []);
const setToolOutputMaxChars = useCallback((value: number) => {
@@ -401,11 +350,10 @@ export function useSharedAISettingsState(options?: SharedAISettingsStateOptions)
break;
}
case STORAGE_KEY_AI_MAX_ITERATIONS: {
const iters = localStorageAdapter.readNumber(STORAGE_KEY_AI_MAX_ITERATIONS) ?? DEFAULT_MAX_ITERATIONS;
const iters = localStorageAdapter.readNumber(STORAGE_KEY_AI_MAX_ITERATIONS) ?? 20;
if (!Number.isFinite(iters)) break;
const normalizedIters = normalizeMaxIterations(iters);
setMaxIterationsRaw(normalizedIters);
getAIBridge()?.aiMcpSetMaxIterations?.(normalizedIters);
setMaxIterationsRaw(iters);
getAIBridge()?.aiMcpSetMaxIterations?.(iters);
break;
}
case STORAGE_KEY_AI_TOOL_OUTPUT_MAX_CHARS: {
@@ -421,9 +369,6 @@ export function useSharedAISettingsState(options?: SharedAISettingsStateOptions)
case STORAGE_KEY_AI_QUICK_MESSAGES:
setQuickMessagesRaw(sanitizeQuickMessages(localStorageAdapter.read<unknown>(STORAGE_KEY_AI_QUICK_MESSAGES)));
break;
case STORAGE_KEY_AI_TITLE_MODEL:
setTitleModelRaw(readTitleModelSetting());
break;
}
} catch (err) {
console.warn('[useAISettingsState] Failed to process AI settings storage change', key, err);
@@ -487,10 +432,6 @@ export function useSharedAISettingsState(options?: SharedAISettingsStateOptions)
setWebSearchConfig,
quickMessages,
setQuickMessages,
autoLlmTitle,
setAutoLlmTitle,
titleModel,
setTitleModel,
}), [
providers,
setProviders,
@@ -524,10 +465,6 @@ export function useSharedAISettingsState(options?: SharedAISettingsStateOptions)
setWebSearchConfig,
quickMessages,
setQuickMessages,
autoLlmTitle,
setAutoLlmTitle,
titleModel,
setTitleModel,
]);
}
@@ -543,12 +480,6 @@ export function useAISettingsState() {
STORAGE_KEY_AI_SHOW_TERMINAL_SELECTION_ACTION,
true,
);
const [agentProviderMap, setAgentProviderMapRaw] = useState<Record<string, string>>(() =>
readAgentStringMap(STORAGE_KEY_AI_AGENT_PROVIDER_MAP),
);
const [agentModelMap, setAgentModelMapRaw] = useState<Record<string, string>>(() =>
readAgentStringMap(STORAGE_KEY_AI_AGENT_MODEL_MAP),
);
const setAiSessionMessageCap = useCallback((value: number) => {
const normalizedValue = normalizeAiSessionMessageCap(value);
@@ -557,32 +488,23 @@ export function useAISettingsState() {
}, []);
useEffect(() => {
const syncSettingsOnlyKey = (key: string | null) => {
const syncMessageCap = (key: string | null) => {
if (key !== STORAGE_KEY_AI_SESSION_MESSAGE_CAP) return;
try {
switch (key) {
case STORAGE_KEY_AI_SESSION_MESSAGE_CAP:
setAiSessionMessageCapRaw(
normalizeAiSessionMessageCap(
localStorageAdapter.readNumber(STORAGE_KEY_AI_SESSION_MESSAGE_CAP)
?? DEFAULT_AI_SESSION_MESSAGE_CAP,
),
);
break;
case STORAGE_KEY_AI_AGENT_PROVIDER_MAP:
setAgentProviderMapRaw(readAgentStringMap(STORAGE_KEY_AI_AGENT_PROVIDER_MAP));
break;
case STORAGE_KEY_AI_AGENT_MODEL_MAP:
setAgentModelMapRaw(readAgentStringMap(STORAGE_KEY_AI_AGENT_MODEL_MAP));
break;
}
setAiSessionMessageCapRaw(
normalizeAiSessionMessageCap(
localStorageAdapter.readNumber(STORAGE_KEY_AI_SESSION_MESSAGE_CAP)
?? DEFAULT_AI_SESSION_MESSAGE_CAP,
),
);
} catch (err) {
console.warn('[useAISettingsState] Failed to process AI settings storage change', key, err);
}
};
const handleStorage = (event: StorageEvent) => syncSettingsOnlyKey(event.key);
const handleStorage = (event: StorageEvent) => syncMessageCap(event.key);
const handleLocalStateChanged = (event: Event) => {
syncSettingsOnlyKey((event as CustomEvent<{ key?: string }>).detail?.key ?? null);
syncMessageCap((event as CustomEvent<{ key?: string }>).detail?.key ?? null);
};
window.addEventListener('storage', handleStorage);
@@ -599,15 +521,11 @@ export function useAISettingsState() {
setAiSessionMessageCap,
showTerminalSelectionAIAction,
setShowTerminalSelectionAIAction,
agentProviderMap,
agentModelMap,
}), [
shared,
aiSessionMessageCap,
setAiSessionMessageCap,
showTerminalSelectionAIAction,
setShowTerminalSelectionAIAction,
agentProviderMap,
agentModelMap,
]);
}
@@ -1,365 +0,0 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import React, { act } from 'react';
import { createRoot } from 'react-dom/client';
import { JSDOM } from 'jsdom';
import type { AISession, ProviderConfig } from '../../infrastructure/ai/types.ts';
import {
STORAGE_KEY_AI_ACTIVE_PROVIDER,
STORAGE_KEY_AI_AGENT_MODEL_MAP,
STORAGE_KEY_AI_AGENT_PROVIDER_MAP,
STORAGE_KEY_AI_AUTO_LLM_TITLE,
STORAGE_KEY_AI_PROVIDERS,
STORAGE_KEY_AI_TITLE_MODEL,
} from '../../infrastructure/config/storageKeys.ts';
import { useAIState, type UseAIStateOptions } from './useAIState.ts';
import { useAISessionsStore } from './aiSessionsStore.ts';
import {
__resetIdbPersistenceForTests,
markAiSessionsHydrationComplete,
setLatestAISessionsSnapshot,
} from './aiStateSnapshots.ts';
function deferred<T>() {
let resolve!: (value: T) => void;
let reject!: (reason?: unknown) => void;
const promise = new Promise<T>((res, rej) => {
resolve = res;
reject = rej;
});
return { promise, resolve, reject };
}
type Capture = {
ai: ReturnType<typeof useAIState> | null;
sessions: AISession[];
};
function Harness({
capture,
options,
}: {
capture: Capture;
options?: UseAIStateOptions;
}) {
capture.ai = useAIState(options);
capture.sessions = useAISessionsStore().sessions as AISession[];
return null;
}
async function setupHook(options?: {
sessions?: AISession[];
providers?: ProviderConfig[];
activeProviderId?: string;
agentProviderMap?: Record<string, string>;
agentModelMap?: Record<string, string>;
autoLlmTitle?: boolean;
titleModel?: { providerId: string; modelId: string } | null;
generateSessionTitle?: UseAIStateOptions['generateSessionTitle'];
}) {
const dom = new JSDOM('<!doctype html><html><body></body></html>', { url: 'http://localhost' });
const prevDescriptors = new Map<string, PropertyDescriptor | undefined>();
for (const [key, value] of [
['window', dom.window],
['document', dom.window.document],
['localStorage', dom.window.localStorage],
['CustomEvent', dom.window.CustomEvent],
['Event', dom.window.Event],
['IS_REACT_ACT_ENVIRONMENT', true],
] as const) {
prevDescriptors.set(key, Object.getOwnPropertyDescriptor(globalThis, key));
Object.defineProperty(globalThis, key, { configurable: true, value });
}
__resetIdbPersistenceForTests();
markAiSessionsHydrationComplete();
if (options?.providers) {
dom.window.localStorage.setItem(STORAGE_KEY_AI_PROVIDERS, JSON.stringify(options.providers));
}
if (options?.activeProviderId) {
dom.window.localStorage.setItem(STORAGE_KEY_AI_ACTIVE_PROVIDER, options.activeProviderId);
}
if (options?.agentProviderMap) {
dom.window.localStorage.setItem(STORAGE_KEY_AI_AGENT_PROVIDER_MAP, JSON.stringify(options.agentProviderMap));
}
if (options?.agentModelMap) {
dom.window.localStorage.setItem(STORAGE_KEY_AI_AGENT_MODEL_MAP, JSON.stringify(options.agentModelMap));
}
if (options?.autoLlmTitle !== undefined) {
dom.window.localStorage.setItem(STORAGE_KEY_AI_AUTO_LLM_TITLE, String(options.autoLlmTitle));
}
if (options?.titleModel) {
dom.window.localStorage.setItem(STORAGE_KEY_AI_TITLE_MODEL, JSON.stringify(options.titleModel));
}
const initialSessions = options?.sessions ?? [];
setLatestAISessionsSnapshot(initialSessions);
dom.window.localStorage.setItem('netcatty_ai_sessions_v1', JSON.stringify(initialSessions));
const container = dom.window.document.createElement('div');
dom.window.document.body.appendChild(container);
const root = createRoot(container);
const capture: Capture = { ai: null, sessions: [] };
await act(async () => {
root.render(
React.createElement(Harness, {
capture,
options: { generateSessionTitle: options?.generateSessionTitle },
}),
);
});
return {
capture,
cleanup: async () => {
await act(async () => root.unmount());
container.remove();
dom.window.close();
__resetIdbPersistenceForTests();
for (const [key, desc] of prevDescriptors) {
if (desc) Object.defineProperty(globalThis, key, desc);
else delete (globalThis as Record<string, unknown>)[key];
}
},
};
}
const providerA: ProviderConfig = {
id: 'p-catty',
providerId: 'openai',
name: 'Main OpenAI',
enabled: true,
defaultModel: 'gpt-5.4',
};
const providerB: ProviderConfig = {
id: 'p-title',
providerId: 'openai',
name: 'Cheap Title',
enabled: true,
defaultModel: 'gpt-4o-mini',
};
const untitledSession = (id = 's-1'): AISession => ({
id,
title: 'New Chat',
agentId: 'catty',
scope: { type: 'terminal', targetId: 'term-1' },
messages: [{ id: 'm-1', role: 'user', content: 'Check slow SSH handshake on prod', timestamp: 1 }],
createdAt: 1,
updatedAt: 1,
});
test('autoTitleSession preserves a user rename that happens while LLM title generation is pending', async () => {
const pending = deferred<string>();
let capturedSignal: AbortSignal | undefined;
const { capture, cleanup } = await setupHook({
sessions: [untitledSession()],
providers: [providerA],
activeProviderId: providerA.id,
generateSessionTitle: async (_source, opts) => {
capturedSignal = opts.signal;
return pending.promise;
},
});
try {
let titleTask!: Promise<void>;
await act(async () => {
titleTask = capture.ai!.autoTitleSession('s-1', 'Check slow SSH handshake on prod');
});
// Deterministic fallback landed immediately.
assert.equal(capture.sessions[0].title, 'Check slow SSH handshake on prod');
assert.equal(capturedSignal?.aborted, false);
// User renames the session (e.g. after closing & reopening the side panel).
await act(async () => {
capture.ai!.updateSessionTitle('s-1', 'Prod SSH Debug');
});
assert.equal(capturedSignal?.aborted, true, 'manual rename aborts pending LLM call');
assert.equal(capture.sessions[0].title, 'Prod SSH Debug');
// Even if the LLM promise resolves with a generated title afterwards, it
// must not overwrite the user's title.
await act(async () => {
pending.resolve('Slow SSH Handshake');
await titleTask;
});
assert.equal(capture.sessions[0].title, 'Prod SSH Debug');
} finally {
await cleanup();
}
});
test('autoTitleSession promotes the LLM title when unrenamed and passes Catty or explicit titleModel config', async () => {
const seenConfigs: Array<ProviderConfig | null | undefined> = [];
const pending = deferred<string>();
const { capture, cleanup } = await setupHook({
sessions: [untitledSession('s-catty'), untitledSession('s-explicit')],
providers: [providerB, providerA],
activeProviderId: providerB.id,
agentProviderMap: { catty: providerA.id },
agentModelMap: { catty: 'gpt-5.4-turbo' },
generateSessionTitle: async (_source, opts) => {
seenConfigs.push(opts.config);
return pending.promise;
},
});
try {
let task!: Promise<void>;
await act(async () => {
task = capture.ai!.autoTitleSession('s-catty', 'Check slow SSH handshake on prod');
});
assert.equal(seenConfigs[0]?.id, providerA.id);
assert.equal(seenConfigs[0]?.defaultModel, 'gpt-5.4-turbo');
await act(async () => {
pending.resolve('SSH Handshake Audit');
await task;
});
assert.equal(capture.sessions.find((s) => s.id === 's-catty')?.title, 'SSH Handshake Audit');
// Explicit titleModel overrides Catty model.
await act(async () => {
capture.ai!.setTitleModel({ providerId: providerB.id, modelId: 'gpt-4o-mini' });
});
await act(async () => {
await capture.ai!.autoTitleSession('s-explicit', 'Inspect nginx error logs');
});
assert.equal(seenConfigs[1]?.id, providerB.id);
assert.equal(seenConfigs[1]?.defaultModel, 'gpt-4o-mini');
assert.equal(capture.sessions.find((s) => s.id === 's-explicit')?.title, 'SSH Handshake Audit');
} finally {
await cleanup();
}
});
test('autoTitleSession aborts and ignores deleted sessions, deduplicates concurrent calls, and skips titled chats', async () => {
const pending = deferred<string>();
let calls = 0;
let signalRef: AbortSignal | undefined;
const { capture, cleanup } = await setupHook({
sessions: [
untitledSession('s-del'),
untitledSession('s-dup'),
{ ...untitledSession('s-titled'), title: 'Already named' },
],
providers: [providerA],
activeProviderId: providerA.id,
generateSessionTitle: async (_source, opts) => {
calls += 1;
signalRef = opts.signal;
return pending.promise;
},
});
try {
// Titled chat skips both fallback and LLM.
await act(async () => {
await capture.ai!.autoTitleSession('s-titled', 'New prompt text');
});
assert.equal(calls, 0);
assert.equal(capture.sessions.find((s) => s.id === 's-titled')?.title, 'Already named');
// Deleting a session aborts in-flight generation and never resurrects it.
let delTask!: Promise<void>;
await act(async () => {
delTask = capture.ai!.autoTitleSession('s-del', 'Delete me mid-flight');
});
assert.equal(calls, 1);
await act(async () => {
capture.ai!.deleteSession('s-del');
});
assert.equal(signalRef?.aborted, true);
await act(async () => {
pending.resolve('Ghost title');
await delTask;
});
assert.equal(capture.sessions.some((s) => s.id === 's-del'), false);
// Duplicate concurrent call for the same session only invokes LLM once.
const pendingDup = deferred<string>();
const dupHarness = await setupHook({
sessions: [untitledSession('s-dup2')],
providers: [providerA],
activeProviderId: providerA.id,
generateSessionTitle: async () => {
calls += 1;
return pendingDup.promise;
},
});
try {
let t1!: Promise<void>;
let t2!: Promise<void>;
await act(async () => {
t1 = dupHarness.capture.ai!.autoTitleSession('s-dup2', 'First call');
t2 = dupHarness.capture.ai!.autoTitleSession('s-dup2', 'Second call');
});
assert.equal(calls, 2);
await act(async () => {
pendingDup.resolve('Single Title');
await Promise.all([t1, t2]);
});
assert.equal(dupHarness.capture.sessions.find((s) => s.id === 's-dup2')?.title, 'Single Title');
} finally {
await dupHarness.cleanup();
}
} finally {
await cleanup();
}
});
test('autoTitleSession respects autoLlmTitle=false and removeProvider clears dangling titleModel', async () => {
let calls = 0;
const { capture, cleanup } = await setupHook({
sessions: [untitledSession('s-off')],
providers: [providerA, providerB],
activeProviderId: providerA.id,
autoLlmTitle: false,
titleModel: { providerId: providerB.id, modelId: 'gpt-4o-mini' },
generateSessionTitle: async () => {
calls += 1;
return 'Should not run';
},
});
try {
await act(async () => {
await capture.ai!.autoTitleSession('s-off', 'Fallback only please');
});
assert.equal(calls, 0);
assert.equal(capture.sessions[0].title, 'Fallback only please');
assert.deepEqual(capture.ai!.titleModel, { providerId: providerB.id, modelId: 'gpt-4o-mini' });
await act(async () => {
capture.ai!.removeProvider(providerB.id);
});
assert.equal(capture.ai!.titleModel, null);
} finally {
await cleanup();
}
});
test('a queued regeneration preserves a title renamed before its request starts', async () => {
const session = untitledSession();
let calls = 0;
const { capture, cleanup } = await setupHook({
sessions: [session],
providers: [providerA],
activeProviderId: providerA.id,
generateSessionTitle: async () => { calls += 1; return 'Generated'; },
});
try {
await act(async () => { capture.ai!.updateSessionTitle(session.id, 'Manual'); });
const result = await capture.ai!.regenerateSessionTitle(session.id, session.title);
assert.deepEqual(result, { status: 'unchanged', title: 'Manual' });
assert.equal(calls, 0);
assert.equal(capture.sessions[0].title, 'Manual');
} finally {
await cleanup();
}
});
@@ -128,64 +128,3 @@ test('restored workspace enters a blank draft when New Chat is clicked', async (
container.remove();
dom.window.close();
});
test('async clearDraftForScope propagates draft removal to sibling useAIState subscribers', async () => {
const dom = new JSDOM('<!doctype html><html><body></body></html>', {
url: 'http://localhost',
});
Object.defineProperty(globalThis, 'window', { configurable: true, value: dom.window });
Object.defineProperty(globalThis, 'document', { configurable: true, value: dom.window.document });
Object.defineProperty(globalThis, 'localStorage', { configurable: true, value: dom.window.localStorage });
Object.defineProperty(globalThis, 'CustomEvent', { configurable: true, value: dom.window.CustomEvent });
Object.defineProperty(globalThis, 'Event', { configurable: true, value: dom.window.Event });
Object.defineProperty(globalThis, 'IS_REACT_ACT_ENVIRONMENT', { configurable: true, value: true });
let writer: ReturnType<typeof useAIState> | null = null;
let readerDraftText: string | undefined;
function Writer() {
writer = useAIState();
return null;
}
function Reader() {
useAIState();
const state = useAISessionsStore();
readerDraftText = state.draftsByScope[SCOPE_KEY]?.text;
return <span data-draft={readerDraftText ?? ''} />;
}
const container = document.createElement('div');
document.body.appendChild(container);
const root = createRoot(container);
await act(async () => {
root.render(
<>
<Writer />
<Reader />
</>,
);
});
await act(async () => {
writer!.updateDraft(SCOPE_KEY, 'catty', () => ({
text: 'sent message',
agentId: 'catty',
attachments: [],
selectedUserSkillSlugs: [],
updatedAt: Date.now(),
}));
});
await act(async () => {
await Promise.resolve();
writer!.clearDraftForScope(SCOPE_KEY);
});
assert.equal(readerDraftText, undefined);
assert.equal(container.querySelector('span')?.dataset.draft, '');
await act(async () => root.unmount());
container.remove();
dom.window.close();
});
Loaded 100 of 890 files, more files were not shown because too many files have changed in this diff. Show more