@jingyi0605/codingns4dsh 0.2.1-beta.8 → 0.2.1-beta.9
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 +3 -3
- package/README.md +7 -3
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.d.ts.map +1 -1
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.js +26 -1
- package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.js.map +1 -1
- package/data/build/dist/client/account-bar.d.ts.map +1 -1
- package/data/build/dist/client/account-bar.js +33 -21
- package/data/build/dist/client/account-bar.js.map +1 -1
- package/data/build/dist/client/avatar/desktop-bridge.js +1 -1
- package/data/build/dist/client/avatar/desktop-bridge.js.map +1 -1
- package/data/build/dist/client/avatar/desktop-view.d.ts +3 -1
- package/data/build/dist/client/avatar/desktop-view.d.ts.map +1 -1
- package/data/build/dist/client/avatar/desktop-view.js +31 -12
- package/data/build/dist/client/avatar/desktop-view.js.map +1 -1
- package/data/build/dist/client/avatar/notification-bubble.d.ts +7 -1
- package/data/build/dist/client/avatar/notification-bubble.d.ts.map +1 -1
- package/data/build/dist/client/avatar/notification-bubble.js +68 -33
- package/data/build/dist/client/avatar/notification-bubble.js.map +1 -1
- package/data/build/dist/client/bundle.js +1626 -303
- package/data/build/dist/client/bundle.js.map +1 -1
- package/data/build/dist/client/cli-slots.d.ts.map +1 -1
- package/data/build/dist/client/cli-slots.js +26 -2
- package/data/build/dist/client/cli-slots.js.map +1 -1
- package/data/build/dist/client/client.assistant-notifications.js.map +1 -1
- package/data/build/dist/client/client.delegate-command.js +6 -6
- package/data/build/dist/client/client.delegate-command.js.map +1 -1
- package/data/build/dist/client/client.native-workspace-store.js +39 -3
- package/data/build/dist/client/client.native-workspace-store.js.map +1 -1
- package/data/build/dist/client/client.session-translation.js +54 -0
- package/data/build/dist/client/client.session-translation.js.map +1 -0
- package/data/build/dist/client/client.transport.js +86 -2
- package/data/build/dist/client/client.transport.js.map +1 -1
- package/data/build/dist/client/desktop-assistant.js +217 -61
- package/data/build/dist/client/features/assistant-notification-store.d.ts +1 -1
- package/data/build/dist/client/features/assistant-notification-store.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-notification-store.js +1 -1
- package/data/build/dist/client/features/assistant-notification-store.js.map +1 -1
- package/data/build/dist/client/features/global-voice-assistant.d.ts.map +1 -1
- package/data/build/dist/client/features/global-voice-assistant.js +12 -6
- package/data/build/dist/client/features/global-voice-assistant.js.map +1 -1
- package/data/build/dist/client/features/index.d.ts +1 -0
- package/data/build/dist/client/features/index.d.ts.map +1 -1
- package/data/build/dist/client/features/index.js +3 -0
- package/data/build/dist/client/features/index.js.map +1 -1
- package/data/build/dist/client/features/peer-host.d.ts.map +1 -1
- package/data/build/dist/client/features/peer-host.js +99 -17
- package/data/build/dist/client/features/peer-host.js.map +1 -1
- package/data/build/dist/client/features/session-translation.d.ts +3 -0
- package/data/build/dist/client/features/session-translation.d.ts.map +1 -0
- package/data/build/dist/client/features/session-translation.js +116 -0
- package/data/build/dist/client/features/session-translation.js.map +1 -0
- package/data/build/dist/client/index.d.ts.map +1 -1
- package/data/build/dist/client/index.js +6 -1
- package/data/build/dist/client/index.js.map +1 -1
- package/data/build/dist/client/locales/panels.d.ts.map +1 -1
- package/data/build/dist/client/locales/panels.js +62 -0
- package/data/build/dist/client/locales/panels.js.map +1 -1
- package/data/build/dist/client/session-file-links.d.ts +11 -0
- package/data/build/dist/client/session-file-links.d.ts.map +1 -0
- package/data/build/dist/client/{peer-host-file-links.js → session-file-links.js} +13 -3
- package/data/build/dist/client/session-file-links.js.map +1 -0
- package/data/build/dist/client/session-translation-chat.d.ts +6 -0
- package/data/build/dist/client/session-translation-chat.d.ts.map +1 -0
- package/data/build/dist/client/session-translation-chat.js +686 -0
- package/data/build/dist/client/session-translation-chat.js.map +1 -0
- package/data/build/dist/client/workspace-session-visibility-dom.d.ts.map +1 -1
- package/data/build/dist/client/workspace-session-visibility-dom.js +23 -7
- package/data/build/dist/client/workspace-session-visibility-dom.js.map +1 -1
- package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.d.ts +1 -1
- package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.d.ts.map +1 -1
- package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.js +28 -2
- package/data/build/dist/dsh-capabilities/client/assistant-session-navigation-adapter.js.map +1 -1
- package/data/build/dist/host/cli-adapters/acp-cli-driver.d.ts +21 -0
- package/data/build/dist/host/cli-adapters/acp-cli-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/acp-cli-driver.js +100 -3
- package/data/build/dist/host/cli-adapters/acp-cli-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts +10 -1
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-driver.js +73 -14
- package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.d.ts +8 -1
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.js +45 -2
- package/data/build/dist/host/cli-adapters/command-code-acp-loader.js.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-driver.d.ts +8 -2
- package/data/build/dist/host/cli-adapters/command-code-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-driver.js +32 -3
- package/data/build/dist/host/cli-adapters/command-code-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-history.d.ts +27 -0
- package/data/build/dist/host/cli-adapters/command-code-history.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/command-code-history.js +131 -1
- package/data/build/dist/host/cli-adapters/command-code-history.js.map +1 -1
- package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.js +9 -9
- package/data/build/dist/host/cli-adapters/delegation-mention-rewrite.js.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts +11 -0
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js +79 -7
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/feature.js +286 -19
- package/data/build/dist/host/cli-adapters/feature.js.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/grok-driver.js +108 -47
- package/data/build/dist/host/cli-adapters/grok-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/legacy-session-settings.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/legacy-session-settings.js +7 -2
- package/data/build/dist/host/cli-adapters/legacy-session-settings.js.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts +4 -2
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-driver.js +78 -31
- package/data/build/dist/host/cli-adapters/opencode-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.d.ts +1 -1
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js +63 -6
- package/data/build/dist/host/cli-adapters/opencode-v2-protocol.js.map +1 -1
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts +5 -1
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/provider-subscription.js +90 -25
- package/data/build/dist/host/cli-adapters/provider-subscription.js.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/registry.js +22 -5
- package/data/build/dist/host/cli-adapters/registry.js.map +1 -1
- package/data/build/dist/host/cli-adapters/session-store.d.ts +1 -0
- package/data/build/dist/host/cli-adapters/session-store.d.ts.map +1 -1
- package/data/build/dist/host/cli-adapters/session-store.js +3 -0
- package/data/build/dist/host/cli-adapters/session-store.js.map +1 -1
- package/data/build/dist/host/cli-bridge/bridge-server.js +2 -2
- package/data/build/dist/host/cli-bridge/bridge-server.js.map +1 -1
- package/data/build/dist/host/cli-bridge/command-code-mod.js +21 -21
- package/data/build/dist/host/cli-bridge/command-code-mod.js.map +1 -1
- package/data/build/dist/host/cli-bridge/dispatch.js +19 -19
- package/data/build/dist/host/cli-bridge/dispatch.js.map +1 -1
- package/data/build/dist/host/cli-bridge/injections.d.ts +32 -0
- package/data/build/dist/host/cli-bridge/injections.d.ts.map +1 -1
- package/data/build/dist/host/cli-bridge/injections.js +137 -1
- package/data/build/dist/host/cli-bridge/injections.js.map +1 -1
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js +20 -20
- package/data/build/dist/host/cli-bridge/mcp-stdio-entry.js.map +1 -1
- package/data/build/dist/host/desktop-assistant/controller.d.ts +1 -0
- package/data/build/dist/host/desktop-assistant/controller.d.ts.map +1 -1
- package/data/build/dist/host/desktop-assistant/controller.js +21 -3
- package/data/build/dist/host/desktop-assistant/controller.js.map +1 -1
- package/data/build/dist/host/desktop-assistant/mac-agent.d.ts.map +1 -1
- package/data/build/dist/host/desktop-assistant/mac-agent.js +15 -3
- package/data/build/dist/host/desktop-assistant/mac-agent.js.map +1 -1
- package/data/build/dist/host/desktop-assistant/win-agent.d.ts.map +1 -1
- package/data/build/dist/host/desktop-assistant/win-agent.js +21 -3
- package/data/build/dist/host/desktop-assistant/win-agent.js.map +1 -1
- package/data/build/dist/host/features/assistant-notifications.d.ts.map +1 -1
- package/data/build/dist/host/features/assistant-notifications.js +12 -4
- package/data/build/dist/host/features/assistant-notifications.js.map +1 -1
- package/data/build/dist/host/features/index.d.ts +1 -0
- package/data/build/dist/host/features/index.d.ts.map +1 -1
- package/data/build/dist/host/features/index.js +3 -0
- package/data/build/dist/host/features/index.js.map +1 -1
- package/data/build/dist/host/features/peer-host.d.ts.map +1 -1
- package/data/build/dist/host/features/peer-host.js +11 -4
- package/data/build/dist/host/features/peer-host.js.map +1 -1
- package/data/build/dist/host/features/session-translation-service.d.ts +31 -0
- package/data/build/dist/host/features/session-translation-service.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation-service.js +451 -0
- package/data/build/dist/host/features/session-translation-service.js.map +1 -0
- package/data/build/dist/host/features/session-translation.d.ts +5 -0
- package/data/build/dist/host/features/session-translation.d.ts.map +1 -0
- package/data/build/dist/host/features/session-translation.js +37 -0
- package/data/build/dist/host/features/session-translation.js.map +1 -0
- package/data/build/dist/host/features/types.d.ts +3 -0
- package/data/build/dist/host/features/types.d.ts.map +1 -1
- package/data/build/dist/host/image-artifact-store.d.ts +21 -0
- package/data/build/dist/host/image-artifact-store.d.ts.map +1 -0
- package/data/build/dist/host/image-artifact-store.js +136 -0
- package/data/build/dist/host/image-artifact-store.js.map +1 -0
- package/data/build/dist/host/index.d.ts.map +1 -1
- package/data/build/dist/host/index.js +3 -0
- package/data/build/dist/host/index.js.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js +2 -0
- package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js.map +1 -1
- package/data/build/dist/host/native-session-bridge.d.ts +16 -1
- package/data/build/dist/host/native-session-bridge.d.ts.map +1 -1
- package/data/build/dist/host/native-session-bridge.js +47 -0
- package/data/build/dist/host/native-session-bridge.js.map +1 -1
- package/data/build/dist/host/rpc.js +3 -3
- package/data/build/dist/host/rpc.js.map +1 -1
- package/data/build/dist/host/session-changes.d.ts.map +1 -1
- package/data/build/dist/host/session-changes.js +196 -13
- package/data/build/dist/host/session-changes.js.map +1 -1
- package/data/build/dist/host/settings.d.ts.map +1 -1
- package/data/build/dist/host/settings.js +8 -0
- package/data/build/dist/host/settings.js.map +1 -1
- package/data/build/dist/shared/assistant-notifications.d.ts +2 -2
- package/data/build/dist/shared/assistant-notifications.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/cli-adapter.d.ts +25 -2
- package/data/build/dist/shared/contracts/cli-adapter.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/config.d.ts +6 -0
- package/data/build/dist/shared/contracts/config.d.ts.map +1 -1
- package/data/build/dist/shared/contracts/config.js +3 -0
- package/data/build/dist/shared/contracts/config.js.map +1 -1
- package/data/build/dist/shared/contracts/session-translation.d.ts +58 -0
- package/data/build/dist/shared/contracts/session-translation.d.ts.map +1 -0
- package/data/build/dist/shared/contracts/session-translation.js +23 -0
- package/data/build/dist/shared/contracts/session-translation.js.map +1 -0
- package/data/build/dist/shared/contracts/version.d.ts +1 -1
- package/data/build/dist/shared/contracts/version.js +1 -1
- package/data/build/dist/shared/delegation-carrier.js +6 -6
- package/data/build/dist/shared/delegation-carrier.js.map +1 -1
- package/data/build/dist/shared/desktop-assistant.d.ts +10 -4
- package/data/build/dist/shared/desktop-assistant.d.ts.map +1 -1
- package/data/build/dist/shared/desktop-assistant.js +28 -8
- package/data/build/dist/shared/desktop-assistant.js.map +1 -1
- package/data/build/dist/shared/index.d.ts +2 -1
- package/data/build/dist/shared/index.d.ts.map +1 -1
- package/data/build/dist/shared/index.js +2 -1
- package/data/build/dist/shared/index.js.map +1 -1
- package/package.json +2 -2
- package/profile/README.md +2 -2
- package/profile/package.json +2 -2
- package/profile/version.json +1 -1
- package/version.json +1 -1
- package/data/build/dist/client/peer-host-file-links.d.ts +0 -8
- package/data/build/dist/client/peer-host-file-links.d.ts.map +0 -1
- package/data/build/dist/client/peer-host-file-links.js.map +0 -1
|
@@ -7705,11 +7705,16 @@
|
|
|
7705
7705
|
//#region src/shared/desktop-assistant.ts
|
|
7706
7706
|
function desktopAssistantHasNotifications(frame) {
|
|
7707
7707
|
const snapshot = frame.notificationSnapshot;
|
|
7708
|
-
return snapshot === void 0 ? frame.notification !== void 0 : snapshot
|
|
7708
|
+
return snapshot === void 0 ? frame.notification !== void 0 : assistantNotificationSnapshotHasNotifications(snapshot);
|
|
7709
|
+
}
|
|
7710
|
+
/** 空快照只代表通知中心已经返回结果,不应被当成需要挂载气泡的通知。 */
|
|
7711
|
+
function assistantNotificationSnapshotHasNotifications(snapshot) {
|
|
7712
|
+
return snapshot.primary !== null || snapshot.unreadCount > 0 || snapshot.pendingCount > 0 || snapshot.capabilities.some((entry) => Boolean(entry.reason) && (!entry.completed || !entry.error || !entry.requests || !entry.resolve || !entry.navigation));
|
|
7709
7713
|
}
|
|
7710
7714
|
/** 没有可直接展示记录时缩成入口;收起后的未读记录仍保留在列表与计数中。 */
|
|
7711
|
-
function desktopAssistantNotificationHeight(frame, expanded = false, error = false) {
|
|
7715
|
+
function desktopAssistantNotificationHeight(frame, expanded = false, error = false, collapsed = false) {
|
|
7712
7716
|
if (!desktopAssistantHasNotifications(frame)) return 0;
|
|
7717
|
+
if (collapsed) return 48;
|
|
7713
7718
|
const snapshot = frame.notificationSnapshot;
|
|
7714
7719
|
const directNotice = snapshot?.primary !== null && snapshot?.primary !== void 0 && snapshot.primary.presentation !== "collapsed" || snapshot?.items.some((item) => item.presentation !== "collapsed" && (!item.read || (item.kind === "question" || item.kind === "approval") && item.lifecycle === "active")) === true;
|
|
7715
7720
|
if (!snapshot || directNotice || expanded || error || snapshot.capabilities.some((entry) => Boolean(entry.reason) && (!entry.completed || !entry.error || !entry.requests || !entry.resolve || !entry.navigation))) return 276;
|
|
@@ -7742,14 +7747,16 @@
|
|
|
7742
7747
|
const availableTop = Math.max(0, y - area.y), availableBottom = Math.max(0, area.y + area.height - y - avatarHeight);
|
|
7743
7748
|
const noticeAbove = availableTop >= availableBottom;
|
|
7744
7749
|
const captionAbove = notification ? !noticeAbove : noticeAbove;
|
|
7745
|
-
const noticeClearance = notification ? Math.max(0, 26) : 0;
|
|
7746
|
-
let
|
|
7750
|
+
const noticeClearance = notification && noticeLimit > 48 ? Math.max(0, 26) : 0;
|
|
7751
|
+
let noticeAvailable = notification ? Math.min(276, Math.max(0, (noticeAbove ? availableTop : availableBottom) - 4 - noticeClearance)) : 0;
|
|
7752
|
+
let noticeHeight = notification ? Math.min(noticeLimit, noticeAvailable) : 0;
|
|
7747
7753
|
let captionHeight = caption ? Math.min(128, Math.max(0, (captionAbove ? availableTop : availableBottom) - 4)) : 0;
|
|
7748
7754
|
const stacked = notification && caption && captionHeight < 40 && Math.max(availableTop, availableBottom) >= 88;
|
|
7749
7755
|
if (stacked) {
|
|
7750
7756
|
const space = noticeAbove ? availableTop : availableBottom;
|
|
7751
7757
|
captionHeight = Math.min(128, Math.max(40, Math.floor((space - 8) / 3)));
|
|
7752
|
-
|
|
7758
|
+
noticeAvailable = Math.min(276, Math.max(0, space - captionHeight - 8 - noticeClearance));
|
|
7759
|
+
noticeHeight = Math.min(noticeLimit, noticeAvailable);
|
|
7753
7760
|
}
|
|
7754
7761
|
const noticeBlock = noticeHeight + noticeClearance;
|
|
7755
7762
|
const combinedHeight = noticeBlock + captionHeight + 4;
|
|
@@ -7789,7 +7796,10 @@
|
|
|
7789
7796
|
return {
|
|
7790
7797
|
bounds,
|
|
7791
7798
|
avatar,
|
|
7792
|
-
...notification && noticeHeight > 0 ? { notification:
|
|
7799
|
+
...notification && noticeHeight > 0 ? { notification: {
|
|
7800
|
+
...noticeRegion,
|
|
7801
|
+
limit: noticeAvailable
|
|
7802
|
+
} } : {},
|
|
7793
7803
|
...caption && captionHeight > 0 ? { caption: captionRegion } : {}
|
|
7794
7804
|
};
|
|
7795
7805
|
}
|
|
@@ -8979,11 +8989,53 @@
|
|
|
8979
8989
|
"cli.thinkingLevelTitle": "Thinking level ({model})",
|
|
8980
8990
|
"cli.adapterEnabled": "{name} enabled",
|
|
8981
8991
|
"cli.adapterDisabled": "{name} disabled",
|
|
8992
|
+
"cli.translationConversation": "Translate conversation",
|
|
8993
|
+
"cli.translationConversationToggle": "Toggle conversation translation",
|
|
8982
8994
|
"lan.fieldListenPort": "listen port",
|
|
8983
8995
|
"lan.fieldDshPort": "DSH local port",
|
|
8984
8996
|
"lan.fieldMustBeNumber": "{field} must be a number",
|
|
8985
8997
|
"lan.fieldMustBeInteger": "{field} must be an integer from {minimum} to 65535",
|
|
8986
|
-
"workspace.sessionSettingsSaved": "Workspace session settings saved"
|
|
8998
|
+
"workspace.sessionSettingsSaved": "Workspace session settings saved",
|
|
8999
|
+
"feature.sessionTranslation.label": "Session translation",
|
|
9000
|
+
"feature.sessionTranslation.description": "Translate selected external Agent requests and replies while keeping tools, commands, paths, and original history unchanged.",
|
|
9001
|
+
"translation.inputTitle": "Translate requests before sending",
|
|
9002
|
+
"translation.inputLanguage": "Request language",
|
|
9003
|
+
"translation.outputTitle": "Translate visible replies",
|
|
9004
|
+
"translation.outputLanguage": "Reply language",
|
|
9005
|
+
"translation.modelTitle": "Translation model",
|
|
9006
|
+
"translation.modelFollowDefault": "Use the default DSH model",
|
|
9007
|
+
"translation.modelUnavailable": "Saved model is unavailable",
|
|
9008
|
+
"translation.modelLoading": "Loading available DSH models…",
|
|
9009
|
+
"translation.modelEmpty": "No DSH text models are available.",
|
|
9010
|
+
"translation.modelHelp": "DeepSeek official and configured third-party models are available here. Translation requests always disable thinking.",
|
|
9011
|
+
"translation.detailsTitle": "Translation details",
|
|
9012
|
+
"translation.viewDetails": "View translation details",
|
|
9013
|
+
"translation.statusTranslated": "Translated",
|
|
9014
|
+
"translation.statusFailed": "Translation failed; original kept",
|
|
9015
|
+
"translation.statusNotNeeded": "Already in the target language; translation skipped",
|
|
9016
|
+
"translation.detectedLanguage": "Detected language",
|
|
9017
|
+
"translation.modelNotUsed": "Not used; translation was unnecessary",
|
|
9018
|
+
"translation.originalText": "Original text",
|
|
9019
|
+
"translation.translatedText": "Translated / sent text",
|
|
9020
|
+
"translation.modelUsed": "Model used",
|
|
9021
|
+
"translation.modelUnknown": "Model information unavailable",
|
|
9022
|
+
"translation.modelOfficial": "DeepSeek official",
|
|
9023
|
+
"translation.modelThirdParty": "Third-party",
|
|
9024
|
+
"translation.saveRejected": "The translation settings could not be saved.",
|
|
9025
|
+
"translation.saved": "Translation settings saved",
|
|
9026
|
+
"translation.language.zh": "简体中文",
|
|
9027
|
+
"translation.language.en": "English",
|
|
9028
|
+
"translation.language.fr": "Français",
|
|
9029
|
+
"translation.language.de": "Deutsch",
|
|
9030
|
+
"translation.language.ja": "日本語",
|
|
9031
|
+
"translation.adapter.claude": "Claude Code",
|
|
9032
|
+
"translation.adapter.codex": "Codex",
|
|
9033
|
+
"translation.adapter.pi": "Pi",
|
|
9034
|
+
"translation.adapter.opencode": "OpenCode",
|
|
9035
|
+
"translation.adapter.antigravity": "Antigravity",
|
|
9036
|
+
"translation.adapter.grok": "Grok",
|
|
9037
|
+
"translation.adapter.cursor": "Cursor",
|
|
9038
|
+
"translation.adapter.kiro": "Kiro"
|
|
8987
9039
|
};
|
|
8988
9040
|
const zh$9 = {
|
|
8989
9041
|
"common.listSeparator": "、",
|
|
@@ -8992,11 +9044,53 @@
|
|
|
8992
9044
|
"cli.thinkingLevelTitle": "思考等级({model})",
|
|
8993
9045
|
"cli.adapterEnabled": "已启用 {name}",
|
|
8994
9046
|
"cli.adapterDisabled": "已停用 {name}",
|
|
9047
|
+
"cli.translationConversation": "翻译对话",
|
|
9048
|
+
"cli.translationConversationToggle": "切换对话翻译",
|
|
8995
9049
|
"lan.fieldListenPort": "监听端口",
|
|
8996
9050
|
"lan.fieldDshPort": "DSH 本地端口",
|
|
8997
9051
|
"lan.fieldMustBeNumber": "{field} 必须是数字",
|
|
8998
9052
|
"lan.fieldMustBeInteger": "{field} 必须是 {minimum} 到 65535 的整数",
|
|
8999
|
-
"workspace.sessionSettingsSaved": "工作区会话设置已保存"
|
|
9053
|
+
"workspace.sessionSettingsSaved": "工作区会话设置已保存",
|
|
9054
|
+
"feature.sessionTranslation.label": "会话翻译",
|
|
9055
|
+
"feature.sessionTranslation.description": "为选定的外部 Agent 翻译请求和回复,同时保留工具、命令、路径与原始历史。",
|
|
9056
|
+
"translation.inputTitle": "发送前翻译请求",
|
|
9057
|
+
"translation.inputLanguage": "请求目标语言",
|
|
9058
|
+
"translation.outputTitle": "翻译界面回复",
|
|
9059
|
+
"translation.outputLanguage": "回复语言",
|
|
9060
|
+
"translation.modelTitle": "翻译模型",
|
|
9061
|
+
"translation.modelFollowDefault": "跟随 DSH 默认模型",
|
|
9062
|
+
"translation.modelUnavailable": "已保存的模型当前不可用",
|
|
9063
|
+
"translation.modelLoading": "正在加载可用的 DSH 模型…",
|
|
9064
|
+
"translation.modelEmpty": "当前没有可用的 DSH 文本模型。",
|
|
9065
|
+
"translation.modelHelp": "这里可以选择 DeepSeek 官方模型或已配置的第三方模型;翻译请求始终关闭思考。",
|
|
9066
|
+
"translation.detailsTitle": "翻译详情",
|
|
9067
|
+
"translation.viewDetails": "查看翻译详情",
|
|
9068
|
+
"translation.statusTranslated": "已翻译",
|
|
9069
|
+
"translation.statusFailed": "翻译失败,已保留原文",
|
|
9070
|
+
"translation.statusNotNeeded": "原文已是目标语言,无需翻译",
|
|
9071
|
+
"translation.detectedLanguage": "检测到的语言",
|
|
9072
|
+
"translation.modelNotUsed": "未调用,原文无需翻译",
|
|
9073
|
+
"translation.originalText": "原文",
|
|
9074
|
+
"translation.translatedText": "译文 / 实际发送文本",
|
|
9075
|
+
"translation.modelUsed": "实际翻译模型",
|
|
9076
|
+
"translation.modelUnknown": "暂无模型信息",
|
|
9077
|
+
"translation.modelOfficial": "DeepSeek 官方",
|
|
9078
|
+
"translation.modelThirdParty": "第三方",
|
|
9079
|
+
"translation.saveRejected": "会话翻译设置未能保存。",
|
|
9080
|
+
"translation.saved": "会话翻译设置已保存",
|
|
9081
|
+
"translation.language.zh": "简体中文",
|
|
9082
|
+
"translation.language.en": "英语",
|
|
9083
|
+
"translation.language.fr": "法语",
|
|
9084
|
+
"translation.language.de": "德语",
|
|
9085
|
+
"translation.language.ja": "日语",
|
|
9086
|
+
"translation.adapter.claude": "Claude Code",
|
|
9087
|
+
"translation.adapter.codex": "Codex",
|
|
9088
|
+
"translation.adapter.pi": "Pi",
|
|
9089
|
+
"translation.adapter.opencode": "OpenCode",
|
|
9090
|
+
"translation.adapter.antigravity": "Antigravity",
|
|
9091
|
+
"translation.adapter.grok": "Grok",
|
|
9092
|
+
"translation.adapter.cursor": "Cursor",
|
|
9093
|
+
"translation.adapter.kiro": "Kiro"
|
|
9000
9094
|
};
|
|
9001
9095
|
//#endregion
|
|
9002
9096
|
//#region src/client/locales/peerHost.ts
|
|
@@ -68502,16 +68596,17 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
68502
68596
|
function isPendingNotice(notice) {
|
|
68503
68597
|
return (notice.kind === "question" || notice.kind === "approval") && notice.lifecycle === "active";
|
|
68504
68598
|
}
|
|
68505
|
-
function AssistantNotificationBubble({ frame, t, error, onOpen, onDismiss, onPresented, autoClose = false, autoCloseSeconds = 30, onExpandedChange, onClearAll, tailSide = "bottom", tailTarget, tailStyle }) {
|
|
68599
|
+
function AssistantNotificationBubble({ frame, t, error, onOpen, onDismiss, onAutoClose, onPresented, autoClose = false, autoCloseSeconds = 30, onExpandedChange, onCollapsedChange, onClearAll, onSizeChange, tailSide = "bottom", tailTarget, tailStyle }) {
|
|
68506
68600
|
const [expanded, setExpanded] = (0, import_react.useState)(false);
|
|
68507
68601
|
const [collapsed, setCollapsed] = (0, import_react.useState)(false);
|
|
68508
68602
|
const [listFilter, setListFilter] = (0, import_react.useState)("all");
|
|
68509
68603
|
const [processing, setProcessing] = (0, import_react.useState)(false);
|
|
68510
68604
|
const bubble = (0, import_react.useRef)(null);
|
|
68605
|
+
const shellBox = (0, import_react.useRef)(null);
|
|
68511
68606
|
const autoCloseTimer = (0, import_react.useRef)(void 0);
|
|
68512
68607
|
const snapshot = "items" in frame ? frame : void 0;
|
|
68513
68608
|
const primary = snapshot === void 0 ? frame : snapshot.primary;
|
|
68514
|
-
const items = snapshot
|
|
68609
|
+
const items = snapshot === void 0 ? [] : [...snapshot.primary !== null && !snapshot.items.some((notice) => notice.noticeId === snapshot.primary.noticeId) ? [snapshot.primary] : [], ...snapshot.items];
|
|
68515
68610
|
const attentionItems = snapshot === void 0 ? primary === void 0 || primary === null ? [] : [primary] : [...snapshot.primary === null || snapshot.primary.presentation === "collapsed" ? [] : [snapshot.primary], ...items.filter((notice) => notice.presentation !== "collapsed" && (!notice.read || isPendingNotice(notice)) && notice.noticeId !== snapshot.primary?.noticeId)];
|
|
68516
68611
|
const multiple = attentionItems.length > 1 || snapshot !== void 0 && Math.max(snapshot.unreadCount, snapshot.pendingCount) > 1;
|
|
68517
68612
|
const mainNotice = attentionItems[0] ?? (snapshot === void 0 ? primary ?? void 0 : void 0);
|
|
@@ -68526,6 +68621,13 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
68526
68621
|
(0, import_react.useEffect)(() => {
|
|
68527
68622
|
setListFilter("all");
|
|
68528
68623
|
}, [frame.generation, snapshot?.reset]);
|
|
68624
|
+
(0, import_react.useEffect)(() => {
|
|
68625
|
+
const node = shellBox.current;
|
|
68626
|
+
if (onSizeChange === void 0 || node === null || typeof ResizeObserver === "undefined") return;
|
|
68627
|
+
const observer = new ResizeObserver(() => onSizeChange(Math.ceil(node.getBoundingClientRect().height)));
|
|
68628
|
+
observer.observe(node);
|
|
68629
|
+
return () => observer.disconnect();
|
|
68630
|
+
}, [onSizeChange]);
|
|
68529
68631
|
(0, import_react.useEffect)(() => {
|
|
68530
68632
|
if (presented === void 0 || presented === null) return;
|
|
68531
68633
|
const node = bubble.current;
|
|
@@ -68537,7 +68639,8 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
68537
68639
|
const connectionGeneration = "connectionGeneration" in presented ? presented.connectionGeneration : void 0;
|
|
68538
68640
|
autoCloseTimer.current = setTimeout(() => {
|
|
68539
68641
|
autoCloseTimer.current = void 0;
|
|
68540
|
-
|
|
68642
|
+
if (onAutoClose !== void 0) onAutoClose(presented.noticeId, frame.generation, connectionGeneration);
|
|
68643
|
+
else onDismiss(presented.noticeId, frame.generation, connectionGeneration);
|
|
68541
68644
|
}, autoCloseSeconds * 1e3);
|
|
68542
68645
|
};
|
|
68543
68646
|
const confirm = () => {
|
|
@@ -68578,7 +68681,8 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
68578
68681
|
autoClose,
|
|
68579
68682
|
autoCloseSeconds,
|
|
68580
68683
|
onPresented,
|
|
68581
|
-
onDismiss
|
|
68684
|
+
onDismiss,
|
|
68685
|
+
onAutoClose
|
|
68582
68686
|
]);
|
|
68583
68687
|
const clearableCount = snapshot === void 0 ? 0 : [...snapshot.items, ...snapshot.primary === null ? [] : [snapshot.primary]].filter((notice) => !notice.read && !isPendingNotice(notice)).length;
|
|
68584
68688
|
const showClearAll = snapshot !== void 0 && clearableCount > 0 && onClearAll !== void 0;
|
|
@@ -68587,7 +68691,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
68587
68691
|
const showExpandButton = collapsed && (mainNotice !== void 0 || hasNotificationCounts);
|
|
68588
68692
|
const showTopRow = showCollapseButton || showExpandButton || showClearAll || hasNotificationCounts;
|
|
68589
68693
|
const showBubble = !collapsed && (!expanded || snapshot === void 0) && mainNotice !== void 0;
|
|
68590
|
-
const showFilterTags = snapshot !== void 0 && (multiple ||
|
|
68694
|
+
const showFilterTags = snapshot !== void 0 && hasNotificationCounts && (multiple || items.length > 1);
|
|
68591
68695
|
const listItems = listFilter === "unread" ? items.filter((notice) => !notice.read && !isPendingNotice(notice)) : listFilter === "pending" ? items.filter((notice) => isPendingNotice(notice)) : items;
|
|
68592
68696
|
const tail = tailSide !== "top" && (showBubble || expanded && snapshot !== void 0) ? (0, import_react.createElement)("span", {
|
|
68593
68697
|
"aria-hidden": true,
|
|
@@ -68604,10 +68708,11 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
68604
68708
|
style: tailSvg(tailSide)
|
|
68605
68709
|
}, (0, import_react.createElement)("path", {
|
|
68606
68710
|
d: `${notificationTailCurve} Z`,
|
|
68607
|
-
fill:
|
|
68711
|
+
fill: notificationTheme.surface
|
|
68608
68712
|
}))) : null;
|
|
68609
68713
|
const toggleFilter = (filter) => {
|
|
68610
68714
|
setCollapsed(false);
|
|
68715
|
+
onCollapsedChange?.(false);
|
|
68611
68716
|
setListFilter(listFilter === filter ? "all" : filter);
|
|
68612
68717
|
setExpanded(true);
|
|
68613
68718
|
};
|
|
@@ -68670,6 +68775,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
68670
68775
|
style: panel
|
|
68671
68776
|
}, capability.reason)) ?? [];
|
|
68672
68777
|
return (0, import_react.createElement)("div", {
|
|
68778
|
+
ref: shellBox,
|
|
68673
68779
|
"data-codingns-assistant-notifications": true,
|
|
68674
68780
|
style: shell,
|
|
68675
68781
|
onPointerDown: (event) => event.stopPropagation(),
|
|
@@ -68684,8 +68790,10 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
68684
68790
|
"aria-label": t(collapsed ? "awb.notifications.expand" : "awb.notifications.collapse"),
|
|
68685
68791
|
title: t(collapsed ? "awb.notifications.expand" : "awb.notifications.collapse"),
|
|
68686
68792
|
onClick: () => {
|
|
68687
|
-
|
|
68688
|
-
setCollapsed(
|
|
68793
|
+
const nextCollapsed = !collapsed;
|
|
68794
|
+
setCollapsed(nextCollapsed);
|
|
68795
|
+
setExpanded(!nextCollapsed);
|
|
68796
|
+
onCollapsedChange?.(nextCollapsed);
|
|
68689
68797
|
}
|
|
68690
68798
|
}, notificationToolbarIcon(collapsed ? "expand" : "collapse")) : null, !collapsed && showClearAll ? (0, import_react.createElement)("button", {
|
|
68691
68799
|
type: "button",
|
|
@@ -68793,67 +68901,88 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
68793
68901
|
if (notice.kind === "question") return t("awb.notifications.question");
|
|
68794
68902
|
return t("awb.notifications.approval");
|
|
68795
68903
|
}
|
|
68904
|
+
/** 独立伴随页没有 DSH 主题变量,回退色固定为夜间灰;宿主页面仍可通过变量覆盖。 */
|
|
68905
|
+
const notificationTheme = {
|
|
68906
|
+
labelPrimary: "var(--dsw-alias-label-primary, #f1f2f4)",
|
|
68907
|
+
labelSecondary: "var(--dsw-alias-label-secondary, #b7bac1)",
|
|
68908
|
+
border: "var(--dsw-alias-border-l2, #5b5e66)",
|
|
68909
|
+
surface: "var(--dsw-alias-bg-layer-3, #303237)",
|
|
68910
|
+
card: "var(--dsw-alias-bg-layer-1, #3b3d43)",
|
|
68911
|
+
button: "var(--dsw-alias-button-elevated-fill, #44474e)",
|
|
68912
|
+
shadow: "var(--dsw-elevation-prominent, 0 12px 36px rgba(0, 0, 0, 0.42))"
|
|
68913
|
+
};
|
|
68796
68914
|
const button = {
|
|
68797
68915
|
...dshSettingsButtonStyle,
|
|
68798
68916
|
minHeight: 36,
|
|
68799
68917
|
touchAction: "manipulation",
|
|
68800
68918
|
whiteSpace: "normal",
|
|
68801
68919
|
borderRadius: 999,
|
|
68802
|
-
fontWeight: 650
|
|
68920
|
+
fontWeight: 650,
|
|
68921
|
+
color: notificationTheme.labelPrimary,
|
|
68922
|
+
background: notificationTheme.button,
|
|
68923
|
+
borderColor: notificationTheme.border
|
|
68803
68924
|
};
|
|
68925
|
+
/** 外壳按实际内容收缩,避免原生为形象预留的高度变成大片不透明背景。 */
|
|
68804
68926
|
const shell = {
|
|
68805
68927
|
position: "relative",
|
|
68806
68928
|
isolation: "isolate",
|
|
68807
68929
|
width: "100%",
|
|
68808
68930
|
maxWidth: 320,
|
|
68809
|
-
height: "
|
|
68931
|
+
height: "auto",
|
|
68810
68932
|
maxHeight: "var(--codingns-notification-max-height, min(276px, calc(100vh - 24px)))",
|
|
68811
68933
|
minHeight: 0,
|
|
68812
68934
|
display: "flex",
|
|
68813
68935
|
flexDirection: "column",
|
|
68814
68936
|
gap: 6,
|
|
68937
|
+
padding: 10,
|
|
68938
|
+
boxSizing: "border-box",
|
|
68815
68939
|
pointerEvents: "auto",
|
|
68816
|
-
color:
|
|
68817
|
-
fontSize: uiFontSize(13)
|
|
68940
|
+
color: notificationTheme.labelPrimary,
|
|
68941
|
+
fontSize: uiFontSize(13),
|
|
68942
|
+
background: notificationTheme.surface,
|
|
68943
|
+
border: `1px solid ${notificationTheme.border}`,
|
|
68944
|
+
borderRadius: "24px 24px 24px 8px",
|
|
68945
|
+
boxShadow: notificationTheme.shadow
|
|
68818
68946
|
};
|
|
68819
68947
|
const panel = {
|
|
68820
68948
|
position: "relative",
|
|
68821
68949
|
zIndex: 1,
|
|
68822
68950
|
padding: 10,
|
|
68823
|
-
background:
|
|
68824
|
-
border: `1px solid ${
|
|
68951
|
+
background: notificationTheme.surface,
|
|
68952
|
+
border: `1px solid ${notificationTheme.border}`,
|
|
68825
68953
|
borderRadius: 18,
|
|
68826
|
-
boxShadow:
|
|
68954
|
+
boxShadow: notificationTheme.shadow,
|
|
68827
68955
|
minWidth: 0,
|
|
68828
68956
|
boxSizing: "border-box",
|
|
68829
|
-
maxHeight: "min(276px, calc(100vh - 24px))",
|
|
68957
|
+
maxHeight: "var(--codingns-notification-max-height, min(276px, calc(100vh - 24px)))",
|
|
68830
68958
|
overflowY: "auto"
|
|
68831
68959
|
};
|
|
68832
68960
|
const bubblePanel = {
|
|
68833
|
-
...panel,
|
|
68834
68961
|
position: "relative",
|
|
68835
68962
|
display: "flex",
|
|
68836
68963
|
flexDirection: "column",
|
|
68837
|
-
flex: "
|
|
68964
|
+
flex: "0 1 auto",
|
|
68838
68965
|
minWidth: 0,
|
|
68839
68966
|
minHeight: 0,
|
|
68840
|
-
padding:
|
|
68967
|
+
padding: 0,
|
|
68841
68968
|
overflow: "visible",
|
|
68842
68969
|
border: "none",
|
|
68843
|
-
borderRadius:
|
|
68844
|
-
maxHeight: "100%",
|
|
68845
|
-
background: dshThemeColor.menuBackground,
|
|
68846
|
-
borderColor: "transparent",
|
|
68970
|
+
borderRadius: 0,
|
|
68847
68971
|
boxShadow: "none",
|
|
68972
|
+
maxHeight: "var(--codingns-notification-max-height, min(276px, calc(100vh - 24px)))",
|
|
68973
|
+
background: "transparent",
|
|
68848
68974
|
outline: "none"
|
|
68849
68975
|
};
|
|
68850
68976
|
const bubbleContent = {
|
|
68851
68977
|
position: "relative",
|
|
68852
68978
|
zIndex: 1,
|
|
68853
68979
|
display: "grid",
|
|
68980
|
+
gridAutoRows: "max-content",
|
|
68981
|
+
alignContent: "start",
|
|
68854
68982
|
gap: 8,
|
|
68855
68983
|
minHeight: 0,
|
|
68856
|
-
flex: "
|
|
68984
|
+
flex: "0 1 auto",
|
|
68985
|
+
maxHeight: "var(--codingns-notification-max-height, min(276px, calc(100vh - 24px)))",
|
|
68857
68986
|
overflowY: "auto",
|
|
68858
68987
|
overscrollBehavior: "contain",
|
|
68859
68988
|
boxSizing: "border-box",
|
|
@@ -68920,7 +69049,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
68920
69049
|
transform: `translate(-50%, -50%) rotate(${side === "left" ? 90 : -90}deg)`
|
|
68921
69050
|
};
|
|
68922
69051
|
}
|
|
68923
|
-
const notificationBubbleCss = "[data-codingns-notification-scroll]{scrollbar-width:none;-ms-overflow-style:none}[data-codingns-notification-scroll]::-webkit-scrollbar{display:none;width:0;height:0}[data-codingns-notification-filter], [data-codingns-notification-filter]:focus, [data-codingns-notification-filter]:focus-visible{border:1px solid var(--dsw-alias-border-l2,#
|
|
69052
|
+
const notificationBubbleCss = "[data-codingns-notification-scroll]{scrollbar-width:none;-ms-overflow-style:none}[data-codingns-notification-scroll]::-webkit-scrollbar{display:none;width:0;height:0}[data-codingns-notification-filter], [data-codingns-notification-filter]:focus, [data-codingns-notification-filter]:focus-visible{border:1px solid var(--dsw-alias-border-l2,#5b5e66)!important;outline:none!important;box-shadow:none!important}";
|
|
68924
69053
|
const primaryCard = {
|
|
68925
69054
|
display: "grid",
|
|
68926
69055
|
gridTemplateColumns: "minmax(0, 1fr) auto",
|
|
@@ -68936,10 +69065,10 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
68936
69065
|
gap: 7,
|
|
68937
69066
|
padding: "10px 11px",
|
|
68938
69067
|
minWidth: 0,
|
|
68939
|
-
background:
|
|
68940
|
-
border: `1px solid ${
|
|
69068
|
+
background: notificationTheme.card,
|
|
69069
|
+
border: `1px solid ${notificationTheme.border}`,
|
|
68941
69070
|
borderRadius: 15,
|
|
68942
|
-
boxShadow:
|
|
69071
|
+
boxShadow: "0 1px 2px rgba(0, 0, 0, 0.24)"
|
|
68943
69072
|
};
|
|
68944
69073
|
const cardBody = {
|
|
68945
69074
|
display: "grid",
|
|
@@ -68954,7 +69083,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
68954
69083
|
minWidth: 0
|
|
68955
69084
|
};
|
|
68956
69085
|
const cardMeta = {
|
|
68957
|
-
color:
|
|
69086
|
+
color: notificationTheme.labelSecondary,
|
|
68958
69087
|
fontSize: uiFontSize(11),
|
|
68959
69088
|
lineHeight: 1.3,
|
|
68960
69089
|
overflowWrap: "anywhere"
|
|
@@ -68972,13 +69101,13 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
68972
69101
|
width: 24,
|
|
68973
69102
|
height: 24,
|
|
68974
69103
|
borderRadius: "50%",
|
|
68975
|
-
color:
|
|
69104
|
+
color: "#fff",
|
|
68976
69105
|
fontSize: uiFontSize(13),
|
|
68977
69106
|
fontWeight: 800,
|
|
68978
|
-
boxShadow:
|
|
69107
|
+
boxShadow: "0 1px 2px rgba(0, 0, 0, 0.28)"
|
|
68979
69108
|
};
|
|
68980
69109
|
const messageText = {
|
|
68981
|
-
color:
|
|
69110
|
+
color: notificationTheme.labelPrimary,
|
|
68982
69111
|
whiteSpace: "pre-wrap",
|
|
68983
69112
|
overflowWrap: "anywhere",
|
|
68984
69113
|
lineHeight: 1.5,
|
|
@@ -69009,8 +69138,8 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
69009
69138
|
gap: 4,
|
|
69010
69139
|
minWidth: 46,
|
|
69011
69140
|
padding: "2px 7px",
|
|
69012
|
-
background:
|
|
69013
|
-
boxShadow:
|
|
69141
|
+
background: notificationTheme.button,
|
|
69142
|
+
boxShadow: "0 1px 2px rgba(0, 0, 0, 0.24)"
|
|
69014
69143
|
};
|
|
69015
69144
|
const filterButtonActive = {
|
|
69016
69145
|
...filterButton,
|
|
@@ -69026,8 +69155,8 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
69026
69155
|
padding: "0 4px",
|
|
69027
69156
|
boxSizing: "border-box",
|
|
69028
69157
|
borderRadius: 8,
|
|
69029
|
-
color:
|
|
69030
|
-
background:
|
|
69158
|
+
color: notificationTheme.labelPrimary,
|
|
69159
|
+
background: notificationTheme.card,
|
|
69031
69160
|
fontSize: uiFontSize(10),
|
|
69032
69161
|
lineHeight: 1,
|
|
69033
69162
|
fontWeight: 750
|
|
@@ -69039,18 +69168,19 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
69039
69168
|
};
|
|
69040
69169
|
const topRow = {
|
|
69041
69170
|
display: "flex",
|
|
69171
|
+
width: "100%",
|
|
69042
69172
|
flexShrink: 0,
|
|
69043
69173
|
alignItems: "center",
|
|
69044
69174
|
justifyContent: "center",
|
|
69045
|
-
flexWrap: "
|
|
69175
|
+
flexWrap: "nowrap",
|
|
69046
69176
|
gap: 6
|
|
69047
69177
|
};
|
|
69048
69178
|
const clearAllButton = {
|
|
69049
69179
|
...toolbarIconButton,
|
|
69050
69180
|
alignSelf: "end",
|
|
69051
|
-
background:
|
|
69052
|
-
borderColor:
|
|
69053
|
-
color:
|
|
69181
|
+
background: notificationTheme.button,
|
|
69182
|
+
borderColor: notificationTheme.border,
|
|
69183
|
+
color: notificationTheme.labelPrimary,
|
|
69054
69184
|
borderRadius: 10,
|
|
69055
69185
|
boxShadow: "none"
|
|
69056
69186
|
};
|
|
@@ -69082,7 +69212,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
69082
69212
|
const compactPrompt = {
|
|
69083
69213
|
fontSize: uiFontSize(12),
|
|
69084
69214
|
lineHeight: 1.4,
|
|
69085
|
-
color:
|
|
69215
|
+
color: notificationTheme.labelPrimary
|
|
69086
69216
|
};
|
|
69087
69217
|
const compactRequestTag = {
|
|
69088
69218
|
...requestInlineTag,
|
|
@@ -69100,7 +69230,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
69100
69230
|
color: dshThemeColor.warningForeground
|
|
69101
69231
|
};
|
|
69102
69232
|
const compactStatus = {
|
|
69103
|
-
color:
|
|
69233
|
+
color: notificationTheme.labelSecondary,
|
|
69104
69234
|
fontSize: uiFontSize(11),
|
|
69105
69235
|
lineHeight: 1.3,
|
|
69106
69236
|
paddingLeft: 32
|
|
@@ -70031,6 +70161,14 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
70031
70161
|
noticeGeneration: generation
|
|
70032
70162
|
});
|
|
70033
70163
|
}
|
|
70164
|
+
/** 通知区高度按气泡真实渲染尺寸收缩;原生据此调整窗口与透明点击区,不保留固定空白。 */
|
|
70165
|
+
function sendDesktopAssistantNoticeSize(height) {
|
|
70166
|
+
if (!Number.isFinite(height) || height <= 0) return;
|
|
70167
|
+
postDesktopAssistantEvent({
|
|
70168
|
+
type: "notice-size",
|
|
70169
|
+
height: Math.min(276, Math.round(height))
|
|
70170
|
+
});
|
|
70171
|
+
}
|
|
70034
70172
|
const renderers = {
|
|
70035
70173
|
builtin: BuiltinAssistantAvatar,
|
|
70036
70174
|
image: ImageAssistantAvatar,
|
|
@@ -70058,6 +70196,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
70058
70196
|
const presented = (0, import_react.useCallback)((noticeId, generation, kind) => sendNotice("notice-presented", noticeId, generation, void 0, kind, desktopAssistantNotice(latestFrame.current)?.connectionGeneration), [sendNotice]);
|
|
70059
70197
|
const openNotice = (0, import_react.useCallback)((noticeId, generation, connectionGeneration) => sendNotice("notice-action", noticeId, generation, "open", void 0, connectionGeneration), [sendNotice]);
|
|
70060
70198
|
const dismissNotice = (0, import_react.useCallback)((noticeId, generation, connectionGeneration) => sendNotice("notice-action", noticeId, generation, "dismiss", void 0, connectionGeneration), [sendNotice]);
|
|
70199
|
+
const collapseNotice = (0, import_react.useCallback)((noticeId, generation, connectionGeneration) => sendNotice("notice-action", noticeId, generation, "collapse", void 0, connectionGeneration), [sendNotice]);
|
|
70061
70200
|
const clearAllNotices = (0, import_react.useCallback)((generation) => {
|
|
70062
70201
|
const current = latestFrame.current;
|
|
70063
70202
|
if (current.notificationSnapshot?.generation !== generation || JSON.stringify(current.identity) !== identityKey) return;
|
|
@@ -70071,6 +70210,14 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
70071
70210
|
expanded
|
|
70072
70211
|
});
|
|
70073
70212
|
}, [identityKey]);
|
|
70213
|
+
const collapsedNotices = (0, import_react.useCallback)((collapsed) => {
|
|
70214
|
+
const current = latestFrame.current;
|
|
70215
|
+
if (current.notificationSnapshot && JSON.stringify(current.identity) === identityKey) postDesktopAssistantEvent({
|
|
70216
|
+
type: "notice-collapse",
|
|
70217
|
+
...current.identity,
|
|
70218
|
+
collapsed
|
|
70219
|
+
});
|
|
70220
|
+
}, [identityKey]);
|
|
70074
70221
|
(0, import_react.useEffect)(() => {
|
|
70075
70222
|
let retry;
|
|
70076
70223
|
const result = (event) => {
|
|
@@ -70129,6 +70276,8 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
70129
70276
|
width: 1024,
|
|
70130
70277
|
height: 768
|
|
70131
70278
|
}]);
|
|
70279
|
+
const notification = desktopAssistantHasNotifications(frame) ? frame.notificationSnapshot ?? frame.notification : void 0;
|
|
70280
|
+
const notificationRegion = notification === void 0 ? void 0 : layout.notification;
|
|
70132
70281
|
const regionStyle = (region) => ({
|
|
70133
70282
|
position: "absolute",
|
|
70134
70283
|
left: region.x,
|
|
@@ -70137,20 +70286,24 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
70137
70286
|
height: region.height,
|
|
70138
70287
|
overflowY: "auto"
|
|
70139
70288
|
});
|
|
70140
|
-
const
|
|
70141
|
-
const
|
|
70142
|
-
const
|
|
70289
|
+
const notificationAbove = notificationRegion !== void 0 && notificationRegion.y < layout.avatar.y;
|
|
70290
|
+
const notificationTail = notificationAbove ? "bottom" : "top";
|
|
70291
|
+
const notificationTailStyle = notificationRegion === void 0 ? {} : assistantNotificationTailStyle(layout.avatar.x + layout.avatar.width / 2, notificationRegion.x, notificationRegion.width, notificationTail);
|
|
70292
|
+
const notificationStyle = notificationRegion === void 0 ? void 0 : {
|
|
70143
70293
|
position: "absolute",
|
|
70144
|
-
left:
|
|
70145
|
-
top:
|
|
70146
|
-
width:
|
|
70147
|
-
|
|
70148
|
-
"--codingns-notification-max-height": `${layout.notification.height}px`,
|
|
70149
|
-
height: layout.notification.height,
|
|
70294
|
+
left: notificationRegion.x,
|
|
70295
|
+
top: notificationRegion.y,
|
|
70296
|
+
width: notificationRegion.width,
|
|
70297
|
+
height: notificationRegion.height,
|
|
70150
70298
|
boxSizing: "border-box",
|
|
70299
|
+
display: "flex",
|
|
70300
|
+
flexDirection: "column",
|
|
70301
|
+
justifyContent: notificationAbove ? "flex-end" : "flex-start",
|
|
70302
|
+
overflow: "visible",
|
|
70303
|
+
"--codingns-notification-max-height": `${notificationRegion.limit ?? notificationRegion.height}px`,
|
|
70151
70304
|
...notificationTailStyle
|
|
70152
70305
|
};
|
|
70153
|
-
const
|
|
70306
|
+
const reportNoticeSize = (0, import_react.useCallback)((height) => sendDesktopAssistantNoticeSize(height), []);
|
|
70154
70307
|
return (0, import_react.createElement)("div", { style: {
|
|
70155
70308
|
width: layout.bounds.width,
|
|
70156
70309
|
height: layout.bounds.height,
|
|
@@ -70217,15 +70370,18 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
70217
70370
|
t: resolveCodingNsTranslator(),
|
|
70218
70371
|
error: noticeError ?? frame.noticeError,
|
|
70219
70372
|
tailSide: notificationTail,
|
|
70220
|
-
tailTarget: assistantNotificationTailTarget(layout.avatar.x + layout.avatar.width / 2,
|
|
70373
|
+
tailTarget: assistantNotificationTailTarget(layout.avatar.x + layout.avatar.width / 2, notificationRegion.x),
|
|
70221
70374
|
tailStyle: notificationTailStyle,
|
|
70375
|
+
onSizeChange: reportNoticeSize,
|
|
70222
70376
|
...frame.autoClose === void 0 || !frame.nativeVisible ? {} : { autoClose: frame.autoClose },
|
|
70223
70377
|
...frame.autoCloseSeconds === void 0 || !frame.nativeVisible ? {} : { autoCloseSeconds: frame.autoCloseSeconds },
|
|
70224
70378
|
onOpen: openNotice,
|
|
70225
70379
|
onDismiss: dismissNotice,
|
|
70380
|
+
onAutoClose: collapseNotice,
|
|
70226
70381
|
onPresented: frame.nativeVisible ? presented : () => void 0,
|
|
70227
70382
|
...frame.notificationSnapshot === void 0 ? {} : {
|
|
70228
70383
|
onExpandedChange: expandedNotices,
|
|
70384
|
+
onCollapsedChange: collapsedNotices,
|
|
70229
70385
|
onClearAll: clearAllNotices
|
|
70230
70386
|
}
|
|
70231
70387
|
})) : null, frame.caption && layout.caption ? (0, import_react.createElement)("div", {
|
|
@@ -49,7 +49,7 @@ export declare class AssistantNotificationStore {
|
|
|
49
49
|
private consumeStream;
|
|
50
50
|
private applyStreamFrame;
|
|
51
51
|
private isCurrent;
|
|
52
|
-
acknowledge(noticeId: string, generation: number, action: 'presented' | 'dismiss', expectedKind?: AssistantNotification['kind'], expectedConnectionGeneration?: number): Promise<void>;
|
|
52
|
+
acknowledge(noticeId: string, generation: number, action: 'presented' | 'collapse' | 'dismiss', expectedKind?: AssistantNotification['kind'], expectedConnectionGeneration?: number): Promise<void>;
|
|
53
53
|
/** 一键清理只清空当前代次的气泡展示;DSH 侧未读、待处理与请求身份都由 Host 原样保留。 */
|
|
54
54
|
clearAll(generation: number): Promise<void>;
|
|
55
55
|
/** 当前会话一旦被 DSH 选中即提交会话级已读;空选择只取消尚未发出的旧选择。 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-notification-store.d.ts","sourceRoot":"","sources":["../../../../../src/client/features/assistant-notification-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAuC,kCAAkC,EAAE,6BAA6B,EAAoC,2BAA2B,EAAE,MAAM,yCAAyC,CAAA;AAE3P,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,KAAK,CAAC,EAAE,6BAA6B,GAAG,SAAS,CAAA;IAC1D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3C,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B;AAKD,gDAAgD;AAChD,qBAAa,0BAA0B;IAuBzB,OAAO,CAAC,QAAQ,CAAC,GAAG;IAC9B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,GAAG;IAzBtB,OAAO,CAAC,QAAQ,CAA0D;IAC1E,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwB;IAClD,OAAO,CAAC,QAAQ,CAAwB;IACxC,OAAO,CAAC,KAAK,CAAI;IACjB,OAAO,CAAC,GAAG,CAAoB;IAC/B,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,QAAQ,CAAQ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BAA4B,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA6BzM,qDAAqD;IAC/C,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAajD,6CAA6C;IAC7C,eAAe,CAAC,MAAM,EAAE,kCAAkC,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAsBtF,oCAAoC;IACpC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,4BAA4B,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA0BhG,OAAO,IAAI,IAAI;IAOf,iDAAiD;IACjD,OAAO,CAAC,wBAAwB;IAMhC,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,OAAO;IAQf,OAAO,CAAC,YAAY;IAGpB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,OAAO;YAMD,IAAI;IAMlB,OAAO,CAAC,gBAAgB;IAcxB,OAAO,CAAC,YAAY;IAYpB,OAAO,CAAC,OAAO;CAChB"}
|
|
@@ -224,7 +224,7 @@ export class AssistantNotificationStore {
|
|
|
224
224
|
this.publish({ ...this.snapshot, error: message(error), errorNoticeId: noticeId, errorGeneration: generation });
|
|
225
225
|
throw error;
|
|
226
226
|
});
|
|
227
|
-
//
|
|
227
|
+
// 不复用写入前的在途快照。单条清理只修改提醒展示,从不提交原生问题或审批。
|
|
228
228
|
await this.refresh(true);
|
|
229
229
|
}
|
|
230
230
|
/** 一键清理只清空当前代次的气泡展示;DSH 侧未读、待处理与请求身份都由 Host 原样保留。 */
|