@nextclaw/ui 0.13.12 → 0.14.0
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/CHANGELOG.md +43 -0
- package/dist/assets/{api-DmxQnm30.js → api-B50yVdT8.js} +7 -7
- package/dist/assets/app-presenter-provider-BI-ewLbO.js +3 -0
- package/dist/assets/arrow-left-BOCJyLbQ.js +1 -0
- package/dist/assets/book-open-Bd2Xbrrc.js +1 -0
- package/dist/assets/channels-list-page-moJkpxtU.js +8 -0
- package/dist/assets/chat-page-CO27cl4v.js +105 -0
- package/dist/assets/config-split-page-CsQ2rIdq.js +1 -0
- package/dist/assets/{confirm-dialog-BWRNsRgb.js → confirm-dialog-DRSelLdI.js} +2 -2
- package/dist/assets/desktop-update-config-qa-SynOc.js +1 -0
- package/dist/assets/{dist-DzM2ZEVN.js → dist-D19wiQwB.js} +1 -1
- package/dist/assets/{dist-CyWdaJvr.js → dist-NZRV-BxD.js} +1 -1
- package/dist/assets/doc-browser-2ddUJCA0.js +1 -0
- package/dist/assets/doc-browser-BjHUczQb.js +1 -0
- package/dist/assets/doc-browser-context-C8KPbj-p.js +1 -0
- package/dist/assets/{ellipsis-BDgTYNDX.js → ellipsis-BYy8TP0A.js} +1 -1
- package/dist/assets/{es2015-WqekV0OK.js → es2015-BUIIKCNh.js} +1 -1
- package/dist/assets/{external-link-BLjo8z2a.js → external-link-528k6MDD.js} +1 -1
- package/dist/assets/host-capabilities-9bB_998Z.js +1 -0
- package/dist/assets/index-CMNrRhnG.js +101 -0
- package/dist/assets/index-UTmTW1eU.css +1 -0
- package/dist/assets/{key-round-Du8x3sWa.js → key-round-D3vD9dj7.js} +1 -1
- package/dist/assets/loader-circle-DV9TSRns.js +1 -0
- package/dist/assets/mcp-marketplace-page-CS5Lh3oA.js +1 -0
- package/dist/assets/mcp-marketplace-page-DEOMcWb0.js +40 -0
- package/dist/assets/model-config-page-BSc4o7pb.js +1 -0
- package/dist/assets/{notice-card-3a7FmAz-.js → notice-card-qqlbsOoR.js} +1 -1
- package/dist/assets/plus-Bf9qhPDO.js +1 -0
- package/dist/assets/{popover-BlJLguiZ.js → popover-BnmPOXe3.js} +1 -1
- package/dist/assets/provider-scoped-model-input-Ca56s475.js +1 -0
- package/dist/assets/providers-config-page-D8Kf4U3u.js +1 -0
- package/dist/assets/{react-BVjl1ZaK.js → react-Dsotw5vM.js} +1 -1
- package/dist/assets/{refresh-cw-DFR87zei.js → refresh-cw-Bmx4wc9P.js} +1 -1
- package/dist/assets/remote-DNMEy_c4.js +1 -0
- package/dist/assets/rotate-cw-CL0sVBel.js +1 -0
- package/dist/assets/runtime-config-page-CUFtKr0U.js +1 -0
- package/dist/assets/{save-BDmIlHvN.js → save-CHDnDTok.js} +1 -1
- package/dist/assets/search-D7L-TCH-.js +1 -0
- package/dist/assets/search-config-page-CA3RVAef.js +1 -0
- package/dist/assets/secrets-config-page-95yaH1fa.js +3 -0
- package/dist/assets/{status-dot-SVPjIyG5.js → status-dot-Dm4h-bjn.js} +1 -1
- package/dist/assets/tabs-CJvw5Lqp.js +1 -0
- package/dist/assets/{tag-chip-Cdwb3JSH.js → tag-chip-Cr8GwpRE.js} +1 -1
- package/dist/assets/{tooltip-CKGxLGnG.js → tooltip-Bxzi6aDL.js} +1 -1
- package/dist/assets/{trash-2-yLA8BEcE.js → trash-2-CSfX-BvU.js} +1 -1
- package/dist/assets/use-config-TzwzTgg0.js +1 -0
- package/dist/assets/x-fkIWvi07.js +1 -0
- package/dist/index.html +27 -25
- package/package.json +9 -8
- package/src/app/index.tsx +8 -4
- package/src/features/account/components/account-panel.tsx +3 -3
- package/src/features/account/hooks/{use-auth.test.ts → __tests__/use-auth.test.ts} +1 -1
- package/src/features/account/managers/account.manager.ts +6 -5
- package/src/features/agents/components/{agents-page.test.tsx → __tests__/agents-page.test.tsx} +41 -2
- package/src/features/agents/components/agent-dialogs.tsx +2 -2
- package/src/features/agents/components/agents-page.tsx +1 -1
- package/src/features/channels/components/config/channel-form.tsx +1 -1
- package/src/features/channels/pages/channels-list-page.tsx +18 -15
- package/src/features/channels/utils/{channel-form-fields.utils.test.ts → __tests__/channel-form-fields.utils.test.ts} +1 -1
- package/src/features/chat/components/{chat-welcome.test.tsx → __tests__/chat-welcome.test.tsx} +1 -1
- package/src/features/chat/components/conversation/{chat-conversation-header.test.tsx → __tests__/chat-conversation-header.test.tsx} +25 -32
- package/src/features/chat/components/conversation/{chat-conversation-panel.test.tsx → __tests__/chat-conversation-panel.test.tsx} +201 -37
- package/src/features/chat/components/conversation/chat-conversation-alerts.tsx +37 -0
- package/src/features/chat/components/conversation/chat-conversation-content.tsx +91 -0
- package/src/features/chat/components/conversation/chat-conversation-header-section.tsx +151 -0
- package/src/features/chat/components/conversation/chat-conversation-header.tsx +26 -89
- package/src/features/chat/components/conversation/chat-conversation-panel.tsx +13 -376
- package/src/features/chat/components/conversation/chat-conversation-parent-banner.tsx +16 -0
- package/src/features/chat/components/conversation/chat-conversation-skeleton.tsx +86 -0
- package/src/features/chat/components/conversation/chat-conversation-workspace-section.tsx +42 -0
- package/src/features/chat/components/layout/{chat-page-shell.test.tsx → __tests__/chat-page-shell.test.tsx} +1 -1
- package/src/features/chat/components/layout/__tests__/chat-sidebar-read-state.test.tsx +167 -0
- package/src/features/chat/components/layout/__tests__/chat-sidebar.test.tsx +834 -0
- package/src/features/chat/components/layout/chat-page-shell.tsx +11 -30
- package/src/features/chat/components/layout/chat-sidebar-toolbar.tsx +33 -53
- package/src/features/chat/components/layout/chat-sidebar-utility-menu.tsx +1 -1
- package/src/features/chat/components/layout/chat-sidebar.tsx +156 -202
- package/src/features/chat/components/providers/chat-presenter.provider.tsx +13 -44
- package/src/features/chat/{components/conversation → features/input/components/__tests__}/chat-attachment-upload-limit.test.ts +1 -1
- package/src/features/chat/{components/conversation → features/input/components}/chat-input-bar.container.tsx +133 -31
- package/src/features/chat/{hooks → features/input/hooks/__tests__}/use-chat-input-bar-controller.test.tsx +1 -1
- package/src/features/chat/{utils → features/input/utils/__tests__}/chat-composer-state.utils.test.ts +1 -1
- package/src/features/chat/{utils → features/input/utils/__tests__}/chat-inline-token.utils.test.ts +1 -1
- package/src/features/chat/{utils → features/input/utils/__tests__}/chat-input-bar.utils.test.ts +2 -2
- package/src/features/chat/{utils → features/input/utils/__tests__}/ncp-chat-input-availability.utils.test.ts +2 -1
- package/src/features/chat/{utils → features/input/utils}/ncp-chat-input-availability.utils.ts +6 -6
- package/src/features/chat/{components/conversation → features/message/components/__tests__}/chat-message-list.container.test.tsx +38 -3
- package/src/features/chat/{components/conversation → features/message/components}/chat-message-list.container.tsx +9 -13
- package/src/features/chat/{utils → features/message/utils/__tests__}/chat-message-invalid-tool-arguments.utils.test.ts +2 -2
- package/src/features/chat/{utils → features/message/utils/__tests__}/chat-message-session-spawn-tool-card.utils.test.ts +2 -2
- package/src/features/chat/features/message/utils/__tests__/chat-message-show-content-tool-card.utils.test.ts +54 -0
- package/src/features/chat/{utils → features/message/utils/__tests__}/chat-message-summary-truncation.utils.test.ts +2 -2
- package/src/features/chat/{utils → features/message/utils/__tests__}/chat-message-tool-agent-id.utils.test.ts +1 -1
- package/src/features/chat/{utils → features/message/utils/__tests__}/chat-message.utils.test.ts +2 -2
- package/src/features/chat/{utils → features/message/utils}/chat-message-inline-content.utils.ts +1 -1
- package/src/features/chat/{utils → features/message/utils}/chat-message-part.utils.ts +15 -2
- package/src/features/chat/{utils → features/message/utils}/chat-message-session-request-tool-card.utils.ts +1 -1
- package/src/features/chat/features/message/utils/chat-message-show-content-tool-card.utils.ts +165 -0
- package/src/features/chat/{utils → features/message/utils}/chat-message-tool-card.utils.ts +1 -1
- package/src/features/chat/{utils → features/message/utils}/chat-message.utils.ts +1 -1
- package/src/features/chat/features/ncp/hooks/__tests__/use-hydrated-ncp-agent.test.tsx +57 -0
- package/src/features/chat/{hooks → features/ncp/hooks/__tests__}/use-ncp-agent-runtime.test.tsx +2 -2
- package/src/features/chat/features/ncp/hooks/__tests__/use-ncp-chat-derived-state.test.tsx +22 -0
- package/src/features/chat/features/ncp/hooks/__tests__/use-ncp-chat-query-store-sync.test.tsx +101 -0
- package/src/features/chat/{hooks → features/ncp/hooks/__tests__}/use-ncp-session-conversation.test.tsx +1 -1
- package/src/features/chat/features/ncp/hooks/__tests__/use-ui-show-content-event.test.tsx +52 -0
- package/src/features/chat/features/ncp/hooks/use-ncp-chat-derived-state.ts +37 -0
- package/src/features/chat/features/ncp/hooks/use-ncp-chat-query-store-sync.ts +28 -0
- package/src/features/chat/{hooks → features/ncp/hooks}/use-ncp-child-session-tabs-view.ts +4 -4
- package/src/features/chat/{hooks → features/ncp/hooks}/use-ncp-session-conversation.ts +1 -1
- package/src/features/chat/{hooks → features/ncp/hooks}/use-ncp-session-list-view.ts +3 -3
- package/src/features/chat/features/ncp/hooks/use-ncp-session-queries.ts +32 -0
- package/src/features/chat/features/ncp/hooks/use-ui-show-content-event.ts +14 -0
- package/src/features/chat/features/ncp/utils/ncp-chat-query-derived.utils.ts +77 -0
- package/src/features/chat/{utils → features/runtime/utils/__tests__}/ncp-app-client-fetch.utils.test.ts +1 -1
- package/src/features/chat/{utils → features/runtime/utils/__tests__}/ncp-chat-runtime-availability.utils.test.ts +1 -1
- package/src/features/chat/{utils → features/runtime/utils}/chat-runtime.utils.ts +1 -1
- package/src/features/chat/{components → features/session/components}/chat-sidebar-project-groups.tsx +21 -42
- package/src/features/chat/{components/layout → features/session/components}/chat-sidebar-session-entry.tsx +40 -13
- package/src/features/chat/{components → features/session/components}/chat-sidebar-session-item.tsx +36 -44
- package/src/features/chat/features/session/components/chat-sidebar-session-list.tsx +78 -0
- package/src/features/chat/{components/session → features/session/components}/session-context-icon.tsx +1 -1
- package/src/features/chat/{components/conversation/session-header → features/session/components/session-header/__tests__}/chat-session-header-actions.test.tsx +3 -3
- package/src/features/chat/{components/conversation/session-header → features/session/components/session-header/__tests__}/chat-session-project-badge.test.tsx +3 -3
- package/src/features/chat/{components/conversation → features/session/components}/session-header/chat-session-header-actions.tsx +15 -27
- package/src/features/chat/{components/conversation → features/session/components}/session-header/chat-session-project-badge.tsx +1 -1
- package/src/features/chat/{hooks → features/session/hooks/__tests__}/use-chat-session-project.test.tsx +2 -2
- package/src/features/chat/{hooks → features/session/hooks/__tests__}/use-chat-session-update.test.tsx +1 -1
- package/src/features/chat/{hooks → features/session/hooks}/use-chat-session-project.ts +1 -1
- package/src/features/chat/{hooks → features/session/hooks}/use-chat-session-update.ts +17 -0
- package/src/features/chat/{hooks → features/session/hooks}/use-chat-sidebar-session-label-editor.ts +1 -1
- package/src/features/chat/{hooks → features/session/hooks}/use-selected-session-context-window-indicator.ts +1 -1
- package/src/features/chat/{utils → features/session/utils/__tests__}/chat-session-display.utils.test.ts +1 -1
- package/src/features/chat/{utils → features/session/utils/__tests__}/chat-session-route.utils.test.ts +1 -1
- package/src/features/chat/{utils → features/session/utils/__tests__}/ncp-session-adapter.utils.cancelled-tool.test.ts +2 -2
- package/src/features/chat/{utils → features/session/utils/__tests__}/ncp-session-adapter.utils.test.ts +2 -2
- package/src/features/chat/{utils → features/session/utils/__tests__}/session-context.utils.test.ts +1 -1
- package/src/features/chat/features/session/utils/chat-run-metadata.utils.ts +60 -0
- package/src/features/chat/{utils → features/session/utils}/chat-session-preference-governance.utils.ts +0 -128
- package/src/features/chat/features/session/utils/chat-sidebar-session-groups.utils.ts +144 -0
- package/src/features/chat/{components → features/session-type/components/__tests__}/chat-session-type-option-item.test.tsx +1 -1
- package/src/features/chat/{components → features/session-type/components}/chat-session-type-option-item.tsx +7 -16
- package/src/features/chat/features/session-type/components/chat-sidebar-create-menu.tsx +42 -0
- package/src/features/chat/{hooks → features/session-type/hooks/__tests__}/use-chat-session-type-state.test.tsx +1 -1
- package/src/features/chat/{hooks → features/session-type/hooks}/use-chat-session-type-state.ts +23 -94
- package/src/features/chat/features/session-type/utils/chat-session-type.utils.ts +105 -0
- package/src/features/chat/{components → features/workspace/components/__tests__}/chat-session-workspace-file-preview.test.tsx +1 -1
- package/src/features/chat/{components → features/workspace/components}/chat-session-workspace-file-preview.tsx +2 -2
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel-content.tsx +156 -0
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel-nav.tsx +84 -0
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel.tsx +138 -0
- package/src/features/chat/{components/workspace → features/workspace/components}/session-cron-job-content.tsx +1 -1
- package/src/features/chat/features/workspace/hooks/use-chat-conversation-workspace-state.ts +63 -0
- package/src/features/chat/features/workspace/utils/__tests__/chat-workspace-panel-view-model.utils.test.ts +103 -0
- package/src/features/chat/features/workspace/utils/chat-workspace-panel-view-model.utils.ts +183 -0
- package/src/features/chat/index.ts +16 -6
- package/src/features/chat/managers/__tests__/chat-input.manager.test.ts +355 -0
- package/src/features/chat/managers/__tests__/chat-query.manager.test.ts +39 -0
- package/src/features/chat/managers/__tests__/chat-run.manager.test.ts +202 -0
- package/src/features/chat/managers/{chat-session-list.manager.test.ts → __tests__/chat-session-list.manager.test.ts} +98 -74
- package/src/features/chat/managers/{chat-session-preference-sync.manager.test.ts → __tests__/chat-session-preference-sync.manager.test.ts} +1 -1
- package/src/features/chat/managers/__tests__/chat-thread.manager.test.ts +622 -0
- package/src/features/chat/managers/__tests__/chat-ui.manager.test.ts +126 -0
- package/src/features/chat/managers/{recent-selection.manager.test.ts → __tests__/recent-selection.manager.test.ts} +1 -1
- package/src/features/chat/managers/{ncp-chat-input.manager.ts → chat-input.manager.ts} +108 -35
- package/src/features/chat/managers/chat-query.manager.ts +48 -0
- package/src/features/chat/managers/chat-run.manager.ts +107 -0
- package/src/features/chat/managers/chat-session-list.manager.ts +47 -15
- package/src/features/chat/managers/chat-session-preference-sync.manager.ts +60 -5
- package/src/features/chat/managers/{ncp-chat-thread.manager.ts → chat-thread.manager.ts} +210 -37
- package/src/features/chat/managers/chat-ui.manager.ts +55 -9
- package/src/features/chat/pages/{ncp-chat-page.test.ts → __tests__/ncp-chat-page.test.ts} +49 -12
- package/src/features/chat/pages/ncp-chat-page.tsx +123 -399
- package/src/features/chat/presenters/chat.presenter.ts +39 -0
- package/src/features/chat/stores/__tests__/chat-thread.store.test.ts +148 -0
- package/src/features/chat/stores/chat-input.store.ts +5 -1
- package/src/features/chat/stores/chat-thread.store.ts +287 -28
- package/src/features/chat/stores/ncp-chat-query.store.ts +25 -0
- package/src/features/chat/types/chat-input.types.ts +1 -0
- package/src/features/chat/types/chat-message.types.ts +1 -0
- package/src/features/chat/types/chat-run.types.ts +41 -0
- package/src/{shared → features/cron}/components/cron-config.tsx +1 -1
- package/src/features/cron/hooks/use-cron-jobs.ts +58 -0
- package/src/features/cron/index.ts +7 -0
- package/src/features/marketplace/components/{marketplace-page.test.tsx → __tests__/marketplace-page.test.tsx} +37 -1
- package/src/features/marketplace/components/curated-shelves/marketplace-curated-shelves.tsx +15 -61
- package/src/features/marketplace/components/marketplace-external-skill-source-action.tsx +14 -0
- package/src/features/marketplace/components/marketplace-item-list-view.tsx +167 -0
- package/src/features/marketplace/components/marketplace-list-card.tsx +27 -31
- package/src/features/marketplace/components/marketplace-page-data.ts +0 -6
- package/src/features/marketplace/components/marketplace-page-parts.tsx +10 -2
- package/src/features/marketplace/components/marketplace-page.tsx +110 -434
- package/src/features/marketplace/components/mcp/mcp-marketplace-card.tsx +1 -1
- package/src/features/marketplace/components/mcp/mcp-marketplace-dialogs.tsx +1 -1
- package/src/features/marketplace/components/mcp/mcp-marketplace-page.tsx +2 -1
- package/src/features/marketplace/hooks/__tests__/use-marketplace.test.tsx +109 -0
- package/src/features/marketplace/hooks/use-marketplace-item-actions.ts +101 -0
- package/src/features/marketplace/hooks/use-marketplace-item-detail.ts +109 -0
- package/src/features/marketplace/hooks/use-marketplace-list-model.ts +160 -0
- package/src/features/marketplace/hooks/use-marketplace.ts +3 -5
- package/src/features/marketplace/utils/{marketplace-installed-cache.utils.test.ts → __tests__/marketplace-installed-cache.utils.test.ts} +1 -1
- package/src/features/panel-apps/components/{panel-app-list-item.test.tsx → __tests__/panel-app-list-item.test.tsx} +1 -1
- package/src/features/panel-apps/components/{panel-app-toolbar.test.tsx → __tests__/panel-app-toolbar.test.tsx} +1 -1
- package/src/features/panel-apps/utils/{panel-app-view.utils.test.ts → __tests__/panel-app-view.utils.test.ts} +1 -1
- package/src/features/pwa/managers/{pwa-service-worker-cache.manager.test.ts → __tests__/pwa-service-worker-cache.manager.test.ts} +1 -1
- package/src/features/remote/components/remote-access-page.tsx +2 -2
- package/src/features/remote/services/{remote-access-feedback.service.test.ts → __tests__/remote-access-feedback.service.test.ts} +1 -1
- package/src/{shared → features/settings}/components/config/provider-form.tsx +7 -7
- package/src/{shared/components → features/settings/components/config}/provider-status-badge.tsx +1 -1
- package/src/{shared/components/model-config.test.tsx → features/settings/pages/__tests__/model-config-page.test.tsx} +40 -5
- package/src/{shared/components/config/providers-list.test.tsx → features/settings/pages/__tests__/providers-config-page.test.tsx} +48 -5
- package/src/{shared/components/search-config.test.tsx → features/settings/pages/__tests__/search-config-page.test.tsx} +3 -3
- package/src/{shared/components/config/secrets-config.test.tsx → features/settings/pages/__tests__/secrets-config-page.test.tsx} +3 -3
- package/src/{shared/components/model-config.tsx → features/settings/pages/model-config-page.tsx} +1 -1
- package/src/{shared/components/config/providers-list.tsx → features/settings/pages/providers-config-page.tsx} +3 -3
- package/src/{shared/components/search-config.tsx → features/settings/pages/search-config-page.tsx} +1 -1
- package/src/{shared/components/config/secrets-config.tsx → features/settings/pages/secrets-config-page.tsx} +2 -2
- package/src/{shared/components/config/provider-form-support.test.ts → features/settings/utils/__tests__/provider-form-support.utils.test.ts} +1 -1
- package/src/features/side-dock/components/{side-dock.test.tsx → __tests__/side-dock.test.tsx} +25 -0
- package/src/features/side-dock/components/side-dock.tsx +13 -0
- package/src/features/system-status/components/{runtime-control-card.test.tsx → __tests__/runtime-control-card.test.tsx} +1 -1
- package/src/features/system-status/components/{runtime-presence-card.test.tsx → __tests__/runtime-presence-card.test.tsx} +1 -1
- package/src/features/system-status/components/desktop-update-config.tsx +2 -1
- package/src/features/system-status/components/runtime-presence-card.tsx +2 -2
- package/src/features/system-status/managers/{system-status.manager.bootstrap-polling.test.ts → __tests__/system-status.manager.bootstrap-polling.test.ts} +1 -1
- package/src/features/system-status/managers/{system-status.manager.test.ts → __tests__/system-status.manager.test.ts} +1 -1
- package/src/features/system-status/utils/{system-status.utils.test.ts → __tests__/system-status.utils.test.ts} +1 -1
- package/src/platforms/desktop/types/desktop-update.types.ts +9 -0
- package/src/shared/components/actions/action-link.tsx +49 -0
- package/src/shared/components/common/{agent-avatar.test.tsx → __tests__/agent-avatar.test.tsx} +1 -1
- package/src/shared/components/common/agent-identity/use-agent-identity.ts +3 -8
- package/src/shared/components/common/brand-header.tsx +1 -1
- package/src/shared/components/common/tag-input.tsx +1 -1
- package/src/shared/components/doc-browser/{doc-browser-context.test.tsx → __tests__/doc-browser-context.test.tsx} +1 -1
- package/src/shared/components/doc-browser/doc-browser-tab-strip.tsx +64 -161
- package/src/shared/components/doc-browser/doc-browser.tsx +4 -4
- package/src/shared/components/doc-browser/managers/doc-browser.manager.ts +39 -32
- package/src/shared/components/resizable-right-panel/__tests__/resizable-right-panel.test.tsx +66 -0
- package/src/shared/components/resizable-right-panel/resizable-right-panel.tsx +11 -8
- package/src/shared/components/ui/actions/icon-action-button.tsx +53 -0
- package/src/shared/components/ui/tab-strip/__tests__/compact-tab-strip.test.tsx +52 -0
- package/src/shared/components/ui/tab-strip/compact-tab-strip.tsx +228 -0
- package/src/shared/hooks/use-app-meta.ts +10 -0
- package/src/shared/hooks/use-config.ts +1 -148
- package/src/shared/lib/api/{ncp-session.test.ts → __tests__/ncp-session.test.ts} +3 -3
- package/src/shared/lib/api/{raw-client.test.ts → __tests__/raw-client.test.ts} +1 -1
- package/src/shared/lib/api/chat-session-type.types.ts +3 -0
- package/src/shared/lib/cadence/services/{adaptive-cadence.service.test.ts → __tests__/adaptive-cadence.service.test.ts} +1 -1
- package/src/shared/lib/host-capabilities/__tests__/host-capability.manager.test.ts +50 -0
- package/src/shared/lib/host-capabilities/host-capability.manager.ts +62 -0
- package/src/shared/lib/host-capabilities/index.ts +1 -0
- package/src/shared/lib/i18n/README.md +16 -3
- package/src/shared/lib/i18n/index.ts +93 -426
- package/src/shared/lib/i18n/locales/en-US/agents.json +49 -0
- package/src/shared/lib/i18n/locales/en-US/channel-auth.json +51 -0
- package/src/shared/lib/i18n/locales/en-US/channels.json +50 -0
- package/src/shared/lib/i18n/locales/en-US/chat.json +183 -0
- package/src/shared/lib/i18n/locales/en-US/core.json +311 -0
- package/src/shared/lib/i18n/locales/en-US/cron.json +32 -0
- package/src/shared/lib/i18n/locales/en-US/desktop-update.json +90 -0
- package/src/shared/lib/i18n/locales/en-US/doc-browser.json +87 -0
- package/src/shared/lib/i18n/locales/en-US/marketplace.json +72 -0
- package/src/shared/lib/i18n/locales/en-US/path-picker.json +12 -0
- package/src/shared/lib/i18n/locales/en-US/pwa.json +26 -0
- package/src/shared/lib/i18n/locales/en-US/remote.json +168 -0
- package/src/shared/lib/i18n/locales/en-US/runtime-control.json +105 -0
- package/src/shared/lib/i18n/locales/en-US/search.json +28 -0
- package/src/shared/lib/i18n/locales/zh-CN/agents.json +49 -0
- package/src/shared/lib/i18n/locales/zh-CN/channel-auth.json +51 -0
- package/src/shared/lib/i18n/locales/zh-CN/channels.json +50 -0
- package/src/shared/lib/i18n/locales/zh-CN/chat.json +183 -0
- package/src/shared/lib/i18n/locales/zh-CN/core.json +311 -0
- package/src/shared/lib/i18n/locales/zh-CN/cron.json +32 -0
- package/src/shared/lib/i18n/locales/zh-CN/desktop-update.json +90 -0
- package/src/shared/lib/i18n/locales/zh-CN/doc-browser.json +87 -0
- package/src/shared/lib/i18n/locales/zh-CN/marketplace.json +72 -0
- package/src/shared/lib/i18n/locales/zh-CN/path-picker.json +12 -0
- package/src/shared/lib/i18n/locales/zh-CN/pwa.json +26 -0
- package/src/shared/lib/i18n/locales/zh-CN/remote.json +168 -0
- package/src/shared/lib/i18n/locales/zh-CN/runtime-control.json +105 -0
- package/src/shared/lib/i18n/locales/zh-CN/search.json +28 -0
- package/src/shared/lib/i18n/runtime/{i18n-language-owner.test.ts → __tests__/i18n-language-owner.test.ts} +2 -2
- package/src/shared/lib/navigation-history/__tests__/navigation-history.utils.test.ts +60 -0
- package/src/shared/lib/navigation-history/index.ts +1 -0
- package/src/shared/lib/navigation-history/navigation-history.utils.ts +105 -0
- package/src/shared/lib/provider-models/{index.test.ts → __tests__/index.test.ts} +1 -1
- package/src/shared/lib/transport/{app-client.test.ts → __tests__/app-client.test.ts} +3 -3
- package/src/shared/lib/transport/{remote.transport.test.ts → __tests__/remote.transport.test.ts} +1 -1
- package/src/shared/lib/transport/{sse-stream.test.ts → __tests__/sse-stream.test.ts} +1 -1
- package/tsconfig.json +2 -5
- package/vite.config.ts +4 -4
- package/vitest.config.ts +4 -0
- package/dist/assets/app-presenter-provider-CDSjiqfE.js +0 -3
- package/dist/assets/arrow-left-Dd45Mvr1.js +0 -1
- package/dist/assets/channels-list-page-D-WYFmcG.js +0 -8
- package/dist/assets/chat-page-D1X8YNTC.js +0 -105
- package/dist/assets/config-split-page-CdJEkWxv.js +0 -1
- package/dist/assets/desktop-update-config-DOi5R1fX.js +0 -1
- package/dist/assets/doc-browser-D5FJcAyz.js +0 -1
- package/dist/assets/doc-browser-DewXa6oX.js +0 -1
- package/dist/assets/doc-browser-context-CpL2m4Sp.js +0 -1
- package/dist/assets/index-Q891JiF_.css +0 -1
- package/dist/assets/index-ZDJP_uJc.js +0 -101
- package/dist/assets/loader-circle-Dz4FssYC.js +0 -1
- package/dist/assets/mcp-marketplace-page-LmMhKH5a.js +0 -1
- package/dist/assets/mcp-marketplace-page-RqISBSqO.js +0 -40
- package/dist/assets/model-config-JUsW1Khb.js +0 -1
- package/dist/assets/play-BziM-Y34.js +0 -1
- package/dist/assets/plus-DrpyArC8.js +0 -1
- package/dist/assets/provider-models-C_yOh6DE.js +0 -1
- package/dist/assets/provider-scoped-model-input-IMD4W0jD.js +0 -1
- package/dist/assets/providers-list-BsDpxNzy.js +0 -1
- package/dist/assets/remote-DjhVMpVd.js +0 -1
- package/dist/assets/rotate-cw-DMBnsYKm.js +0 -1
- package/dist/assets/runtime-config-page-DzbTVebD.js +0 -1
- package/dist/assets/search-CjHGYvTI.js +0 -1
- package/dist/assets/search-config-CJ6OPxAf.js +0 -1
- package/dist/assets/secrets-config-CYOHWL7P.js +0 -3
- package/dist/assets/tabs-Czd2mj6z.js +0 -1
- package/dist/assets/tabs-custom-Ix4nkp2h.js +0 -1
- package/dist/assets/x-dpDISboO.js +0 -1
- package/src/features/chat/components/chat-session-workspace-panel-nav.tsx +0 -232
- package/src/features/chat/components/chat-session-workspace-panel.tsx +0 -371
- package/src/features/chat/components/layout/chat-sidebar-read-state.test.tsx +0 -145
- package/src/features/chat/components/layout/chat-sidebar.test.tsx +0 -896
- package/src/features/chat/hooks/use-chat-session-label.ts +0 -18
- package/src/features/chat/hooks/use-hydrated-ncp-agent.test.tsx +0 -90
- package/src/features/chat/hooks/use-ncp-chat-derived-state.ts +0 -181
- package/src/features/chat/hooks/use-ncp-chat-page-data.test.tsx +0 -70
- package/src/features/chat/hooks/use-ncp-chat-page-data.ts +0 -260
- package/src/features/chat/managers/chat-stream-actions.manager.ts +0 -35
- package/src/features/chat/managers/ncp-chat-input.manager.test.ts +0 -232
- package/src/features/chat/managers/ncp-chat-presenter.manager.ts +0 -28
- package/src/features/chat/managers/ncp-chat-thread.manager.test.ts +0 -241
- package/src/features/chat/types/chat-stream.types.ts +0 -32
- package/src/features/chat/utils/chat-session-preference-governance.utils.test.tsx +0 -114
- package/src/features/marketplace/components/marketplace-catalog-grid.tsx +0 -114
- package/src/shared/components/resizable-right-panel/resizable-right-panel.test.tsx +0 -38
- package/src/shared/components/ui/action-link.tsx +0 -27
- package/src/shared/components/ui/config-card.tsx +0 -71
- package/src/shared/components/ui/highlight-card.tsx +0 -40
- package/src/shared/components/ui/tabs-custom.tsx +0 -49
- package/src/shared/lib/i18n/agents.ts +0 -85
- package/src/shared/lib/i18n/channel-auth.constants.ts +0 -87
- package/src/shared/lib/i18n/channels.ts +0 -53
- package/src/shared/lib/i18n/chat-labels.utils.ts +0 -206
- package/src/shared/lib/i18n/cron-labels.utils.ts +0 -32
- package/src/shared/lib/i18n/desktop-update-labels.utils.ts +0 -165
- package/src/shared/lib/i18n/marketplace-labels.utils.ts +0 -78
- package/src/shared/lib/i18n/pwa.ts +0 -62
- package/src/shared/lib/i18n/remote.ts +0 -273
- package/src/shared/lib/i18n/runtime/doc-browser-labels.utils.ts +0 -120
- package/src/shared/lib/i18n/runtime/i18n.path-picker.ts +0 -12
- package/src/shared/lib/i18n/runtime-control-labels.utils.ts +0 -180
- package/src/shared/lib/i18n/search.ts +0 -37
- /package/dist/assets/{config-hints-Ceiol9x4.js → config-hints-Cl2XAhzV.js} +0 -0
- /package/src/{app.test.tsx → __tests__/app.test.tsx} +0 -0
- /package/src/app/components/layout/{app-layout.test.tsx → __tests__/app-layout.test.tsx} +0 -0
- /package/src/app/components/layout/{runtime-status-entry.test.tsx → __tests__/runtime-status-entry.test.tsx} +0 -0
- /package/src/app/components/layout/{settings-entry-page.test.tsx → __tests__/settings-entry-page.test.tsx} +0 -0
- /package/src/app/components/layout/{sidebar.layout.test.tsx → __tests__/sidebar.layout.test.tsx} +0 -0
- /package/src/features/channels/components/config/{channel-form.test.tsx → __tests__/channel-form.test.tsx} +0 -0
- /package/src/features/channels/components/config/{weixin-channel-auth-section.test.tsx → __tests__/weixin-channel-auth-section.test.tsx} +0 -0
- /package/src/features/channels/pages/{channels-list-page.test.tsx → __tests__/channels-list-page.test.tsx} +0 -0
- /package/src/features/chat/{hooks → features/input/hooks}/use-chat-input-bar-controller.ts +0 -0
- /package/src/features/chat/{utils → features/input/utils}/chat-composer-state.utils.ts +0 -0
- /package/src/features/chat/{utils → features/input/utils}/chat-inline-token.utils.ts +0 -0
- /package/src/features/chat/{utils → features/input/utils}/chat-input-bar.utils.ts +0 -0
- /package/src/features/chat/{utils → features/input/utils}/chat-input-toolbar.utils.ts +0 -0
- /package/src/features/chat/{utils → features/message/utils}/chat-message-core.utils.ts +0 -0
- /package/src/features/chat/{utils → features/message/utils}/chat-message-partial-json.utils.ts +0 -0
- /package/src/features/chat/{utils → features/message/utils}/chat-message-tool-agent-id.utils.ts +0 -0
- /package/src/features/chat/{utils → features/message/utils}/file-operation/card.utils.ts +0 -0
- /package/src/features/chat/{utils → features/message/utils}/file-operation/diff.utils.ts +0 -0
- /package/src/features/chat/{utils → features/message/utils}/file-operation/line-builder.utils.ts +0 -0
- /package/src/features/chat/{utils → features/message/utils}/file-operation/parsed-block.utils.ts +0 -0
- /package/src/features/chat/{utils → features/message/utils}/file-operation/record-readers.utils.ts +0 -0
- /package/src/features/chat/{utils → features/runtime/utils}/ncp-app-client-fetch.utils.ts +0 -0
- /package/src/features/chat/{utils → features/runtime/utils}/ncp-chat-runtime-availability.utils.ts +0 -0
- /package/src/features/chat/{components/conversation → features/session/components}/session-header/chat-session-header-menu-item.tsx +0 -0
- /package/src/features/chat/{components/conversation → features/session/components}/session-header/chat-session-project-dialog.tsx +0 -0
- /package/src/features/chat/{components/session → features/session/components}/session-run-badge.tsx +0 -0
- /package/src/features/chat/{utils → features/session/utils}/chat-context-window-indicator.utils.ts +0 -0
- /package/src/features/chat/{utils → features/session/utils}/chat-session-display.utils.ts +0 -0
- /package/src/features/chat/{utils → features/session/utils}/chat-session-route.utils.ts +0 -0
- /package/src/features/chat/{utils → features/session/utils}/ncp-session-adapter.utils.ts +0 -0
- /package/src/features/chat/{utils → features/session/utils}/ncp-session-context-metadata.utils.ts +0 -0
- /package/src/features/chat/{utils → features/session/utils}/session-context.utils.ts +0 -0
- /package/src/features/chat/{hooks → features/session-type/hooks}/use-ncp-chat-session-types.ts +0 -0
- /package/src/features/chat/{components/workspace → features/workspace/components}/chat-session-workspace-file-breadcrumbs.tsx +0 -0
- /package/src/features/marketplace/components/{marketplace-page-detail.test.tsx → __tests__/marketplace-page-detail.test.tsx} +0 -0
- /package/src/features/marketplace/components/curated-shelves/{marketplace-curated-scene-route.test.tsx → __tests__/marketplace-curated-scene-route.test.tsx} +0 -0
- /package/src/features/marketplace/components/detail-doc/{marketplace-detail-doc.test.ts → __tests__/marketplace-detail-doc.test.ts} +0 -0
- /package/src/features/marketplace/components/mcp/{mcp-marketplace-page.test.tsx → __tests__/mcp-marketplace-page.test.tsx} +0 -0
- /package/src/features/panel-apps/managers/{panel-app-bridge.manager.test.ts → __tests__/panel-app-bridge.manager.test.ts} +0 -0
- /package/src/features/panel-apps/utils/{panel-app-doc-browser.utils.test.ts → __tests__/panel-app-doc-browser.utils.test.ts} +0 -0
- /package/src/features/pwa/components/{pwa-install-entry.test.tsx → __tests__/pwa-install-entry.test.tsx} +0 -0
- /package/src/features/pwa/managers/{pwa-install.manager.test.ts → __tests__/pwa-install.manager.test.ts} +0 -0
- /package/src/features/pwa/managers/{pwa-shell-theme.manager.test.ts → __tests__/pwa-shell-theme.manager.test.ts} +0 -0
- /package/src/features/remote/components/{remote-access-page.test.tsx → __tests__/remote-access-page.test.tsx} +0 -0
- /package/src/features/right-panel-resources/utils/{right-panel-resource-route-resolver.utils.test.ts → __tests__/right-panel-resource-route-resolver.utils.test.ts} +0 -0
- /package/src/features/right-panel-resources/utils/{right-panel-resource-uri.utils.test.ts → __tests__/right-panel-resource-uri.utils.test.ts} +0 -0
- /package/src/features/service-apps/components/{service-apps-panel.test.tsx → __tests__/service-apps-panel.test.tsx} +0 -0
- /package/src/{shared/components → features/settings/components/config}/provider-advanced-settings-section.tsx +0 -0
- /package/src/{shared/components → features/settings/components/config}/provider-auth-section.tsx +0 -0
- /package/src/{shared → features/settings}/components/config/provider-models-section.tsx +0 -0
- /package/src/{shared/components → features/settings/components/config}/provider-pill-selector.tsx +0 -0
- /package/src/{shared → features/settings}/components/config/secrets-config-form.tsx +0 -0
- /package/src/features/settings/pages/{language-settings-page.test.tsx → __tests__/language-settings-page.test.tsx} +0 -0
- /package/src/{shared/components/config/provider-form-support.ts → features/settings/utils/provider-form-support.utils.ts} +0 -0
- /package/src/features/side-dock/managers/{side-dock.manager.test.ts → __tests__/side-dock.manager.test.ts} +0 -0
- /package/src/features/side-dock/utils/{side-dock-item.utils.test.ts → __tests__/side-dock-item.utils.test.ts} +0 -0
- /package/src/features/system-status/components/{desktop-update-config.test.tsx → __tests__/desktop-update-config.test.tsx} +0 -0
- /package/src/features/system-status/pages/{runtime-config-page.test.tsx → __tests__/runtime-config-page.test.tsx} +0 -0
- /package/src/platforms/desktop/components/{desktop-app-shell.test.tsx → __tests__/desktop-app-shell.test.tsx} +0 -0
- /package/src/platforms/mobile/components/{mobile-app-shell.test.tsx → __tests__/mobile-app-shell.test.tsx} +0 -0
- /package/src/platforms/mobile/components/{mobile-bottom-nav.test.tsx → __tests__/mobile-bottom-nav.test.tsx} +0 -0
- /package/src/shared/components/common/{brand-header.test.tsx → __tests__/brand-header.test.tsx} +0 -0
- /package/src/shared/components/doc-browser/{doc-browser.test.tsx → __tests__/doc-browser.test.tsx} +0 -0
- /package/src/shared/components/{ui → feedback}/notice-card.tsx +0 -0
- /package/src/shared/components/path-picker/{server-path-picker-dialog.test.tsx → __tests__/server-path-picker-dialog.test.tsx} +0 -0
- /package/src/shared/components/{ui → settings}/setting-row.tsx +0 -0
- /package/src/shared/components/{ui → status}/status-dot.tsx +0 -0
- /package/src/shared/components/{ui → tags}/tag-chip.tsx +0 -0
- /package/src/shared/lib/api/{api-base.test.ts → __tests__/api-base.test.ts} +0 -0
- /package/src/shared/lib/api/{client.test.ts → __tests__/client.test.ts} +0 -0
- /package/src/shared/lib/api/{ncp-session-query-cache.utils.test.ts → __tests__/ncp-session-query-cache.utils.test.ts} +0 -0
- /package/src/shared/lib/app-resource-uri/{app-resource-uri.test.ts → __tests__/app-resource-uri.test.ts} +0 -0
- /package/src/shared/lib/resource-uri/utils/{resource-uri-resolver.utils.test.ts → __tests__/resource-uri-resolver.utils.test.ts} +0 -0
- /package/src/shared/lib/session-project/{workspace-file-breadcrumb.test.ts → __tests__/workspace-file-breadcrumb.test.ts} +0 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"remotePageTitle": "远程访问",
|
|
3
|
+
"remotePageDescription": "让这台设备出现在 NextClaw Platform 的设备列表里,并从网页中打开它。",
|
|
4
|
+
"remoteOpenWeb": "前往 NextClaw Web",
|
|
5
|
+
"remoteOpenDeviceList": "前往 NextClaw Web",
|
|
6
|
+
"remoteOpenWebHint": "开启后,这台设备会出现在 NextClaw Web 中,你可以在那里点击打开并继续使用。",
|
|
7
|
+
"remoteOpenWebUnavailable": "暂时还没有可用的平台地址,请先完成登录。",
|
|
8
|
+
"remoteLoading": "正在加载远程访问状态...",
|
|
9
|
+
"remoteStatusNeedsSignIn": "先登录 NextClaw",
|
|
10
|
+
"remoteStatusNeedsSignInDescription": "远程访问依赖 NextClaw 账号。登录后,这台设备才能和网页版关联起来。",
|
|
11
|
+
"remoteStatusNeedsEnable": "还没有开启远程访问",
|
|
12
|
+
"remoteStatusNeedsEnableDescription": "你已经登录 NextClaw。开启后,这台设备会出现在网页版的设备列表中。",
|
|
13
|
+
"remoteStatusConnectingTitle": "正在把这台设备接入 NextClaw Web",
|
|
14
|
+
"remoteStatusConnectingDescription": "后台服务正在建立连接,几秒后刷新即可看到最新状态。",
|
|
15
|
+
"remoteStatusReadyTitle": "这台设备已经可在网页中打开",
|
|
16
|
+
"remoteStatusReadyDescription": "你现在可以前往 NextClaw Web,在设备列表中点击打开,继续这条 Agent 链路。",
|
|
17
|
+
"remoteStatusNeedsServiceTitle": "需要拉起后台服务",
|
|
18
|
+
"remoteStatusNeedsServiceDescription": "远程访问已经开启,但后台服务没有运行。拉起后才会真正连到网页版。",
|
|
19
|
+
"remoteStatusReauthorizationTitle": "登录已过期,请重新登录 NextClaw",
|
|
20
|
+
"remoteStatusReauthorizationDescription": "为了保护你的账号安全,远程访问已暂停。重新登录后会自动恢复,不需要重新配置设备。",
|
|
21
|
+
"remoteStatusIssueTitle": "远程访问暂时没有连上",
|
|
22
|
+
"remoteStatusIssueDescription": "设备配置还在,但当前没有稳定连上平台。你可以先重新连接;如果问题持续,再重新登录或稍后再试。",
|
|
23
|
+
"remoteStatusIssueDetailTitle": "下一步",
|
|
24
|
+
"remoteStatusRecoveryTitle": "推荐操作",
|
|
25
|
+
"remoteStatusIssueDetailGeneric": "远程访问暂时不可用。你可以先重新连接;如果问题持续,再重新登录或稍后再试。",
|
|
26
|
+
"remoteStatusIssueDetailServiceStopped": "后台服务当前没有运行。启动后,这台设备才会重新出现在网页版设备列表里。",
|
|
27
|
+
"remoteStatusReauthorizationHint": "点击下方按钮后会打开登录页。完成登录后,这台设备会自动恢复远程访问,不需要重新配置。",
|
|
28
|
+
"remoteSignInAndEnable": "登录并开启远程访问",
|
|
29
|
+
"remoteEnableNow": "开启远程访问",
|
|
30
|
+
"remoteReconnectNow": "重新连接",
|
|
31
|
+
"remoteReauthorizeNow": "重新登录并恢复远程访问",
|
|
32
|
+
"remoteDisable": "关闭远程访问",
|
|
33
|
+
"remoteDeviceSummaryTitle": "当前设备",
|
|
34
|
+
"remoteDeviceSummaryDescription": "普通用户只需要关心账号、设备名、连接状态和网页版入口。",
|
|
35
|
+
"remoteSignedInAccount": "当前账号",
|
|
36
|
+
"remoteConnectionStatus": "连接状态",
|
|
37
|
+
"remoteAdvancedTitle": "高级设置",
|
|
38
|
+
"remoteAdvancedDescription": "只有在排查或自定义平台地址时,才需要打开这一层。",
|
|
39
|
+
"remoteAdvancedToggleOpen": "展开高级设置",
|
|
40
|
+
"remoteAdvancedToggleClose": "收起高级设置",
|
|
41
|
+
"remoteAdvancedSaved": "高级设置已保存",
|
|
42
|
+
"remoteEnabledReady": "远程访问已开启,现在可以前往 NextClaw Web 使用",
|
|
43
|
+
"remoteDisabledDone": "远程访问已关闭",
|
|
44
|
+
"remoteServiceRecovered": "后台服务已重新接上远程访问",
|
|
45
|
+
"remoteActionEnabling": "正在开启远程访问...",
|
|
46
|
+
"remoteActionDisabling": "正在关闭远程访问...",
|
|
47
|
+
"remoteActionSavingAdvanced": "正在保存高级设置...",
|
|
48
|
+
"remoteActionStarting": "正在启动后台服务...",
|
|
49
|
+
"remoteActionRestarting": "正在重启后台服务...",
|
|
50
|
+
"remoteActionStopping": "正在停止后台服务...",
|
|
51
|
+
"remoteAccountEntryTitle": "NextClaw 账号",
|
|
52
|
+
"remoteAccountEntryDisconnected": "未登录,点击连接",
|
|
53
|
+
"remoteAccountEntryConnected": "已连接到 NextClaw",
|
|
54
|
+
"remoteAccountEntryManage": "账号",
|
|
55
|
+
"accountPanelTitle": "NextClaw 账号",
|
|
56
|
+
"accountPanelDescription": "远程访问依赖这个账号登录。后续 token、授权和更多云端能力也会基于它展开。",
|
|
57
|
+
"accountPanelSignedInTitle": "账号已连接",
|
|
58
|
+
"accountPanelSignedInDescription": "这台设备已经和你的 NextClaw 账号关联,可以直接去网页版查看设备。",
|
|
59
|
+
"accountPanelSignedOutTitle": "通过浏览器完成登录",
|
|
60
|
+
"accountPanelSignedOutDescription": "点击下方按钮后会打开 NextClaw 网页,在网页中登录或注册,当前设备会自动接入。",
|
|
61
|
+
"remoteOverviewTitle": "连接总览",
|
|
62
|
+
"remoteOverviewDescription": "只保留普通用户真正需要知道的信息。",
|
|
63
|
+
"remoteAccountConnected": "平台已登录",
|
|
64
|
+
"remoteAccountNotConnected": "平台未登录",
|
|
65
|
+
"remoteRuntimeMissing": "连接器未运行",
|
|
66
|
+
"remoteStateConnected": "已连接",
|
|
67
|
+
"remoteStateConnecting": "连接中",
|
|
68
|
+
"remoteStateError": "连接异常",
|
|
69
|
+
"remoteStateDisconnected": "已断开",
|
|
70
|
+
"remoteStateDisabled": "未启用",
|
|
71
|
+
"remoteStateReauthorizationRequired": "需要重新登录",
|
|
72
|
+
"remoteLocalOrigin": "本地服务地址",
|
|
73
|
+
"remotePublicPlatform": "平台地址",
|
|
74
|
+
"remoteDeviceId": "设备 ID",
|
|
75
|
+
"remoteRuntimeUpdatedAt": "状态更新时间",
|
|
76
|
+
"remoteLastConnectedAt": "上次连接时间",
|
|
77
|
+
"remoteLastError": "最近错误",
|
|
78
|
+
"remoteDeviceTitle": "设备配置",
|
|
79
|
+
"remoteDeviceDescription": "保存远程访问开关、设备名和平台 API Base。",
|
|
80
|
+
"remoteDeviceSectionTitle": "设备信息",
|
|
81
|
+
"remoteDeviceSectionDescription": "开启之后,这台设备会在平台网页的设备列表中出现。",
|
|
82
|
+
"remoteDeviceNameAuto": "未命名设备",
|
|
83
|
+
"remoteEnabled": "启用远程访问",
|
|
84
|
+
"remoteEnabledHelp": "保存后需要启动或重启后台服务,新的远程配置才会真正生效。",
|
|
85
|
+
"remoteDeviceName": "设备名称",
|
|
86
|
+
"remoteDeviceNamePlaceholder": "例如:PeideMacBook-Pro",
|
|
87
|
+
"remotePlatformApiBase": "平台 API Base",
|
|
88
|
+
"remotePlatformApiBaseHelp": "留空可回退到登录时写入的 providers.nextclaw.apiBase。",
|
|
89
|
+
"remoteSaveSettings": "保存设置",
|
|
90
|
+
"remoteSettingsSaved": "远程设置已保存",
|
|
91
|
+
"remoteSettingsSaveFailed": "远程设置保存失败",
|
|
92
|
+
"remoteSaveHint": "推荐流程:先保存设置,再启动或重启服务,最后运行诊断确认。",
|
|
93
|
+
"remoteAccountTitle": "平台账号",
|
|
94
|
+
"remoteAccountDescription": "通过浏览器授权把当前设备安全连接到 NextClaw 平台。",
|
|
95
|
+
"remoteAccountEmail": "邮箱",
|
|
96
|
+
"remoteAccountUsername": "用户名",
|
|
97
|
+
"remoteAccountUsernameRequiredTitle": "发布 skill 前需要先设置用户名",
|
|
98
|
+
"remoteAccountUsernameRequiredDescription": "平台账号已经登录,但还没有正式用户名。设置后,你的个人 skill 会使用 `@username/skill-name` 作为发布标识。",
|
|
99
|
+
"remoteAccountUsernamePlaceholder": "例如:alice-dev",
|
|
100
|
+
"remoteAccountUsernameSave": "保存用户名",
|
|
101
|
+
"remoteAccountUsernameSaving": "保存中...",
|
|
102
|
+
"remoteAccountUsernameSetSuccess": "用户名已保存",
|
|
103
|
+
"remoteAccountUsernameSetFailed": "用户名保存失败",
|
|
104
|
+
"remoteAccountUsernameLockedHelp": "当前版本先支持首次设置用户名;设置后暂不支持改名。",
|
|
105
|
+
"remoteAccountRole": "角色",
|
|
106
|
+
"remoteApiBase": "API Base",
|
|
107
|
+
"remoteBrowserAuthTitle": "浏览器授权登录",
|
|
108
|
+
"remoteBrowserAuthDescription": "点击后会打开平台授权页,在浏览器内登录或注册并授权当前设备。",
|
|
109
|
+
"remoteBrowserAuthAction": "前往浏览器授权",
|
|
110
|
+
"remoteBrowserAuthActionRetry": "重新发起浏览器登录",
|
|
111
|
+
"remoteBrowserAuthResume": "重新打开授权页",
|
|
112
|
+
"remoteBrowserAuthStarting": "正在创建授权会话...",
|
|
113
|
+
"remoteBrowserAuthAuthorizing": "等待浏览器完成授权...",
|
|
114
|
+
"remoteBrowserAuthWaiting": "浏览器授权页已打开。请在网页中完成登录或注册,然后此页面会自动接入。",
|
|
115
|
+
"remoteBrowserAuthCompleted": "浏览器授权完成,正在刷新登录状态。",
|
|
116
|
+
"remoteBrowserAuthExpired": "授权会话已过期,请重新发起。",
|
|
117
|
+
"remoteBrowserAuthPopupBlocked": "浏览器没有自动打开,请点击“重新打开授权页”。",
|
|
118
|
+
"remoteBrowserAuthSession": "授权会话",
|
|
119
|
+
"remoteBrowserAuthExpiresAt": "授权过期时间",
|
|
120
|
+
"remoteBrowserAuthHint": "如果你刚修改了上方 Platform API Base,建议先保存设置;未保存时当前页面也会沿用你输入的新地址发起授权。",
|
|
121
|
+
"remoteBrowserAuthStartFailed": "启动浏览器授权失败",
|
|
122
|
+
"remoteBrowserAuthPollFailed": "浏览器授权状态检查失败",
|
|
123
|
+
"remoteEmail": "邮箱",
|
|
124
|
+
"remotePassword": "密码",
|
|
125
|
+
"remotePasswordPlaceholder": "请输入你的平台密码",
|
|
126
|
+
"remoteRegisterIfNeeded": "首次验证自动创建账号",
|
|
127
|
+
"remoteRegisterIfNeededHelp": "如果邮箱还没有对应账号,平台会在验证码验证成功后自动创建账号并保存登录态。",
|
|
128
|
+
"remoteLogin": "登录平台",
|
|
129
|
+
"remoteCreateAccount": "注册并登录",
|
|
130
|
+
"remoteLoggingIn": "登录中...",
|
|
131
|
+
"remoteLoginSuccess": "平台登录成功",
|
|
132
|
+
"remoteLoginFailed": "平台登录失败",
|
|
133
|
+
"remoteLogout": "退出登录",
|
|
134
|
+
"remoteLoggingOut": "退出中...",
|
|
135
|
+
"remoteLogoutSuccess": "已退出平台登录",
|
|
136
|
+
"remoteLogoutFailed": "退出登录失败",
|
|
137
|
+
"remoteServiceTitle": "后台服务",
|
|
138
|
+
"remoteServiceDescription": "直接控制托管当前 UI 的后台服务。",
|
|
139
|
+
"remoteServiceRunning": "服务运行中",
|
|
140
|
+
"remoteServiceManagedRunning": "当前就是托管服务",
|
|
141
|
+
"remoteServiceStopped": "服务未运行",
|
|
142
|
+
"remoteServicePid": "进程 PID",
|
|
143
|
+
"remoteServiceUiUrl": "UI 地址",
|
|
144
|
+
"remoteServiceCurrentProcess": "当前页面是否由该服务提供",
|
|
145
|
+
"remoteStartService": "启动服务",
|
|
146
|
+
"remoteRestartService": "重启服务",
|
|
147
|
+
"remoteStopService": "停止服务",
|
|
148
|
+
"remoteServiceHint": "如果当前页面本身就是托管服务,停止或重启时页面会短暂断开,这是预期行为。",
|
|
149
|
+
"remoteServiceActionFailed": "服务操作失败",
|
|
150
|
+
"remoteDoctorTitle": "远程诊断",
|
|
151
|
+
"remoteDoctorDescription": "检查开关、平台登录、本地 UI 健康和连接器状态。",
|
|
152
|
+
"remoteRunDoctor": "运行诊断",
|
|
153
|
+
"remoteDoctorRunning": "诊断中...",
|
|
154
|
+
"remoteDoctorCompleted": "诊断完成",
|
|
155
|
+
"remoteDoctorFailed": "诊断失败",
|
|
156
|
+
"remoteDoctorGeneratedAt": "生成时间",
|
|
157
|
+
"remoteDoctorEmpty": "点击上方按钮运行一次诊断。",
|
|
158
|
+
"remoteCheckPassed": "通过",
|
|
159
|
+
"remoteCheckFailed": "失败",
|
|
160
|
+
"connected": "已连接",
|
|
161
|
+
"disconnected": "未连接",
|
|
162
|
+
"connecting": "连接中...",
|
|
163
|
+
"feishuConnecting": "验证 / 连接中...",
|
|
164
|
+
"statusReady": "就绪",
|
|
165
|
+
"statusSetup": "待配置",
|
|
166
|
+
"statusActive": "活跃",
|
|
167
|
+
"statusInactive": "未启用"
|
|
168
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"runtimePageTitle": "路由与运行时",
|
|
3
|
+
"runtimePageDescription": "对齐 OpenClaw 的多智能体路由:绑定规则、智能体池、私聊范围。",
|
|
4
|
+
"dmScopeMain": "统一到主会话",
|
|
5
|
+
"dmScopePerPeer": "按对端隔离",
|
|
6
|
+
"dmScopePerChannelPeer": "按渠道和对端隔离",
|
|
7
|
+
"dmScopePerAccountChannelPeer": "按账号、渠道和对端隔离",
|
|
8
|
+
"runtimeEntries": "运行时入口",
|
|
9
|
+
"runtimeEntriesHelp": "统一管理可见的运行时入口与其配置。",
|
|
10
|
+
"runtimeEntryIdPlaceholder": "入口 ID,例如 hermes",
|
|
11
|
+
"runtimeEntryLabelPlaceholder": "展示名称,例如 Hermes",
|
|
12
|
+
"runtimeEntryTypePlaceholder": "运行时类型,例如 narp-stdio",
|
|
13
|
+
"runtimeEntryConfigJson": "配置 JSON",
|
|
14
|
+
"addRuntimeEntry": "添加运行时入口",
|
|
15
|
+
"runtimeEntryIdRequired": "运行时入口 ID 必填,位置:{index}",
|
|
16
|
+
"runtimeEntryTypeRequired": "运行时入口 \"{id}\" 的类型必填",
|
|
17
|
+
"runtimeEntryDuplicate": "重复的运行时入口 ID",
|
|
18
|
+
"runtimeEntryConfigObjectRequired": "运行时入口 \"{id}\" 的配置必须是 JSON 对象。",
|
|
19
|
+
"peerKindDirect": "私聊",
|
|
20
|
+
"peerKindGroup": "群组",
|
|
21
|
+
"peerKindChannel": "频道",
|
|
22
|
+
"runtimeLoading": "加载运行时配置中...",
|
|
23
|
+
"runtimeControlTitle": "服务管理",
|
|
24
|
+
"runtimeControlDescription": "明确当前服务状态,并在宿主允许的范围内执行启动、重启、停止或桌面应用重启。",
|
|
25
|
+
"runtimePresenceTitle": "运行形态与常驻",
|
|
26
|
+
"runtimePresenceDescription": "明确当前环境里“关闭窗口/页面”会发生什么,以及哪些后台能力由宿主层负责。",
|
|
27
|
+
"runtimePresenceLoading": "正在读取常驻状态...",
|
|
28
|
+
"runtimePresenceLoadFailed": "读取桌面端常驻状态失败",
|
|
29
|
+
"runtimePresenceBehaviorLabel": "当前关闭行为",
|
|
30
|
+
"runtimePresenceBehaviorBackground": "关闭窗口时隐藏到后台",
|
|
31
|
+
"runtimePresenceBehaviorQuit": "关闭窗口时退出应用",
|
|
32
|
+
"runtimePresenceCloseToBackground": "关闭窗口时继续在后台运行",
|
|
33
|
+
"runtimePresenceCloseToBackgroundHelp": "开启后,关闭桌面窗口只会隐藏到托盘,不会停止本地 NextClaw 服务。",
|
|
34
|
+
"runtimePresenceLaunchAtLogin": "登录系统时自动启动 NextClaw",
|
|
35
|
+
"runtimePresenceLaunchAtLoginHelp": "开启后,桌面端会在登录系统后自动启动,并默认保持后台运行。",
|
|
36
|
+
"runtimePresenceLaunchAtLoginUnavailable": "当前环境暂不支持在这里配置开机自启。",
|
|
37
|
+
"runtimePresenceSaved": "桌面端常驻设置已保存",
|
|
38
|
+
"runtimePresenceSaveFailed": "保存桌面端常驻设置失败",
|
|
39
|
+
"runtimePresenceManagedLocalTitle": "浏览器只是本地服务控制面",
|
|
40
|
+
"runtimePresenceManagedLocalDescription": "关闭浏览器标签页不会停止本地 NextClaw 服务。服务生命周期由本地受管服务负责,而不是由页面生命周期决定。",
|
|
41
|
+
"runtimePresenceSelfHostedTitle": "页面不拥有自托管服务生命周期",
|
|
42
|
+
"runtimePresenceSelfHostedDescription": "关闭浏览器页面不会影响自托管实例。服务启停和开机常驻应由宿主环境或部署层管理。",
|
|
43
|
+
"runtimePresenceSharedTitle": "共享网页端只暴露状态,不暴露进程控制",
|
|
44
|
+
"runtimePresenceSharedDescription": "关闭页面只会结束当前连接或会话,不会影响共享服务本体。服务生命周期由平台托管层负责。",
|
|
45
|
+
"runtimeControlLoading": "读取运行时控制能力中...",
|
|
46
|
+
"runtimeControlLoadFailed": "读取运行时控制状态失败",
|
|
47
|
+
"runtimeControlManagedLocalMessage": "使用此页面管理本地 NextClaw 服务。关闭浏览器不会停止服务。",
|
|
48
|
+
"runtimeControlManagedLocalHint": "此页面由正在运行的本地服务提供。关闭浏览器不会停止它。",
|
|
49
|
+
"runtimeControlManagedLocalHintShort": "此页面由正在运行的本地服务提供。",
|
|
50
|
+
"runtimeControlStartUnavailableHosted": "当前页面已经由运行中的本地服务托管。",
|
|
51
|
+
"runtimeControlRestartAppDesktopOnly": "只有桌面壳环境支持重启整个应用。",
|
|
52
|
+
"runtimeControlServiceNotRunning": "本地服务未运行。",
|
|
53
|
+
"runtimeControlServiceAlreadyStopped": "本地服务已经停止。",
|
|
54
|
+
"runtimeControlManagedServiceStarted": "本地服务已启动。",
|
|
55
|
+
"runtimeControlManagedServiceStartScheduled": "本地服务启动已安排。",
|
|
56
|
+
"runtimeControlRestartScheduled": "重启已安排。此页面可能会短暂断开。",
|
|
57
|
+
"runtimeControlStopScheduled": "停止已安排。此页面即将断开。",
|
|
58
|
+
"runtimeControlServiceRunning": "服务运行中",
|
|
59
|
+
"runtimeControlServiceStopped": "服务已停止",
|
|
60
|
+
"runtimeControlServiceStarting": "正在启动服务",
|
|
61
|
+
"runtimeControlServiceStopping": "正在停止服务",
|
|
62
|
+
"runtimeControlServiceRestarting": "正在重启服务",
|
|
63
|
+
"runtimeControlServiceUnknown": "服务状态未知",
|
|
64
|
+
"runtimeControlHealthy": "运行时正常",
|
|
65
|
+
"runtimeControlStartingService": "正在启动服务",
|
|
66
|
+
"runtimeControlRestartingService": "正在重启服务",
|
|
67
|
+
"runtimeControlStoppingService": "正在停止服务",
|
|
68
|
+
"runtimeControlRestartingApp": "正在重启应用",
|
|
69
|
+
"runtimeControlRecovering": "正在恢复连接",
|
|
70
|
+
"runtimeControlFailed": "重启失败",
|
|
71
|
+
"runtimeControlUnavailable": "当前不可用",
|
|
72
|
+
"runtimeControlEnvironmentDesktop": "桌面端内嵌运行时",
|
|
73
|
+
"runtimeControlEnvironmentManagedService": "本地托管服务",
|
|
74
|
+
"runtimeControlEnvironmentSelfHosted": "自托管网页端",
|
|
75
|
+
"runtimeControlEnvironmentSharedWeb": "共享网页端",
|
|
76
|
+
"runtimeControlStartService": "启动服务",
|
|
77
|
+
"runtimeControlRestartService": "重启服务",
|
|
78
|
+
"runtimeControlStopService": "停止服务",
|
|
79
|
+
"runtimeControlRestartApp": "重启应用",
|
|
80
|
+
"runtimeControlPendingRestartTitle": "待重启",
|
|
81
|
+
"runtimeControlPendingRestartDescription": "这次改动已经保存,但系统不会自动重启。请在你方便的时候手动重启,重启完成后该提示会自动清空。",
|
|
82
|
+
"runtimeControlPendingRestartPaths": "待生效项",
|
|
83
|
+
"runtimeStatusLoadingTitle": "读取状态中",
|
|
84
|
+
"runtimeStatusLoadingDescription": "正在读取当前系统状态。",
|
|
85
|
+
"runtimeStatusHealthyTitle": "系统正常",
|
|
86
|
+
"runtimeStatusHealthyDescription": "当前没有需要你立即处理的系统动作。",
|
|
87
|
+
"runtimeStatusPendingRestartTitle": "待重启",
|
|
88
|
+
"runtimeStatusPendingRestartDescription": "这些改动已经保存,但不会自动重启。你可以在这里查看原因,并在方便的时候手动重启。",
|
|
89
|
+
"runtimeStatusPendingRestartReasonItem": "{path} 改动将在重启后生效。",
|
|
90
|
+
"runtimeStatusActionHint": "准备好时再执行",
|
|
91
|
+
"runtimeStatusRestartAction": "立即重启",
|
|
92
|
+
"runtimeStatusRestartingAction": "重启中...",
|
|
93
|
+
"runtimeControlStartingServiceHelp": "正在启动 NextClaw 服务,页面可能会在服务恢复后重新连接。",
|
|
94
|
+
"runtimeControlRestartingServiceHelp": "正在重启 NextClaw 服务,页面可能会短暂断开。",
|
|
95
|
+
"runtimeControlStoppingServiceHelp": "正在停止 NextClaw 服务,当前页面会很快断开。",
|
|
96
|
+
"runtimeControlRestartingAppHelp": "正在重新启动桌面应用,当前窗口会短暂关闭并立即拉起。",
|
|
97
|
+
"runtimeControlRecoveringHelp": "正在等待服务恢复连接...",
|
|
98
|
+
"runtimeControlRecovered": "运行时已恢复连接",
|
|
99
|
+
"runtimeControlActionFailed": "服务管理动作失败",
|
|
100
|
+
"runtimeControlRestartAppConfirm": "这会重启整个 NextClaw 桌面应用,并中断当前窗口。确定继续吗?",
|
|
101
|
+
"runtimeControlStopServiceConfirm": "这会停止当前 NextClaw 服务,当前页面会立即断开。确定继续吗?",
|
|
102
|
+
"runtimeRestartAppUnavailable": "当前环境不支持从前端重启整个应用。",
|
|
103
|
+
"runtimeControlDesktopServiceHint": "桌面端由 Launcher 持有应用生命周期;普通用户无需单独停止内嵌服务。",
|
|
104
|
+
"runtimeRecoveryTimedOut": "等待运行时恢复超时,请稍后重试或查看日志。"
|
|
105
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"searchPageTitle": "搜索渠道",
|
|
3
|
+
"searchPageDescription": "配置网页搜索提供商",
|
|
4
|
+
"searchActiveProvider": "当前搜索提供商",
|
|
5
|
+
"searchDefaultMaxResults": "默认返回条数",
|
|
6
|
+
"searchProviderSummary": "结果摘要",
|
|
7
|
+
"searchProviderFreshness": "时间范围",
|
|
8
|
+
"searchProviderSearchDepth": "搜索深度",
|
|
9
|
+
"searchProviderIncludeAnswer": "包含回答",
|
|
10
|
+
"searchProviderBaseUrl": "接口地址",
|
|
11
|
+
"searchProviderOpenDocs": "查看文档",
|
|
12
|
+
"searchProviderActivate": "激活",
|
|
13
|
+
"searchProviderActivated": "已激活",
|
|
14
|
+
"searchProviderDeactivate": "取消激活",
|
|
15
|
+
"searchProviderBochaDescription": "更适合中国大陆用户的 AI 搜索。",
|
|
16
|
+
"searchProviderTavilyDescription": "更适合调研和网页信息整合的搜索 provider。",
|
|
17
|
+
"searchProviderBraveDescription": "保留 Brave 作为可选 provider。",
|
|
18
|
+
"searchStatusConfigured": "已配置",
|
|
19
|
+
"searchStatusNeedsSetup": "待配置",
|
|
20
|
+
"searchFreshnessNoLimit": "不限",
|
|
21
|
+
"searchFreshnessOneDay": "一天内",
|
|
22
|
+
"searchFreshnessOneWeek": "一周内",
|
|
23
|
+
"searchFreshnessOneMonth": "一个月内",
|
|
24
|
+
"searchFreshnessOneYear": "一年内",
|
|
25
|
+
"searchDepthBasic": "基础",
|
|
26
|
+
"searchDepthAdvanced": "高级",
|
|
27
|
+
"searchNoProviderSelected": "请选择左侧搜索 provider"
|
|
28
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
-
import type * as I18nRuntimeModule from '
|
|
2
|
+
import type * as I18nRuntimeModule from '../i18n-language-owner';
|
|
3
3
|
|
|
4
4
|
type I18nRuntimeOwnerModule = typeof I18nRuntimeModule;
|
|
5
5
|
|
|
@@ -21,7 +21,7 @@ declare global {
|
|
|
21
21
|
|
|
22
22
|
async function loadOwner(): Promise<I18nRuntimeOwnerModule> {
|
|
23
23
|
vi.resetModules();
|
|
24
|
-
return await import('
|
|
24
|
+
return await import('../i18n-language-owner');
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
function createMockStorage(): MockStorage {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import {
|
|
3
|
+
filterNavigationHistoryEntries,
|
|
4
|
+
pushNavigationHistoryEntry,
|
|
5
|
+
stepNavigationHistory,
|
|
6
|
+
} from '../navigation-history.utils';
|
|
7
|
+
|
|
8
|
+
describe('navigation-history utils', () => {
|
|
9
|
+
it('pushes new entries and truncates forward history after stepping back', () => {
|
|
10
|
+
const initial = pushNavigationHistoryEntry({ entries: [], index: 0 }, 'a');
|
|
11
|
+
const second = pushNavigationHistoryEntry(initial, 'b');
|
|
12
|
+
const third = pushNavigationHistoryEntry(second, 'c');
|
|
13
|
+
const stepped = stepNavigationHistory(third, 'back');
|
|
14
|
+
|
|
15
|
+
expect(stepped?.entry).toBe('b');
|
|
16
|
+
|
|
17
|
+
const next = pushNavigationHistoryEntry(stepped!.history, 'd');
|
|
18
|
+
|
|
19
|
+
expect(next).toEqual({
|
|
20
|
+
entries: ['a', 'b', 'd'],
|
|
21
|
+
index: 2,
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('does not duplicate the current entry when the matcher says it is the same', () => {
|
|
26
|
+
const history = pushNavigationHistoryEntry(
|
|
27
|
+
{ entries: [{ id: 'a' }], index: 0 },
|
|
28
|
+
{ id: 'a' },
|
|
29
|
+
(current, next) => current.id === next.id,
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
expect(history.entries).toEqual([{ id: 'a' }]);
|
|
33
|
+
expect(history.index).toBe(0);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('filters entries while keeping the nearest surviving current position', () => {
|
|
37
|
+
const history = filterNavigationHistoryEntries(
|
|
38
|
+
{ entries: ['a', 'b', 'c', 'b'], index: 2 },
|
|
39
|
+
(entry) => entry !== 'b',
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
expect(history).toEqual({
|
|
43
|
+
entries: ['a', 'c'],
|
|
44
|
+
index: 1,
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('uses the fallback entry when every entry is filtered out', () => {
|
|
49
|
+
expect(
|
|
50
|
+
filterNavigationHistoryEntries(
|
|
51
|
+
{ entries: ['a'], index: 0 },
|
|
52
|
+
() => false,
|
|
53
|
+
'home',
|
|
54
|
+
),
|
|
55
|
+
).toEqual({
|
|
56
|
+
entries: ['home'],
|
|
57
|
+
index: 0,
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './navigation-history.utils';
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export type NavigationHistoryDirection = 'back' | 'forward';
|
|
2
|
+
|
|
3
|
+
export type NavigationHistoryState<Entry> = {
|
|
4
|
+
entries: readonly Entry[];
|
|
5
|
+
index: number;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export type NavigationHistoryStep<Entry> = {
|
|
9
|
+
history: NavigationHistoryState<Entry>;
|
|
10
|
+
entry: Entry;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type NavigationHistoryEntryMatcher<Entry> = (
|
|
14
|
+
current: Entry,
|
|
15
|
+
next: Entry,
|
|
16
|
+
) => boolean;
|
|
17
|
+
|
|
18
|
+
export function canGoBackInNavigationHistory<Entry>(
|
|
19
|
+
history: NavigationHistoryState<Entry>,
|
|
20
|
+
): boolean {
|
|
21
|
+
return history.index > 0 && history.entries.length > 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function canGoForwardInNavigationHistory<Entry>(
|
|
25
|
+
history: NavigationHistoryState<Entry>,
|
|
26
|
+
): boolean {
|
|
27
|
+
return history.index >= 0 && history.index < history.entries.length - 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function pushNavigationHistoryEntry<Entry>(
|
|
31
|
+
history: NavigationHistoryState<Entry>,
|
|
32
|
+
entry: Entry,
|
|
33
|
+
isSameEntry: NavigationHistoryEntryMatcher<Entry> = Object.is,
|
|
34
|
+
): NavigationHistoryState<Entry> {
|
|
35
|
+
const normalizedIndex = normalizeNavigationHistoryIndex(history);
|
|
36
|
+
const current = history.entries[normalizedIndex];
|
|
37
|
+
if (current && isSameEntry(current, entry)) {
|
|
38
|
+
return {
|
|
39
|
+
entries: history.entries,
|
|
40
|
+
index: normalizedIndex,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
const entries = [...history.entries.slice(0, normalizedIndex + 1), entry];
|
|
44
|
+
return {
|
|
45
|
+
entries,
|
|
46
|
+
index: entries.length - 1,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function stepNavigationHistory<Entry>(
|
|
51
|
+
history: NavigationHistoryState<Entry>,
|
|
52
|
+
direction: NavigationHistoryDirection,
|
|
53
|
+
): NavigationHistoryStep<Entry> | null {
|
|
54
|
+
const normalizedIndex = normalizeNavigationHistoryIndex(history);
|
|
55
|
+
const nextIndex = direction === 'back'
|
|
56
|
+
? normalizedIndex - 1
|
|
57
|
+
: normalizedIndex + 1;
|
|
58
|
+
const entry = history.entries[nextIndex];
|
|
59
|
+
if (!entry) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
history: {
|
|
64
|
+
entries: history.entries,
|
|
65
|
+
index: nextIndex,
|
|
66
|
+
},
|
|
67
|
+
entry,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function filterNavigationHistoryEntries<Entry>(
|
|
72
|
+
history: NavigationHistoryState<Entry>,
|
|
73
|
+
shouldKeep: (entry: Entry) => boolean,
|
|
74
|
+
fallbackEntry?: Entry,
|
|
75
|
+
): NavigationHistoryState<Entry> {
|
|
76
|
+
const normalizedIndex = normalizeNavigationHistoryIndex(history);
|
|
77
|
+
const keptEntries = history.entries.filter(shouldKeep);
|
|
78
|
+
if (keptEntries.length === 0) {
|
|
79
|
+
return fallbackEntry === undefined
|
|
80
|
+
? { entries: [], index: 0 }
|
|
81
|
+
: { entries: [fallbackEntry], index: 0 };
|
|
82
|
+
}
|
|
83
|
+
const keptBeforeOrAtCurrent = history.entries
|
|
84
|
+
.slice(0, normalizedIndex + 1)
|
|
85
|
+
.filter(shouldKeep);
|
|
86
|
+
return {
|
|
87
|
+
entries: keptEntries,
|
|
88
|
+
index: Math.min(
|
|
89
|
+
Math.max(0, keptBeforeOrAtCurrent.length - 1),
|
|
90
|
+
keptEntries.length - 1,
|
|
91
|
+
),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function normalizeNavigationHistoryIndex<Entry>(
|
|
96
|
+
history: NavigationHistoryState<Entry>,
|
|
97
|
+
): number {
|
|
98
|
+
if (history.entries.length === 0) {
|
|
99
|
+
return 0;
|
|
100
|
+
}
|
|
101
|
+
if (!Number.isInteger(history.index)) {
|
|
102
|
+
return history.entries.length - 1;
|
|
103
|
+
}
|
|
104
|
+
return Math.min(Math.max(0, history.index), history.entries.length - 1);
|
|
105
|
+
}
|
|
@@ -11,7 +11,7 @@ describe('appClient runtime detection', () => {
|
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
it('imports without triggering an API_BASE initialization cycle', async () => {
|
|
14
|
-
const { appClient } = await import('
|
|
14
|
+
const { appClient } = await import('../app-client.service');
|
|
15
15
|
|
|
16
16
|
expect(appClient).toBeDefined();
|
|
17
17
|
});
|
|
@@ -28,7 +28,7 @@ describe('appClient runtime detection', () => {
|
|
|
28
28
|
vi.stubGlobal('fetch', fetchMock);
|
|
29
29
|
|
|
30
30
|
const localRequest = vi.fn().mockResolvedValue({ ok: true } as never);
|
|
31
|
-
vi.doMock('
|
|
31
|
+
vi.doMock('../local-transport.service', () => ({
|
|
32
32
|
LocalAppTransport: class {
|
|
33
33
|
request = localRequest;
|
|
34
34
|
openStream = vi.fn();
|
|
@@ -36,7 +36,7 @@ describe('appClient runtime detection', () => {
|
|
|
36
36
|
}
|
|
37
37
|
}));
|
|
38
38
|
|
|
39
|
-
const { appClient } = await import('
|
|
39
|
+
const { appClient } = await import('../app-client.service');
|
|
40
40
|
const result = await appClient.request<{ ok: boolean }>({
|
|
41
41
|
method: 'GET',
|
|
42
42
|
path: '/api/config'
|
package/src/shared/lib/transport/{remote.transport.test.ts → __tests__/remote.transport.test.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
-
import { RemoteSessionMultiplexTransport } from '
|
|
2
|
+
import { RemoteSessionMultiplexTransport } from '../remote-transport.service';
|
|
3
3
|
|
|
4
4
|
class MockWebSocket {
|
|
5
5
|
static readonly CONNECTING = 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { readSseStreamResult } from '
|
|
2
|
+
import { readSseStreamResult } from '../sse-stream.utils';
|
|
3
3
|
|
|
4
4
|
function createSseResponse(frames: string[]): Response {
|
|
5
5
|
const payload = new TextEncoder().encode(frames.join(''));
|
package/tsconfig.json
CHANGED
|
@@ -15,11 +15,7 @@
|
|
|
15
15
|
"@/components/chat/chat-page": ["./src/features/chat/pages/chat-page.tsx"],
|
|
16
16
|
"@/components/config/ChannelsList": ["./src/features/channels/pages/channels-list-page.tsx"],
|
|
17
17
|
"@/components/config/desktop-update-config": ["./src/features/system-status/components/desktop-update-config.tsx"],
|
|
18
|
-
"@/components/config/ModelConfig": ["./src/shared/components/model-config.tsx"],
|
|
19
|
-
"@/components/config/ProvidersList": ["./src/shared/components/config/providers-list.tsx"],
|
|
20
18
|
"@/components/config/RuntimeConfig": ["./src/features/system-status/pages/runtime-config-page.tsx"],
|
|
21
|
-
"@/components/config/SearchConfig": ["./src/shared/components/search-config.tsx"],
|
|
22
|
-
"@/components/config/SecretsConfig": ["./src/shared/components/config/secrets-config.tsx"],
|
|
23
19
|
"@/components/config/security-config": ["./src/features/system-status/components/security-config.tsx"],
|
|
24
20
|
"@/components/config/SessionsConfig": ["./src/features/chat/pages/sessions-config-page.tsx"],
|
|
25
21
|
"@/components/layout/AppLayout": ["./src/app/components/layout/app-layout.tsx"],
|
|
@@ -39,7 +35,8 @@
|
|
|
39
35
|
"@nextclaw/shared": ["../nextclaw-shared/src/index.ts"],
|
|
40
36
|
"@nextclaw/ncp": ["../ncp-packages/nextclaw-ncp/src/index.ts"],
|
|
41
37
|
"@nextclaw/ncp-http-agent-client": ["../ncp-packages/nextclaw-ncp-http-agent-client/src/index.ts"],
|
|
42
|
-
"@nextclaw/ncp-react": ["../ncp-packages/nextclaw-ncp-react/src/index.ts"]
|
|
38
|
+
"@nextclaw/ncp-react": ["../ncp-packages/nextclaw-ncp-react/src/index.ts"],
|
|
39
|
+
"@nextclaw/ncp-toolkit": ["../ncp-packages/nextclaw-ncp-toolkit/src/index.ts"]
|
|
43
40
|
}
|
|
44
41
|
},
|
|
45
42
|
"include": ["src"]
|
package/vite.config.ts
CHANGED
|
@@ -13,11 +13,7 @@ export default defineConfig({
|
|
|
13
13
|
'@/components/chat/chat-page': path.resolve(__dirname, './src/features/chat/pages/chat-page.tsx'),
|
|
14
14
|
'@/components/config/ChannelsList': path.resolve(__dirname, './src/features/channels/pages/channels-list-page.tsx'),
|
|
15
15
|
'@/components/config/desktop-update-config': path.resolve(__dirname, './src/features/system-status/components/desktop-update-config.tsx'),
|
|
16
|
-
'@/components/config/ModelConfig': path.resolve(__dirname, './src/shared/components/model-config.tsx'),
|
|
17
|
-
'@/components/config/ProvidersList': path.resolve(__dirname, './src/shared/components/config/providers-list.tsx'),
|
|
18
16
|
'@/components/config/RuntimeConfig': path.resolve(__dirname, './src/features/system-status/pages/runtime-config-page.tsx'),
|
|
19
|
-
'@/components/config/SearchConfig': path.resolve(__dirname, './src/shared/components/search-config.tsx'),
|
|
20
|
-
'@/components/config/SecretsConfig': path.resolve(__dirname, './src/shared/components/config/secrets-config.tsx'),
|
|
21
17
|
'@/components/config/security-config': path.resolve(__dirname, './src/features/system-status/components/security-config.tsx'),
|
|
22
18
|
'@/components/layout/AppLayout': path.resolve(__dirname, './src/app/components/layout/app-layout.tsx'),
|
|
23
19
|
'@/components/marketplace/marketplace-page': path.resolve(__dirname, './src/features/marketplace/components/marketplace-page.tsx'),
|
|
@@ -33,6 +29,10 @@ export default defineConfig({
|
|
|
33
29
|
'@nextclaw/agent-chat-ui': path.resolve(__dirname, '../nextclaw-agent-chat-ui/src/index.ts'),
|
|
34
30
|
'@agent-chat-ui': path.resolve(__dirname, '../nextclaw-agent-chat-ui/src'),
|
|
35
31
|
'@nextclaw/client-sdk': path.resolve(__dirname, '../nextclaw-client-sdk/src/index.ts'),
|
|
32
|
+
'@nextclaw/ncp': path.resolve(__dirname, '../ncp-packages/nextclaw-ncp/src/index.ts'),
|
|
33
|
+
'@nextclaw/ncp-http-agent-client': path.resolve(__dirname, '../ncp-packages/nextclaw-ncp-http-agent-client/src/index.ts'),
|
|
34
|
+
'@nextclaw/ncp-react': path.resolve(__dirname, '../ncp-packages/nextclaw-ncp-react/src/index.ts'),
|
|
35
|
+
'@nextclaw/ncp-toolkit': path.resolve(__dirname, '../ncp-packages/nextclaw-ncp-toolkit/src/index.ts'),
|
|
36
36
|
'@nextclaw/shared': path.resolve(__dirname, '../nextclaw-shared/src/index.ts')
|
|
37
37
|
}
|
|
38
38
|
},
|
package/vitest.config.ts
CHANGED
|
@@ -28,6 +28,10 @@ export default defineConfig({
|
|
|
28
28
|
'@nextclaw/agent-chat-ui': path.resolve(__dirname, '../nextclaw-agent-chat-ui/src/index.ts'),
|
|
29
29
|
'@agent-chat-ui': path.resolve(__dirname, '../nextclaw-agent-chat-ui/src'),
|
|
30
30
|
'@nextclaw/client-sdk': path.resolve(__dirname, '../nextclaw-client-sdk/src/index.ts'),
|
|
31
|
+
'@nextclaw/ncp': path.resolve(__dirname, '../ncp-packages/nextclaw-ncp/src/index.ts'),
|
|
32
|
+
'@nextclaw/ncp-http-agent-client': path.resolve(__dirname, '../ncp-packages/nextclaw-ncp-http-agent-client/src/index.ts'),
|
|
33
|
+
'@nextclaw/ncp-react': path.resolve(__dirname, '../ncp-packages/nextclaw-ncp-react/src/index.ts'),
|
|
34
|
+
'@nextclaw/ncp-toolkit': path.resolve(__dirname, '../ncp-packages/nextclaw-ncp-toolkit/src/index.ts'),
|
|
31
35
|
'@nextclaw/shared': path.resolve(__dirname, '../nextclaw-shared/src/index.ts')
|
|
32
36
|
}
|
|
33
37
|
},
|