@jingyi0605/codingns4dsh 0.2.1-beta.7 → 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 +9 -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 +6 -2
- package/data/build/dist/client/avatar/desktop-view.d.ts.map +1 -1
- package/data/build/dist/client/avatar/desktop-view.js +48 -13
- package/data/build/dist/client/avatar/desktop-view.js.map +1 -1
- package/data/build/dist/client/avatar/floating.d.ts +5 -2
- package/data/build/dist/client/avatar/floating.d.ts.map +1 -1
- package/data/build/dist/client/avatar/floating.js +16 -5
- package/data/build/dist/client/avatar/floating.js.map +1 -1
- package/data/build/dist/client/avatar/notification-bubble.d.ts +24 -5
- package/data/build/dist/client/avatar/notification-bubble.d.ts.map +1 -1
- package/data/build/dist/client/avatar/notification-bubble.js +253 -66
- package/data/build/dist/client/avatar/notification-bubble.js.map +1 -1
- package/data/build/dist/client/avatar/notification-surface.d.ts +16 -0
- package/data/build/dist/client/avatar/notification-surface.d.ts.map +1 -0
- package/data/build/dist/client/avatar/notification-surface.js +54 -0
- package/data/build/dist/client/avatar/notification-surface.js.map +1 -0
- package/data/build/dist/client/avatar/reaction-badge.d.ts.map +1 -1
- package/data/build/dist/client/avatar/reaction-badge.js +11 -2
- package/data/build/dist/client/avatar/reaction-badge.js.map +1 -1
- package/data/build/dist/client/bundle.js +2628 -566
- 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.assistant-workbench.js +235 -109
- package/data/build/dist/client/client.assistant-workbench.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.manager.js +46 -9
- package/data/build/dist/client/client.manager.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.theme.js +2 -0
- package/data/build/dist/client/client.theme.js.map +1 -1
- package/data/build/dist/client/client.transport.js +123 -11
- package/data/build/dist/client/client.transport.js.map +1 -1
- package/data/build/dist/client/desktop-assistant.js +57927 -387
- package/data/build/dist/client/features/assistant-conversation-message.d.ts +2 -1
- package/data/build/dist/client/features/assistant-conversation-message.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-conversation-message.js +59 -24
- package/data/build/dist/client/features/assistant-conversation-message.js.map +1 -1
- package/data/build/dist/client/features/assistant-notification-store.d.ts +8 -2
- package/data/build/dist/client/features/assistant-notification-store.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-notification-store.js +45 -1
- package/data/build/dist/client/features/assistant-notification-store.js.map +1 -1
- package/data/build/dist/client/features/assistant-record-style.js +11 -4
- package/data/build/dist/client/features/assistant-record-style.js.map +1 -1
- package/data/build/dist/client/features/assistant-workbench.d.ts +4 -0
- package/data/build/dist/client/features/assistant-workbench.d.ts.map +1 -1
- package/data/build/dist/client/features/assistant-workbench.js +27 -1
- package/data/build/dist/client/features/assistant-workbench.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 +46 -8
- 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 +130 -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/assistantWorkbench.d.ts +17 -3
- package/data/build/dist/client/locales/assistantWorkbench.d.ts.map +1 -1
- package/data/build/dist/client/locales/assistantWorkbench.js +15 -11
- package/data/build/dist/client/locales/assistantWorkbench.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/peer-host-native-projection.d.ts +4 -0
- package/data/build/dist/client/peer-host-native-projection.d.ts.map +1 -1
- package/data/build/dist/client/peer-host-native-projection.js +40 -1
- package/data/build/dist/client/peer-host-native-projection.js.map +1 -1
- package/data/build/dist/client/peer-host-remote-events.d.ts +14 -0
- package/data/build/dist/client/peer-host-remote-events.d.ts.map +1 -1
- package/data/build/dist/client/peer-host-remote-events.js +92 -3
- package/data/build/dist/client/peer-host-remote-events.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/style.css +2561 -0
- package/data/build/dist/client/subscription-slot.d.ts.map +1 -1
- package/data/build/dist/client/subscription-slot.js +5 -1
- package/data/build/dist/client/subscription-slot.js.map +1 -1
- package/data/build/dist/client/theme.d.ts +2 -0
- package/data/build/dist/client/theme.d.ts.map +1 -1
- package/data/build/dist/client/theme.js +3 -0
- package/data/build/dist/client/theme.js.map +1 -1
- package/data/build/dist/client/workspace-session-visibility-dom.d.ts.map +1 -1
- package/data/build/dist/client/workspace-session-visibility-dom.js +43 -15
- 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 +9 -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 +65 -0
- 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 +11 -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 +80 -14
- package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -1
- package/data/build/dist/host/cli-adapters/codex-file-citations.d.ts +13 -0
- package/data/build/dist/host/cli-adapters/codex-file-citations.d.ts.map +1 -0
- package/data/build/dist/host/cli-adapters/codex-file-citations.js +271 -0
- package/data/build/dist/host/cli-adapters/codex-file-citations.js.map +1 -0
- 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 +13 -1
- 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 +95 -12
- 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 +287 -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 +83 -9
- 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 +3 -0
- package/data/build/dist/host/desktop-assistant/controller.d.ts.map +1 -1
- package/data/build/dist/host/desktop-assistant/controller.js +49 -4
- 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-management-tools.d.ts +2 -1
- package/data/build/dist/host/features/assistant-management-tools.d.ts.map +1 -1
- package/data/build/dist/host/features/assistant-management-tools.js +10 -3
- package/data/build/dist/host/features/assistant-management-tools.js.map +1 -1
- package/data/build/dist/host/features/assistant-notification-events.js +1 -1
- package/data/build/dist/host/features/assistant-notification-events.js.map +1 -1
- package/data/build/dist/host/features/assistant-notifications.d.ts +8 -1
- package/data/build/dist/host/features/assistant-notifications.d.ts.map +1 -1
- package/data/build/dist/host/features/assistant-notifications.js +114 -12
- package/data/build/dist/host/features/assistant-notifications.js.map +1 -1
- package/data/build/dist/host/features/global-voice-rpc.d.ts +2 -2
- package/data/build/dist/host/features/global-voice-rpc.d.ts.map +1 -1
- package/data/build/dist/host/features/global-voice-rpc.js +89 -2
- package/data/build/dist/host/features/global-voice-rpc.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 +41 -5
- 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 +6 -1
- 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-dispatch.d.ts +7 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts.map +1 -1
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js +23 -4
- package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.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 +69 -9
- package/data/build/dist/host/native-session-bridge.js.map +1 -1
- package/data/build/dist/host/rpc.js +4 -4
- 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-message-timeline.d.ts +11 -0
- package/data/build/dist/shared/assistant-message-timeline.d.ts.map +1 -1
- package/data/build/dist/shared/assistant-message-timeline.js +19 -0
- package/data/build/dist/shared/assistant-message-timeline.js.map +1 -1
- package/data/build/dist/shared/assistant-notifications.d.ts +35 -1
- package/data/build/dist/shared/assistant-notifications.d.ts.map +1 -1
- package/data/build/dist/shared/assistant-notifications.js +8 -0
- package/data/build/dist/shared/assistant-notifications.js.map +1 -1
- package/data/build/dist/shared/assistant-session-messages.d.ts +13 -0
- package/data/build/dist/shared/assistant-session-messages.d.ts.map +1 -0
- package/data/build/dist/shared/assistant-session-messages.js +155 -0
- package/data/build/dist/shared/assistant-session-messages.js.map +1 -0
- package/data/build/dist/shared/contracts/assistant.d.ts +13 -0
- package/data/build/dist/shared/contracts/assistant.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 -3
- package/data/build/dist/shared/desktop-assistant.d.ts.map +1 -1
- package/data/build/dist/shared/desktop-assistant.js +46 -14
- 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 +17 -15
- 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
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ASSISTANT_NOTIFICATION_TAIL_HEIGHT, ASSISTANT_NOTIFICATION_TAIL_WIDTH } from '../../shared/assistant-notifications.js';
|
|
2
|
+
/** 面板与尾巴共用一个闭合轮廓;所有点都属于面板坐标系,没有旋转原点或拼接遮盖。 */
|
|
3
|
+
export function notificationSurfaceGeometry(width, height, side, target, length = ASSISTANT_NOTIFICATION_TAIL_HEIGHT) {
|
|
4
|
+
const radius = Math.min(18, width / 2, height / 2);
|
|
5
|
+
const horizontal = side === 'top' || side === 'bottom';
|
|
6
|
+
const size = horizontal ? width : height;
|
|
7
|
+
const half = Math.min(ASSISTANT_NOTIFICATION_TAIL_WIDTH / 2, Math.max(0, (size - 2 * radius - 4) / 2));
|
|
8
|
+
const tipAlong = Math.max(1, Math.min(size - 1, target ?? size / 2));
|
|
9
|
+
const bias = tipAlong < size / 2 ? 24 : -24;
|
|
10
|
+
const rootAlong = Math.max(radius + half + 2, Math.min(size - radius - half - 2, tipAlong + bias));
|
|
11
|
+
const reverse = side === 'bottom' || side === 'left';
|
|
12
|
+
const root = reverse ? size - rootAlong : rootAlong;
|
|
13
|
+
const tip = reverse ? size - tipAlong : tipAlong;
|
|
14
|
+
const point = (along, outward) => {
|
|
15
|
+
if (side === 'top')
|
|
16
|
+
return { x: along, y: -outward };
|
|
17
|
+
if (side === 'right')
|
|
18
|
+
return { x: width + outward, y: along };
|
|
19
|
+
if (side === 'bottom')
|
|
20
|
+
return { x: width - along, y: height + outward };
|
|
21
|
+
return { x: -outward, y: height - along };
|
|
22
|
+
};
|
|
23
|
+
const xy = (along, outward) => {
|
|
24
|
+
const p = point(along, outward);
|
|
25
|
+
return `${p.x} ${p.y}`;
|
|
26
|
+
};
|
|
27
|
+
const tail = `L${xy(root - half, 0)} C${xy(root - half + half * .6, 0)} ${xy(tip - 5, length * .66)} ${xy(tip, length)}`
|
|
28
|
+
+ ` C${xy(tip + 3, length * .58)} ${xy(root + half - half * .6, 0)} ${xy(root + half, 0)}`;
|
|
29
|
+
const path = `M${radius} 0 ${side === 'top' ? tail : ''} H${width - radius} Q${width} 0 ${width} ${radius}`
|
|
30
|
+
+ ` ${side === 'right' ? tail : ''} V${height - radius} Q${width} ${height} ${width - radius} ${height}`
|
|
31
|
+
+ ` ${side === 'bottom' ? tail : ''} H${radius} Q0 ${height} 0 ${height - radius}`
|
|
32
|
+
+ ` ${side === 'left' ? tail : ''} V${radius} Q0 0 ${radius} 0 Z`;
|
|
33
|
+
return { path, tip: point(tip, length), root: point(root, 0) };
|
|
34
|
+
}
|
|
35
|
+
/** 直接测量实际面板,内容、字体和滚动区变化只更新背景轮廓,不反过来改变布局。 */
|
|
36
|
+
export function observeNotificationSurface(node, side, target, length = ASSISTANT_NOTIFICATION_TAIL_HEIGHT) {
|
|
37
|
+
const draw = () => {
|
|
38
|
+
const width = node.clientWidth, height = node.clientHeight;
|
|
39
|
+
if (width <= 0 || height <= 0)
|
|
40
|
+
return;
|
|
41
|
+
const geometry = notificationSurfaceGeometry(width, height, side, target, length);
|
|
42
|
+
node.querySelector('[data-codingns-notification-outline]')?.setAttribute('d', geometry.path);
|
|
43
|
+
node.querySelector('[data-codingns-notification-fallback]')?.setAttribute('visibility', 'hidden');
|
|
44
|
+
node.dataset.tailTipX = String(geometry.tip.x);
|
|
45
|
+
node.dataset.tailTipY = String(geometry.tip.y);
|
|
46
|
+
};
|
|
47
|
+
draw();
|
|
48
|
+
if (typeof ResizeObserver === 'undefined')
|
|
49
|
+
return () => { };
|
|
50
|
+
const observer = new ResizeObserver(draw);
|
|
51
|
+
observer.observe(node);
|
|
52
|
+
return () => observer.disconnect();
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=notification-surface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-surface.js","sourceRoot":"","sources":["../../../../../src/client/avatar/notification-surface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,iCAAiC,EAAE,MAAM,yCAAyC,CAAA;AAG/H,6CAA6C;AAC7C,MAAM,UAAU,2BAA2B,CAAC,KAAa,EAAE,MAAc,EAAE,IAAmC,EAC5G,MAAe,EAAE,MAAM,GAAG,kCAAkC;IAC5D,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAA;IAClD,MAAM,UAAU,GAAG,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,QAAQ,CAAA;IACtD,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAA;IACxC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,iCAAiC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACtG,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,MAAM,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,CAAA;IACpE,MAAM,IAAI,GAAG,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAC3C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AO,CAAA;AACzC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAG/E,mCAAmC;AACnC,wBAAgB,4BAA4B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAA;CAAE,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"reaction-badge.d.ts","sourceRoot":"","sources":["../../../../../src/client/avatar/reaction-badge.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAG/E,mCAAmC;AACnC,wBAAgB,4BAA4B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAA;CAAE,GAAG,YAAY,CAUvH"}
|
|
@@ -4,8 +4,17 @@ import { resolveCodingNsTranslator } from '../locale.js';
|
|
|
4
4
|
export function AssistantAvatarReactionBadge({ reaction }) {
|
|
5
5
|
const t = resolveCodingNsTranslator();
|
|
6
6
|
const labels = { success: t('awb.notifications.completed'), concerned: t('awb.notifications.error'), question: t('awb.notifications.question'), approval: t('awb.notifications.approval') };
|
|
7
|
-
const icons = { success: '✓', concerned: '!',
|
|
7
|
+
const icons = { success: '✓', concerned: '!', approval: '…' };
|
|
8
|
+
const icon = reaction === 'question'
|
|
9
|
+
? createElement('span', { 'data-codingns-avatar-reaction-glyph': 'speech', style: { display: 'inline-flex' } }, speechIcon())
|
|
10
|
+
: icons[reaction];
|
|
8
11
|
return createElement('span', { role: 'status', 'aria-label': labels[reaction], title: labels[reaction], 'data-codingns-avatar-reaction': reaction,
|
|
9
|
-
style: { position: 'absolute',
|
|
12
|
+
style: { position: 'absolute', left: '50%', top: 0, transform: 'translateX(-50%)', width: 30, height: 26, boxSizing: 'border-box', display: 'grid', placeItems: 'center', padding: 0, borderRadius: 11,
|
|
13
|
+
background: '#fff', color: '#242424', border: '1px solid #b8c3d3', lineHeight: 1, pointerEvents: 'none' } }, icon);
|
|
14
|
+
}
|
|
15
|
+
/** 提问状态使用发言气泡:圆角轮廓、右下尾巴和三个空心圆点。 */
|
|
16
|
+
function speechIcon() {
|
|
17
|
+
return createElement('svg', { width: 20, height: 20, viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: 1.9,
|
|
18
|
+
strokeLinecap: 'round', strokeLinejoin: 'round', 'aria-hidden': true, focusable: false }, createElement('path', { d: 'M12 3H9a7 7 0 0 0-7 7v2a7 7 0 0 0 7 7h5.5l3.5 2.5.8-4.45A7 7 0 0 0 21 12v-2a7 7 0 0 0-7-7h-2Z' }), createElement('circle', { cx: 7.5, cy: 11, r: 1.45 }), createElement('circle', { cx: 12, cy: 11, r: 1.45 }), createElement('circle', { cx: 16.5, cy: 11, r: 1.45 }));
|
|
10
19
|
}
|
|
11
20
|
//# sourceMappingURL=reaction-badge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reaction-badge.js","sourceRoot":"","sources":["../../../../../src/client/avatar/reaction-badge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAGrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAExD,mCAAmC;AACnC,MAAM,UAAU,4BAA4B,CAAC,EAAE,QAAQ,EAAkD;IACvG,MAAM,CAAC,GAAG,yBAAyB,EAAE,CAAA;IACrC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,6BAA6B,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,yBAAyB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,4BAA4B,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,4BAA4B,CAAC,EAAE,CAAA;IAC3L,MAAM,KAAK,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ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