@jingyi0605/codingns4dsh 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +306 -0
- package/README.md +190 -993
- package/data/build/dist/client/account-bar.d.ts +2 -2
- package/data/build/dist/client/account-bar.js +96 -39
- package/data/build/dist/client/bundle.js +13722 -3611
- package/data/build/dist/client/cli-catalog.js +20 -3
- package/data/build/dist/client/cli-slots.d.ts +5 -0
- package/data/build/dist/client/cli-slots.js +57 -7
- package/data/build/dist/client/debug/ui.d.ts +1 -1
- package/data/build/dist/client/debug/ui.js +62 -32
- package/data/build/dist/client/dsh-runtime-version.d.ts +9 -2
- package/data/build/dist/client/dsh-runtime-version.js +24 -2
- package/data/build/dist/client/features/cli-adapters.d.ts +1 -1
- package/data/build/dist/client/features/cli-adapters.js +19 -16
- package/data/build/dist/client/features/debug.js +2 -2
- package/data/build/dist/client/features/index.d.ts +2 -1
- package/data/build/dist/client/features/index.js +3 -1
- package/data/build/dist/client/features/lan-access-panel.d.ts +1 -1
- package/data/build/dist/client/features/lan-access-panel.js +8 -10
- package/data/build/dist/client/features/lan-access.js +1 -1
- package/data/build/dist/client/features/login-protection-panel.d.ts +1 -1
- package/data/build/dist/client/features/login-protection-panel.js +7 -9
- package/data/build/dist/client/features/reverse-proxy-panel.d.ts +1 -1
- package/data/build/dist/client/features/reverse-proxy-panel.js +99 -11
- package/data/build/dist/client/features/reverse-proxy.d.ts +1 -1
- package/data/build/dist/client/features/reverse-proxy.js +19 -18
- package/data/build/dist/client/features/terminal-enhancement-panel.d.ts +1 -1
- package/data/build/dist/client/features/terminal-enhancement-panel.js +62 -55
- package/data/build/dist/client/features/terminal-enhancement.d.ts +1 -1
- package/data/build/dist/client/features/terminal-enhancement.js +3 -3
- package/data/build/dist/client/features/types.d.ts +14 -3
- package/data/build/dist/client/features/workspace-session-enhancement-panel.d.ts +1 -1
- package/data/build/dist/client/features/workspace-session-enhancement-panel.js +31 -9
- package/data/build/dist/client/features/workspace-session-enhancement.js +72 -11
- package/data/build/dist/client/git-management.d.ts +16 -0
- package/data/build/dist/client/git-management.js +757 -0
- package/data/build/dist/client/index.d.ts +3 -2
- package/data/build/dist/client/index.js +152 -27
- package/data/build/dist/client/locale.js +91 -29
- package/data/build/dist/client/quick-phrase-layout.d.ts +49 -0
- package/data/build/dist/client/quick-phrase-layout.js +95 -0
- package/data/build/dist/client/quick-phrase-slot.d.ts +7 -0
- package/data/build/dist/client/quick-phrase-slot.js +370 -0
- package/data/build/dist/client/remote-web-context.js +1 -1
- package/data/build/dist/client/settings-bridge.d.ts +9 -6
- package/data/build/dist/client/settings-bridge.js +51 -27
- package/data/build/dist/client/settings-section.d.ts +3 -2
- package/data/build/dist/client/settings-section.js +33 -19
- package/data/build/dist/client/subscription-slot.d.ts +3 -0
- package/data/build/dist/client/subscription-slot.js +108 -16
- package/data/build/dist/client/terminal/model.d.ts +14 -2
- package/data/build/dist/client/terminal/model.js +109 -21
- package/data/build/dist/client/terminal/recovery.d.ts +50 -0
- package/data/build/dist/client/terminal/recovery.js +101 -0
- package/data/build/dist/client/terminal/ui.d.ts +2 -2
- package/data/build/dist/client/terminal/ui.js +49 -11
- package/data/build/dist/client/terminal/xterm-view.d.ts +2 -2
- package/data/build/dist/client/terminal/xterm-view.js +2 -1
- package/data/build/dist/client/theme.d.ts +6 -1
- package/data/build/dist/client/theme.js +32 -1
- package/data/build/dist/client/workspace-session-archive-dom.d.ts +12 -0
- package/data/build/dist/client/workspace-session-archive-dom.js +27 -5
- package/data/build/dist/client/workspace-session-visibility-dom.d.ts +30 -0
- package/data/build/dist/client/workspace-session-visibility-dom.js +604 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.d.ts +50 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.js +139 -0
- package/data/build/dist/dsh-capabilities/client/conversation-adapter.d.ts +7 -0
- package/data/build/dist/dsh-capabilities/client/conversation-adapter.js +6 -0
- package/data/build/dist/dsh-capabilities/client/locale-adapter.d.ts +9 -0
- package/data/build/dist/dsh-capabilities/client/locale-adapter.js +4 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts +10 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js +14 -0
- package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.d.ts +8 -0
- package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.js +16 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-adapter.d.ts +7 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-adapter.js +5 -0
- package/data/build/dist/dsh-capabilities/client/theme-adapter.d.ts +6 -0
- package/data/build/dist/dsh-capabilities/client/theme-adapter.js +4 -0
- package/data/build/dist/dsh-capabilities/client/typert-adapter.d.ts +5 -0
- package/data/build/dist/dsh-capabilities/client/typert-adapter.js +4 -0
- package/data/build/dist/dsh-capabilities/host/config-forms-adapter.d.ts +19 -0
- package/data/build/dist/dsh-capabilities/host/config-forms-adapter.js +45 -0
- package/data/build/dist/dsh-capabilities/host/connection-rpc-adapter.d.ts +19 -0
- package/data/build/dist/dsh-capabilities/host/connection-rpc-adapter.js +13 -0
- package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.d.ts +8 -0
- package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.js +47 -0
- package/data/build/dist/dsh-capabilities/host/typert-adapter.d.ts +6 -0
- package/data/build/dist/dsh-capabilities/host/typert-adapter.js +4 -0
- package/data/build/dist/dsh-capabilities/index.d.ts +6 -0
- package/data/build/dist/dsh-capabilities/index.js +6 -0
- package/data/build/dist/dsh-capabilities/matrix.d.ts +15 -0
- package/data/build/dist/dsh-capabilities/matrix.js +32 -0
- package/data/build/dist/dsh-capabilities/registry.d.ts +22 -0
- package/data/build/dist/dsh-capabilities/registry.js +196 -0
- package/data/build/dist/dsh-capabilities/routes.d.ts +10 -0
- package/data/build/dist/dsh-capabilities/routes.js +34 -0
- package/data/build/dist/dsh-capabilities/settings-store.d.ts +29 -0
- package/data/build/dist/dsh-capabilities/settings-store.js +5 -0
- package/data/build/dist/dsh-capabilities/types.d.ts +50 -0
- package/data/build/dist/dsh-capabilities/types.js +23 -0
- package/data/build/dist/features/registry.d.ts +8 -2
- package/data/build/dist/features/registry.js +104 -1
- package/data/build/dist/host/auth-session.d.ts +8 -1
- package/data/build/dist/host/auth-session.js +28 -6
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/claude-driver.js +19 -4
- package/data/build/dist/host/cli-adapters/claude-model-options.d.ts +14 -0
- package/data/build/dist/host/cli-adapters/claude-model-options.js +157 -0
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts +11 -0
- package/data/build/dist/host/cli-adapters/codex-driver.js +166 -14
- package/data/build/dist/host/cli-adapters/driver.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts +15 -0
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js +120 -29
- package/data/build/dist/host/cli-adapters/dsh-tool-history.d.ts +4 -1
- package/data/build/dist/host/cli-adapters/dsh-tool-history.js +25 -7
- package/data/build/dist/host/cli-adapters/feature.js +74 -8
- package/data/build/dist/host/cli-adapters/gemini-driver.js +2 -2
- package/data/build/dist/host/cli-adapters/grok-driver.js +2 -2
- package/data/build/dist/host/cli-adapters/json-rpc-process.d.ts +4 -2
- package/data/build/dist/host/cli-adapters/json-rpc-process.js +8 -9
- package/data/build/dist/host/cli-adapters/kimi-driver.js +1 -1
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts +17 -0
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js +88 -0
- package/data/build/dist/host/cli-adapters/legacy-session-settings.d.ts +24 -0
- package/data/build/dist/host/cli-adapters/legacy-session-settings.js +162 -0
- package/data/build/dist/host/cli-adapters/official-provider-subscription.d.ts +29 -0
- package/data/build/dist/host/cli-adapters/official-provider-subscription.js +361 -0
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/opencode-driver.js +97 -12
- package/data/build/dist/host/cli-adapters/pi-driver.js +69 -23
- package/data/build/dist/host/cli-adapters/provider-registry.d.ts +33 -0
- package/data/build/dist/host/cli-adapters/provider-registry.js +83 -0
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts +25 -3
- package/data/build/dist/host/cli-adapters/provider-subscription.js +346 -30
- package/data/build/dist/host/cli-adapters/registry.d.ts +6 -0
- package/data/build/dist/host/cli-adapters/registry.js +170 -13
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.js +10 -0
- package/data/build/dist/host/cli-adapters/session-store.d.ts +7 -0
- package/data/build/dist/host/cli-adapters/session-store.js +39 -1
- package/data/build/dist/host/cli-adapters/standard-stream-driver.d.ts +3 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.d.ts +3 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.js +22 -2
- package/data/build/dist/host/control-api-client.d.ts +3 -3
- package/data/build/dist/host/control-api-client.js +2 -1
- package/data/build/dist/host/credential-store.js +11 -1
- package/data/build/dist/host/dsh-device-runtime.d.ts +4 -0
- package/data/build/dist/host/dsh-device-runtime.js +20 -9
- package/data/build/dist/host/dsh-runtime-version.d.ts +3 -2
- package/data/build/dist/host/dsh-runtime-version.js +71 -2
- package/data/build/dist/host/features/auth.js +8 -5
- package/data/build/dist/host/features/debug.js +1 -1
- package/data/build/dist/host/features/git-management.d.ts +5 -0
- package/data/build/dist/host/features/git-management.js +290 -0
- package/data/build/dist/host/features/host-status.js +1 -1
- package/data/build/dist/host/features/index.d.ts +1 -0
- package/data/build/dist/host/features/index.js +3 -0
- package/data/build/dist/host/features/terminal-process.js +1 -1
- package/data/build/dist/host/features/terminal-status.d.ts +3 -1
- package/data/build/dist/host/features/terminal-status.js +3 -1
- package/data/build/dist/host/index.d.ts +7 -3
- package/data/build/dist/host/index.js +79 -15
- package/data/build/dist/host/lan-access-dsh.js +18 -5
- package/data/build/dist/host/native-session-bridge.d.ts +23 -1
- package/data/build/dist/host/native-session-bridge.js +157 -10
- package/data/build/dist/host/rpc-table.d.ts +1 -1
- package/data/build/dist/host/rpc.js +60 -10
- package/data/build/dist/host/session-migration-repair.d.ts +19 -0
- package/data/build/dist/host/session-migration-repair.js +395 -0
- package/data/build/dist/host/settings.d.ts +8 -1
- package/data/build/dist/host/settings.js +94 -3
- package/data/build/dist/host/terminal/backends/tmux-backend.d.ts +1 -0
- package/data/build/dist/host/terminal/backends/tmux-backend.js +4 -2
- package/data/build/dist/host/terminal/controller-factory.d.ts +4 -0
- package/data/build/dist/host/terminal/controller-factory.js +26 -7
- package/data/build/dist/host/terminal/runtime-manager.d.ts +2 -1
- package/data/build/dist/host/terminal/runtime-manager.js +3 -0
- package/data/build/dist/host/terminal/startup.d.ts +2 -0
- package/data/build/dist/host/terminal/startup.js +2 -1
- package/data/build/dist/host/terminal/terminal-controller.d.ts +10 -3
- package/data/build/dist/host/terminal/terminal-controller.js +101 -15
- package/data/build/dist/host/terminal/terminal-process-service.js +3 -1
- package/data/build/dist/host/terminal/terminal-service.d.ts +2 -0
- package/data/build/dist/host/terminal/terminal-service.js +10 -0
- package/data/build/dist/index.d.ts +6 -2
- package/data/build/dist/index.js +8 -2
- package/data/build/dist/shared/contracts/cli-adapter.d.ts +14 -0
- package/data/build/dist/shared/contracts/config.d.ts +31 -1
- package/data/build/dist/shared/contracts/config.js +25 -0
- package/data/build/dist/shared/contracts/dsh-device.d.ts +13 -1
- package/data/build/dist/shared/contracts/errors.d.ts +1 -1
- package/data/build/dist/shared/contracts/feature.d.ts +6 -0
- package/data/build/dist/shared/contracts/git.d.ts +82 -0
- package/data/build/dist/shared/contracts/git.js +3 -0
- package/data/build/dist/shared/contracts/subscription.d.ts +46 -0
- package/data/build/dist/shared/contracts/terminal.d.ts +4 -1
- package/data/build/dist/shared/contracts/version.d.ts +2 -2
- package/data/build/dist/shared/contracts/version.js +4 -6
- package/data/build/dist/shared/debug.d.ts +14 -0
- package/data/build/dist/shared/debug.js +53 -0
- package/data/build/dist/shared/index.d.ts +7 -4
- package/data/build/dist/shared/index.js +2 -1
- package/data/build/dist/transport/debug.d.ts +1 -1
- package/data/build/dist/transport/debug.js +3 -30
- package/data/build/dist/transport/dsh-session.js +3 -3
- package/data/build/dist/typert.host.d.ts +1 -1
- package/data/build/dist/typert.host.js +6 -3
- package/data/build/dist/typert.remote-client.d.ts +11 -0
- package/data/build/dist/typert.remote-client.js +7 -0
- package/dsh.bundle.patch +1 -1
- package/package.json +13 -5
- package/profile/README.md +4 -4
- package/profile/package.json +6 -4
- package/profile/scripts/check-dsh-install.mjs +2 -2
- package/profile/version.json +2 -2
- package/scripts/check-dsh-install.mjs +2 -2
- package/version.json +2 -2
|
@@ -9,7 +9,7 @@ import type { Context } from '@deepseek-ai/cordis';
|
|
|
9
9
|
import './provider-icon-assets.js';
|
|
10
10
|
export { ensureCryptoRandomUUID } from './lan-access.js';
|
|
11
11
|
export type { CryptoRandomUUIDInstallResult, LanAccessCrypto, LanAccessGlobal, } from './lan-access.js';
|
|
12
|
-
export { CLIENT_FEATURES, settingsModules, startBrowserRelayConnection } from './features/index.js';
|
|
12
|
+
export { CLIENT_FEATURES, settingsModules, startBrowserRelayConnection, gitManagementFeature } from './features/index.js';
|
|
13
13
|
export { chooseDshDevice, createHttpDshH5ControlApi, startDshH5Bootstrap, startDshH5BrowserBootstrap } from './dsh-h5-bootstrap.js';
|
|
14
14
|
export type { DshH5BootstrapOptions, DshH5BootstrapResult, DshH5BrowserBootstrapOptions, DshH5BrowserBootstrapResult, DshH5BrowserControlApi, } from './dsh-h5-bootstrap.js';
|
|
15
15
|
export { RemoteDshWebContext } from './remote-web-context.js';
|
|
@@ -17,10 +17,11 @@ export type { RemoteDshWebBoot, RemoteDshWebContextOptions } from './remote-web-
|
|
|
17
17
|
export type { CodingNsClientFeatureModule, CodingNsClientServices, CodingNsRpcClient, CodingNsRpcResult, FeaturePanelProps, } from './features/index.js';
|
|
18
18
|
export { CodingNsSettingsSection } from './settings-section.js';
|
|
19
19
|
export { startWorkspaceSessionArchiveDom, WORKSPACE_SESSION_ARCHIVE_ATTRIBUTE, WORKSPACE_SESSION_ARCHIVE_MODAL_ATTRIBUTE, } from './workspace-session-archive-dom.js';
|
|
20
|
+
export { startWorkspaceSessionVisibilityDom, WORKSPACE_SESSION_HIDDEN_ATTRIBUTE, WORKSPACE_SESSION_HIDDEN_MENU_ATTRIBUTE, WORKSPACE_SESSION_HIDDEN_LIST_ATTRIBUTE, } from './workspace-session-visibility-dom.js';
|
|
20
21
|
export { CodingNsTerminalView, CodingNsWebTerminals, registerCodingNsTerminalUi } from './terminal/index.js';
|
|
21
22
|
export { registerSubscriptionSlot, registerCommandCodeSubscriptionSlot, CommandCodeSubscriptionSlot } from './subscription-slot.js';
|
|
22
23
|
/** Client Runner 用于等待服务就绪的 Cordis 依赖声明。 */
|
|
23
|
-
export declare const inject: readonly ["slots", "
|
|
24
|
+
export declare const inject: readonly ["slots", "connection", "remote", "remote.workspace", "remote.session", "sidebarRight", "sidebarRightTabs", "theme", "locale", "uiConversation"];
|
|
24
25
|
/**
|
|
25
26
|
* 把 Codingns4DSH 设置页挂载到 DSH 设置左侧导航,并让模块开关驱动启停。
|
|
26
27
|
*
|
|
@@ -1,24 +1,29 @@
|
|
|
1
1
|
import './provider-icon-assets.js';
|
|
2
2
|
import { FeatureRegistry } from '../features/registry.js';
|
|
3
3
|
import { registerCodingNsLocale } from './locale.js';
|
|
4
|
-
import { CODINGNS_SETTINGS_NAMESPACE, captureRestartFeatureStates, enabledFeatureNames, } from '../shared/contracts/config.js';
|
|
4
|
+
import { CODINGNS_SETTINGS_NAMESPACE, CODINGNS_SETTINGS_ENTRY_IDS, captureRestartFeatureStates, enabledFeatureNames, } from '../shared/contracts/config.js';
|
|
5
5
|
import { CLIENT_FEATURES } from './features/index.js';
|
|
6
6
|
import { ensureCryptoRandomUUID } from './lan-access.js';
|
|
7
7
|
import { CodingNsSettingsSection } from './settings-section.js';
|
|
8
|
-
import { createCodingNsSettingsBridge } from './settings-bridge.js';
|
|
8
|
+
import { callCodingNsRpc, createCodingNsSettingsBridge } from './settings-bridge.js';
|
|
9
|
+
import { debugInfo } from '../shared/debug.js';
|
|
10
|
+
import { createConfigFormSettingsStore } from '../dsh-capabilities/client/config-forms-adapter.js';
|
|
9
11
|
import { CodingNsWebTerminals, registerCodingNsTerminalUi } from './terminal/index.js';
|
|
10
12
|
import { startCodingNsAccountBar } from './account-bar.js';
|
|
11
13
|
import { assertInjectedDshVersion } from './dsh-runtime-version.js';
|
|
14
|
+
import { createDshCapabilityRegistry } from '../dsh-capabilities/index.js';
|
|
15
|
+
import { TYPERT_REMOTE } from '../typert.remote-client.js';
|
|
12
16
|
export { ensureCryptoRandomUUID } from './lan-access.js';
|
|
13
|
-
export { CLIENT_FEATURES, settingsModules, startBrowserRelayConnection } from './features/index.js';
|
|
17
|
+
export { CLIENT_FEATURES, settingsModules, startBrowserRelayConnection, gitManagementFeature } from './features/index.js';
|
|
14
18
|
export { chooseDshDevice, createHttpDshH5ControlApi, startDshH5Bootstrap, startDshH5BrowserBootstrap } from './dsh-h5-bootstrap.js';
|
|
15
19
|
export { RemoteDshWebContext } from './remote-web-context.js';
|
|
16
20
|
export { CodingNsSettingsSection } from './settings-section.js';
|
|
17
21
|
export { startWorkspaceSessionArchiveDom, WORKSPACE_SESSION_ARCHIVE_ATTRIBUTE, WORKSPACE_SESSION_ARCHIVE_MODAL_ATTRIBUTE, } from './workspace-session-archive-dom.js';
|
|
22
|
+
export { startWorkspaceSessionVisibilityDom, WORKSPACE_SESSION_HIDDEN_ATTRIBUTE, WORKSPACE_SESSION_HIDDEN_MENU_ATTRIBUTE, WORKSPACE_SESSION_HIDDEN_LIST_ATTRIBUTE, } from './workspace-session-visibility-dom.js';
|
|
18
23
|
export { CodingNsTerminalView, CodingNsWebTerminals, registerCodingNsTerminalUi } from './terminal/index.js';
|
|
19
24
|
export { registerSubscriptionSlot, registerCommandCodeSubscriptionSlot, CommandCodeSubscriptionSlot } from './subscription-slot.js';
|
|
20
25
|
/** Client Runner 用于等待服务就绪的 Cordis 依赖声明。 */
|
|
21
|
-
export const inject = ['slots', '
|
|
26
|
+
export const inject = ['slots', 'connection', 'remote', 'remote.workspace', 'remote.session', 'sidebarRight', 'sidebarRightTabs', 'theme', 'locale', 'uiConversation'];
|
|
22
27
|
/**
|
|
23
28
|
* 把 Codingns4DSH 设置页挂载到 DSH 设置左侧导航,并让模块开关驱动启停。
|
|
24
29
|
*
|
|
@@ -28,36 +33,65 @@ export const inject = ['slots', 'settingsScope', 'connection', 'remote', 'remote
|
|
|
28
33
|
export function apply(ctx) {
|
|
29
34
|
if (ctx === undefined)
|
|
30
35
|
return;
|
|
31
|
-
const dshVersion = assertInjectedDshVersion();
|
|
36
|
+
const dshVersion = assertInjectedDshVersion(ctx);
|
|
37
|
+
debugInfo('codingns4dsh: client apply entered', { dshVersion });
|
|
32
38
|
// 版本门禁通过后才修改浏览器全局,避免不兼容 Client 留下半初始化状态。
|
|
33
39
|
ensureCryptoRandomUUID();
|
|
34
40
|
ctx.effect(() => registerCodingNsLocale(ctx), 'codingns4dsh: Client 词典');
|
|
35
|
-
ctx.inject(['slots', '
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
ctx.inject(['slots', 'connection', 'remote', 'remote.workspace', 'remote.session', 'sidebarRight', 'sidebarRightTabs', 'theme', 'locale', 'uiConversation'], async (settingsCtx) => {
|
|
42
|
+
debugInfo('codingns4dsh: client inject ready', {
|
|
43
|
+
hasConnection: settingsCtx.connection !== undefined,
|
|
44
|
+
hasRemote: settingsCtx.remote !== undefined,
|
|
45
|
+
hasSlots: settingsCtx.slots !== undefined,
|
|
46
|
+
hasSidebarRight: settingsCtx.sidebarRight !== undefined,
|
|
47
|
+
hasSidebarRightTabs: settingsCtx.sidebarRightTabs !== undefined,
|
|
48
|
+
hasTheme: settingsCtx.theme !== undefined,
|
|
49
|
+
hasLocale: settingsCtx.locale !== undefined,
|
|
50
|
+
hasUiConversation: settingsCtx.uiConversation !== undefined,
|
|
38
51
|
});
|
|
39
52
|
// Host 与 Client 共用同一个 cordis Context 类型,而 DSH 的 Host 侧声明会把
|
|
40
53
|
// connection 收窄成 Host 句柄;浏览器侧按 ConnectionHandle 收窄回真实形状。
|
|
41
54
|
const connection = settingsCtx.connection;
|
|
42
|
-
const settings =
|
|
43
|
-
|
|
44
|
-
const
|
|
55
|
+
const settings = createClientSettingsStore(settingsCtx, connection.rpc);
|
|
56
|
+
debugInfo('codingns4dsh: client settings store ready');
|
|
57
|
+
const disposeTerminalRemote = await ensureTerminalRemote(settingsCtx);
|
|
58
|
+
// `remote` 是 Cordis 代理,读取嵌套命名空间必须在当前 Fiber 显式声明注入。
|
|
59
|
+
// 独立注入避免把 DSH 0.1.7 自动提供的官方 `remote.terminal` 当成插件终端。
|
|
60
|
+
let mountedTerminalRemote;
|
|
61
|
+
const terminalRemote = () => mountedTerminalRemote;
|
|
45
62
|
const webTerminals = new CodingNsWebTerminals(settingsCtx, terminalRemote);
|
|
63
|
+
settingsCtx.inject(['remote.codingnsTerminal'], (terminalCtx) => {
|
|
64
|
+
mountedTerminalRemote = terminalCtx.get('remote.codingnsTerminal');
|
|
65
|
+
debugInfo('codingns4dsh: client terminal remote ready');
|
|
66
|
+
webTerminals.remoteReady();
|
|
67
|
+
});
|
|
68
|
+
debugInfo('codingns4dsh: client terminal UI registration begin');
|
|
46
69
|
const disposeTerminalUi = registerCodingNsTerminalUi(settingsCtx, webTerminals, settings);
|
|
70
|
+
debugInfo('codingns4dsh: client terminal UI registration ready');
|
|
47
71
|
const services = {
|
|
48
72
|
dshVersion,
|
|
49
73
|
settings,
|
|
50
74
|
rpc: connection.rpc,
|
|
51
75
|
remote: settingsCtx.remote,
|
|
76
|
+
terminalRemote,
|
|
52
77
|
slots: settingsCtx.slots,
|
|
53
78
|
locale: settingsCtx.locale,
|
|
54
79
|
uiConversation: settingsCtx.uiConversation,
|
|
55
80
|
uiContext: settingsCtx,
|
|
56
81
|
};
|
|
82
|
+
debugInfo('codingns4dsh: client account bar registration begin');
|
|
57
83
|
const disposeAccountBar = startCodingNsAccountBar(connection.rpc, undefined, settings);
|
|
58
|
-
|
|
84
|
+
debugInfo('codingns4dsh: client account bar registration ready');
|
|
85
|
+
const capabilityProfile = createDshCapabilityRegistry(dshVersion, 'client', settingsCtx).getProfile(settingsCtx);
|
|
86
|
+
debugInfo('codingns4dsh: client capabilities resolved', {
|
|
87
|
+
dshVersion,
|
|
88
|
+
capabilities: [...capabilityProfile.capabilities.entries()].map(([capability, resolution]) => ({ capability, status: resolution.status, route: resolution.routeId, reason: resolution.reason ?? null })),
|
|
89
|
+
diagnostics: capabilityProfile.diagnostics,
|
|
90
|
+
});
|
|
91
|
+
const registry = new FeatureRegistry(services, capabilityProfile);
|
|
59
92
|
registry.registerMany(CLIENT_FEATURES);
|
|
60
93
|
registry.validate();
|
|
94
|
+
debugInfo('codingns4dsh: client feature registry ready', { features: registry.descriptors().map((item) => item.name) });
|
|
61
95
|
const restartStates = {};
|
|
62
96
|
let restartStatesCaptured = false;
|
|
63
97
|
settingsCtx.effect(() => {
|
|
@@ -67,32 +101,123 @@ export function apply(ctx) {
|
|
|
67
101
|
Object.assign(restartStates, captureRestartFeatureStates(registry.descriptors(), snapshot.value, dshVersion));
|
|
68
102
|
restartStatesCaptured = true;
|
|
69
103
|
}
|
|
104
|
+
const enabled = enabledFeatureNames(registry.descriptors(), snapshot.value, restartStates, dshVersion);
|
|
105
|
+
debugInfo('codingns4dsh: client feature sync', {
|
|
106
|
+
settingsStatus: snapshot.status,
|
|
107
|
+
settingsRevision: snapshot.revision,
|
|
108
|
+
enabled,
|
|
109
|
+
states: registry.list(),
|
|
110
|
+
});
|
|
70
111
|
void registry
|
|
71
|
-
.reconcile(
|
|
112
|
+
.reconcile(enabled)
|
|
72
113
|
.catch((error) => {
|
|
73
114
|
console.error('codingns4dsh: 功能模块状态同步失败', error);
|
|
74
115
|
});
|
|
75
116
|
};
|
|
76
117
|
sync();
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
118
|
+
const loading = settings.load?.();
|
|
119
|
+
if (loading !== undefined) {
|
|
120
|
+
void loading.catch((error) => {
|
|
121
|
+
console.error('codingns4dsh: 远程设置读取失败', error);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
80
124
|
const unsubscribe = settings.subscribe(sync);
|
|
81
|
-
return () => {
|
|
125
|
+
return async () => {
|
|
82
126
|
unsubscribe();
|
|
127
|
+
await registry.reconcile([]);
|
|
83
128
|
disposeTerminalUi();
|
|
84
|
-
disposeAccountBar.dispose();
|
|
85
|
-
|
|
86
|
-
|
|
129
|
+
await disposeAccountBar.dispose();
|
|
130
|
+
await disposeTerminalRemote();
|
|
131
|
+
await webTerminals.dispose();
|
|
132
|
+
await settings.dispose?.();
|
|
87
133
|
};
|
|
88
134
|
}, 'codingns4dsh: 功能模块启停同步');
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
135
|
+
try {
|
|
136
|
+
debugInfo('codingns4dsh: client settings slot registration begin');
|
|
137
|
+
settingsCtx.slots.inject('settings.section', () => {
|
|
138
|
+
debugInfo('codingns4dsh: client settings slot injector invoked');
|
|
139
|
+
return settingsCtx.slots.register({
|
|
140
|
+
name: 'settings.section',
|
|
141
|
+
id: 'codingns',
|
|
142
|
+
order: 30,
|
|
143
|
+
label: 'Codingns4DSH',
|
|
144
|
+
inject: () => ({ settings, registry, services, restartStates }),
|
|
145
|
+
}, CodingNsSettingsSection);
|
|
146
|
+
});
|
|
147
|
+
debugInfo('codingns4dsh: client settings slot registration requested');
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
console.error('codingns4dsh: client settings slot registration failed', error);
|
|
151
|
+
throw error;
|
|
152
|
+
}
|
|
96
153
|
});
|
|
97
154
|
}
|
|
155
|
+
/** 按需挂载 Codingns4DSH 自有 Remote 描述,不能复用 DSH 官方 terminal。 */
|
|
156
|
+
async function ensureTerminalRemote(ctx) {
|
|
157
|
+
// 这里只能读取已经声明的 `remote`。直接探测
|
|
158
|
+
// `remote.codingnsTerminal` 会触发 Cordis 的 without-inject 错误;
|
|
159
|
+
// Remote 贡献由当前 Client assembly 负责挂载,重复挂载由上层生命周期避免。
|
|
160
|
+
const remote = ctx.get('remote');
|
|
161
|
+
const dispose = await remote.$mount(TYPERT_REMOTE);
|
|
162
|
+
debugInfo('codingns4dsh: client terminal remote mounted');
|
|
163
|
+
return dispose;
|
|
164
|
+
}
|
|
165
|
+
/** 在设置服务改名期间选择旧 Scope 或 0.1.7 ConfigForm,业务层只接收内部 Store。 */
|
|
166
|
+
function createClientSettingsStore(ctx, rpc) {
|
|
167
|
+
const scopeBinder = ctx.get('settingsScope');
|
|
168
|
+
if (typeof scopeBinder?.bind === 'function') {
|
|
169
|
+
debugInfo('codingns4dsh: client settings source=settingsScope');
|
|
170
|
+
const local = scopeBinder.bind({ namespace: CODINGNS_SETTINGS_NAMESPACE });
|
|
171
|
+
return createCodingNsSettingsBridge(local, rpc);
|
|
172
|
+
}
|
|
173
|
+
const forms = ctx.get('configForms');
|
|
174
|
+
const form = findConfigForm(forms);
|
|
175
|
+
debugInfo('codingns4dsh: client settings source=configForms', { hasConfigForms: forms !== undefined, hasForm: form !== undefined });
|
|
176
|
+
return createConfigFormSettingsStore({ get: () => form }, CODINGNS_SETTINGS_NAMESPACE, form === undefined
|
|
177
|
+
? undefined
|
|
178
|
+
: {
|
|
179
|
+
// DSH 0.1.7 的 ConfigForm 会把 Host 后台索引更新也纳入 revision。
|
|
180
|
+
// Codingns4DSH 的路径操作是原子的,交给 Host RPC 无条件合并,避免
|
|
181
|
+
// 模块开关因为 cliSessions 的后台心跳而永久冲突。
|
|
182
|
+
writeUnfenced: async (ops) => callCodingNsRpc(rpc, 'settings/set', { ops }),
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
function findConfigForm(forms) {
|
|
186
|
+
if (forms === undefined)
|
|
187
|
+
return undefined;
|
|
188
|
+
// ConfigForms.get 对未知 entry 也会返回一个 Form;必须先看共享 mirror 中
|
|
189
|
+
// Host 实际提供的 namespace,否则会永远拿到旧的 `codingns` 空表单。
|
|
190
|
+
try {
|
|
191
|
+
const namespaces = forms.describe?.().getSnapshot().view?.namespaces;
|
|
192
|
+
debugInfo('codingns4dsh: client config form namespaces', {
|
|
193
|
+
namespaces: namespaces?.map((item) => item.ns),
|
|
194
|
+
});
|
|
195
|
+
const servedId = CODINGNS_SETTINGS_ENTRY_IDS.find((id) => namespaces?.some((item) => item.ns === id));
|
|
196
|
+
if (servedId !== undefined) {
|
|
197
|
+
const form = forms.get(servedId);
|
|
198
|
+
debugInfo('codingns4dsh: client config form namespace selected', { namespace: servedId, hasForm: form !== undefined });
|
|
199
|
+
return form;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
catch {
|
|
203
|
+
// mirror 尚未就绪时继续按 scoped entry 优先的兼容顺序探测。
|
|
204
|
+
}
|
|
205
|
+
for (const id of CODINGNS_SETTINGS_ENTRY_IDS) {
|
|
206
|
+
try {
|
|
207
|
+
const form = forms.get(id);
|
|
208
|
+
if (form !== undefined && form.getSnapshot().status !== 'unavailable') {
|
|
209
|
+
debugInfo('codingns4dsh: client config form namespace fallback selected', {
|
|
210
|
+
namespace: id,
|
|
211
|
+
status: form.getSnapshot().status,
|
|
212
|
+
revision: form.getSnapshot().revision,
|
|
213
|
+
});
|
|
214
|
+
return form;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
catch {
|
|
218
|
+
// 不同 0.1.7 构建可能只接受其中一个 entry id,继续尝试别名。
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return undefined;
|
|
222
|
+
}
|
|
98
223
|
//# sourceMappingURL=index.js.map
|
|
@@ -5,26 +5,26 @@ const en = {
|
|
|
5
5
|
'common.brand': 'Codingns4DSH',
|
|
6
6
|
'settings.title': 'Codingns4DSH features',
|
|
7
7
|
'settings.subtitle': 'Configure modules without changing DSH global settings.',
|
|
8
|
-
'settings.
|
|
9
|
-
'settings.
|
|
10
|
-
'settings.disabled': 'Disabled',
|
|
11
|
-
'settings.runtimeReported': 'The current process state is reported by the module runtime.',
|
|
12
|
-
'settings.restartRequired': 'Restart DSH to apply this change.',
|
|
8
|
+
'settings.version': 'Codingns4DSH v{version}',
|
|
9
|
+
'settings.compatibility': 'Compatible with DSH {range}',
|
|
13
10
|
'settings.toggle': '{label} toggle',
|
|
14
11
|
'settings.legacyFallback': 'This DSH version uses compatibility mode; multi-tab and shell-selection extensions are unavailable.',
|
|
15
12
|
'settings.versionBlocked': 'This module is unavailable on DSH {version}; it requires DSH {minimum} or newer.',
|
|
13
|
+
'settings.moduleEnabled': '{label} enabled.',
|
|
14
|
+
'settings.moduleDisabled': '{label} disabled.',
|
|
15
|
+
'settings.moduleWriteRejected': 'The setting change was rejected; please retry.',
|
|
16
16
|
'feature.workspaceSession.legacyFallback': 'DSH 0.1.5 compatibility path is enabled but not verified. Session-row DOM injection and archive entry placement may vary; restoring archived sessions is unavailable.',
|
|
17
17
|
'feature.lanAccess.label': 'LAN access to DSH',
|
|
18
18
|
'feature.lanAccess.description': 'Access DSH through a LAN IP, provide crypto.randomUUID when needed, and forward the listener to the current DSH Web port.',
|
|
19
19
|
'feature.loginProtection.label': 'Login protection',
|
|
20
20
|
'feature.loginProtection.description': 'Protect LAN and relay DSH Web access with one local account; loopback access is always allowed.',
|
|
21
21
|
'feature.reverseProxy.label': 'Relay access service',
|
|
22
|
-
'feature.reverseProxy.description': 'Access a DSH Host through the isolated
|
|
22
|
+
'feature.reverseProxy.description': 'Access a DSH Host through the isolated Codingns4DSH relay.',
|
|
23
23
|
'feature.cliAdapters.label': 'External Agent integration',
|
|
24
24
|
'feature.cliAdapters.description': 'View installed external Agents, versions, command paths, available models, and enable them independently.',
|
|
25
25
|
'feature.workspaceSession.label': 'Workspace session enhancement',
|
|
26
|
-
'feature.workspaceSession.description': 'Show
|
|
27
|
-
'feature.terminal.label': 'Terminal
|
|
26
|
+
'feature.workspaceSession.description': 'Show Agent logos, archived-session entries, workspace hiding controls, subscription or usage information, and local quick sessions.',
|
|
27
|
+
'feature.terminal.label': 'Terminal enhancements',
|
|
28
28
|
'feature.terminal.description': 'Configure the default shell and terminal appearance. Enabling or disabling requires a DSH restart.',
|
|
29
29
|
'terminal.title': 'Terminal',
|
|
30
30
|
'terminal.new': 'New terminal',
|
|
@@ -40,8 +40,11 @@ const en = {
|
|
|
40
40
|
'terminal.enhanced': 'Terminal enhancement enabled',
|
|
41
41
|
'terminal.basic': 'Basic local terminal',
|
|
42
42
|
'terminal.saved': 'Terminal settings saved',
|
|
43
|
+
'terminal.saveRejected': 'Host rejected the terminal settings change; please retry.',
|
|
43
44
|
'terminal.readingStatus': 'Reading Host terminal status…',
|
|
44
45
|
'terminal.restartNote': 'Enabling or disabling requires a DSH restart. Disabling stops restoration and connection only; existing tmux or ConPTY sessions are not terminated.',
|
|
46
|
+
'terminal.appearanceTitle': 'Terminal appearance',
|
|
47
|
+
'terminal.resetAppearance': 'Reset appearance defaults',
|
|
45
48
|
'terminal.newDefault': 'New terminal default',
|
|
46
49
|
'terminal.theme': 'Theme',
|
|
47
50
|
'terminal.bindingScope': 'Terminal binding scope',
|
|
@@ -49,15 +52,13 @@ const en = {
|
|
|
49
52
|
'terminal.inheritDshTheme': 'Inherit DSH theme',
|
|
50
53
|
'terminal.custom': 'Custom',
|
|
51
54
|
'terminal.background': 'Background color',
|
|
52
|
-
'terminal.foreground': '
|
|
55
|
+
'terminal.foreground': 'Text color',
|
|
53
56
|
'terminal.cursorColor': 'Cursor color',
|
|
54
|
-
'terminal.font': 'Font',
|
|
55
57
|
'terminal.fontSize': 'Font size (px)',
|
|
56
58
|
'terminal.lineHeight': 'Line height',
|
|
57
59
|
'terminal.cursorShape': 'Cursor shape',
|
|
58
60
|
'terminal.cursorBlink': 'Cursor blink',
|
|
59
61
|
'terminal.scrollback': 'Scrollback lines',
|
|
60
|
-
'terminal.inheritFont': 'Inherit DSH native font',
|
|
61
62
|
'terminal.inherit': 'Inherit',
|
|
62
63
|
'terminal.workspaceBinding': 'Bind by workspace (recommended)',
|
|
63
64
|
'terminal.sessionBinding': 'Bind by DSH session',
|
|
@@ -70,7 +71,6 @@ const en = {
|
|
|
70
71
|
'terminal.cursorUnderline': 'Underline',
|
|
71
72
|
'terminal.cursorOn': 'On',
|
|
72
73
|
'terminal.cursorOff': 'Off',
|
|
73
|
-
'terminal.resetInherit': 'Restore inherited',
|
|
74
74
|
'terminal.unsupportedPlatform': 'Unsupported platform',
|
|
75
75
|
'lan.listenHost': 'Listen host',
|
|
76
76
|
'lan.description': 'Add a listener on this machine and redirect access to the current DSH Web. This is LAN access and does not use the cross-NAT relay service.',
|
|
@@ -91,7 +91,7 @@ const en = {
|
|
|
91
91
|
'lan.autoStartOn': 'Auto-start enabled. The mapping will be restored the next time DSH starts.',
|
|
92
92
|
'lan.autoStartOff': 'Auto-start disabled',
|
|
93
93
|
'lan.processing': 'Processing…',
|
|
94
|
-
'relay.controlApi': '
|
|
94
|
+
'relay.controlApi': 'Relay service address',
|
|
95
95
|
'relay.add': 'Add',
|
|
96
96
|
'relay.cancel': 'Cancel',
|
|
97
97
|
'relay.adding': 'Adding…',
|
|
@@ -110,16 +110,27 @@ const en = {
|
|
|
110
110
|
'relay.addServerHint': 'Enter a new Control API address.',
|
|
111
111
|
'relay.login': 'Log in',
|
|
112
112
|
'relay.loggingIn': 'Logging in…',
|
|
113
|
+
'relay.noAccountPrefix': 'No account? ',
|
|
114
|
+
'relay.register': 'Register here',
|
|
115
|
+
'relay.noAccountSuffix': '.',
|
|
113
116
|
'relay.loggedIn': 'Logged in',
|
|
114
117
|
'relay.loggingOut': 'Logged out',
|
|
115
118
|
'relay.loginSuccess': 'Login succeeded',
|
|
119
|
+
'relay.h5LoginAddress': 'H5 login page',
|
|
120
|
+
'relay.copied': 'Copied',
|
|
121
|
+
'relay.copyAddressHint': 'Click address to copy',
|
|
122
|
+
'relay.copySuccess': 'H5 login address copied',
|
|
123
|
+
'relay.copyFailed': 'Unable to copy the H5 login address',
|
|
116
124
|
'relay.loggedOut': 'Logged out',
|
|
117
125
|
'relay.bindSuccess': 'Host bound successfully',
|
|
118
126
|
'relay.unbindSuccess': 'Host unbound',
|
|
119
127
|
'relay.device': 'Device: {value}',
|
|
128
|
+
'relay.dshVersion': 'DSH version: {value}',
|
|
129
|
+
'relay.computerName': 'Computer name: {value}',
|
|
120
130
|
'relay.host': 'Host: {value}',
|
|
121
131
|
'relay.devicesSummary': 'Current device {current}; other active devices: {count}',
|
|
122
|
-
'relay.
|
|
132
|
+
'relay.deviceStatus': 'Device status: {value}',
|
|
133
|
+
'relay.dshDevices': 'Codingns4DSH devices',
|
|
123
134
|
'relay.selectDevice': 'Select a DSH Host',
|
|
124
135
|
'relay.online': 'online',
|
|
125
136
|
'relay.offline': 'offline',
|
|
@@ -185,33 +196,53 @@ const en = {
|
|
|
185
196
|
'workspace.logoDescription': 'Display the selected external Agent logo in native workspace session rows.',
|
|
186
197
|
'workspace.showArchivedSessions': 'Show archived workspace sessions',
|
|
187
198
|
'workspace.archivedSessionsDescription': 'Display an archived-session folder entry above each workspace\'s more-sessions button.',
|
|
199
|
+
'workspace.showWorkspaceHiding': 'Show workspace hiding controls',
|
|
200
|
+
'workspace.workspaceHidingDescription': 'Add a Hide workspace action to each workspace menu and show hidden workspaces through the workspace filter.',
|
|
188
201
|
'workspace.showSubscriptionUsage': 'Show subscription and usage',
|
|
189
202
|
'workspace.subscriptionUsageDescription': 'Detect and display provider subscription balances and upstream usage in the conversation footer.',
|
|
203
|
+
'workspace.showQuickPhrases': 'Show quick sessions',
|
|
204
|
+
'workspace.quickPhrasesDescription': 'Keep reusable session instructions locally in Codingns4DSH and show the quick sessions button inside the composer.',
|
|
205
|
+
'workspace.quickPhrasesTitle': 'Quick sessions',
|
|
206
|
+
'workspace.quickPhrasesHint': 'Click an item in the composer to fill the current draft.',
|
|
207
|
+
'workspace.quickPhrasesEmpty': 'No quick sessions yet.',
|
|
208
|
+
'workspace.quickPhrasesPlaceholder': 'Enter a reusable session instruction',
|
|
209
|
+
'workspace.quickPhrasesAdd': 'Add quick session',
|
|
210
|
+
'workspace.quickPhrasesCancel': 'Cancel',
|
|
211
|
+
'workspace.quickPhrasesAddDialogLabel': 'Add a quick session',
|
|
212
|
+
'workspace.quickPhrasesDelete': 'Delete quick session',
|
|
213
|
+
'workspace.quickPhrasesMoveUp': 'Move quick session up',
|
|
214
|
+
'workspace.quickPhrasesMoveDown': 'Move quick session down',
|
|
215
|
+
'workspace.quickPhrasesDrag': 'Drag to reorder quick session',
|
|
216
|
+
'workspace.quickPhrasesSaved': 'Quick session settings saved',
|
|
217
|
+
'workspace.quickPhrasesSaveFailed': 'Unable to save quick session settings',
|
|
218
|
+
'workspace.quickPhrasesTrigger': 'Quick sessions',
|
|
219
|
+
'workspace.quickPhrasesDialogLabel': 'Choose a quick session',
|
|
220
|
+
'workspace.quickPhrasesClose': 'Close quick sessions',
|
|
190
221
|
};
|
|
191
222
|
const zh = {
|
|
192
223
|
'common.brand': 'Codingns4DSH',
|
|
193
224
|
'settings.title': 'Codingns4DSH 功能模块',
|
|
194
225
|
'settings.subtitle': '按模块配置 Codingns4DSH 功能,不影响 DSH 的全局设置。',
|
|
195
|
-
'settings.
|
|
196
|
-
'settings.
|
|
197
|
-
'settings.disabled': '禁用',
|
|
198
|
-
'settings.runtimeReported': '当前进程状态由模块运行时报告',
|
|
199
|
-
'settings.restartRequired': '重启 DSH 后生效',
|
|
226
|
+
'settings.version': 'Codingns4DSH v{version}',
|
|
227
|
+
'settings.compatibility': '兼容 DSH {range}',
|
|
200
228
|
'settings.toggle': '{label}开关',
|
|
201
229
|
'settings.legacyFallback': '当前 DSH 版本使用兼容模式;多 Tab 和 Shell 选择扩展不可用。',
|
|
202
230
|
'settings.versionBlocked': '当前 DSH {version} 不支持此模块;需要 DSH {minimum} 或更高版本。',
|
|
231
|
+
'settings.moduleEnabled': '已启用{label}',
|
|
232
|
+
'settings.moduleDisabled': '已禁用{label}',
|
|
233
|
+
'settings.moduleWriteRejected': '设置未被接受,请重试。',
|
|
203
234
|
'feature.workspaceSession.legacyFallback': '已启用 DSH 0.1.5 兼容路径,但尚未完成验证。会话行 DOM 注入和归档入口位置可能存在差异;当前版本不支持取消归档。',
|
|
204
235
|
'feature.lanAccess.label': '局域网访问DSH',
|
|
205
236
|
'feature.lanAccess.description': '通过局域网 IP 访问 DSH,自动补齐 crypto.randomUUID,并将监听端口转发到当前 DSH Web。',
|
|
206
237
|
'feature.loginProtection.label': '登录保护',
|
|
207
238
|
'feature.loginProtection.description': '使用统一的本地账号保护局域网和中继 DSH Web 访问,本机回环地址始终放行。',
|
|
208
239
|
'feature.reverseProxy.label': '中转访问服务',
|
|
209
|
-
'feature.reverseProxy.description': '通过隔离的
|
|
240
|
+
'feature.reverseProxy.description': '通过隔离的 Codingns4DSH 中继访问 DSH Host。',
|
|
210
241
|
'feature.cliAdapters.label': '外部Agent集成',
|
|
211
242
|
'feature.cliAdapters.description': '查看外部 Agent 的安装状态、版本、命令路径和可用模型,并单独启用或停用。',
|
|
212
243
|
'feature.workspaceSession.label': '工作区会话增强',
|
|
213
|
-
'feature.workspaceSession.description': '在原生工作区会话行显示 Agent Logo
|
|
214
|
-
'feature.terminal.label': '
|
|
244
|
+
'feature.workspaceSession.description': '在原生工作区会话行显示 Agent Logo、归档会话入口、工作区隐藏功能和订阅/用量信息,并提供本地快捷会话。',
|
|
245
|
+
'feature.terminal.label': '终端增强',
|
|
215
246
|
'feature.terminal.description': '配置持久终端的默认 shell 与插件终端外观。启用和禁用均需重启 DSH。',
|
|
216
247
|
'terminal.title': '终端',
|
|
217
248
|
'terminal.new': '新建终端',
|
|
@@ -224,11 +255,14 @@ const zh = {
|
|
|
224
255
|
'terminal.rename': '双击重命名终端',
|
|
225
256
|
'terminal.cleanupFailed': '终端「{title}」未能结束:{message}',
|
|
226
257
|
'terminal.currentStatus': '当前运行状态:{status};Host 平台:{platform}',
|
|
227
|
-
'terminal.enhanced': '
|
|
258
|
+
'terminal.enhanced': '终端增强已启用',
|
|
228
259
|
'terminal.basic': '基础本地终端',
|
|
229
260
|
'terminal.saved': '终端设置已保存',
|
|
261
|
+
'terminal.saveRejected': 'Host 拒绝了终端设置变更,请重试。',
|
|
230
262
|
'terminal.readingStatus': '正在读取 Host 终端状态...',
|
|
231
263
|
'terminal.restartNote': '启用或禁用需要重启 DSH。禁用只会停止恢复和连接,不会结束已有的 tmux 或 ConPTY 会话。',
|
|
264
|
+
'terminal.appearanceTitle': '终端样式',
|
|
265
|
+
'terminal.resetAppearance': '重置为默认样式',
|
|
232
266
|
'terminal.newDefault': '新建终端默认项',
|
|
233
267
|
'terminal.theme': '主题',
|
|
234
268
|
'terminal.bindingScope': '终端绑定范围',
|
|
@@ -236,15 +270,13 @@ const zh = {
|
|
|
236
270
|
'terminal.inheritDshTheme': '继承 DSH 主题',
|
|
237
271
|
'terminal.custom': '自定义',
|
|
238
272
|
'terminal.background': '背景色',
|
|
239
|
-
'terminal.foreground': '
|
|
273
|
+
'terminal.foreground': '文本颜色',
|
|
240
274
|
'terminal.cursorColor': '光标颜色',
|
|
241
|
-
'terminal.font': '字体',
|
|
242
275
|
'terminal.fontSize': '字号(px)',
|
|
243
276
|
'terminal.lineHeight': '行高',
|
|
244
277
|
'terminal.cursorShape': '光标形状',
|
|
245
278
|
'terminal.cursorBlink': '光标闪烁',
|
|
246
279
|
'terminal.scrollback': '回滚行数',
|
|
247
|
-
'terminal.inheritFont': '继承 DSH 原生字体',
|
|
248
280
|
'terminal.inherit': '继承',
|
|
249
281
|
'terminal.workspaceBinding': '按工作区绑定(推荐)',
|
|
250
282
|
'terminal.sessionBinding': '按 DSH 会话绑定',
|
|
@@ -257,7 +289,6 @@ const zh = {
|
|
|
257
289
|
'terminal.cursorUnderline': '下划线',
|
|
258
290
|
'terminal.cursorOn': '开启',
|
|
259
291
|
'terminal.cursorOff': '关闭',
|
|
260
|
-
'terminal.resetInherit': '恢复继承',
|
|
261
292
|
'terminal.unsupportedPlatform': '不支持的平台',
|
|
262
293
|
'lan.listenHost': '监听地址',
|
|
263
294
|
'lan.description': '在本机增加一个监听端口,将访问重定向到当前 DSH Web。此功能属于局域网访问,不经过跨 NAT 中转服务。',
|
|
@@ -278,7 +309,7 @@ const zh = {
|
|
|
278
309
|
'lan.autoStartOn': '已开启自动启动,下一次启动 DSH 时将自动恢复映射',
|
|
279
310
|
'lan.autoStartOff': '已关闭自动启动',
|
|
280
311
|
'lan.processing': '处理中…',
|
|
281
|
-
'relay.controlApi': '
|
|
312
|
+
'relay.controlApi': '中转服务地址',
|
|
282
313
|
'relay.add': '添加',
|
|
283
314
|
'relay.cancel': '取消',
|
|
284
315
|
'relay.adding': '添加中…',
|
|
@@ -297,16 +328,27 @@ const zh = {
|
|
|
297
328
|
'relay.addServerHint': '请输入新的 Control API 地址。',
|
|
298
329
|
'relay.login': '登录',
|
|
299
330
|
'relay.loggingIn': '登录中…',
|
|
331
|
+
'relay.noAccountPrefix': '没有账号,',
|
|
332
|
+
'relay.register': '点这里注册',
|
|
333
|
+
'relay.noAccountSuffix': '。',
|
|
300
334
|
'relay.loggedIn': '已登录',
|
|
301
335
|
'relay.loggingOut': '退出登录',
|
|
302
336
|
'relay.loginSuccess': '登录成功',
|
|
337
|
+
'relay.h5LoginAddress': 'H5 登录页面地址',
|
|
338
|
+
'relay.copied': '已复制',
|
|
339
|
+
'relay.copyAddressHint': '点击地址复制',
|
|
340
|
+
'relay.copySuccess': 'H5 登录页面地址复制成功',
|
|
341
|
+
'relay.copyFailed': '无法复制 H5 登录页面地址',
|
|
303
342
|
'relay.bindSuccess': 'Host 绑定成功',
|
|
304
343
|
'relay.unbindSuccess': 'Host 已解绑',
|
|
305
344
|
'relay.loggedOut': '已退出登录',
|
|
306
345
|
'relay.device': '设备:{value}',
|
|
346
|
+
'relay.dshVersion': 'DSH 版本:{value}',
|
|
347
|
+
'relay.computerName': '计算机名:{value}',
|
|
307
348
|
'relay.host': 'Host:{value}',
|
|
308
349
|
'relay.devicesSummary': '当前设备 {current},其他活动设备 {count} 台',
|
|
309
|
-
'relay.
|
|
350
|
+
'relay.deviceStatus': '设备状态:{value}',
|
|
351
|
+
'relay.dshDevices': 'Codingns4DSH 设备',
|
|
310
352
|
'relay.selectDevice': '选择 DSH Host',
|
|
311
353
|
'relay.online': '在线',
|
|
312
354
|
'relay.offline': '离线',
|
|
@@ -372,8 +414,28 @@ const zh = {
|
|
|
372
414
|
'workspace.logoDescription': '在原生工作区会话行显示所选外部 Agent 的 Logo。',
|
|
373
415
|
'workspace.showArchivedSessions': '显示工作区归档会话',
|
|
374
416
|
'workspace.archivedSessionsDescription': '在每个工作区的“展开其余会话”按钮上方显示已归档的会话入口。',
|
|
417
|
+
'workspace.showWorkspaceHiding': '显示工作区隐藏功能',
|
|
418
|
+
'workspace.workspaceHidingDescription': '在工作区菜单中加入“隐藏工作区”,通过工作区筛选菜单显示隐藏的工作区并支持恢复。',
|
|
375
419
|
'workspace.showSubscriptionUsage': '显示订阅/用量检测',
|
|
376
420
|
'workspace.subscriptionUsageDescription': '在对话底部检测并显示 Agent 订阅余额和上游用量。',
|
|
421
|
+
'workspace.showQuickPhrases': '显示快捷会话',
|
|
422
|
+
'workspace.quickPhrasesDescription': '在 Codingns4DSH 内本地保存可复用的会话指令,并将快捷会话按钮显示在输入工具区。',
|
|
423
|
+
'workspace.quickPhrasesTitle': '快捷会话',
|
|
424
|
+
'workspace.quickPhrasesHint': '点击条目即可填入当前对话框。',
|
|
425
|
+
'workspace.quickPhrasesEmpty': '还没有快捷会话。',
|
|
426
|
+
'workspace.quickPhrasesPlaceholder': '输入可复用的会话指令',
|
|
427
|
+
'workspace.quickPhrasesAdd': '添加快捷会话',
|
|
428
|
+
'workspace.quickPhrasesCancel': '取消',
|
|
429
|
+
'workspace.quickPhrasesAddDialogLabel': '添加快捷会话',
|
|
430
|
+
'workspace.quickPhrasesDelete': '删除快捷会话',
|
|
431
|
+
'workspace.quickPhrasesMoveUp': '上移快捷会话',
|
|
432
|
+
'workspace.quickPhrasesMoveDown': '下移快捷会话',
|
|
433
|
+
'workspace.quickPhrasesDrag': '拖动以调整快捷会话顺序',
|
|
434
|
+
'workspace.quickPhrasesSaved': '快捷会话设置已保存',
|
|
435
|
+
'workspace.quickPhrasesSaveFailed': '快捷会话设置保存失败',
|
|
436
|
+
'workspace.quickPhrasesTrigger': '快捷会话',
|
|
437
|
+
'workspace.quickPhrasesDialogLabel': '选择快捷会话',
|
|
438
|
+
'workspace.quickPhrasesClose': '关闭快捷会话',
|
|
377
439
|
};
|
|
378
440
|
/** 在当前 Client Cordis 作用域注册中英文词典。 */
|
|
379
441
|
export function registerCodingNsLocale(ctx) {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 快捷短语按钮在 DSH 输入工具栏里的落位。
|
|
3
|
+
*
|
|
4
|
+
* DSH 原生结构是「添加附件按钮 → 权限/规划组 → conversation.input.left 槽位」,
|
|
5
|
+
* 槽位里的控件默认排在权限组件右边。这里不改 DOM 顺序,只给这些项各加一个 flex order:
|
|
6
|
+
* 三者仍共用宿主工具栏的 flex 行,既不互相覆盖,间距也由宿主 gap 统一决定。
|
|
7
|
+
*/
|
|
8
|
+
export declare const QUICK_PHRASE_TRIGGER_ORDER = 1;
|
|
9
|
+
export declare const QUICK_PHRASE_PERMISSION_ORDER = 2;
|
|
10
|
+
/** 快捷短语两侧保留的间距比例:只留宿主原生间距的一半,入口更紧凑。 */
|
|
11
|
+
export declare const QUICK_PHRASE_GAP_SCALE = 0.5;
|
|
12
|
+
/** 读不到宿主 gap 时按 DSH 当前的 12px 估算,留出一半间距。 */
|
|
13
|
+
export declare const QUICK_PHRASE_FALLBACK_MARGIN = -6;
|
|
14
|
+
/** 读取计算样式的入口;测试可注入替身。 */
|
|
15
|
+
export interface QuickPhraseLayoutEnvironment {
|
|
16
|
+
readonly computedStyle?: (element: Element) => {
|
|
17
|
+
readonly display: string;
|
|
18
|
+
readonly columnGap?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/** 重排结果:被排到快捷短语之后的工具栏项与还原函数。 */
|
|
22
|
+
export interface QuickPhraseOrderHandle {
|
|
23
|
+
/** 从添加附件按钮到快捷短语之间的工具栏项(DSH 中是权限/规划组);布局变化导致找不到时为空。 */
|
|
24
|
+
readonly reordered: readonly HTMLElement[];
|
|
25
|
+
/** 承载这些控件的工具栏行;DSH 结构变化时为 null。 */
|
|
26
|
+
readonly container: HTMLElement | null;
|
|
27
|
+
dispose(): void;
|
|
28
|
+
}
|
|
29
|
+
export interface QuickPhraseOrderRequest {
|
|
30
|
+
/** 插件自己的快捷短语根节点。 */
|
|
31
|
+
readonly trigger: HTMLElement;
|
|
32
|
+
/** DSH 的添加附件按钮,用来定位它之后的工具栏项。 */
|
|
33
|
+
readonly addButton: HTMLElement;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* 把快捷短语按钮排到添加附件按钮之后、权限设置组件之前。
|
|
37
|
+
* @param request - 快捷短语根节点与添加附件按钮。
|
|
38
|
+
* @param environment - 计算样式读取入口。
|
|
39
|
+
* @returns 被重排的工具栏项、工具栏行与还原函数。
|
|
40
|
+
*/
|
|
41
|
+
export declare function applyQuickPhraseOrder(request: QuickPhraseOrderRequest, environment?: QuickPhraseLayoutEnvironment): QuickPhraseOrderHandle;
|
|
42
|
+
/**
|
|
43
|
+
* 快捷短语两侧要用的负外边距:把宿主原生 gap 收窄到 {@link QUICK_PHRASE_GAP_SCALE}。
|
|
44
|
+
* @param container - 承载工具栏项的 flex 行。
|
|
45
|
+
* @param environment - 计算样式读取入口。
|
|
46
|
+
* @returns 左右外边距(px,负值)。
|
|
47
|
+
*/
|
|
48
|
+
export declare function readQuickPhraseMargin(container: Element | null, environment?: QuickPhraseLayoutEnvironment): number;
|
|
49
|
+
//# sourceMappingURL=quick-phrase-layout.d.ts.map
|