@songsid/agend 2.3.5-alpha.5 → 2.3.5-alpha.6
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 +27 -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/backend/codex.js +1 -0
- package/dist/backend/codex.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/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 +116 -11
- 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 +129 -0
- package/dist/fleet-manager.js +725 -53
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +10 -0
- package/dist/hub/compose/server.js +1 -0
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/directory/directory.d.ts +1 -1
- package/dist/hub/directory/directory.js +115 -3
- 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 +1 -0
- package/dist/hub/directory/types.d.ts +4 -0
- package/dist/hub/directory/types.js.map +1 -1
- 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 +52 -0
- package/dist/hub/group-policy/resources.js +166 -0
- package/dist/hub/group-policy/resources.js.map +1 -0
- package/dist/hub/group-policy/store.d.ts +52 -0
- package/dist/hub/group-policy/store.js +149 -0
- package/dist/hub/group-policy/store.js.map +1 -0
- package/dist/hub/http/compose.js +4 -3
- package/dist/hub/http/compose.js.map +1 -1
- 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/server.d.ts +2 -0
- package/dist/hub/server.js +12 -2
- package/dist/hub/server.js.map +1 -1
- 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 +21 -0
- 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 +125 -1
- 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 +3 -0
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +8 -0
- package/dist/settings-change.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 +1 -1
- package/dist/structured-signin.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 +3 -0
- package/dist/ui/accounts-keepalive.js +112 -0
- package/dist/ui/accounts-manage.js +237 -0
- package/dist/ui/accounts-view.js +175 -31
- package/dist/ui/agent-runtime-settings.js +2 -1
- package/dist/ui/app.html +8 -1
- package/dist/ui/hub-attachments.js +90 -0
- package/dist/ui/hub-chat-store.js +9 -4
- package/dist/ui/hub-client.js +20 -1
- package/dist/ui/hub-preview.js +101 -0
- package/dist/ui/machine-signin.js +56 -0
- package/dist/ui/panel-fleet.js +1 -1
- package/dist/ui/panel-hub.js +126 -31
- package/dist/ui/panel-needs.js +14 -8
- package/dist/ui/panel-notices.js +4 -3
- package/dist/ui/panel-runtimes.js +19 -6
- package/dist/ui/panel-settings.js +12 -6
- 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 +114 -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-guests.js +3 -2
- package/dist/ui/settings-hub-browser-certificate.js +2 -0
- package/dist/ui/settings-hub-membership.js +12 -6
- package/dist/ui/settings-hub-retention.js +2 -0
- package/dist/ui/settings-hub.js +11 -3
- package/dist/ui/settings-quota-notice.js +100 -0
- package/dist/ui/settings-registry.js +1 -0
- package/dist/ui/settings-strings.js +2 -2
- 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-route.js +1 -1
- package/dist/ui/shared/app-shell.js +9 -3
- package/dist/ui/shared/app-store.js +2 -2
- package/dist/ui/shared/app.css +13 -0
- package/dist/ui/shared/app.js +2 -1
- package/dist/ui/shared/hub-chat.css +1 -0
- package/dist/ui/shared/hub-owner.css +1 -1
- 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/workspace-follow.css +19 -0
- package/dist/ui/signin.html +7 -3
- package/dist/ui/structured-signin.js +31 -7
- 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 +5 -0
- package/dist/usage/providers.js +5 -0
- 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 +33 -0
- package/dist/web-api.js +342 -8
- 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-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 +6 -0
- package/dist/windows-cli-api.js +11 -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 +6 -2
- package/templates/runtime-install/install.ps1 +154 -13
|
@@ -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";
|
|
@@ -86,13 +87,13 @@ import { useRuntimeCatalog } from "./runtime-catalog.js";
|
|
|
86
87
|
import { ShortcutsHelpRow } from "./settings-shortcuts.js";
|
|
87
88
|
import { GeneralLocation } from "./general-location.js";
|
|
88
89
|
|
|
89
|
-
const tn = (k, ...v) => t(`settings.${k}`, ...v);
|
|
90
|
+
const tn = (k, ...v) => k === "sec_notifications" ? quotaNoticeText().title : t(`settings.${k}`, ...v);
|
|
90
91
|
/** What a refused change says to a person: the server's code in words (the code itself only for one not listed). */
|
|
91
92
|
const APPLY_ERRORS = new Set(["unsupported_sensitive_effect", "confirmation_diff_too_large", "session_required", "admin_required", "settings_changed",
|
|
92
93
|
"request_no_longer_current", "too_many_pending_changes", "fleet_unavailable", "invalid_settings_effect", "settings_confirmation_unavailable", "failed"]);
|
|
93
94
|
// #2726: a code or words of the setup host (the wizard's commit) in the page's language; anything else as it came.
|
|
94
95
|
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" };
|
|
96
|
+
const ICONS = { preferences: "user", look: "palette", agents: "bot", notifications: "sliders", runtimes: "view", "agent-defaults": "sliders", chat: "chat", "web-dashboard": "globe", access: "key", advanced: "code" };
|
|
96
97
|
|
|
97
98
|
/** GET under the panel's lease → { ok, status, body }. */
|
|
98
99
|
async function read(lease, path) {
|
|
@@ -416,6 +417,7 @@ export function SettingsPanel({ route, navKey }) {
|
|
|
416
417
|
: 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
418
|
<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
419
|
<${AccountsView} instances=${ctx.fleet.instances || {}} stageAgent=${ctx.stageAgent}
|
|
420
|
+
openAgent=${(name) => { const insts = ctx.fleet.instances || {}; if (Object.hasOwn(insts, name)) toDialog({ kind: "agent", name, inst: insts[name] }); }}
|
|
419
421
|
stageDefault=${(backend, profile) => {
|
|
420
422
|
// One change for every CLI's fleet default, carrying the whole map (the write replaces it whole).
|
|
421
423
|
const opts = defaultsBackendOptions((ctx.fleet.defaults || {}).backend_options, stagedRef.current.get("defaults:account")?.request?.body?.backend_options, backend, profile);
|
|
@@ -424,7 +426,8 @@ export function SettingsPanel({ route, navKey }) {
|
|
|
424
426
|
request: { method: "PUT", url: "/api/settings/fleet/defaults", body: { backend_options: opts } } });
|
|
425
427
|
}} />${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
428
|
</div></details>`
|
|
427
|
-
: section === "agent-defaults" ? html`<${GeneralLocation} /><${YamlLock} staged=${staged}><${General} key=${formKey} ctx=${ctx} part="fleet"
|
|
429
|
+
: 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}>`
|
|
430
|
+
: section === "notifications" ? html`<${YamlLock} staged=${staged}><${QuotaNoticeSettings} key=${formKey} ctx=${ctx} /></${YamlLock}>`
|
|
428
431
|
: section === "chat" ? html`<${YamlLock} staged=${staged}><${Bots} ctx=${ctx} search=${search} openDialog=${toDialog} /></${YamlLock}>
|
|
429
432
|
<${WebSection} key=${formKey} ctx=${ctx} staged=${staged} part="chat" />
|
|
430
433
|
<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>
|
|
@@ -715,8 +718,9 @@ export function ProfileCard({ embedded = false } = {}) {
|
|
|
715
718
|
};
|
|
716
719
|
const busy = state.phase !== "ready";
|
|
717
720
|
const changed = draft.trim() !== state.name;
|
|
721
|
+
const loading = state.phase === "loading";
|
|
718
722
|
const initial = [...(state.shown || state.name || "web-user")][0]?.toUpperCase() || "W";
|
|
719
|
-
const fields = html`<div class
|
|
723
|
+
const fields = html`<div class=${`s-pref-profile-layout${loading ? " sk-reserve" : ""}`} aria-hidden=${loading ? "true" : undefined} inert=${loading || undefined}>
|
|
720
724
|
${embedded ? html`<span class="s-pref-avatar" aria-hidden="true">${initial}</span>` : null}
|
|
721
725
|
<div class="s-pref-profile-main"><div class="field"><label for="profile-name">${tn("profileName")}</label>
|
|
722
726
|
<div class="s-pref-name-action"><input id="profile-name" type="text" maxlength="200" autocomplete="nickname" value=${draft} disabled=${busy}
|
|
@@ -729,8 +733,10 @@ export function ProfileCard({ embedded = false } = {}) {
|
|
|
729
733
|
${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
734
|
<details class="s-pref-identity-details"><summary>${layoutText("profileIdentityDetails")}</summary><p class="sub">${state.bound ? tn("profileLeadBound") : tn("profileLeadUnbound")}</p></details>
|
|
731
735
|
</div></div>`;
|
|
732
|
-
|
|
733
|
-
|
|
736
|
+
const content = html`${loading ? html`<div class="sk-profile-cover"><${Skeleton} variant="form" lines=${4} /></div>` : null}
|
|
737
|
+
${fields}`;
|
|
738
|
+
return embedded ? html`<div class="s-profile s-pref-profile-fields">${content}</div>`
|
|
739
|
+
: html`<section class="card s-device s-profile"><h3>${tn("profileTitle")}</h3>${content}</section>`;
|
|
734
740
|
}
|
|
735
741
|
|
|
736
742
|
/** The operation in hand still owns Apply: its writes and job, or a restart of AgEnD from the press to its end. */
|
|
@@ -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";
|
|
@@ -1,161 +1,3 @@
|
|
|
1
|
-
// #
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
// Nothing here reads or relays the page. A preview's content is the agent's untrusted HTML, so only what the chat
|
|
6
|
-
// already holds goes into the message: a #2272 reply to the message the page came in, and the page's <title> or file
|
|
7
|
-
// name as one line of plain text in the composer — where the person edits it and sends it themselves. What goes is an
|
|
8
|
-
// ordinary message (Discord first): no new channel, nothing sent by itself.
|
|
9
|
-
|
|
10
|
-
import { html, useEffect, useState } from "/assets/app-html.js";
|
|
11
|
-
import { t } from "/assets/app-i18n.js";
|
|
12
|
-
import { Icon } from "/assets/ui-icons.js";
|
|
13
|
-
import { closePanel, frameKey, htmlTitle } from "./preview-panel.js";
|
|
14
|
-
import { PageShareButton } from "./page-share-dialog.js";
|
|
15
|
-
|
|
16
|
-
const P = () => globalThis.AgendPreview;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* The chat registers how to reach its composer (panel-chat.js): { findMsg(instance, msgKey), startReply(instance, msg),
|
|
20
|
-
* clearReply(instance), addToDraft(instance, line), focus() }. null: no chat is mounted, and the actions are not shown.
|
|
21
|
-
*/
|
|
22
|
-
let chat = null;
|
|
23
|
-
export function setPanelFeedback(deps) { chat = deps || null; }
|
|
24
|
-
|
|
25
|
-
/** The most of a page's title or file name the line carries. */
|
|
26
|
-
export const NAME_MAX = 80;
|
|
27
|
-
|
|
28
|
-
/** One line of plain text: format characters removed, whitespace and control characters collapsed, cut at NAME_MAX characters. */
|
|
29
|
-
export function plainName(value) {
|
|
30
|
-
// \p{Cf} first (bidi controls, zero-widths): what the person reads is what is sent (#2914 review).
|
|
31
|
-
const s = String(value == null ? "" : value).replace(/\p{Cf}+/gu, "").replace(/[\s\u0000-\u001f\u007f-\u009f\u2028\u2029]+/gu, " ").trim();
|
|
32
|
-
const chars = [...s];
|
|
33
|
-
return chars.length > NAME_MAX ? `${chars.slice(0, NAME_MAX - 1).join("")}…` : s;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/** The composer's line naming the page: its <title>, else the attached file's name, else "this page". */
|
|
37
|
-
export function aboutLine(open) {
|
|
38
|
-
if (!open) return "";
|
|
39
|
-
const name = plainName(htmlTitle(open.code || "")) || plainName(open.att && open.att.name);
|
|
40
|
-
return name ? t("chat.pvFbAboutNamed", name) : t("chat.pvFbAboutThis");
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Reply about the open page: a reply to the message it came in (while the thread still has it), and the line naming
|
|
45
|
-
* the page added to the composer (never twice). Returns false when there is nothing to do it with.
|
|
46
|
-
*/
|
|
47
|
-
export function replyAboutPage(open, deps = chat) {
|
|
48
|
-
if (!open || !deps) return false;
|
|
49
|
-
const msg = open.msgKey ? deps.findMsg(open.instance, open.msgKey) : null;
|
|
50
|
-
// The page's message gone from the thread: no reply — and not one to another message started earlier, which the
|
|
51
|
-
// line naming this page would be sent as (#2913 review).
|
|
52
|
-
if (msg) deps.startReply(open.instance, msg);
|
|
53
|
-
else deps.clearReply(open.instance);
|
|
54
|
-
deps.addToDraft(open.instance, aboutLine(open));
|
|
55
|
-
deps.focus();
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* #2911: the lines the errors chip adds — a header saying the text below is the page's, then each kept error quoted
|
|
61
|
-
* ("> "), already one line of plain text (preview.js), and how many more there were. `log`: P().errors(key).
|
|
62
|
-
*/
|
|
63
|
-
export function errorLines(log) {
|
|
64
|
-
if (!log || !log.count) return [];
|
|
65
|
-
const kind = { error: "", rejection: t("chat.pvFbErrRejection"), console: "console.error: ", blocked: t("chat.pvCdnBlocked") };
|
|
66
|
-
const lines = [t(log.count === 1 ? "chat.pvFbErrHeadOne" : "chat.pvFbErrHead", String(log.count))];
|
|
67
|
-
for (const x of log.items) lines.push(`> ${kind[x.kind] ?? ""}${plainName(x.message)}${x.line ? ` (${t("chat.pvFbErrAt", String(x.line), String(x.col))})` : ""}`);
|
|
68
|
-
const more = log.count - log.items.length;
|
|
69
|
-
if (more > 0) lines.push(t("chat.pvFbErrMore", String(more)));
|
|
70
|
-
return lines;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/** The errors chip's click: reply about the page, then the error lines (each once) — the person edits and sends. */
|
|
74
|
-
export function sendErrors(open, log, deps = chat) {
|
|
75
|
-
if (!replyAboutPage(open, deps)) return false;
|
|
76
|
-
for (const line of errorLines(log)) deps.addToDraft(open.instance, line);
|
|
77
|
-
deps.focus();
|
|
78
|
-
return true;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* #2911: the line a picked element adds — where in the page (the selector the page's frame built, as code) and its
|
|
83
|
-
* words, marked as the page's text. Backticks are taken out of the selector so it stays one code span.
|
|
84
|
-
*/
|
|
85
|
-
export function pickLine(result) {
|
|
86
|
-
if (!result) return "";
|
|
87
|
-
const where = plainName(String(result.selector || "").replace(/`/g, "")) || "?";
|
|
88
|
-
const words = plainName(result.text);
|
|
89
|
-
return words ? t("chat.pvFbPickWords", where, words) : t("chat.pvFbPickAt", where);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/** A picked element: reply about the page, then its line — the person writes what to change after it. */
|
|
93
|
-
export function sendPick(open, result, deps = chat) {
|
|
94
|
-
if (!result || !replyAboutPage(open, deps)) return false;
|
|
95
|
-
deps.addToDraft(open.instance, pickLine(result));
|
|
96
|
-
deps.focus();
|
|
97
|
-
return true;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/** Whether the open page's frame is in pick mode, and its answer handed to sendPick. */
|
|
101
|
-
function usePick(open) {
|
|
102
|
-
const key = open ? frameKey(open.key) : null;
|
|
103
|
-
const [on, setOn] = useState(() => !!(key && P() && P().picking && P().picking(key)));
|
|
104
|
-
useEffect(() => {
|
|
105
|
-
setOn(!!(key && P() && P().picking && P().picking(key)));
|
|
106
|
-
if (!key || !P() || typeof P().onPick !== "function") return undefined;
|
|
107
|
-
return P().onPick((k, result, now) => {
|
|
108
|
-
if (k !== key) return;
|
|
109
|
-
setOn(!!now);
|
|
110
|
-
if (result) { if (narrow()) closePanel(); sendPick(open, result); }
|
|
111
|
-
});
|
|
112
|
-
}, [key]);
|
|
113
|
-
return on;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/** The errors the open page's frame reported, re-read when they change. */
|
|
117
|
-
function useErrors(open) {
|
|
118
|
-
const key = open ? frameKey(open.key) : null;
|
|
119
|
-
const read = () => (key && P() && typeof P().errors === "function" ? P().errors(key) : null);
|
|
120
|
-
const [log, setLog] = useState(read);
|
|
121
|
-
useEffect(() => {
|
|
122
|
-
setLog(read());
|
|
123
|
-
if (!key || !P() || typeof P().onErrors !== "function") return undefined;
|
|
124
|
-
return P().onErrors((k) => { if (k === key) setLog(read()); });
|
|
125
|
-
}, [key]);
|
|
126
|
-
return log;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* #2911 item 8: what Share page names — the block of the message the open page came in ({ boot, id } and its fence
|
|
131
|
-
* number or attachment id; the server reads the page itself), its title, and whose reply. null while the thread no
|
|
132
|
-
* longer has that message.
|
|
133
|
-
*/
|
|
134
|
-
export function shareBlock(open, deps = chat) {
|
|
135
|
-
if (!open || !deps) return null;
|
|
136
|
-
const msg = open.msgKey ? deps.findMsg(open.instance, open.msgKey) : null;
|
|
137
|
-
if (!msg || typeof msg.boot !== "string" || typeof msg.id !== "number") return null;
|
|
138
|
-
const from = open.att && typeof open.att.id === "string" ? { boot: msg.boot, id: msg.id, att: open.att.id }
|
|
139
|
-
: Number.isInteger(open.n) ? { boot: msg.boot, id: msg.id, fence: open.n } : null;
|
|
140
|
-
if (!from) return null;
|
|
141
|
-
const title = plainName(htmlTitle(open.code || "")) || plainName(open.att && open.att.name);
|
|
142
|
-
return { instance: open.instance, from, title, sender: msg.sender || open.sender || "", ts: msg.ts || open.ts || "" };
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
const narrow = () => typeof window !== "undefined" && !!window.matchMedia && window.matchMedia("(max-width: 899px)").matches;
|
|
146
|
-
|
|
147
|
-
/** The bar's actions for the open page. props: open, name, run, view (as the panel has them). */
|
|
148
|
-
export function PanelActions({ open, run }) {
|
|
149
|
-
const log = useErrors(open);
|
|
150
|
-
const picking = usePick(open);
|
|
151
|
-
if (!open || !chat) return null;
|
|
152
|
-
// On a phone the panel is a sheet over the composer: it closes, so the composer is there to type in.
|
|
153
|
-
const reply = () => { if (narrow()) closePanel(); replyAboutPage(open); };
|
|
154
|
-
const send = () => { const now = P().errors(frameKey(open.key)); if (narrow()) closePanel(); sendErrors(open, now); };
|
|
155
|
-
const n = log ? log.count : 0;
|
|
156
|
-
const key = open && frameKey(open.key);
|
|
157
|
-
const canPick = run && run.state === "running" && typeof P().pick === "function";
|
|
158
|
-
const point = () => { P().pick(key, !picking); };
|
|
159
|
-
return html`<${PageShareButton} block=${shareBlock(open)} Icon=${Icon} />${canPick ? html`<button type="button" class=${`btn btn-sm pv-fb-pick${picking ? " on" : ""}`} aria-pressed=${picking ? "true" : "false"}
|
|
160
|
-
title=${t(picking ? "chat.pvFbPickCancelTitle" : "chat.pvFbPickTitle")} onClick=${point}><${Icon} name="edit" size=${14} /><span class="lbl">${t(picking ? "chat.pvFbPickCancel" : "chat.pvFbPick")}</span></button>` : null}${n ? html`<button type="button" class="btn btn-sm pv-fb-errors" title=${t("chat.pvFbErrTitle")} onClick=${send}><${Icon} name="alert" size=${14} /><span class="pv-fb-n">${n >= P().ERRORS.maxCount ? `${n}+` : String(n)}</span><span class="lbl">${t(n === 1 ? "chat.pvFbErrOne" : "chat.pvFbErrMany")}</span></button>` : null}<button type="button" class="btn btn-sm pv-fb-reply" title=${t("chat.pvFbReplyTitle")} onClick=${reply}><${Icon} name="chat" size=${14} /><span class="lbl">${t("chat.pvFbReply")}</span></button>`;
|
|
161
|
-
}
|
|
1
|
+
// Hub E (#3226): this module moved to /assets/preview-panel-actions.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-panel-actions.js";
|