@songsid/agend 2.3.5-alpha.5 → 2.3.5-alpha.7
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/THIRD_PARTY_NOTICES.md +0 -1
- package/dist/accounts-profiles.d.ts +96 -0
- package/dist/accounts-profiles.js +178 -0
- package/dist/accounts-profiles.js.map +1 -0
- package/dist/accounts-signout.d.ts +59 -0
- package/dist/accounts-signout.js +184 -0
- package/dist/accounts-signout.js.map +1 -0
- package/dist/accounts-view.d.ts +54 -0
- package/dist/accounts-view.js +55 -11
- package/dist/accounts-view.js.map +1 -1
- package/dist/agent-workspace.d.ts +11 -0
- package/dist/agent-workspace.js +28 -0
- package/dist/agent-workspace.js.map +1 -1
- package/dist/auth-api.js +38 -5
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/session-authorizations.d.ts +2 -0
- package/dist/authority/session-authorizations.js +7 -1
- package/dist/authority/session-authorizations.js.map +1 -1
- package/dist/authority/web-authority.d.ts +13 -0
- package/dist/authority/web-authority.js +12 -0
- package/dist/authority/web-authority.js.map +1 -1
- package/dist/backend/claude-code.js +47 -9
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex.js +1 -0
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/kiro.js +1 -1
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/types.d.ts +2 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/bundled-tmux-guard.d.ts +19 -0
- package/dist/bundled-tmux-guard.js +83 -0
- package/dist/bundled-tmux-guard.js.map +1 -0
- package/dist/channel/access-manager.d.ts +1 -6
- package/dist/channel/access-manager.js +4 -94
- package/dist/channel/access-manager.js.map +1 -1
- package/dist/channel/adapters/discord.d.ts +0 -2
- package/dist/channel/adapters/discord.js +0 -8
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +0 -3
- package/dist/channel/adapters/telegram.js +1 -30
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/types.d.ts +0 -2
- package/dist/classic-bindings.d.ts +13 -0
- package/dist/classic-bindings.js +28 -2
- package/dist/classic-bindings.js.map +1 -1
- package/dist/classic-channel-manager.d.ts +2 -0
- package/dist/classic-channel-manager.js +5 -1
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/cli.js +117 -30
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +11 -0
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +3 -1
- package/dist/config.js.map +1 -1
- package/dist/daemon.d.ts +27 -2
- package/dist/daemon.js +107 -6
- package/dist/daemon.js.map +1 -1
- package/dist/doctor.js +3 -4
- package/dist/doctor.js.map +1 -1
- package/dist/e2e-isolation.js +5 -2
- package/dist/e2e-isolation.js.map +1 -1
- package/dist/fleet-control-audit.d.ts +1 -1
- package/dist/fleet-manager.d.ts +188 -1
- package/dist/fleet-manager.js +1059 -79
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +22 -7
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +10 -0
- package/dist/general-knowledge/steering/core-rules.md +6 -4
- package/dist/hub/buttons.js +4 -2
- package/dist/hub/buttons.js.map +1 -1
- package/dist/hub/catalog.d.ts +1 -1
- package/dist/hub/catalog.js +82 -15
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/compose/server.d.ts +4 -1
- package/dist/hub/compose/server.js +30 -3
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/directory/directory.d.ts +1 -1
- package/dist/hub/directory/directory.js +142 -21
- package/dist/hub/directory/directory.js.map +1 -1
- package/dist/hub/directory/groups.d.ts +29 -0
- package/dist/hub/directory/groups.js +29 -0
- package/dist/hub/directory/groups.js.map +1 -0
- package/dist/hub/directory/index.d.ts +2 -1
- package/dist/hub/directory/types.d.ts +12 -2
- package/dist/hub/directory/types.js.map +1 -1
- package/dist/hub/group-policy/admin-context.d.ts +23 -0
- package/dist/hub/group-policy/admin-context.js +52 -0
- package/dist/hub/group-policy/admin-context.js.map +1 -0
- package/dist/hub/group-policy/admin-dto.d.ts +235 -0
- package/dist/hub/group-policy/admin-dto.js +55 -0
- package/dist/hub/group-policy/admin-dto.js.map +1 -0
- package/dist/hub/group-policy/admin-inventory.d.ts +24 -0
- package/dist/hub/group-policy/admin-inventory.js +72 -0
- package/dist/hub/group-policy/admin-inventory.js.map +1 -0
- package/dist/hub/group-policy/admin-read.d.ts +21 -0
- package/dist/hub/group-policy/admin-read.js +90 -0
- package/dist/hub/group-policy/admin-read.js.map +1 -0
- package/dist/hub/group-policy/authorization.d.ts +43 -0
- package/dist/hub/group-policy/authorization.js +170 -0
- package/dist/hub/group-policy/authorization.js.map +1 -0
- package/dist/hub/group-policy/model.d.ts +56 -0
- package/dist/hub/group-policy/model.js +46 -0
- package/dist/hub/group-policy/model.js.map +1 -0
- package/dist/hub/group-policy/resources.d.ts +60 -0
- package/dist/hub/group-policy/resources.js +191 -0
- package/dist/hub/group-policy/resources.js.map +1 -0
- package/dist/hub/group-policy/store.d.ts +58 -0
- package/dist/hub/group-policy/store.js +155 -0
- package/dist/hub/group-policy/store.js.map +1 -0
- package/dist/hub/http/compose.js +9 -9
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/core.d.ts +23 -3
- package/dist/hub/http/core.js +138 -5
- package/dist/hub/http/core.js.map +1 -1
- package/dist/hub/http/deps.d.ts +3 -0
- package/dist/hub/pairing.d.ts +3 -1
- package/dist/hub/pairing.js +6 -3
- package/dist/hub/pairing.js.map +1 -1
- package/dist/hub/policy.d.ts +3 -1
- package/dist/hub/policy.js +13 -6
- package/dist/hub/policy.js.map +1 -1
- package/dist/hub/rooms.d.ts +1 -0
- package/dist/hub/rooms.js +76 -26
- package/dist/hub/rooms.js.map +1 -1
- package/dist/hub/server.d.ts +2 -0
- package/dist/hub/server.js +12 -2
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/sessions.js +2 -1
- package/dist/hub/sessions.js.map +1 -1
- package/dist/hub/types.d.ts +2 -0
- package/dist/instance-config-impact.js +4 -3
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +17 -0
- package/dist/instance-lifecycle.js +38 -1
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/locale.js +45 -18
- package/dist/locale.js.map +1 -1
- package/dist/login-controller.d.ts +5 -0
- package/dist/login-controller.js +11 -0
- package/dist/login-controller.js.map +1 -1
- package/dist/login-window-lock.d.ts +2 -1
- package/dist/login-window-lock.js.map +1 -1
- package/dist/ls-rows.d.ts +1 -1
- package/dist/ls-rows.js +1 -1
- package/dist/ls-rows.js.map +1 -1
- package/dist/machine-accounts.d.ts +110 -0
- package/dist/machine-accounts.js +229 -0
- package/dist/machine-accounts.js.map +1 -0
- package/dist/machine-signins.d.ts +89 -0
- package/dist/machine-signins.js +182 -0
- package/dist/machine-signins.js.map +1 -0
- package/dist/muse-usage-relay.d.ts +2 -0
- package/dist/muse-usage-relay.js +5 -3
- package/dist/muse-usage-relay.js.map +1 -1
- package/dist/needs-you-hub.d.ts +3 -0
- package/dist/needs-you-hub.js +13 -3
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +35 -2
- package/dist/needs-you.js +19 -0
- package/dist/needs-you.js.map +1 -1
- package/dist/quickstart.js +7 -18
- package/dist/quickstart.js.map +1 -1
- package/dist/quiet-run.d.ts +31 -0
- package/dist/quiet-run.js +50 -0
- package/dist/quiet-run.js.map +1 -0
- package/dist/quota-notice-config.d.ts +22 -0
- package/dist/quota-notice-config.js +41 -0
- package/dist/quota-notice-config.js.map +1 -0
- package/dist/runtime-api.d.ts +13 -0
- package/dist/runtime-api.js +134 -2
- package/dist/runtime-api.js.map +1 -1
- package/dist/runtime-build-info.d.ts +2 -1
- package/dist/runtime-build-info.js +7 -3
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli-install.d.ts +153 -0
- package/dist/runtime-cli-install.js +675 -0
- package/dist/runtime-cli-install.js.map +1 -0
- package/dist/runtime-cli.js +157 -12
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client.d.ts +64 -2
- package/dist/runtime-client.js +277 -20
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-coordinator.d.ts +10 -1
- package/dist/runtime-coordinator.js +93 -2
- package/dist/runtime-coordinator.js.map +1 -1
- package/dist/runtime-credential-profiles.d.ts +11 -2
- package/dist/runtime-credential-profiles.js +28 -4
- package/dist/runtime-credential-profiles.js.map +1 -1
- package/dist/runtime-install.js +9 -6
- package/dist/runtime-install.js.map +1 -1
- package/dist/runtime-pane-link.js +2 -1
- package/dist/runtime-pane-link.js.map +1 -1
- package/dist/runtime-pane-service.js +2 -2
- package/dist/runtime-pane-service.js.map +1 -1
- package/dist/runtime-pane-store.d.ts +10 -0
- package/dist/runtime-pane-store.js +13 -1
- package/dist/runtime-pane-store.js.map +1 -1
- package/dist/runtime-profile-ownership.d.ts +66 -0
- package/dist/runtime-profile-ownership.js +391 -0
- package/dist/runtime-profile-ownership.js.map +1 -0
- package/dist/runtime-protocol.d.ts +88 -2
- package/dist/runtime-protocol.js +40 -0
- package/dist/runtime-protocol.js.map +1 -1
- package/dist/runtime-remote-accounts.d.ts +197 -0
- package/dist/runtime-remote-accounts.js +663 -0
- package/dist/runtime-remote-accounts.js.map +1 -0
- package/dist/runtime-remote-setup.d.ts +105 -0
- package/dist/runtime-remote-setup.js +529 -0
- package/dist/runtime-remote-setup.js.map +1 -0
- package/dist/runtime-signin-transport.d.ts +39 -0
- package/dist/runtime-signin-transport.js +110 -0
- package/dist/runtime-signin-transport.js.map +1 -0
- package/dist/runtime-signin.d.ts +132 -0
- package/dist/runtime-signin.js +289 -0
- package/dist/runtime-signin.js.map +1 -0
- package/dist/runtime-update-attention.d.ts +4 -0
- package/dist/runtime-update-attention.js +11 -0
- package/dist/runtime-update-attention.js.map +1 -0
- package/dist/runtime-update-controller.d.ts +75 -0
- package/dist/runtime-update-controller.js +691 -0
- package/dist/runtime-update-controller.js.map +1 -0
- package/dist/runtime-update-ipc.d.ts +42 -0
- package/dist/runtime-update-ipc.js +144 -0
- package/dist/runtime-update-ipc.js.map +1 -0
- package/dist/runtime-update-journal.d.ts +5 -0
- package/dist/runtime-update-journal.js +7 -0
- package/dist/runtime-update-journal.js.map +1 -1
- package/dist/runtime-update-lock.js +17 -2
- package/dist/runtime-update-lock.js.map +1 -1
- package/dist/runtime-update-status.d.ts +30 -0
- package/dist/runtime-update-status.js +31 -0
- package/dist/runtime-update-status.js.map +1 -0
- package/dist/settings-api.js +6 -2
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.d.ts +10 -0
- package/dist/settings-change.js +25 -1
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-confirmation.d.ts +25 -1
- package/dist/settings-confirmation.js +11 -3
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.js +18 -6
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +21 -0
- package/dist/settings-http-confirmation.js +74 -3
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-instance-patch.js +1 -1
- package/dist/settings-instance-patch.js.map +1 -1
- package/dist/setup-wizard.js +3 -5
- package/dist/setup-wizard.js.map +1 -1
- package/dist/signin-keepalive.d.ts +203 -0
- package/dist/signin-keepalive.js +652 -0
- package/dist/signin-keepalive.js.map +1 -0
- package/dist/structured-signin-transport.js +4 -0
- package/dist/structured-signin-transport.js.map +1 -1
- package/dist/structured-signin.d.ts +7 -0
- package/dist/structured-signin.js +4 -2
- package/dist/structured-signin.js.map +1 -1
- package/dist/tips.js +4 -4
- package/dist/tips.js.map +1 -1
- package/dist/tmux-binary.d.ts +23 -23
- package/dist/tmux-binary.js +35 -46
- package/dist/tmux-binary.js.map +1 -1
- package/dist/tmux-exec-helper.js +3 -3
- package/dist/tmux-exec-helper.js.map +1 -1
- package/dist/tmux-legacy.d.ts +94 -0
- package/dist/tmux-legacy.js +309 -0
- package/dist/tmux-legacy.js.map +1 -0
- package/dist/tmux-manager.d.ts +7 -1
- package/dist/tmux-manager.js +21 -11
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tmux-rollback.d.ts +31 -0
- package/dist/tmux-rollback.js +72 -0
- package/dist/tmux-rollback.js.map +1 -0
- package/dist/tmux-server.d.ts +102 -0
- package/dist/tmux-server.js +248 -0
- package/dist/tmux-server.js.map +1 -0
- package/dist/transcript-monitor.js +43 -5
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/transcript-records.d.ts +2 -1
- package/dist/transcript-records.js +3 -0
- package/dist/transcript-records.js.map +1 -1
- package/dist/transcript-sources.js +3 -0
- package/dist/transcript-sources.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/types.js.map +1 -1
- package/dist/ui/accounts-keepalive.js +113 -0
- package/dist/ui/accounts-manage.js +237 -0
- package/dist/ui/accounts-view.js +191 -36
- package/dist/ui/agent-runtime-settings.js +2 -1
- package/dist/ui/app.html +8 -1
- package/dist/ui/backend-signin.js +12 -3
- package/dist/ui/general-location.js +28 -14
- package/dist/ui/hub-attachments.js +90 -0
- package/dist/ui/hub-chat-store.js +11 -5
- package/dist/ui/hub-client.js +20 -1
- package/dist/ui/hub-grant-strings.js +13 -0
- package/dist/ui/hub-owner-strings.js +6 -2
- package/dist/ui/hub-preview.js +101 -0
- package/dist/ui/hub-strings.js +4 -2
- package/dist/ui/machine-signin.js +56 -0
- package/dist/ui/panel-fleet.js +1 -1
- package/dist/ui/panel-hub.js +194 -54
- package/dist/ui/panel-log.js +2 -2
- package/dist/ui/panel-needs.js +14 -8
- package/dist/ui/panel-notices.js +4 -3
- package/dist/ui/panel-runtimes.js +32 -11
- package/dist/ui/panel-settings.js +18 -24
- package/dist/ui/panel-windows-agent.js +2 -1
- package/dist/ui/preview-pages.js +3 -41
- package/dist/ui/preview-panel-actions.js +3 -161
- package/dist/ui/preview-panel.js +10 -557
- package/dist/ui/preview-versions.js +3 -155
- package/dist/ui/runtime-cli-install.js +134 -0
- package/dist/ui/runtime-update-commands.d.ts +2 -0
- package/dist/ui/runtime-update-commands.js +11 -0
- package/dist/ui/runtime-update-status.js +53 -0
- package/dist/ui/search-dialog.js +3 -2
- package/dist/ui/settings-confirm.js +28 -0
- package/dist/ui/settings-devices.js +6 -10
- package/dist/ui/settings-guests.js +3 -2
- package/dist/ui/settings-hub-browser-certificate.js +2 -0
- package/dist/ui/settings-hub-membership.js +17 -11
- package/dist/ui/settings-hub-retention.js +2 -0
- package/dist/ui/settings-hub-section.js +35 -0
- package/dist/ui/settings-hub.js +17 -5
- package/dist/ui/settings-layout.js +6 -2
- package/dist/ui/settings-named-test.js +2 -2
- package/dist/ui/settings-outside.js +1 -1
- package/dist/ui/settings-quota-notice.js +102 -0
- package/dist/ui/settings-registry.js +4 -0
- package/dist/ui/settings-strings.js +6 -6
- package/dist/ui/settings-web-authority.js +2 -1
- package/dist/ui/shared/accounts-keepalive.css +7 -0
- package/dist/ui/shared/accounts.css +13 -0
- package/dist/ui/shared/app-i18n.js +4 -2
- package/dist/ui/shared/app-route.js +1 -1
- package/dist/ui/shared/app-shell.js +111 -8
- package/dist/ui/shared/app-store.js +2 -2
- package/dist/ui/shared/app.css +29 -0
- package/dist/ui/shared/app.js +2 -1
- package/dist/ui/shared/chat-strings.js +8 -8
- package/dist/ui/shared/hub-chat.css +1 -0
- package/dist/ui/shared/hub-owner.css +3 -3
- package/dist/ui/shared/hub-signin.css +24 -0
- package/dist/ui/shared/loading.css +37 -0
- package/dist/ui/shared/preview-pages.js +41 -0
- package/dist/ui/shared/preview-panel-actions.js +168 -0
- package/dist/ui/shared/preview-panel.js +565 -0
- package/dist/ui/shared/preview-versions.js +155 -0
- package/dist/ui/shared/runtime-install.css +4 -0
- package/dist/ui/shared/signin.js +68 -6
- package/dist/ui/shared/ui-states.js +14 -3
- package/dist/ui/shared/view-strings.js +4 -4
- package/dist/ui/shared/workspace-follow.css +19 -0
- package/dist/ui/signin.html +7 -3
- package/dist/ui/structured-signin.js +43 -11
- package/dist/ui/workspace-follow-strings.js +28 -0
- package/dist/ui/workspace-panel.js +225 -36
- package/dist/update-install.d.ts +7 -0
- package/dist/update-install.js +23 -0
- package/dist/update-install.js.map +1 -1
- package/dist/usage/providers.d.ts +6 -0
- package/dist/usage/providers.js +18 -9
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/quota-notices.d.ts +38 -0
- package/dist/usage/quota-notices.js +160 -0
- package/dist/usage/quota-notices.js.map +1 -0
- package/dist/usage/usage-api.d.ts +1 -0
- package/dist/usage/usage-api.js +16 -0
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/web-api.d.ts +38 -0
- package/dist/web-api.js +357 -14
- package/dist/web-api.js.map +1 -1
- package/dist/web-login.d.ts +35 -1
- package/dist/web-login.js +51 -5
- package/dist/web-login.js.map +1 -1
- package/dist/web-remote-access.d.ts +6 -0
- package/dist/web-remote-access.js +10 -1
- package/dist/web-remote-access.js.map +1 -1
- package/dist/web-session.d.ts +11 -0
- package/dist/web-session.js +38 -1
- package/dist/web-session.js.map +1 -1
- package/dist/web-shell-routes.d.ts +1 -1
- package/dist/web-shell-routes.js +1 -1
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-signin-link.d.ts +42 -0
- package/dist/web-signin-link.js +110 -0
- package/dist/web-signin-link.js.map +1 -0
- package/dist/windows-cli-api.d.ts +14 -0
- package/dist/windows-cli-api.js +21 -0
- package/dist/windows-cli-api.js.map +1 -1
- package/dist/windows-cli-worker.d.ts +3 -1
- package/dist/windows-cli-worker.js +18 -3
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/workspace-follow-parse.d.ts +36 -0
- package/dist/workspace-follow-parse.js +208 -0
- package/dist/workspace-follow-parse.js.map +1 -0
- package/dist/workspace-follow-records.d.ts +17 -0
- package/dist/workspace-follow-records.js +88 -0
- package/dist/workspace-follow-records.js.map +1 -0
- package/dist/workspace-follow.d.ts +41 -0
- package/dist/workspace-follow.js +143 -0
- package/dist/workspace-follow.js.map +1 -0
- package/dist/wsl-detect.d.ts +1 -0
- package/dist/wsl-detect.js +20 -0
- package/dist/wsl-detect.js.map +1 -0
- package/launcher/tmux-bundle.cjs +26 -10
- package/package.json +7 -2
- package/templates/runtime-install/install.ps1 +154 -13
package/dist/ui/panel-needs.js
CHANGED
|
@@ -19,18 +19,19 @@ import { useLease } from "/assets/app-ctx.js";
|
|
|
19
19
|
import { PanelHeader, setTitle } from "/assets/app-shell.js";
|
|
20
20
|
import { chatPath } from "/assets/app-route.js";
|
|
21
21
|
import { namesOf, namesStore } from "/assets/instance-nav.js";
|
|
22
|
-
import { Empty } from "/assets/ui-states.js";
|
|
22
|
+
import { Empty, Skeleton } from "/assets/ui-states.js";
|
|
23
23
|
import { Icon } from "/assets/ui-icons.js";
|
|
24
24
|
import { toast } from "/assets/ui-toast.js";
|
|
25
25
|
import { notifyStore, notifySupport, configDetail, reasonText, refreshNotify, setNotify } from "/assets/app-needs.js";
|
|
26
26
|
import { openSignIn, signInOffered } from "./backend-signin.js";
|
|
27
27
|
import { decideProposal, installProposals } from "./agent-proposals.js";
|
|
28
28
|
import { GeneralLocation } from "./general-location.js";
|
|
29
|
+
import { runtimeUpdateText } from "./runtime-update-status.js";
|
|
29
30
|
|
|
30
31
|
// A pre-upgrade tab retains app-i18n.js. Register these reasons when the updated panel is loaded, too.
|
|
31
32
|
register("app", {
|
|
32
|
-
en: { needs_reason_hub_proposal: "Hub action proposed: review locally", needs_reason_hub_execution_hold: "Hub work held: review locally", needs_reason_hub_unavailable: "Hub not running" },
|
|
33
|
-
"zh-TW": { needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_unavailable: "Hub 未在執行" },
|
|
33
|
+
en: { needs_reason_hub_proposal: "Hub action proposed: review locally", needs_reason_hub_execution_hold: "Hub work held: review locally", needs_reason_hub_unavailable: "Hub not running", needs_reason_tmux_hold: "Held: an old tmux server or window" },
|
|
34
|
+
"zh-TW": { needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_unavailable: "Hub 未在執行", needs_reason_tmux_hold: "已暫停:舊的 tmux 伺服器或視窗" },
|
|
34
35
|
});
|
|
35
36
|
|
|
36
37
|
register("needs", {
|
|
@@ -88,6 +89,7 @@ register("needs", {
|
|
|
88
89
|
const tn = (k, ...v) => t(`needs.${k}`, ...v);
|
|
89
90
|
/** Stale shells keep the old app-i18n.js; a missing key would otherwise show as app.needs_reason_*. */
|
|
90
91
|
function itemReason(item) {
|
|
92
|
+
if (item.runtimeUpdate) return runtimeUpdateText("attention");
|
|
91
93
|
const text = reasonText(item);
|
|
92
94
|
if (typeof text === "string" && text.startsWith("app.needs_reason_") && (item.type === "missed" || item.reason === "missed_offline")) {
|
|
93
95
|
return tn("typeMissed");
|
|
@@ -174,7 +176,7 @@ export const decisions = createStore({});
|
|
|
174
176
|
|
|
175
177
|
export function NeedsPanel({ navKey }) {
|
|
176
178
|
const lease = useLease(navKey);
|
|
177
|
-
const { needs, chatOwner: owner, instances, connections, proposals } = useStore(appStore);
|
|
179
|
+
const { ready, needsLoaded, needs, chatOwner: owner, instances, connections, proposals } = useStore(appStore);
|
|
178
180
|
// A tab opened before an upgrade has this panel but not the app.js that installs the list (it never set `proposals`):
|
|
179
181
|
// install it here then. On a current page app.js already did, and this panel reads nothing itself (#1374).
|
|
180
182
|
useEffect(() => { if (appStore.get().proposals === undefined) installProposals(); }, []);
|
|
@@ -193,7 +195,9 @@ export function NeedsPanel({ navKey }) {
|
|
|
193
195
|
useEffect(() => { lease.interval(() => tick((n) => n + 1), 30_000); }, [lease]);
|
|
194
196
|
// The chat store owns a prompt's busy/answered state; redraw when it changes (and when it arrives).
|
|
195
197
|
useEffect(() => { if (owner) return owner.subscribe(() => tick((n) => n + 1)); return undefined; }, [owner, lease]);
|
|
196
|
-
const
|
|
198
|
+
const updates = items.filter(item => item.runtimeUpdate);
|
|
199
|
+
const groups = groupNeeds(items.filter(item => !item.runtimeUpdate));
|
|
200
|
+
if (updates.length) groups.push({ instance: "", items: updates });
|
|
197
201
|
const nowMs = Date.now();
|
|
198
202
|
return html`<div data-effect-panel="needs" class="panel p-needs">
|
|
199
203
|
<${PanelHeader} title=${tn("title")} sub=${items.length + asks.length ? t("app.needsCount", items.length + asks.length) : null} />
|
|
@@ -203,9 +207,10 @@ export function NeedsPanel({ navKey }) {
|
|
|
203
207
|
${asks.map((p) => html`<${ProposalItem} key=${p.id} proposal=${p} nowMs=${nowMs} />`)}
|
|
204
208
|
${decidedHere.map(([id, d]) => html`<${ProposalResult} key=${id} result=${d} />`)}
|
|
205
209
|
</section>` : null}
|
|
206
|
-
${!
|
|
207
|
-
:
|
|
208
|
-
|
|
210
|
+
${(!ready || needsLoaded === false) && !items.length && !asks.length ? html`<${Skeleton} variant="rows" lines=${3} />`
|
|
211
|
+
: !items.length && !asks.length && !decidedHere.length ? html`<${Empty} icon="check" title=${tn("empty")} hint=${tn(chatApp ? "emptyHint" : "emptyHintWeb")} />`
|
|
212
|
+
: groups.map((g) => html`<section key=${JSON.stringify([g.instance, g.items[0]?.type === "config", !!g.items[0]?.runtimeUpdate])} class="n-group" aria-label=${g.items[0]?.runtimeUpdate ? runtimeUpdateText("attention") : g.instance}>
|
|
213
|
+
<h2 class="n-group-head">${g.items[0]?.runtimeUpdate ? runtimeUpdateText("attention") : g.instance ? html`<a href=${chatPath(g.instance)} title=${g.instance}>${nameFor(g.instance)}</a>` : g.items[0]?.type === "config" ? t("app.settings") : tn(g.items.some(i => i.type === "backend") ? "fleetSignIns" : "noAssignee")}</h2>
|
|
209
214
|
${g.items.map((item) => html`<${NeedsItem} key=${item.id} item=${item} nowMs=${nowMs} owner=${owner} />`)}
|
|
210
215
|
</section>`)}
|
|
211
216
|
<${NotifyToggle} />
|
|
@@ -266,6 +271,7 @@ function NeedsItem({ item, nowMs, owner }) {
|
|
|
266
271
|
<${Icon} name="check" size=${14} />${ack === "busy" ? tn("acknowledging") : tn("acknowledge")}</button>` : null}
|
|
267
272
|
${(item.reason === "auth_paused" || item.reason === "backend_signin") && item.signIn && signInOffered() ? html`<button type="button" class="btn btn-sm btn-primary" onClick=${() => openSignIn(item.signIn)}>${tn("signIn")}</button>` : null}
|
|
268
273
|
${item.type === "task" && item.card ? html`<a class="btn btn-sm" href=${`/ui/fleet?card=${encodeURIComponent(item.card.code)}`}>${tn("openCard")}</a>` : null}
|
|
274
|
+
${item.runtimeUpdate ? html`<a class="btn btn-sm" href="/settings/runtimes">${runtimeUpdateText("open")}</a>` : null}
|
|
269
275
|
${item.kiroChoice === true ? html`<a class="btn btn-sm" href="https://github.com/songsid/AgEnD/blob/main/src/general-knowledge/skills/kiro-engine-migration/SKILL.md" target="_blank" rel="noopener noreferrer">${tn("kiroMigration")}</a>` : null}
|
|
270
276
|
${item.instance ? html`<a class="btn btn-sm btn-ghost" href=${chatPath(item.instance)}>${tn(item.kiroChoice === true ? "kiroOpen" : "open")}</a>` : null}
|
|
271
277
|
</div>
|
package/dist/ui/panel-notices.js
CHANGED
|
@@ -8,7 +8,7 @@ import { appStore, applyNoticesSeen, useStore } from "/assets/app-store.js";
|
|
|
8
8
|
import { useLease } from "/assets/app-ctx.js";
|
|
9
9
|
import { PanelHeader, setTitle } from "/assets/app-shell.js";
|
|
10
10
|
import { chatPath } from "/assets/app-route.js";
|
|
11
|
-
import { Empty } from "/assets/ui-states.js";
|
|
11
|
+
import { Empty, ErrorState, Skeleton } from "/assets/ui-states.js";
|
|
12
12
|
import { Icon } from "/assets/ui-icons.js";
|
|
13
13
|
|
|
14
14
|
register("notices", {
|
|
@@ -64,7 +64,7 @@ function markShown() {
|
|
|
64
64
|
|
|
65
65
|
export function NoticesPanel({ navKey }) {
|
|
66
66
|
const lease = useLease(navKey);
|
|
67
|
-
const { notices, instances } = useStore(appStore);
|
|
67
|
+
const { notices, noticesError, instances, connections } = useStore(appStore);
|
|
68
68
|
const items = notices && Array.isArray(notices.items) ? notices.items : [];
|
|
69
69
|
// What was unread when the page opened stays marked "New" while it is open (it is marked read on the server at once).
|
|
70
70
|
const [seenAtOpen] = useState(() => (notices ? notices.seen | 0 : 0));
|
|
@@ -82,7 +82,8 @@ export function NoticesPanel({ navKey }) {
|
|
|
82
82
|
<${PanelHeader} title=${tn("title")} />
|
|
83
83
|
<div data-trust="panel-content" class="panel-body"><div class="col">
|
|
84
84
|
${items.length ? html`<p class="note notice-sub">${tn("sub")}</p>` : null}
|
|
85
|
-
${!
|
|
85
|
+
${!notices && noticesError ? html`<${ErrorState} onRetry=${() => appStore.get().readNotices?.()} />`
|
|
86
|
+
: !notices && (connections == null || connections === 0) ? html`<${Skeleton} variant="rows" lines=${3} />` : !items.length ? html`<${Empty} icon="bell" title=${tn("empty")} hint=${tn("emptyHint")} />`
|
|
86
87
|
: items.map((n) => html`<article key=${n.id} class=${`n-item notice${n.id > seenAtOpen ? " unread" : ""}${n.kind === "fleet" ? " bad" : ""}`}>
|
|
87
88
|
<span class="n-icon"><${Icon} name=${ICON[n.kind] || "info"} size=${18} /></span>
|
|
88
89
|
<div class="n-body">
|
|
@@ -2,6 +2,7 @@ import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
|
2
2
|
import { register, t } from "/assets/app-i18n.js";
|
|
3
3
|
import { useLease } from "/assets/app-ctx.js";
|
|
4
4
|
import { Icon } from "/assets/ui-icons.js";
|
|
5
|
+
import { Skeleton } from "/assets/ui-states.js";
|
|
5
6
|
import { Dialog } from "/assets/ui-dialog.js";
|
|
6
7
|
import { Menu } from "/assets/ui-menu.js";
|
|
7
8
|
import { appStore, useStore } from "/assets/app-store.js";
|
|
@@ -11,8 +12,10 @@ import { CliProductMark, cliLabel } from "./cli-picker.js";
|
|
|
11
12
|
import { WindowsCliPanel } from "./panel-windows-cli.js";
|
|
12
13
|
import { useRuntimeCatalog } from "./runtime-catalog.js";
|
|
13
14
|
import { runtimeConnectCommand, runtimeInstallCommand, runtimeWindowsConnectCommand } from "./runtime-commands.js";
|
|
15
|
+
import { RuntimeUpdateNotice, runtimeUpdateText, runtimeFreshInstallCommand } from "./runtime-update-status.js";
|
|
14
16
|
import { credentialProfileView, credentialProfileState } from "./credential-profile-select.js";
|
|
15
17
|
import { identityText } from "./account-identity.js";
|
|
18
|
+
import { CliInstall, offersCliInstall } from "./runtime-cli-install.js";
|
|
16
19
|
import { useWindowsCliCatalog, refreshWindowsCliCatalog, useWindowsCliCatalogSnapshot } from "./windows-cli-catalog.js";
|
|
17
20
|
|
|
18
21
|
/** The install tabs', command cards' and account list's stylesheet, linked once by this lazy page (a tab opened before an upgrade has an app.css without these rules). */
|
|
@@ -156,7 +159,7 @@ function paneVerificationTag(cli, text) {
|
|
|
156
159
|
return key ? html`<span class="tag" title=${text(`${key}Hint`)}>${text(key)}</span>` : null;
|
|
157
160
|
}
|
|
158
161
|
export function machineTime(value) { const date=new Date(value); return value && Number.isFinite(date.getTime()) ? date.toLocaleString() : machineText("unknown"); }
|
|
159
|
-
function MachineCard({ machine, busy, action, openDiagnostics, probe }) {
|
|
162
|
+
function MachineCard({ machine, busy, action, openDiagnostics, probe, repairUpdate, lease, onChanged }) {
|
|
160
163
|
const [editing,setEditing] = useState(false), [name,setName] = useState(machine.name), [info,setInfo] = useState(false);
|
|
161
164
|
const detection = useWindowsCliCatalogSnapshot(machine.isLocal ? "" : machine.id);
|
|
162
165
|
const probing = machine.probing || detection.loading;
|
|
@@ -167,18 +170,22 @@ function MachineCard({ machine, busy, action, openDiagnostics, probe }) {
|
|
|
167
170
|
!local && status !== "revoked" && {key:"rename",label:machineText("rename"),icon:"edit",onSelect:()=>setEditing(true)},
|
|
168
171
|
!local && status !== "revoked" && {key:"revoke",label:machineText("revoke"),icon:"close",danger:true,onSelect:()=>action(machine,"revoke")}];
|
|
169
172
|
return html`<article class=${`runtime-machine${local ? " runtime-native-local" : ""}${revoked ? " is-revoked" : ""}`} data-machine-id=${local ? "local" : machine.id}>
|
|
170
|
-
<header><span class="runtime-machine-icon"><${Icon} name="fleet" size=${22} /></span><div><h3>${machine.name}${revoked ? null : html`<span class="runtime-kind">${machineText(local ? "localBadge" : "pairedBadge")}</span>`}</h3><p>${machine.platform === "win32" ? "Windows" : machine.platform || machineText("unknown")}${machine.hostname && machine.hostname !== machine.name ? ` · ${machine.hostname}` : ""} · ${machineText("cliCount",clis.length)}</p></div><span class=${`runtime-status is-${status}`}><span class="windows-cli-dot"></span>${machineText(["available","online","offline","pending","revoked"].includes(status) ? status : "unknown")}</span></header>
|
|
173
|
+
<header><span class="runtime-machine-icon"><${Icon} name="fleet" size=${22} /></span><div><h3>${machine.name}${revoked ? null : html`<span class="runtime-kind">${machineText(local ? "localBadge" : "pairedBadge")}</span>`}</h3><p>${machine.platform === "win32" ? "Windows" : machine.platform || machineText("unknown")}${machine.hostname && machine.hostname !== machine.name ? ` · ${machine.hostname}` : ""} · ${machineText((clis.length) === 1 ? "cliCountOne" : "cliCount",clis.length)}</p></div><span class=${`runtime-status is-${status}`}><span class="windows-cli-dot"></span>${machineText(["available","online","offline","pending","revoked"].includes(status) ? status : "unknown")}</span></header>
|
|
171
174
|
${!local && !revoked && machine.runtimeCompatibility === "incompatible" ? html`<p class="runtime-reinstall" role="alert">${machineText("needsReinstall")}</p>` : null}
|
|
175
|
+
${!local && !revoked && status !== "pending" ? html`<${RuntimeUpdateNotice} machine=${machine} onRepair=${() => repairUpdate(machine)} />` : null}
|
|
172
176
|
${revoked ? null : html`<p class="runtime-inventory-time note">${machine.inventoryUpdatedAt ? machineText("inventoryAt",machineTime(machine.inventoryUpdatedAt)) : machineText("neverDetected")}</p>`}
|
|
173
177
|
${status === "pending" ? html`<div class="runtime-approval"><p>${machineText("fingerprintLabel")}<code class="runtime-pairing-fingerprint">${machine.pairingFingerprint || machineText("unknown")}</code></p><p class="note">${machineText("approvalHint")}</p></div>` : null}
|
|
174
178
|
${revoked ? html`<p class="note runtime-revoked-note" role="status">${machineText("revokedNote")}</p>` : clis.length ? html`<table class="runtime-cli-table" aria-label=${machineText("cli")}><thead><tr><th>${machineText("cli")}</th><th>${machineText("versionColumn")}</th><th>${machineText("signInColumn")}</th></tr></thead><tbody>${clis.map(cli=>html`<tr key=${cli.id}><td><span class="runtime-cli-product"><${CliProductMark} id=${cli.id} size=${21} /><strong>${cliLabel(cli.id)}</strong></span>${cli.supports?.execution === false ? html`<small>${machineText("detectionOnly")}</small>` : null}</td><td><span class="runtime-cli-version" title=${cli.version || ""}>${cli.version || "—"}</span>${paneVerificationTag(cli,machineText)}</td><td><span class=${`runtime-cli-auth ${cli.authenticated === true ? "is-signed-in" : ""}`}><span class="windows-cli-dot"></span>${machineText(cli.authenticated === true ? "signedIn" : cli.authenticated === false ? "signedOut" : "authShort")}</span>${cli.authenticated === true && identityText(cli.identity) ? html`<small class="runtime-account" data-account="default">${identityText(cli.identity)}</small>` : null}</td></tr>`)}</tbody></table>` : html`<p class="note runtime-no-clis">${machineText(local ? "noLocalClis" : "noClis")}</p>`}
|
|
175
179
|
${!local && !revoked && status !== "pending" ? html`<${CredentialProfiles} machine=${machine} />` : null}
|
|
180
|
+
${offersCliInstall(machine) && lease ? html`<${CliInstall} machine=${machine} lease=${lease} onChanged=${onChanged} />` : null}
|
|
176
181
|
<div class="runtime-machine-actions">${ready ? html`<button type="button" class="btn btn-sm runtime-inspect" onClick=${() => openDiagnostics(local ? "" : machine.id)}>${machineText("diagnosticTitle")}</button><button type="button" class="btn btn-sm runtime-probe" disabled=${busy || probing || !local && status !== "online"} onClick=${() => probe(local ? "" : machine.id)}><${Icon} name="restart" size=${14} cls=${probing ? "out-spin" : ""} />${machineText(probing ? "probeBusy" : "probeAgain")}</button>` : null}
|
|
177
182
|
${status === "pending" ? html`<button type="button" class="btn btn-primary btn-sm" disabled=${busy || !machine.pairingFingerprint} onClick=${() => action(machine,"approve",{fingerprint:machine.pairingFingerprint})}>${machineText("approve")}</button>` : null}
|
|
178
183
|
<${Menu} cls="runtime-machine-menu" label=${machineText("machineActions",machine.name)} disabled=${busy} items=${menuItems} />
|
|
179
184
|
</div>
|
|
180
185
|
${info ? html`<${Dialog} title=${`${machineText("machineInfo")} · ${machine.name}`} onClose=${()=>setInfo(false)}><dl class="runtime-machine-facts"><dt>${machineText("machineName")}</dt><dd>${machine.name}</dd><dt>${machineText("hostName")}</dt><dd>${machine.hostname || machine.inventory?.hostname || machineText("unknown")}</dd><dt>${machineText("platform")}</dt><dd>${machine.platform === "win32" ? "Windows" : machine.platform}</dd>${local ? html`<dt>${machineText("home")}</dt><dd>${machine.inventory?.home || machineText("unknown")}</dd>` : html`<dt>${machineText("version")}</dt><dd class="runtime-reported-version">${machine.runtimeInfo?.version || machineText(machine.runtimeInfo ? "versionUnreadable" : "versionNotReported")}</dd>${machine.runtimeInfo ? html`<dt>${machineText("buildId")}</dt><dd class="runtime-reported-build"><code>${machine.runtimeInfo?.buildId || machineText("buildUnavailable")}</code></dd><dt>${machineText("protocols")}</dt><dd>${machine.runtimeInfo?.protocolVersions?.map(v=>`v${v}`).join(", ") || machineText("protocolUnknown")}</dd>` : null}<dt>${machineText("compatibility")}</dt><dd class="runtime-compatibility">${machineText(["compatible","legacy","incompatible"].includes(machine.runtimeCompatibility) ? machine.runtimeCompatibility : "protocolUnknown")}</dd>${machine.runtimeInfo ? html`<dt>${machineText("capabilities")}</dt><dd>${machine.runtimeInfo?.capabilities?.map(capability=>["exec","mcp","panes"].includes(capability) ? machineText(`capability_${capability}`) : capability === "credential-profiles" ? machineText("capability_credentialProfiles") : capability).join(" · ") || machineText("unknown")}</dd>` : null}<dt>${machineText("lastSeenLabel")}</dt><dd>${machineTime(machine.lastSeenAt)}</dd><dt>${machineText("identity")}</dt><dd><code>${machine.id}</code></dd>`}</dl></${Dialog}>` : null}
|
|
181
|
-
${editing ? html`<${Dialog} title=${machineText("rename")} onClose=${()=>setEditing(false)} busy=${busy}
|
|
186
|
+
${editing ? html`<${Dialog} title=${machineText("rename")} onClose=${()=>setEditing(false)} busy=${busy}
|
|
187
|
+
actions=${html`<button type="button" class="btn" disabled=${busy} onClick=${()=>setEditing(false)}>${machineText("cancel")}</button><button class="btn btn-primary" type="submit" form=${`runtime-rename-${machine.id}`} disabled=${busy || !name.trim()}>${machineText("save")}</button>`}>
|
|
188
|
+
<form id=${`runtime-rename-${machine.id}`} class="runtime-rename" onSubmit=${event=>{event.preventDefault();if(name.trim())void action(machine,"rename",{name:name.trim()}).then(ok=>{if(ok)setEditing(false);});}}><label class="field"><span>${machineText("name")}</span><input value=${name} maxLength=${100} onInput=${event=>setName(event.target.value)} /></label></form></${Dialog}>` : null}
|
|
182
189
|
</article>`;
|
|
183
190
|
}
|
|
184
191
|
function RuntimeDiagnosticsDialog({ navKey, machineId, machine, enabled, drafts, session, taskLease, onChanged, onClose }) {
|
|
@@ -255,6 +262,8 @@ function RuntimeSwitches({ lease, onChanged, computers }) {
|
|
|
255
262
|
<p>${machineText("guidePair")}</p><p>${machineText("guideApprove")}</p>
|
|
256
263
|
<a class="runtime-guide-link" href=${RUNTIME_DOCS} target="_blank" rel="noopener noreferrer">${machineText("remoteRuntimeDocs")}<${Icon} name="external" size=${14} /></a>
|
|
257
264
|
</details><p class="note">${machineText("connectionNote")}</p></details>`;
|
|
265
|
+
if (!view && !unavailable) return html`<div class="runtime-layout"><div class="runtime-main">${computers}<section class="runtime-switches" aria-label=${machineText("switches")}><h3>${machineText("switches")}</h3>
|
|
266
|
+
${error ? html`<p role="alert">${error}</p><button type="button" class="btn btn-sm" onClick=${() => { setError(""); load().catch(e => { if (lease.current()) setError(machineText("switchFailed", e.message)); }); }}>${machineText("retry")}</button>` : html`<${Skeleton} variant="rows" lines=${3} />`}</section></div></div>`;
|
|
258
267
|
if (unavailable) return html`<div class="runtime-layout"><div class="runtime-main">${computers}<section class="runtime-switches" aria-label=${machineText("switches")}><div class="runtime-switches-main"><h3>${machineText("switches")}</h3><p class="note">${machineText("switchesUnavailable")}</p></div></section></div></div>`;
|
|
259
268
|
return html`<div class="runtime-layout"><div class="runtime-main">${computers}<section class="runtime-switches" aria-label=${machineText("switches")}>
|
|
260
269
|
<details class="runtime-policy s-ui-disclosure"><summary><${Icon} name="settings" size=${22} /><span><strong>${machineText("policies")}</strong><small>${machineText("policySummary")}</small></span></summary>
|
|
@@ -295,6 +304,7 @@ export function RuntimesPanel({navKey}) {
|
|
|
295
304
|
const [tab,setTab]=useState("windows"), [copiedCommand,setCopiedCommand]=useState(""), [installCopied,setInstallCopied]=useState(false);
|
|
296
305
|
// The administrator-only report of install.ps1's SHA-256 (what the server sends); the install command pins it.
|
|
297
306
|
const [installer,setInstaller]=useState({status:"idle",sha:"",version:""});
|
|
307
|
+
const [repairMachine,setRepairMachine]=useState(null);
|
|
298
308
|
const [diagnosticMachineId,setDiagnosticMachineId]=useState(null);
|
|
299
309
|
// Computers revoked on this page stay on screen as revoked until the page is left or reloaded; the server keeps the record.
|
|
300
310
|
const [revokedHere,setRevokedHere]=useState(() => new Map());
|
|
@@ -316,7 +326,7 @@ export function RuntimesPanel({navKey}) {
|
|
|
316
326
|
else setInstaller({status:"error",sha:"",version:""});
|
|
317
327
|
} catch { if(lease.current())setInstaller({status:"error",sha:"",version:""}); }
|
|
318
328
|
};
|
|
319
|
-
useEffect(() => { if (pairing && installer.status === "idle") void loadInstaller(); },[pairing,installer.status]);
|
|
329
|
+
useEffect(() => { if ((pairing || repairMachine) && installer.status === "idle") void loadInstaller(); },[pairing,repairMachine,installer.status]);
|
|
320
330
|
const post=async(path,body={}) => {
|
|
321
331
|
const response=await lease.fetch(path,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(body)});
|
|
322
332
|
const value=await response.json();
|
|
@@ -391,35 +401,46 @@ export function RuntimesPanel({navKey}) {
|
|
|
391
401
|
if(typeof document !== "undefined")lease.timeout(() => document.getElementById(`runtime-install-tab-${tabItems[next].id}`)?.focus(),0);
|
|
392
402
|
};
|
|
393
403
|
const installTabs=html`<div class="s-page-tabs runtime-install-tabs" role="tablist" aria-label=${machineText("installMethod")}>${tabItems.map((item,index) => html`<button key=${item.id} id=${`runtime-install-tab-${item.id}`} type="button" role="tab" class=${tab === item.id ? "on" : ""} aria-selected=${tab === item.id ? "true" : "false"} aria-controls="runtime-install-panel" tabindex=${tab === item.id ? 0 : -1} onClick=${() => setTab(item.id)} onKeyDown=${event => tabKeys(event,index)}>${item.label}</button>`)}</div>`;
|
|
394
|
-
const addressStep=step(1,machineText("server"),html`<input type="url" aria-label=${machineText("server")} value=${server} disabled=${busy === "download"} spellcheck=${false} onInput=${event => setServer(event.target.value)}
|
|
404
|
+
const addressStep=step(1,machineText("server"),html`<div class="field"><input type="url" aria-label=${machineText("server")} value=${server} disabled=${busy === "download"} spellcheck=${false} onInput=${event => setServer(event.target.value)} /></div><p class="note">${machineText("serverHint")}</p>${command ? null : html`<p role="alert">${machineText("serverInvalid")}</p>`}`);
|
|
395
405
|
const approveStep=step(4,machineText("stepApprove"),html`<p class="note">${machineText("stepApproveHint")}</p>`);
|
|
396
406
|
const windowsSteps=html`${addressStep}
|
|
397
407
|
${step(2,machineText("stepInstall"),html`<p class="note">${machineText("stepInstallHint")}</p>
|
|
398
|
-
${installer.status === "loading" || installer.status === "idle" ? html
|
|
408
|
+
${installer.status === "loading" || installer.status === "idle" ? html`<${Skeleton} lines=${3} label=${machineText("installerLoading")} />` : null}
|
|
399
409
|
${installer.status === "error" ? html`<p class="runtime-installer-error" role="alert">${machineText("installerUnavailable")} <button type="button" class="btn btn-ghost btn-sm" onClick=${() => void loadInstaller()}>${machineText("installerRetry")}</button></p>` : null}
|
|
400
410
|
${installCommand ? html`${commandCard("install",machineText("installCommand"),installCommand)}<p class="note runtime-installer-hash">${machineText("installerHash")} <code>${installer.sha}</code></p><p class="note">${machineText("tlsHelp")}</p><p class="note">${machineText("restrictedHelp")}</p>` : null}`)}
|
|
401
411
|
${step(3,machineText("stepConnect"),html`<p class="note">${machineText("stepConnectHint")}</p>${windowsConnectCommand ? commandCard("connect",machineText("connectCommand"),windowsConnectCommand) : null}`)}
|
|
402
412
|
${approveStep}`;
|
|
403
413
|
const zipSteps=html`${addressStep}
|
|
404
414
|
${step(2,machineText("stepDownload"),html`<p class="note">${machineText("stepZipHint")}</p>${download()}${downloadedFor ? html`<p class="note" role="status">${machineText("downloadedFor",downloadedFor)}</p>` : null}`)}
|
|
405
|
-
${step(3,machineText("stepLaunch"),html`<p class="note">${machineText("stepLaunchHint")}</p>${command ? html`<details class="runtime-manual-command"><summary>${machineText("manualCommand")}</summary><label><span>${machineText("command")}</span><input class="runtime-command" value=${command} readOnly=${true} spellcheck=${false} /></label><p class="note">${machineText("manualMultiHint")}</p></details>` : null}`)}
|
|
415
|
+
${step(3,machineText("stepLaunch"),html`<p class="note">${machineText("stepLaunchHint")}</p>${command ? html`<details class="runtime-manual-command"><summary>${machineText("manualCommand")}</summary><label class="field"><span>${machineText("command")}</span><input class="runtime-command" value=${command} readOnly=${true} spellcheck=${false} /></label><p class="note">${machineText("manualMultiHint")}</p></details>` : null}`)}
|
|
406
416
|
${approveStep}`;
|
|
407
417
|
|
|
408
|
-
const computers = html`<section class="runtime-computers"><div class="runtime-computers-heading"><h3>${machineText("computersTitle")}</h3><
|
|
409
|
-
<section class="runtime-machines" aria-label=${machineText("machines")}>${allMachines.map(machine=>html`<${MachineCard} key=${machine.isLocal ? "local" : machine.id} machine=${machine} busy=${!!busy || !!machine.probing} action=${action} openDiagnostics=${openDiagnostics} probe=${probeTarget} />`)}</section>
|
|
418
|
+
const computers = html`<section class="runtime-computers"><div class="runtime-computers-heading"><h3>${machineText("computersTitle")}</h3><div class="note">${state.data ? machineText((allMachines.length) === 1 ? "machineCountOne" : "machineCount",allMachines.length) : !state.error ? html`<${Skeleton} variant="inline" lines=${1} />` : "—"}</div></div>
|
|
419
|
+
<section class="runtime-machines" aria-label=${machineText("machines")}>${!state.data && !state.error ? html`<${Skeleton} variant="cards" lines=${2} label=${machineText("loading")} />` : allMachines.map(machine=>html`<${MachineCard} key=${machine.isLocal ? "local" : machine.id} lease=${lease} onChanged=${state.refresh} machine=${machine} busy=${!!busy || !!machine.probing} action=${action} openDiagnostics=${openDiagnostics} probe=${probeTarget} repairUpdate=${setRepairMachine} />`)}</section>
|
|
420
|
+
${repairMachine ? html`<${Dialog} title=${runtimeUpdateText("repairTitle")} onClose=${() => setRepairMachine(null)}>
|
|
421
|
+
<p>${runtimeUpdateText("repairHint")}</p>
|
|
422
|
+
${installer.status === "idle" || installer.status === "loading" ? html`<${Skeleton} lines=${3} label=${machineText("installerLoading")} />` : null}
|
|
423
|
+
${installer.status === "error" ? html`<p role="alert">${machineText("installerUnavailable")} <button class="btn btn-sm" onClick=${() => void loadInstaller()}>${machineText("installerRetry")}</button></p>` : null}
|
|
424
|
+
${installer.status === "ready" ? commandCard("update-repair",machineText("installCommand"),runtimeFreshInstallCommand(typeof location === "undefined" ? "" : location.origin,installer.sha)) : null}
|
|
425
|
+
</${Dialog}>` : null}
|
|
410
426
|
${state.data && !allMachines.some(machine=>!machine.isLocal) ? html`<p class="note runtime-empty-remotes">${machineText("empty")}</p>` : null}
|
|
411
427
|
<article class="runtime-host-note"><${Icon} name="info" size=${18} /><span>${machineText("hostLocationNote")}</span></article></section>`;
|
|
412
428
|
|
|
413
429
|
return html`<section class="runtime-settings">
|
|
414
430
|
<header class="runtime-heading s-page-head"><div><h2>${machineText("title")}<span class="s-scope">${machineText("fleetScope")}</span></h2><p class="s-page-lead">${machineText("lead")}</p></div><div><button type="button" class="btn btn-primary btn-sm" disabled=${!!busy || state.data?.enabled !== true} onClick=${connect}><${Icon} name="plus" size=${15} />${machineText("connect")}</button>${state.data?.enabled === true && !pairing ? download(true) : null}<button type="button" class="btn btn-sm" disabled=${state.loading} onClick=${state.refresh}><${Icon} name="restart" size=${15} />${machineText("refresh")}</button></div></header>
|
|
415
431
|
${state.data?.enabled === false ? html`<p class="note">${machineText("disabled")}</p>` : null}
|
|
416
|
-
${state.loading && !state.data ? html`<p role="status" aria-busy="true"><span class="out-spin" aria-hidden="true"></span> ${machineText("loading")}</p>` : null}
|
|
417
432
|
${error || state.error ? html`<div class="runtime-error" role="alert"><p>${error || state.error}</p>${state.data && state.error ? html`<p>${machineText("seenCached")}</p>` : null}<button type="button" class="btn btn-sm" onClick=${state.refresh}>${machineText("retry")}</button></div>` : null}
|
|
418
433
|
${pairing ? html`<section class="runtime-pairing" aria-label=${machineText("pairing")}><header><h3>${machineText("pairing")}</h3><p class="note">${machineText("pairingHint")}</p></header><div class="runtime-pairing-body"><div class="runtime-install">${installTabs}<div id="runtime-install-panel" class="runtime-install-panel" role="tabpanel" aria-labelledby=${`runtime-install-tab-${tab}`} data-install-method=${tab}><ol class="runtime-steps">
|
|
419
434
|
${tab === "windows" ? windowsSteps : zipSteps}
|
|
420
|
-
</ol></div></div><aside class=${`runtime-pair-card${awaitingApproval ? " is-pending" : ""}`}><label><span>${machineText("pairingCode")}</span><div class="runtime-pair-code-row"><input class="runtime-pair-code" value=${pairing.code} readOnly=${true} spellcheck=${false} autocomplete="off" /><button type="button" class="btn btn-sm" onClick=${copyCode}><${Icon} name="copy" size=${15} />${machineText(copied ? "codeCopied" : "copyCode")}</button></div></label><p class="note">${machineText("expires",machineTime(pairing.expiresAt))}</p><p class="runtime-pair-status" role="status"><span class="windows-cli-dot"></span>${machineText(awaitingApproval ? "pairingApprove" : "pairingWait")}</p><div class="runtime-pair-actions"><button type="button" class="btn btn-sm" disabled=${!!busy} onClick=${connect}>${machineText("newCode")}</button><button type="button" class="btn btn-ghost btn-sm" onClick=${() => setPairing(null)}>${machineText("closeCode")}</button></div></aside></div></section>` : null}
|
|
435
|
+
</ol></div></div><aside class=${`runtime-pair-card${awaitingApproval ? " is-pending" : ""}`}><label class="field"><span>${machineText("pairingCode")}</span><div class="runtime-pair-code-row"><input class="runtime-pair-code" value=${pairing.code} readOnly=${true} spellcheck=${false} autocomplete="off" /><button type="button" class="btn btn-sm" onClick=${copyCode}><${Icon} name="copy" size=${15} />${machineText(copied ? "codeCopied" : "copyCode")}</button></div></label><p class="note">${machineText("expires",machineTime(pairing.expiresAt))}</p><p class="runtime-pair-status" role="status"><span class="windows-cli-dot"></span>${machineText(awaitingApproval ? "pairingApprove" : "pairingWait")}</p><div class="runtime-pair-actions"><button type="button" class="btn btn-sm" disabled=${!!busy} onClick=${connect}>${machineText("newCode")}</button><button type="button" class="btn btn-ghost btn-sm" onClick=${() => setPairing(null)}>${machineText("closeCode")}</button></div></aside></div></section>` : null}
|
|
421
436
|
<${RuntimeSwitches} lease=${lease} onChanged=${state.refresh} computers=${computers} />
|
|
422
437
|
${diagnosticMachineId !== null ? html`<${RuntimeDiagnosticsDialog} key=${diagnosticMachineId || "local"} navKey=${navKey} machineId=${diagnosticMachineId} machine=${target} enabled=${diagnosticMachineId !== "" || windowsCli} drafts=${drafts.current} session=${taskSessions.current.get(diagnosticMachineId)} taskLease=${lease} onChanged=${state.refresh} onClose=${()=>setDiagnosticMachineId(null)} />` : null}
|
|
423
438
|
<p class="note runtime-operations-note">${machineText("operationsNote")}</p>
|
|
424
439
|
</section>`;
|
|
425
440
|
}
|
|
441
|
+
|
|
442
|
+
// Ridge #3321 S17: one computer, one CLI — not "1 computers", "1 CLIs".
|
|
443
|
+
register("machines", {
|
|
444
|
+
en: { cliCountOne: "{0} CLI", machineCountOne: "{0} computer" },
|
|
445
|
+
"zh-TW": { cliCountOne: "{0} 個 CLI", machineCountOne: "{0} 台電腦" },
|
|
446
|
+
});
|
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
NewBotDialog, Override, Select, ask, impactText, inAgentDefaults, valueText,
|
|
42
42
|
} from "./settings-dialogs.js";
|
|
43
43
|
import { SharedAgentSettings, sharedNotes } from "./settings-shared.js";
|
|
44
|
+
import { QuotaNoticeSettings, quotaNoticeText } from "./settings-quota-notice.js";
|
|
44
45
|
import { SetupWizard } from "./settings-wizard.js";
|
|
45
46
|
import { CreateInstanceDialog } from "./panel-fleet.js";
|
|
46
47
|
import { RuntimesPanel } from "./panel-runtimes.js";
|
|
@@ -59,22 +60,7 @@ import { syncStage, useDraft } from "./settings-draft.js";
|
|
|
59
60
|
import { WebAuthorityCard } from "./settings-web-authority.js";
|
|
60
61
|
import { OutsideCard } from "./settings-outside.js";
|
|
61
62
|
import { DevicesCard } from "./settings-devices.js";
|
|
62
|
-
|
|
63
|
-
function HubCardSlot() {
|
|
64
|
-
const [Card, setCard] = useState(null);
|
|
65
|
-
useEffect(() => { let live = true; import("./settings-hub-membership.js").then((m) => { if (live) setCard(() => m.HubMembershipSettings); }, () => {}); return () => { live = false; }; }, []);
|
|
66
|
-
return Card ? html`<${Card} />` : null;
|
|
67
|
-
}
|
|
68
|
-
function HubBrowserCertificateSlot() {
|
|
69
|
-
const [Card, setCard] = useState(null);
|
|
70
|
-
useEffect(() => { let live = true; import("./settings-hub-browser-certificate.js").then(m => { if (live) setCard(() => m.HubBrowserCertificateSettings); }, () => {}); return () => { live = false; }; }, []);
|
|
71
|
-
return Card ? html`<${Card} />` : null;
|
|
72
|
-
}
|
|
73
|
-
function HubRetentionSlot() {
|
|
74
|
-
const [Card, setCard] = useState(null);
|
|
75
|
-
useEffect(() => { let live = true; import("./settings-hub-retention.js").then(m => { if (live) setCard(() => m.HubRetentionSettings); }, () => {}); return () => { live = false; }; }, []);
|
|
76
|
-
return Card ? html`<${Card} />` : null;
|
|
77
|
-
}
|
|
63
|
+
import { HubSection, hubSectionText } from "./settings-hub-section.js";
|
|
78
64
|
import { NamedLinkTest, setTypedTunnelToken } from "./settings-named-test.js";
|
|
79
65
|
import { SignInList } from "./backend-signin.js";
|
|
80
66
|
import { AccountsView, defaultsBackendOptions } from "./accounts-view.js"; // #3212: SignInList stays exported for a page that still imports it
|
|
@@ -86,13 +72,13 @@ import { useRuntimeCatalog } from "./runtime-catalog.js";
|
|
|
86
72
|
import { ShortcutsHelpRow } from "./settings-shortcuts.js";
|
|
87
73
|
import { GeneralLocation } from "./general-location.js";
|
|
88
74
|
|
|
89
|
-
const tn = (k, ...v) => t(`settings.${k}`, ...v);
|
|
75
|
+
const tn = (k, ...v) => k === "sec_notifications" ? quotaNoticeText().title : t(`settings.${k}`, ...v);
|
|
90
76
|
/** What a refused change says to a person: the server's code in words (the code itself only for one not listed). */
|
|
91
77
|
const APPLY_ERRORS = new Set(["unsupported_sensitive_effect", "confirmation_diff_too_large", "session_required", "admin_required", "settings_changed",
|
|
92
78
|
"request_no_longer_current", "too_many_pending_changes", "fleet_unavailable", "invalid_settings_effect", "settings_confirmation_unavailable", "failed"]);
|
|
93
79
|
// #2726: a code or words of the setup host (the wizard's commit) in the page's language; anything else as it came.
|
|
94
80
|
export const applyErrorText = (code) => (APPLY_ERRORS.has(code) ? tn(`applyError_${code}`) : tn("applyErrorOther", hostText(String(code), lang())));
|
|
95
|
-
const ICONS = { preferences: "user", look: "palette", agents: "bot", runtimes: "view", "agent-defaults": "sliders", chat: "chat", "web-dashboard": "globe", access: "key", advanced: "code" };
|
|
81
|
+
const ICONS = { preferences: "user", look: "palette", agents: "bot", notifications: "sliders", runtimes: "view", "agent-defaults": "sliders", chat: "chat", "web-dashboard": "globe", access: "key", hub: "plug", advanced: "code" };
|
|
96
82
|
|
|
97
83
|
/** GET under the panel's lease → { ok, status, body }. */
|
|
98
84
|
async function read(lease, path) {
|
|
@@ -416,6 +402,7 @@ export function SettingsPanel({ route, navKey }) {
|
|
|
416
402
|
: section === "agents" ? html`<${YamlLock} staged=${staged}><${Agents} ctx=${ctx} search=${search} clearSearch=${() => setSearch("")} openDialog=${toDialog} /></${YamlLock}><details class="s-ui-disclosure s-ai-accounts"><summary><span>${layoutText("aiAccounts")}</span><small>${layoutText("aiAccountsSummary")}</small></summary><div class="s-disclosure-body s-auth-body">
|
|
417
403
|
<div class="s-auth-scope"><${Icon} name="view" size=${18} /><div><strong>${layoutText("aiHostScope")}</strong><p>${layoutText("aiAccountsHint")}</p><a href=${settingsPath("runtimes")}>${layoutText("aiWindowsLink")}<span aria-hidden="true">→</span></a></div></div>
|
|
418
404
|
<${AccountsView} instances=${ctx.fleet.instances || {}} stageAgent=${ctx.stageAgent}
|
|
405
|
+
openAgent=${(name) => { const insts = ctx.fleet.instances || {}; if (Object.hasOwn(insts, name)) toDialog({ kind: "agent", name, inst: insts[name] }); }}
|
|
419
406
|
stageDefault=${(backend, profile) => {
|
|
420
407
|
// One change for every CLI's fleet default, carrying the whole map (the write replaces it whole).
|
|
421
408
|
const opts = defaultsBackendOptions((ctx.fleet.defaults || {}).backend_options, stagedRef.current.get("defaults:account")?.request?.body?.backend_options, backend, profile);
|
|
@@ -424,13 +411,16 @@ export function SettingsPanel({ route, navKey }) {
|
|
|
424
411
|
request: { method: "PUT", url: "/api/settings/fleet/defaults", body: { backend_options: opts } } });
|
|
425
412
|
}} />${ctx.providerOk ? html`<${ProviderKeys} ctx=${ctx} />` : html`<section class="s-auth-section s-api-unavailable"><header class="s-auth-section-head"><div><h3>${layoutText("apiKeysTitle")}</h3><p>${layoutText("apiKeysHint")}</p></div><span class="s-auth-state">${layoutText("apiKeysUnavailableState")}</span></header><p class="note">${layoutText("apiKeysUnavailable")}</p></section>`}
|
|
426
413
|
</div></details>`
|
|
427
|
-
: section === "agent-defaults" ? html`<${GeneralLocation} /><${YamlLock} staged=${staged}><${General} key=${formKey} ctx=${ctx} part="fleet"
|
|
414
|
+
: section === "agent-defaults" ? html`<${GeneralLocation} /><${YamlLock} staged=${staged}><${General} key=${formKey} ctx=${ctx} part="fleet" />${!SETTINGS_SECTIONS.includes("notifications") ? html`<${QuotaNoticeSettings} key=${`quota:${formKey}`} ctx=${ctx} />` : null}</${YamlLock}>`
|
|
415
|
+
: section === "notifications" ? html`<${YamlLock} staged=${staged}><${QuotaNoticeSettings} key=${formKey} ctx=${ctx} /></${YamlLock}>`
|
|
428
416
|
: section === "chat" ? html`<${YamlLock} staged=${staged}><${Bots} ctx=${ctx} search=${search} openDialog=${toDialog} /></${YamlLock}>
|
|
429
417
|
<${WebSection} key=${formKey} ctx=${ctx} staged=${staged} part="chat" />
|
|
430
418
|
<div id="classicbot" class="s-anchor s-classic-area"><section class="card s-chat-classic"><h2 class="s-ap-group">ClassicBot</h2><${Classic} ctx=${ctx} search=${search} openDialog=${toDialog} /></section>
|
|
431
419
|
<details class="s-ui-disclosure s-classic-defaults"><summary>${layoutText("classicDefaults")}</summary><div class="s-disclosure-body"><${General} key=${formKey} ctx=${ctx} part="classic" /></div></details></div>`
|
|
432
420
|
: section === "web-dashboard" ? html`<${WebSection} key=${formKey} ctx=${ctx} staged=${staged} part="dashboard" /><${AppearanceSection} ...${you} part="dashboard" />`
|
|
433
421
|
: section === "access" ? html`<${WebSection} key=${formKey} ctx=${ctx} staged=${staged} part="access" />`
|
|
422
|
+
// alpha.6 feedback (#2): the Hub cards have their own section (they were under Access & security, unfound by search).
|
|
423
|
+
: section === "hub" ? html`<${HubSection} overPublicLink=${typeof document !== "undefined" && document.body?.dataset?.publicLink === "1"} hubHost=${!!ctx.fleet.hub?.hubId} />`
|
|
434
424
|
: html`<${AdvancedSettings} ctx=${ctx} staged=${staged} formKey=${formKey} draftEpoch=${draftEpoch} />`;
|
|
435
425
|
// #2347 §6: the setting a search result opened — brought into view once its section is drawn (its data may still be
|
|
436
426
|
// on its way), focused, and flashed for 2 s.
|
|
@@ -715,8 +705,9 @@ export function ProfileCard({ embedded = false } = {}) {
|
|
|
715
705
|
};
|
|
716
706
|
const busy = state.phase !== "ready";
|
|
717
707
|
const changed = draft.trim() !== state.name;
|
|
708
|
+
const loading = state.phase === "loading";
|
|
718
709
|
const initial = [...(state.shown || state.name || "web-user")][0]?.toUpperCase() || "W";
|
|
719
|
-
const fields = html`<div class
|
|
710
|
+
const fields = html`<div class=${`s-pref-profile-layout${loading ? " sk-reserve" : ""}`} aria-hidden=${loading ? "true" : undefined} inert=${loading || undefined}>
|
|
720
711
|
${embedded ? html`<span class="s-pref-avatar" aria-hidden="true">${initial}</span>` : null}
|
|
721
712
|
<div class="s-pref-profile-main"><div class="field"><label for="profile-name">${tn("profileName")}</label>
|
|
722
713
|
<div class="s-pref-name-action"><input id="profile-name" type="text" maxlength="200" autocomplete="nickname" value=${draft} disabled=${busy}
|
|
@@ -729,8 +720,10 @@ export function ProfileCard({ embedded = false } = {}) {
|
|
|
729
720
|
${state.name ? html`<div class="s-device-row"><button type="button" class="btn btn-ghost btn-sm" disabled=${busy} onClick=${() => save(true)}>${state.bound ? tn("profileUseAccount", state.platform || "web-user") : tn("profileClear")}</button></div>` : null}
|
|
730
721
|
<details class="s-pref-identity-details"><summary>${layoutText("profileIdentityDetails")}</summary><p class="sub">${state.bound ? tn("profileLeadBound") : tn("profileLeadUnbound")}</p></details>
|
|
731
722
|
</div></div>`;
|
|
732
|
-
|
|
733
|
-
|
|
723
|
+
const content = html`${loading ? html`<div class="sk-profile-cover"><${Skeleton} variant="form" lines=${4} /></div>` : null}
|
|
724
|
+
${fields}`;
|
|
725
|
+
return embedded ? html`<div class="s-profile s-pref-profile-fields">${content}</div>`
|
|
726
|
+
: html`<section class="card s-device s-profile"><h3>${tn("profileTitle")}</h3>${content}</section>`;
|
|
734
727
|
}
|
|
735
728
|
|
|
736
729
|
/** The operation in hand still owns Apply: its writes and job, or a restart of AgEnD from the press to its end. */
|
|
@@ -1408,8 +1401,8 @@ function WebSection({ ctx, staged, part = "all" }) {
|
|
|
1408
1401
|
<details class="s-setting-details"><summary>${layoutText("revSessionDetails")}</summary><p class="note">${tn("webSessionHint")}</p><p class="note">${tn("webNotifyLoginHint")}</p></details>
|
|
1409
1402
|
</section>`)}
|
|
1410
1403
|
${!overPublicLink ? html`<${WebAuthorityCard} ctx=${ctx} staged=${staged} />` : null}
|
|
1411
|
-
${
|
|
1412
|
-
${!
|
|
1404
|
+
${/* A tab whose shell is from before Settings → Hub (its app-route.js has no "hub"): the Hub cards stay here. */ ""}
|
|
1405
|
+
${!SETTINGS_SECTIONS.includes("hub") ? html`<${HubSection} overPublicLink=${overPublicLink} hubHost=${!!ctx.fleet.hub?.hubId} />` : null}
|
|
1413
1406
|
<details class="drawer s-terminal-disclosure"><summary>${tn("webTerminalTitle")}</summary><div class="drawer-body">${lock(html`<section class="card s-access-terminal"><h3>${tn("webTerminalTitle")}</h3>
|
|
1414
1407
|
<p class="note">${tn("webTerminalHint")}</p>
|
|
1415
1408
|
<label class=${fc("check", "termOn")}><input id="webTerminalEnabled" type="checkbox" checked=${f.termOn} onChange=${(e) => set("termOn")(e.target.checked)} /><span>${tn("webTerminalEnabled")}</span><${Impact} schema=${schema} field="web_terminal.enabled" /></label>
|
|
@@ -1422,6 +1415,7 @@ function WebSection({ ctx, staged, part = "all" }) {
|
|
|
1422
1415
|
</div><aside class="card s-access-related"><h3>${layoutText("revRelatedAccess")}</h3>
|
|
1423
1416
|
<button type="button" onClick=${() => setAccessTab("guests")}><${Icon} name="user" size=${18} /><span><strong>${layoutText("accessGuests")}</strong><small>${layoutText("revRelatedGuests")}</small></span><${Icon} name="chevron" size=${16} /></button>
|
|
1424
1417
|
<button type="button" onClick=${() => setAccessTab("sharing")}><${Icon} name="globe" size=${18} /><span><strong>${layoutText("accessSharing")}</strong><small>${layoutText("revRelatedSharing")}</small></span><${Icon} name="chevron" size=${16} /></button>
|
|
1418
|
+
${!overPublicLink && SETTINGS_SECTIONS.includes("hub") ? html`<button type="button" onClick=${() => navigate(sectionPath("hub"))}><${Icon} name="plug" size=${18} /><span><strong>${hubSectionText("relatedTitle")}</strong><small>${hubSectionText("relatedHint")}</small></span><${Icon} name="chevron" size=${16} /></button>` : null}
|
|
1425
1419
|
</aside></div>
|
|
1426
1420
|
</${SettingsTabPanel}>
|
|
1427
1421
|
<${SettingsTabPanel} group="access" id="guests" active=${accessTab === "guests"}>
|
|
@@ -3,6 +3,7 @@ import { register, t } from "/assets/app-i18n.js";
|
|
|
3
3
|
import { useLease } from "/assets/app-ctx.js";
|
|
4
4
|
import { PanelHeader, setTitle } from "/assets/app-shell.js";
|
|
5
5
|
import { Icon } from "/assets/ui-icons.js";
|
|
6
|
+
import { Skeleton } from "/assets/ui-states.js";
|
|
6
7
|
import { CliProductMark, cliLabel } from "./cli-picker.js";
|
|
7
8
|
import { appStore, useStore } from "/assets/app-store.js";
|
|
8
9
|
import { navigate } from "/assets/app-nav.js";
|
|
@@ -77,7 +78,7 @@ export function WindowsAgentPanel({ route, navKey }) {
|
|
|
77
78
|
${agent ? html`<div class="windows-agent-identity"><span class="windows-cli-brand"><${CliProductMark} id=${agent.cli || "codex"} size=${24} /></span><div><strong>Windows · ${cliLabel(agent.cli || "codex")}${agent.model ? ` · ${agent.model}` : ""}</strong><code>${agent.cwd}</code></div><span class="pill">${tn(fileAccess === "read-only" ? "read" : "write")}</span></div>
|
|
78
79
|
${agent.description ? html`<p class="note">${agent.description}</p>` : null}
|
|
79
80
|
${!agent.turns.length ? html`<div class="windows-agent-empty"><${Icon} name="chat" size=${32} /><h2>${tn("empty")}</h2><p>${tn("emptyHint")}</p></div>` : agent.turns.map(turn => html`<article key=${turn.id} class="windows-agent-turn"><div class="windows-agent-human"><strong>${tn("you")}</strong><p>${turn.prompt}</p></div><div class="windows-agent-reply"><strong><${CliProductMark} id=${agent.cli || "codex"} size=${18} />${cliLabel(agent.cli || "codex")}</strong><pre tabIndex="0">${turn.output || tn(["starting","running","cancelling"].includes(turn.status) ? "waiting" : "noOutput")}</pre>${turn.error ? html`<p class="error">${turn.error}</p>` : null}<small>${tn(turn.status)}</small></div></article>`)}
|
|
80
|
-
` : html
|
|
81
|
+
` : error ? null : html`<${Skeleton} variant="rows" lines=${4} label=${tn("loading")} />`}
|
|
81
82
|
${error ? html`<p class="error" role="alert">${error}</p>` : null}
|
|
82
83
|
${agent?.blocked ? html`<div class="windows-agent-blocked"><p>${tn("blocked")}</p><button type="button" class="btn" onClick=${recover}>${tn("recover")}</button></div>` : null}
|
|
83
84
|
</div></div>
|
package/dist/ui/preview-pages.js
CHANGED
|
@@ -1,41 +1,3 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
import "/assets/chat-render.js";
|
|
5
|
-
import { htmlTitle } from "./preview-versions.js";
|
|
6
|
-
|
|
7
|
-
const R = () => globalThis.AgendChatRender;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* The pages in `msgs` (in thread order), newest first: [{ id, label, kind: "html" | "file", versions, latest }], where
|
|
11
|
-
* `latest` is the newest version as the panel opens it ({ key, instance, msgKey, n | att, code, sender, ts }; an
|
|
12
|
-
* attached file's code is read when it is opened). `label` is the title, the file name, or "" for untitled blocks.
|
|
13
|
-
*/
|
|
14
|
-
export function pagesOf(msgs, keyOf, instance) {
|
|
15
|
-
const pages = new Map();
|
|
16
|
-
const add = (id, label, kind, spec) => {
|
|
17
|
-
const p = pages.get(id);
|
|
18
|
-
if (p) { p.versions++; p.latest = spec; pages.delete(id); pages.set(id, p); } // re-inserted: newest last
|
|
19
|
-
else pages.set(id, { id, label, kind, versions: 1, latest: spec });
|
|
20
|
-
};
|
|
21
|
-
for (const x of Array.isArray(msgs) ? msgs : []) {
|
|
22
|
-
if (x.role !== "agent") continue;
|
|
23
|
-
const msgKey = keyOf(x);
|
|
24
|
-
R().htmlFences(x.text).forEach((f, n) => {
|
|
25
|
-
if (!f.terminated) return;
|
|
26
|
-
const title = htmlTitle(f.code);
|
|
27
|
-
add(`t:${title}`, title, "html", { key: `${msgKey}:f${n}`, instance, msgKey, n, code: f.code, sender: x.sender, ts: x.ts });
|
|
28
|
-
});
|
|
29
|
-
for (const a of Array.isArray(x.attachments) ? x.attachments : []) {
|
|
30
|
-
if (!R().isHtmlAttachment(a)) continue;
|
|
31
|
-
add(`a:${a.name.trim().toLowerCase()}`, a.name, "file", { key: `${msgKey}:a${a.id}`, instance, msgKey, att: { id: a.id, name: a.name, size: a.size }, code: null, sender: x.sender, ts: x.ts });
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return [...pages.values()].reverse();
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/** The page `open` belongs to: its id in pagesOf's terms. */
|
|
38
|
-
export function pageIdOf(open) {
|
|
39
|
-
if (!open) return null;
|
|
40
|
-
return open.att ? `a:${String(open.att.name || "").trim().toLowerCase()}` : `t:${htmlTitle(open.code)}`;
|
|
41
|
-
}
|
|
1
|
+
// Hub E (#3226): this module moved to /assets/preview-pages.js (src/ui/shared/), shared by the fleet and the Hub. A tab opened
|
|
2
|
+
// before the move still imports it from here: the same module (one instance), re-exported.
|
|
3
|
+
export * from "/assets/preview-pages.js";
|