@songsid/agend 2.4.0-beta.15 → 2.4.0-beta.17
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/dist/accounts-profiles.d.ts +1 -1
- package/dist/accounts-view.d.ts +3 -0
- package/dist/accounts-view.js.map +1 -1
- package/dist/auth-api.js +6 -0
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/claude-code.d.ts +15 -1
- package/dist/backend/claude-code.js +64 -8
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/kiro.js +6 -1
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/types.d.ts +8 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-command.d.ts +4 -2
- package/dist/backend-command.js +3 -0
- package/dist/backend-command.js.map +1 -1
- package/dist/browser-backend-signins.d.ts +1 -0
- package/dist/browser-backend-signins.js +3 -1
- package/dist/browser-backend-signins.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/classic-channel-manager.d.ts +1 -0
- package/dist/classic-channel-manager.js +4 -1
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/claude-credential-change.d.ts +22 -0
- package/dist/claude-credential-change.js +47 -0
- package/dist/claude-credential-change.js.map +1 -0
- package/dist/claude-credential-launch.d.ts +63 -0
- package/dist/claude-credential-launch.js +315 -0
- package/dist/claude-credential-launch.js.map +1 -0
- package/dist/claude-credential-runner.d.ts +1 -0
- package/dist/claude-credential-runner.js +56 -0
- package/dist/claude-credential-runner.js.map +1 -0
- package/dist/claude-credential-vault.d.ts +57 -0
- package/dist/claude-credential-vault.js +277 -0
- package/dist/claude-credential-vault.js.map +1 -0
- package/dist/claude-request-observation.d.ts +7 -0
- package/dist/claude-request-observation.js +26 -0
- package/dist/claude-request-observation.js.map +1 -0
- package/dist/claude-setup-token-transport.d.ts +9 -0
- package/dist/claude-setup-token-transport.js +82 -0
- package/dist/claude-setup-token-transport.js.map +1 -0
- package/dist/claude-setup-token.d.ts +51 -0
- package/dist/claude-setup-token.js +83 -0
- package/dist/claude-setup-token.js.map +1 -0
- package/dist/cli-audited.js +15 -12
- package/dist/cli-audited.js.map +1 -1
- package/dist/command-report.d.ts +11 -0
- package/dist/command-report.js +2 -0
- package/dist/command-report.js.map +1 -0
- package/dist/config-validator.js +9 -0
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +4 -2
- package/dist/config.js.map +1 -1
- package/dist/daemon.d.ts +5 -0
- package/dist/daemon.js +65 -3
- package/dist/daemon.js.map +1 -1
- package/dist/fleet-level-config.d.ts +1 -1
- package/dist/fleet-level-config.js +1 -0
- package/dist/fleet-level-config.js.map +1 -1
- package/dist/fleet-manager.d.ts +53 -2
- package/dist/fleet-manager.js +511 -22
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +4 -1
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +25 -6
- package/dist/host-monitoring-config.d.ts +15 -0
- package/dist/host-monitoring-config.js +36 -0
- package/dist/host-monitoring-config.js.map +1 -0
- package/dist/host-monitoring-history-files.d.ts +2 -0
- package/dist/host-monitoring-history-files.js +16 -0
- package/dist/host-monitoring-history-files.js.map +1 -0
- package/dist/host-monitoring-history-policy.d.ts +55 -0
- package/dist/host-monitoring-history-policy.js +93 -0
- package/dist/host-monitoring-history-policy.js.map +1 -0
- package/dist/host-monitoring-history-store.d.ts +52 -0
- package/dist/host-monitoring-history-store.js +176 -0
- package/dist/host-monitoring-history-store.js.map +1 -0
- package/dist/host-monitoring-history-worker.d.ts +1 -0
- package/dist/host-monitoring-history-worker.js +50 -0
- package/dist/host-monitoring-history-worker.js.map +1 -0
- package/dist/host-monitoring-history.d.ts +71 -0
- package/dist/host-monitoring-history.js +265 -0
- package/dist/host-monitoring-history.js.map +1 -0
- package/dist/host-monitoring-platform.d.ts +73 -0
- package/dist/host-monitoring-platform.js +273 -0
- package/dist/host-monitoring-platform.js.map +1 -0
- package/dist/host-monitoring-runtime.d.ts +34 -0
- package/dist/host-monitoring-runtime.js +80 -0
- package/dist/host-monitoring-runtime.js.map +1 -0
- package/dist/host-monitoring-settings-store.d.ts +5 -0
- package/dist/host-monitoring-settings-store.js +49 -0
- package/dist/host-monitoring-settings-store.js.map +1 -0
- package/dist/host-monitoring.d.ts +106 -0
- package/dist/host-monitoring.js +157 -0
- package/dist/host-monitoring.js.map +1 -0
- package/dist/hub/group-policy/resources.d.ts +1 -1
- package/dist/instance-config-impact.js +1 -1
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instructions.js +1 -0
- package/dist/instructions.js.map +1 -1
- package/dist/locale.d.ts +2 -0
- package/dist/locale.js +13 -1
- package/dist/locale.js.map +1 -1
- package/dist/office-share-page.js +1 -1
- package/dist/office-share-page.js.map +1 -1
- package/dist/profile-signins.d.ts +1 -0
- package/dist/profile-signins.js +3 -1
- package/dist/profile-signins.js.map +1 -1
- package/dist/public-web-gateway.js +6 -0
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +21 -2
- package/dist/public-web-link.js +22 -2
- package/dist/public-web-link.js.map +1 -1
- package/dist/runtime-cli-install.js +17 -16
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/settings-api.d.ts +15 -0
- package/dist/settings-api.js +154 -8
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +1 -0
- package/dist/settings-baseline.js +5 -4
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-change.js +10 -0
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.d.ts +2 -0
- package/dist/settings-effect.js +15 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/topic-commands.d.ts +7 -1
- package/dist/topic-commands.js +98 -88
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-monitor.d.ts +1 -0
- package/dist/transcript-monitor.js +18 -0
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/ui/accounts-view.js +16 -8
- package/dist/ui/backend-signin.js +3 -1
- package/dist/ui/chat-commands.js +2 -0
- package/dist/ui/chat-popout-transport.js +49 -19
- package/dist/ui/chat-popout.js +15 -1
- package/dist/ui/chat-store.js +1 -1
- package/dist/ui/claude-credentials.js +123 -0
- package/dist/ui/claude-setup-token.js +36 -0
- package/dist/ui/contact-auth-client.js +7 -2
- package/dist/ui/contact-auth-strings.js +45 -14
- package/dist/ui/contact-authorizations.js +47 -26
- package/dist/ui/contact-needs.js +4 -4
- package/dist/ui/fleet-canvas.js +3 -2
- package/dist/ui/fleet-office-card.js +414 -41
- package/dist/ui/fleet-office-dialogue.js +3 -3
- package/dist/ui/fleet-office-pack.d.ts +67 -1
- package/dist/ui/fleet-office-pack.js +412 -18
- package/dist/ui/fleet-office-play.js +401 -3
- package/dist/ui/fleet-office-skin.js +133 -21
- package/dist/ui/fleet-office-store.js +41 -0
- package/dist/ui/fleet-office-zones.js +34 -9
- package/dist/ui/fleet-office.js +513 -62
- package/dist/ui/host-health-model.js +42 -0
- package/dist/ui/host-health.js +74 -0
- package/dist/ui/office-share-page.js +5 -1
- package/dist/ui/panel-chat.js +146 -46
- package/dist/ui/panel-fleet.js +24 -11
- package/dist/ui/panel-hub.js +5 -1
- package/dist/ui/panel-settings.js +5 -4
- package/dist/ui/preview-popout.js +134 -0
- package/dist/ui/reply-file-preview.js +1 -1
- package/dist/ui/search-dialog.js +8 -1
- package/dist/ui/settings-capabilities.js +2 -0
- package/dist/ui/settings-host-monitoring.js +69 -0
- package/dist/ui/settings-registry.js +4 -1
- package/dist/ui/settings-shared.js +3 -2
- package/dist/ui/shared/accounts.css +8 -4
- package/dist/ui/shared/agent-sheet.js +5 -2
- package/dist/ui/shared/app-route.js +1 -1
- package/dist/ui/shared/app.css +248 -27
- package/dist/ui/shared/app.js +8 -1
- package/dist/ui/shared/chat-strings.js +10 -4
- package/dist/ui/shared/chat-thread.js +42 -10
- package/dist/ui/shared/info-tip.js +64 -0
- package/dist/ui/shared/instance-nav.js +47 -5
- package/dist/ui/shared/jump-idle.js +36 -0
- package/dist/ui/shared/office-dialogue.css +12 -0
- package/dist/ui/shared/preview-panel.js +44 -18
- package/dist/ui/shared/preview-popout.css +11 -0
- package/dist/ui/shared/theme.js +15 -1
- package/dist/ui/shared/ui-menu.js +17 -11
- package/dist/ui/shared/usage-dialog.js +9 -34
- package/dist/ui/shared/view-strings.js +2 -0
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +1 -1
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/providers.d.ts +1 -0
- package/dist/usage/providers.js +14 -1
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/usage-api.js +5 -2
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/web-api.d.ts +6 -1
- package/dist/web-api.js +83 -9
- package/dist/web-api.js.map +1 -1
- package/dist/web-chat-history.d.ts +7 -1
- package/dist/web-chat-history.js +19 -3
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-claude-credentials.d.ts +31 -0
- package/dist/web-claude-credentials.js +138 -0
- package/dist/web-claude-credentials.js.map +1 -0
- package/dist/web-commands.d.ts +5 -2
- package/dist/web-commands.js +4 -2
- package/dist/web-commands.js.map +1 -1
- package/dist/web-office-skins.d.ts +7 -2
- package/dist/web-office-skins.js +42 -16
- package/dist/web-office-skins.js.map +1 -1
- package/dist/web-session.d.ts +20 -1
- package/dist/web-session.js +27 -0
- 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-terminal.d.ts +4 -0
- package/dist/web-terminal.js +16 -1
- package/dist/web-terminal.js.map +1 -1
- package/package.json +1 -1
package/dist/ui/panel-hub.js
CHANGED
|
@@ -21,6 +21,7 @@ import { createStore, useStore } from "/assets/app-store.js";
|
|
|
21
21
|
import { navigate, navStore } from "/assets/app-nav.js";
|
|
22
22
|
import { Empty, ErrorState, Skeleton } from "/assets/ui-states.js";
|
|
23
23
|
import { Icon } from "/assets/ui-icons.js";
|
|
24
|
+
import { useJumpIdle } from "/assets/jump-idle.js";
|
|
24
25
|
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
25
26
|
import { Dialog } from "/assets/ui-dialog.js";
|
|
26
27
|
import { PairingNotices } from "./hub-quick-pairing.js";
|
|
@@ -948,6 +949,8 @@ function HubThread({ store, name, panelKey, threadRef, extra = null, emptyView =
|
|
|
948
949
|
thread.dispose(true); list.remove(); th.current = null; if (threadRef && threadRef.current === thread) threadRef.current = null;
|
|
949
950
|
};
|
|
950
951
|
}, [store]);
|
|
952
|
+
// M-3493: the Fleet chat's 最新 (M-3492): it fades out JUMP_IDLE_MS after the last scroll (shared/jump-idle.js).
|
|
953
|
+
const jumpIdle = useJumpIdle(scroller, jump.show, store);
|
|
951
954
|
return html`<div class="scroller hub-scroller" ref=${scroller}>
|
|
952
955
|
<div class="thread-host" ref=${host}></div>
|
|
953
956
|
${/* #3145: that every asker shares the agent's one conversation is said before anyone types. */ ""}
|
|
@@ -956,7 +959,8 @@ function HubThread({ store, name, panelKey, threadRef, extra = null, emptyView =
|
|
|
956
959
|
: !loaded && store.error() ? html`<${ErrorState} message=${errText({ code: store.error() })} onRetry=${() => store.refresh()} />` : null}
|
|
957
960
|
${empty && loaded && !store.closed() && emptyView ? html`<div class="center hub-room-empty">${emptyView}</div>` : null}
|
|
958
961
|
${empty && loaded && !store.closed() && !emptyView ? html`<div class="center hub-room-empty"><${Empty} icon="chat" title=${hc("emptyRoom", name)} hint=${personalAgentQuestionHint(store.room())??`${hc("emptyRoomHint", store.room().ownerName || name)}${lang() === "zh-TW" ? "" : " "}${hw("roomShared")}`} /></div>` : null}
|
|
959
|
-
<div class="jump-dock">${jump.show ? html`<button data-trust="thread-control" type="button" class
|
|
962
|
+
<div class="jump-dock">${jump.show ? html`<button data-trust="thread-control" type="button" ref=${jumpIdle.ref} class=${`jump-latest${jumpIdle.idle ? " is-idle" : ""}`}
|
|
963
|
+
onClick=${() => th.current && th.current.jumpLatest()} onFocus=${jumpIdle.onFocus} onBlur=${jumpIdle.onBlur}>
|
|
960
964
|
<${Icon} name="down" size=${16} />${jump.unseen > 0 ? t("chat.newBelow", jump.unseen) : t("chat.jumpLatest")}</button>` : null}</div>
|
|
961
965
|
</div>`;
|
|
962
966
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HostMonitoringSettings } from "./settings-host-monitoring.js";
|
|
1
2
|
import { SettingsBuildVersion } from "./settings-build-version.js";
|
|
2
3
|
// #1408 step 3: the Settings panel (/settings[/<section>]) — agents, connections, ClassicBot rooms, general defaults,
|
|
3
4
|
// the developer YAML. Behind the session gate (/ui/js/), loaded the first time it is opened.
|
|
@@ -436,7 +437,7 @@ export function SettingsPanel({ route, navKey }) {
|
|
|
436
437
|
: section === "agents" ? html`<${YamlLock} staged=${staged}><${Agents} ctx=${ctx} search=${search} clearSearch=${() => setSearch("")} openDialog=${toDialog} /></${YamlLock}>${SETTINGS_SECTIONS.includes("accounts") ? html`<p class="note s-agents-accounts-link">${layoutText("agentsAccountsNote")} <a href=${settingsPath("accounts")}>${layoutText("agentsAccountsLink")}<span aria-hidden="true">→</span></a></p>` : accountsCard()}`
|
|
437
438
|
: section === "accounts" ? accountsCard()
|
|
438
439
|
: 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}>`
|
|
439
|
-
: section === "notifications" ? html`<${YamlLock} staged=${staged}><${QuotaNoticeSettings} key=${formKey} ctx=${ctx} /></${YamlLock}>`
|
|
440
|
+
: section === "notifications" ? html`<${YamlLock} staged=${staged}><${HostMonitoringSettings} key=${`monitoring:${formKey}`} ctx=${ctx} /><${QuotaNoticeSettings} key=${formKey} ctx=${ctx} /></${YamlLock}>`
|
|
440
441
|
: section === "chat" ? html`<${SettingsConnector} /><${YamlLock} staged=${staged}><${Bots} ctx=${ctx} search=${search} openDialog=${toDialog} /></${YamlLock}>
|
|
441
442
|
<${WebSection} key=${formKey} ctx=${ctx} staged=${staged} part="chat" />
|
|
442
443
|
<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>
|
|
@@ -527,7 +528,7 @@ export function SettingsPanel({ route, navKey }) {
|
|
|
527
528
|
<button type="button" class="btn btn-ghost btn-sm" disabled=${!ctx || yamlStaged(staged)} title=${ctx && yamlStaged(staged) ? tn("yamlUnsaved") : undefined} onClick=${openWizard}><${Icon} name="wand" size=${16} /><span class="hide-narrow">${tn("wizardButton")}</span></button>
|
|
528
529
|
<button type="button" class="icon-btn" aria-label=${tn("helpButton")} title=${tn("helpButton")} onClick=${() => setDialog({ kind: "help", key: navKey })}><${Icon} name="info" /></button>
|
|
529
530
|
</${PanelHeader}>
|
|
530
|
-
<nav data-trust="panel-navigation" class="seg s-nav" aria-label=${tn("title")}><${SettingsSearch} /><div class="s-nav-groups">${SETTINGS_GROUPS.map((g) => html`<div key=${g.id} class="s-nav-group" role="group" aria-labelledby=${`s-grp-${g.id}`}>
|
|
531
|
+
<nav data-trust="panel-navigation" class="seg s-nav" aria-label=${tn("title")}><${SettingsSearch} schema=${ctx?.schema} /><div class="s-nav-groups">${SETTINGS_GROUPS.map((g) => html`<div key=${g.id} class="s-nav-group" role="group" aria-labelledby=${`s-grp-${g.id}`}>
|
|
531
532
|
<span class="s-nav-head" id=${`s-grp-${g.id}`}>${tn(`grp_${g.id}`)}</span>
|
|
532
533
|
${g.sections.map((k) => html`<a key=${k} href=${sectionPath(k)} class=${`seg-item${k === section ? " active" : ""}`} title=${tn(`sec_${k}`)}
|
|
533
534
|
aria-current=${k === section ? "page" : undefined}><${Icon} name=${ICONS[k]} size=${16} /><span>${tn(`sec_${k}`)}</span></a>`)}</div>`)}</div></nav>
|
|
@@ -581,10 +582,10 @@ function marked(text, query) {
|
|
|
581
582
|
* #2347 §6: search every setting — by its name, its config key, or the words people use (both languages: "token",
|
|
582
583
|
* "語言", "port") — results grouped by section with where they are; Enter or a click goes there. "/" focuses it.
|
|
583
584
|
*/
|
|
584
|
-
function SettingsSearch() {
|
|
585
|
+
function SettingsSearch({schema}) {
|
|
585
586
|
const [q, setQ] = useState("");
|
|
586
587
|
const [active, setActive] = useState(0);
|
|
587
|
-
const hits = useMemo(() => searchSettings(q).slice(0, 40), [q]);
|
|
588
|
+
const hits = useMemo(() => searchSettings(q, schema).slice(0, 40), [q, schema]);
|
|
588
589
|
// Grouped by section, the group of the best match first (its order is the ranking's): Enter takes the best.
|
|
589
590
|
const groups = useMemo(() => [...new Set(hits.map((e) => e.section))].map((s) => ({ section: s, items: hits.filter((e) => e.section === s) })), [hits]);
|
|
590
591
|
const flat = groups.flatMap((g) => g.items);
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// M-3438: presentation only. Each new window authenticates and reads its own history.
|
|
2
|
+
// Only a bounded locator crosses the existing exact-window protocol; never HTML, credentials or permissions.
|
|
3
|
+
import { appStore } from "/assets/app-store.js";
|
|
4
|
+
import { assetUrl } from "/assets/asset-url.js";
|
|
5
|
+
import { Shell, shellStore } from "/assets/app-shell.js";
|
|
6
|
+
import { isSafeInstanceName } from "/assets/app-route.js";
|
|
7
|
+
import { register, t } from "/assets/app-i18n.js";
|
|
8
|
+
import { toast } from "/assets/ui-toast.js";
|
|
9
|
+
import { loadHtmlAttachment } from "/assets/html-attachment.js";
|
|
10
|
+
import * as Panel from "/assets/preview-panel.js";
|
|
11
|
+
import * as Transport from "./chat-popout-transport.js";
|
|
12
|
+
|
|
13
|
+
register("previewPopout", {
|
|
14
|
+
en: { open: "Pop out preview", blocked: "Your browser blocked the window. Allow pop-ups for this site, then try again. The original preview is unchanged.",
|
|
15
|
+
retained: "The preview could not be opened in the new window. The original preview has been kept.", busy: "A preview window is already opening." },
|
|
16
|
+
"zh-TW": { open: "彈出預覽視窗", blocked: "瀏覽器封鎖了新視窗。請允許這個網站開啟彈出視窗,再試一次。原本的預覽不變。",
|
|
17
|
+
retained: "無法在新視窗開啟預覽,已保留原本的預覽。", busy: "正在開啟預覽視窗。" },
|
|
18
|
+
});
|
|
19
|
+
register("chat", { en: { pvPopout: "Pop out preview" }, "zh-TW": { pvPopout: "彈出預覽視窗" } });
|
|
20
|
+
const notify = reason => toast(t("previewPopout." + reason), false);
|
|
21
|
+
const safeKey = value => typeof value === "string" && value.length <= 256 && /^[a-zA-Z0-9_-]+-[0-9]+$/.test(value);
|
|
22
|
+
export function validPreviewLocator(value) {
|
|
23
|
+
if (!value || typeof value !== "object" || Array.isArray(value) || !safeKey(value.msgKey)) return false;
|
|
24
|
+
const keys = Object.keys(value).sort().join(",");
|
|
25
|
+
return keys === "msgKey,n" ? Number.isInteger(value.n) && value.n >= 0 && value.n < 1000
|
|
26
|
+
: keys === "attachmentId,msgKey" && typeof value.attachmentId === "string" && /^[a-f0-9]{32}$/.test(value.attachmentId);
|
|
27
|
+
}
|
|
28
|
+
export function previewLocator(open) {
|
|
29
|
+
if (!open || open.kind !== "html" || !isSafeInstanceName(open.instance)) return null;
|
|
30
|
+
const locator = open.att ? { msgKey: open.msgKey, attachmentId: open.att.id } : { msgKey: open.msgKey, n: open.n };
|
|
31
|
+
return validPreviewLocator(locator) ? locator : null;
|
|
32
|
+
}
|
|
33
|
+
export function previewSpecFromHistory(name, locator, messages) {
|
|
34
|
+
if (!isSafeInstanceName(name) || !validPreviewLocator(locator)) return null;
|
|
35
|
+
const row = (Array.isArray(messages) ? messages : []).find(x =>
|
|
36
|
+
x.instance === name && x.role === "agent" && x.boot + "-" + x.id === locator.msgKey);
|
|
37
|
+
if (!row) return null;
|
|
38
|
+
const common = { instance: name, msgKey: locator.msgKey, sender: row.sender, ts: row.ts };
|
|
39
|
+
if (Object.hasOwn(locator, "n")) {
|
|
40
|
+
const fence = globalThis.AgendChatRender.htmlFences(row.text)[locator.n];
|
|
41
|
+
return fence?.terminated ? { ...common, key: locator.msgKey + ":f" + locator.n, n: locator.n, code: fence.code } : null;
|
|
42
|
+
}
|
|
43
|
+
const att = (row.attachments || []).find(a => a.id === locator.attachmentId && globalThis.AgendChatRender.isHtmlAttachment(a));
|
|
44
|
+
return att ? { ...common, key: locator.msgKey + ":a" + att.id, att: { id: att.id, name: att.name, size: att.size }, code: null } : null;
|
|
45
|
+
}
|
|
46
|
+
export async function readPreviewSpec(chat, name, locator, current) {
|
|
47
|
+
if (!validPreviewLocator(locator) || !current()) return null;
|
|
48
|
+
await chat.store.findQuoted(name, locator.msgKey); // Existing endpoint, archive limits and audience checks.
|
|
49
|
+
if (!current()) return null;
|
|
50
|
+
let spec = previewSpecFromHistory(name, locator, chat.store.state.msgs[name]);
|
|
51
|
+
if (spec?.att) {
|
|
52
|
+
// Read through the existing same-origin attachment loader. Launch still has its own size/opt-in gate.
|
|
53
|
+
const read = await loadHtmlAttachment(spec.att, undefined, { anyway: true });
|
|
54
|
+
if (!current() || !read.ok) return null;
|
|
55
|
+
spec = { ...spec, code: read.code };
|
|
56
|
+
}
|
|
57
|
+
return current() ? spec : null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
let styles;
|
|
61
|
+
function loadStyles() {
|
|
62
|
+
return styles ??= new Promise(resolve => {
|
|
63
|
+
const link = document.createElement("link"); link.rel = "stylesheet"; link.href = assetUrl("/assets/preview-popout.css");
|
|
64
|
+
link.onload = () => resolve(true); link.onerror = () => resolve(false); document.head.appendChild(link);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
const supported = () => Shell.popoutVersion === 1 && typeof Panel.previewHostReady === "function"
|
|
68
|
+
&& typeof Transport.createPreviewPopoutTransport === "function" && typeof Transport.receivePreviewPopout === "function";
|
|
69
|
+
const requested = win => new URL(win.location.href).searchParams.get("presentation") === "preview";
|
|
70
|
+
const auth = () => globalThis.AgendAuth;
|
|
71
|
+
const visible = name => appStore.get().ready && appStore.get().instances.some(x => x.name === name) && !auth()?.sessionEnded?.();
|
|
72
|
+
let leavePresentation = null;
|
|
73
|
+
export function leavePreviewWindow() { leavePresentation?.(); }
|
|
74
|
+
|
|
75
|
+
/** Prepared before offering the control, so window.open remains in its actual click stack. */
|
|
76
|
+
export async function createPreviewPopout(name, win = window) {
|
|
77
|
+
if (!supported() || !isSafeInstanceName(name) || requested(win)) return null;
|
|
78
|
+
const [css, scope] = await Promise.all([loadStyles(), auth()?.sessionHandle?.()]);
|
|
79
|
+
if (!css || !scope || !visible(name)) return null;
|
|
80
|
+
let alive = true;
|
|
81
|
+
const transport = Transport.createPreviewPopoutTransport({ win, scope, notify });
|
|
82
|
+
const off = auth()?.onSessionEnd?.(() => { alive = false; transport.close(); });
|
|
83
|
+
return {
|
|
84
|
+
open(open) {
|
|
85
|
+
const payload = previewLocator(open);
|
|
86
|
+
const current = () => alive && visible(name) && open.instance === name && Panel.panelStore.get().open === open;
|
|
87
|
+
if (!payload || !current()) return false;
|
|
88
|
+
return transport.open({ name, payload, current, complete() {
|
|
89
|
+
if (!current()) return false; Panel.closePanel(); return true;
|
|
90
|
+
} });
|
|
91
|
+
},
|
|
92
|
+
close() { alive = false; transport.close(); if (typeof off === "function") off(); },
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export async function installPreviewWindow({ nav, chat, win = window }) {
|
|
97
|
+
const stamp = nav.navStore.get(), route = stamp.route, name = route?.instance;
|
|
98
|
+
if (!supported() || !requested(win) || route?.panel !== "chat" || !isSafeInstanceName(name) || !win.opener) return null;
|
|
99
|
+
const [css, scope] = await Promise.all([loadStyles(), auth()?.sessionHandle?.()]);
|
|
100
|
+
if (!css || !scope) return null;
|
|
101
|
+
let alive = true, showing = false;
|
|
102
|
+
const current = () => alive && nav.navStore.get() === stamp && !auth()?.sessionEnded?.();
|
|
103
|
+
const leave = () => {
|
|
104
|
+
if (!showing) return; showing = false;
|
|
105
|
+
delete document.documentElement.dataset.previewWindow;
|
|
106
|
+
shellStore.set({ popout: false, popoutHeader: null });
|
|
107
|
+
const url = new URL(win.location.href); url.searchParams.delete("presentation");
|
|
108
|
+
win.history.replaceState(win.history.state, "", url.pathname + url.search + url.hash);
|
|
109
|
+
};
|
|
110
|
+
const stop = Transport.receivePreviewPopout({
|
|
111
|
+
win, name, scope, notify, current,
|
|
112
|
+
ready: () => current() && visible(name) && Panel.previewHostReady(name),
|
|
113
|
+
accept: async (locator, withinDeadline) => {
|
|
114
|
+
const fresh = () => current() && withinDeadline();
|
|
115
|
+
const spec = await readPreviewSpec(chat, name, locator, fresh);
|
|
116
|
+
if (!spec || !fresh()) return false;
|
|
117
|
+
showing = true; leavePresentation = leave;
|
|
118
|
+
document.documentElement.dataset.previewWindow = "1";
|
|
119
|
+
shellStore.set({ popout: true, popoutHeader: null, drawer: false });
|
|
120
|
+
Panel.openPanel(spec, { run: true }); // The explicit pop-out click; existing availability/opt-in/size gates still own launch.
|
|
121
|
+
return true;
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
const panelOff = Panel.panelStore.subscribe(s => { if (showing && !s.open) leave(); });
|
|
125
|
+
const navOff = nav.navStore.subscribe(() => { if (nav.navStore.get() !== stamp) close(); });
|
|
126
|
+
let authOff = null;
|
|
127
|
+
authOff = auth()?.onSessionEnd?.(() => { Panel.closePanel(); close(); });
|
|
128
|
+
function close() {
|
|
129
|
+
if (!alive) return; alive = false; stop(); leave(); panelOff(); navOff();
|
|
130
|
+
if (leavePresentation === leave) leavePresentation = null;
|
|
131
|
+
if (typeof authOff === "function") authOff();
|
|
132
|
+
}
|
|
133
|
+
return { close };
|
|
134
|
+
}
|
|
@@ -51,7 +51,7 @@ export function ReplyFilePanel({ open, panel, fs, enterFs, leaveFs, onKey, close
|
|
|
51
51
|
return html`<aside data-trust="preview" class=${`pv-panel ws-panel reply-file-panel${fs ? ` pv-fs pv-fs-${fs}` : ""}`} ref=${panel} aria-label=${t("replyPreview.title")} onKeyDown=${onKey}>
|
|
52
52
|
<div class="pv-panel-head">
|
|
53
53
|
<div class="pv-panel-title"><strong>${t("replyPreview.title")}</strong><span class="pv-source">${open.instance}</span></div>
|
|
54
|
-
<button type="button" class="icon-btn
|
|
54
|
+
<button type="button" class="icon-btn pv-panel-fs" aria-label=${t(fs ? "chat.pvFsExit" : "chat.pvFs")} onClick=${() => fs ? leaveFs() : enterFs()}><${Icon} name=${fs ? "fullscreenexit" : "fullscreen"} size=${16} /></button>
|
|
55
55
|
<button type="button" class="icon-btn pv-panel-close" aria-label=${t("chat.pvClose")} onClick=${close}><${Icon} name="close" size=${18} /></button>
|
|
56
56
|
</div>
|
|
57
57
|
<div class="pv-note ws-readonly">${t("replyPreview.readonly")}</div>
|
package/dist/ui/search-dialog.js
CHANGED
|
@@ -240,7 +240,14 @@ export function SearchDialog({ preset = {}, onClose }) {
|
|
|
240
240
|
// While a new query runs, the last answer stays (dimmed) rather than flashing empty.
|
|
241
241
|
const groups = useMemo(() => groupHits(res.hits || []), [res]);
|
|
242
242
|
// #2347 §6: the settings matching the query, from the page's own registry (no request), above the messages.
|
|
243
|
-
const
|
|
243
|
+
const [settingsSchema,setSettingsSchema] = useState(null);
|
|
244
|
+
useEffect(() => {
|
|
245
|
+
if (guest) {setSettingsSchema(null);return;}
|
|
246
|
+
let current=true;const ac=new AbortController();
|
|
247
|
+
fetch("/api/settings/schema",{signal:ac.signal}).then(r=>r.ok?r.json():null).then(schema=>{if(current)setSettingsSchema(schema);},()=>{if(current)setSettingsSchema(null);});
|
|
248
|
+
return ()=>{current=false;ac.abort();};
|
|
249
|
+
},[guest]);
|
|
250
|
+
const settings = useMemo(() => (q.trim() && !guest ? searchSettings(q, settingsSchema).slice(0, SETTINGS_SHOWN) : []), [q, guest, settingsSchema]);
|
|
244
251
|
const flat = useMemo(() => [...settings.map((entry) => ({ setting: entry })), ...flatHits(groups)], [settings, groups]);
|
|
245
252
|
const activeFilters = (f.instance ? 1 : 0) + (f.team ? 1 : 0) + (f.since !== "any" ? 1 : 0) + (!guest && f.sources.length < SOURCES.length ? 1 : 0) + (f.mine ? 1 : 0);
|
|
246
253
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { html, useEffect, useRef, useState } from '/assets/app-html.js';
|
|
2
|
+
import { register, t } from '/assets/app-i18n.js';
|
|
3
|
+
import { confirmDialog } from '/assets/ui-confirm.js';
|
|
4
|
+
import { useDraft, syncStage } from './settings-draft.js';
|
|
5
|
+
import { fleetPath } from '/assets/app-route.js';
|
|
6
|
+
import { hostMonitoringVisible } from './settings-capabilities.js';
|
|
7
|
+
register('hostMonitoring', {
|
|
8
|
+
en: { open:'View host health',title:'Host monitoring', enabled:'Monitor this computer', agents:'Include agent footprint',
|
|
9
|
+
hint:'Samples every 30–60 seconds; keeps up to 64 MiB locally. Memory and write costs are being measured.',
|
|
10
|
+
agentHint:'Optional process snapshot every minute; for 32 agents, an estimated extra 2–8 MiB RAM and 1–4 MiB of writes per hour.',
|
|
11
|
+
off:'Off by default. While off, there is no monitoring collector, timer or history file.',
|
|
12
|
+
agentUnavailable:'Agent footprint is not available in this version of AgEnD.',
|
|
13
|
+
stopTitle:'Turn off host monitoring?', stopBody:'This stops monitoring and its alerts, and removes the recorded host history. Turning it on again starts a new history.', stop:'Turn off',
|
|
14
|
+
drive:'Windows drive holding this WSL distribution', auto:'Identify automatically', refresh:'Refresh drive list', driveHint:'If automatic identification is unavailable, choose the drive that holds this distribution’s virtual disk. Mounted local drives are listed from the latest sample while monitoring is on; Refresh reads that sample without starting a probe.', },
|
|
15
|
+
'zh-TW': { open:'查看主機狀態',title:'主機監測', enabled:'監測這台電腦', agents:'包含 Agent 資源用量',
|
|
16
|
+
hint:'每 30–60 秒取樣,本機資料最多 64 MiB;額外記憶體與寫入量仍在量測。',
|
|
17
|
+
agentHint:'選用:每分鐘讀取行程資料;32 個 Agent 估計另用 2–8 MiB 記憶體,每小時寫入 1–4 MiB。',
|
|
18
|
+
off:'預設關閉。關閉時沒有監測收集器、計時器或歷史檔案。',
|
|
19
|
+
agentUnavailable:'這個 AgEnD 版本尚未提供 Agent 資源用量。',
|
|
20
|
+
stopTitle:'關閉主機監測?', stopBody:'這會停止監測與通知,並移除已記錄的主機歷史。重新開啟時會建立新的歷史。', stop:'關閉',
|
|
21
|
+
drive:'這個 WSL 發行版本的 Windows 磁碟', auto:'自動辨識', refresh:'重新整理磁碟清單', driveHint:'無法自動辨識時,請選擇存放這個發行版本虛擬磁碟的磁碟。監測開啟後會依最新取樣列出已掛載的本機磁碟;重新整理只讀取該取樣,不會啟動探測。', },
|
|
22
|
+
});
|
|
23
|
+
const copy = k => t(`hostMonitoring.${k}`);
|
|
24
|
+
export function HostMonitoringSettings({ ctx }) {
|
|
25
|
+
const available = hostMonitoringVisible(ctx.schema);
|
|
26
|
+
useEffect(() => { if (!available) syncStage(ctx, 'host-monitoring', null); }, [available]);
|
|
27
|
+
// A collector alone is not a visible feature: S-207 must provide its page too.
|
|
28
|
+
// A separate child keeps hook order stable across capability transitions.
|
|
29
|
+
return available ? html`<${AvailableHostMonitoringSettings} ctx=${ctx} />` : null;
|
|
30
|
+
}
|
|
31
|
+
function AvailableHostMonitoringSettings({ ctx }) {
|
|
32
|
+
const base = { enabled:ctx.fleet.monitoring?.enabled === true, agent_footprint:ctx.fleet.monitoring?.agent_footprint === true,
|
|
33
|
+
...(typeof ctx.fleet.monitoring?.wsl_drive === 'string' ? {wsl_drive:ctx.fleet.monitoring.wsl_drive} : {}) };
|
|
34
|
+
const [form, setForm] = useDraft(ctx, 'host-monitoring', () => base);
|
|
35
|
+
const [health,setHealth] = useState(null), [reading,setReading] = useState(false);
|
|
36
|
+
const live=useRef(false),seq=useRef(0);
|
|
37
|
+
const refresh=async()=>{
|
|
38
|
+
const request=++seq.current;setReading(true);
|
|
39
|
+
try {const r=await fetch('/ui/host-health');const snapshot=r.ok?await r.json():null;if(live.current&&request===seq.current)setHealth(snapshot);}
|
|
40
|
+
catch {if(live.current&&request===seq.current)setHealth(null);}
|
|
41
|
+
finally {if(live.current&&request===seq.current)setReading(false);}
|
|
42
|
+
};
|
|
43
|
+
useEffect(()=>{live.current=true;void refresh();return()=>{live.current=false;seq.current++;};},[]);
|
|
44
|
+
const agentsAvailable = ctx.schema?.host_monitoring_agents === true;
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
const changed = form.enabled !== base.enabled || form.agent_footprint !== base.agent_footprint || (form.wsl_drive ?? '') !== (base.wsl_drive ?? '');
|
|
47
|
+
syncStage(ctx, 'host-monitoring', changed ? {label:copy('title'), impact:'now', request:{method:'PUT',url:'/api/settings/fleet/monitoring',body:{enabled:form.enabled,agent_footprint:form.agent_footprint,...(Object.hasOwn(form,'wsl_drive')?{wsl_drive:form.wsl_drive}:{})}}} : null);
|
|
48
|
+
}, [form]);
|
|
49
|
+
const setEnabled = async (checked, control) => {
|
|
50
|
+
if (!checked && form.enabled && !(await confirmDialog({title:copy('stopTitle'),message:copy('stopBody'),confirmLabel:copy('stop'),danger:true}))) {
|
|
51
|
+
// The browser toggled its native property before the asynchronous question.
|
|
52
|
+
// Cancel leaves the draft unchanged, so restore the displayed value too.
|
|
53
|
+
control.checked = form.enabled;
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
setForm(f=>({...f,enabled:checked}));
|
|
57
|
+
};
|
|
58
|
+
const row = (id,key,hint,disabled,change) => html`<div class="s-setting-row"><div class="s-setting-copy"><label for=${id}>${copy(key)}</label><p class="note" id=${`${id}-hint`}>${copy(hint)}</p></div>
|
|
59
|
+
<input class="s-ui-toggle" type="checkbox" role="switch" id=${id} checked=${form[key === 'agents' ? 'agent_footprint':'enabled']} disabled=${disabled} aria-describedby=${`${id}-hint`} onChange=${e=>change(e.target.checked, e.target)} /></div>`;
|
|
60
|
+
return html`<section class="card s-group" id="host-monitoring"><div class="s-group-head"><h3>${copy('title')}</h3><a class="btn btn-sm" href=${fleetPath('host-health')}>${copy('open')}</a></div>
|
|
61
|
+
${row('hostMonitoringEnabled','enabled','hint',false,setEnabled)}
|
|
62
|
+
${row('hostMonitoringAgents','agents','agentHint',!agentsAvailable || !form.enabled,checked=>setForm(f=>({...f,agent_footprint:checked})))}
|
|
63
|
+
${health?.platform === 'wsl' || base.wsl_drive ? html`<div class="field"><label for="hostMonitoringDrive">${copy('drive')}</label>
|
|
64
|
+
<select id="hostMonitoringDrive" value=${form.wsl_drive ?? ''} onChange=${e=>setForm(f=>({...f,wsl_drive:e.target.value}))}>
|
|
65
|
+
<option value="">${copy('auto')}</option>${[...new Set([...(health?.disks?.value?.availableDrives ?? []),form.wsl_drive])].filter(v=>typeof v==='string'&&/^[A-Z]$/.test(v)).slice(0,26).map(d=>html`<option value=${d}>${d}:</option>`)}</select>
|
|
66
|
+
<p class="note">${copy('driveHint')}</p><button type="button" class="btn btn-sm" disabled=${reading} onClick=${refresh}>${copy('refresh')}</button></div>` : null}
|
|
67
|
+
${!agentsAvailable ? html`<p class="note">${copy('agentUnavailable')}</p>` : null}
|
|
68
|
+
<p class="note">${copy('off')}</p></section>`;
|
|
69
|
+
}
|
|
@@ -12,6 +12,7 @@ import "./settings-public-session-strings.js"; // #3708: publicSessionAbsolute
|
|
|
12
12
|
import "./settings-access-strings.js"; // …and this one (webLoginQr), added by Access & security (#3061)
|
|
13
13
|
import "/assets/chat-strings.js";
|
|
14
14
|
import { GUESTS_SETTINGS } from "./settings-guests-entries.js";
|
|
15
|
+
import { hostMonitoringVisible } from "./settings-capabilities.js";
|
|
15
16
|
import { CLI_CAPS } from "./cli-caps.js";
|
|
16
17
|
|
|
17
18
|
const L = (en, zh) => ({ en, "zh-TW": zh });
|
|
@@ -20,6 +21,7 @@ const L = (en, zh) => ({ en, "zh-TW": zh });
|
|
|
20
21
|
const CLI_WORDS = Object.keys(CLI_CAPS).flatMap((id) => [id, id.split("-")[0]]);
|
|
21
22
|
/** [id, section, target, labelKey | label, config key, words en, words zh] */
|
|
22
23
|
const ROWS = [
|
|
24
|
+
["host.monitoring", "notifications", "#host-monitoring", null, "monitoring.enabled", ["host", "health", "monitoring", "disk", "memory", "cpu", "agent footprint"], ["主機", "監測", "磁碟", "記憶體", "資源用量"], L("Host monitoring", "主機監測")],
|
|
23
25
|
["general.location", "agent-defaults", "#general-location", null, null, ["general", "windows", "paired PC", "host", "location"], ["General", "Windows", "電腦", "主機", "執行位置"], L("Run General on", "General 執行位置")],
|
|
24
26
|
// alpha.6 feedback (#2): "hub" found nothing — Settings → Hub's cards. Connect to a Hub is drawn once membership is on.
|
|
25
27
|
["hub.membership", "hub", "#hubMemberEnabled", null, "hub_member.enabled", ["hub", "team hub", "membership", "connect", "join", "pair", "share agents"], ["Hub", "團隊 Hub", "成員", "連線", "加入", "配對", "分享"], L("Allow this fleet to connect to a Hub", "允許這個 Fleet 連線至 Hub")],
|
|
@@ -155,11 +157,12 @@ const fold = (s) => String(s || "").toLowerCase().normalize("NFKC");
|
|
|
155
157
|
* Entries matching `query`: every word in it is found in the entry's name (either language), its config key, or its
|
|
156
158
|
* words (either language). Ranked: a name that starts with it, then one that contains it, then a config key, then a word.
|
|
157
159
|
*/
|
|
158
|
-
export function searchSettings(query) {
|
|
160
|
+
export function searchSettings(query, schema = null) {
|
|
159
161
|
const terms = fold(query).split(/\s+/).filter(Boolean);
|
|
160
162
|
if (!terms.length) return [];
|
|
161
163
|
const scored = [];
|
|
162
164
|
for (const entry of SETTINGS_REGISTRY) {
|
|
165
|
+
if (entry.id === "host.monitoring" && !hostMonitoringVisible(schema)) continue;
|
|
163
166
|
const names = [settingLabel(entry, "en"), settingLabel(entry, "zh-TW")].map(fold);
|
|
164
167
|
const keys = fold(entry.key || "");
|
|
165
168
|
const words = [...(entry.words.en || []), ...(entry.words["zh-TW"] || [])].map(fold);
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
11
11
|
import { t } from "/assets/app-i18n.js";
|
|
12
12
|
import { settingsPath } from "/assets/app-route.js";
|
|
13
|
+
import { InfoTip as SharedInfoTip } from "/assets/info-tip.js";
|
|
13
14
|
import "./settings-strings.js";
|
|
14
15
|
import "./settings-shared-strings.js"; // the words this page added: a tab that already ran an older settings-strings.js has none of them (#3087)
|
|
15
16
|
import {
|
|
@@ -225,9 +226,9 @@ export function Tip({ text, cls = "", ariaLabel, children }) {
|
|
|
225
226
|
onClick=${(e) => { e.stopPropagation(); if (pinned) hide(); else { show(); setPinned(true); } }}>${children}</button>
|
|
226
227
|
<span id=${idRef.current} ref=${body} class=${`s-tipbody${at && at.above ? " above" : ""}`} role="tooltip" hidden=${!at}>${text}</span></span>`;
|
|
227
228
|
}
|
|
228
|
-
/** The ⓘ beside a label: what the field is for, when it matters, what its default means. */
|
|
229
|
+
/** The ⓘ beside a label: what the field is for, when it matters, what its default means. M-3443: the shared info icon. */
|
|
229
230
|
export function InfoTip({ text, name }) {
|
|
230
|
-
return html`<${
|
|
231
|
+
return html`<${SharedInfoTip} text=${text} label=${tn("tipLabel", name)} cls="s-i" />`;
|
|
231
232
|
}
|
|
232
233
|
/**
|
|
233
234
|
* "6/7 in use · artist custom" at a field's right: how many agents use this page's value; hover lists the ones that set their own.
|
|
@@ -22,15 +22,19 @@
|
|
|
22
22
|
curving into the row's rounded corners. Drawn here, on the row's own class, rather than by a class in the markup (#3407
|
|
23
23
|
review): this sheet loads apart from the shell and its markup, so a tab holding either older half still draws one bar
|
|
24
24
|
in its state's colour (older markup + this sheet: this bar; this markup is unchanged + an older sheet: the old edge),
|
|
25
|
-
never two. The
|
|
26
|
-
.s-accounts .s-account-row { display:
|
|
25
|
+
never two. The absolute bar does not change the shared inner padding. */
|
|
26
|
+
.s-accounts .s-account-row { display: flex; flex-direction: column; align-items: stretch; gap: var(--s-2); position: relative; min-height: 0; padding: var(--s-3) var(--s-4); background: var(--bg); overflow: visible; }
|
|
27
27
|
.s-accounts .s-account-row::before { content: ""; position: absolute; left: 0; top: var(--s-2); bottom: var(--s-2); width: 3px; background: var(--ok); pointer-events: none; }
|
|
28
28
|
.s-account-row:has(.s-auth-state.is-not_signed_in)::before { background: var(--warn); }
|
|
29
29
|
.s-account-row:has(.s-auth-state:is(.is-unknown, .is-not_installed, .is-too_old))::before { background: var(--text-3); }
|
|
30
30
|
.s-account-row details { margin-top: var(--s-3); }
|
|
31
31
|
|
|
32
|
-
/*
|
|
33
|
-
.s-
|
|
32
|
+
/* One spacing rhythm per box; the absolute state bar never shifts its content. */
|
|
33
|
+
.s-accounts .s-account-row > * { margin: 0; }
|
|
34
|
+
|
|
35
|
+
/* Layer 1: name/state, then a left-aligned wrapping action row at the same content edge. */
|
|
36
|
+
.s-account-title-bar { display: flex; flex-direction: column; align-items: stretch; gap: var(--s-2); }
|
|
37
|
+
.s-account-title-bar > .s-actions { margin: 0; justify-content: flex-start; gap: var(--s-2); }
|
|
34
38
|
.s-account-title-left { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); }
|
|
35
39
|
.s-account-title-left strong { font-size: var(--fs-md); line-height: 1.4; overflow-wrap: anywhere; }
|
|
36
40
|
.s-account-default-tag { background: var(--accent-dim); color: var(--accent); font-weight: var(--fw-semibold); }
|
|
@@ -26,7 +26,7 @@ register("agentSheet", {
|
|
|
26
26
|
en: { sheet: "{0}: more", search: "Search", files: "Files & changes", card: "Card", usage: "Usage", model: "Model & effort", backend: "CLI backend",
|
|
27
27
|
textSize: "Text size", textSizes: "Small,Medium,Large", look: "Appearance", agent: "This agent", details: "Agent details",
|
|
28
28
|
verifiedUntil: "Verified · speaks as you until {0}" },
|
|
29
|
-
"zh-TW": { sheet: "{0}:更多", search: "搜尋", files: "檔案與變更", card: "卡片", usage: "用量", model: "模型與推理", backend: "CLI
|
|
29
|
+
"zh-TW": { sheet: "{0}:更多", search: "搜尋", files: "檔案與變更", card: "卡片", usage: "用量", model: "模型與推理", backend: "CLI 後端",
|
|
30
30
|
textSize: "文字大小", textSizes: "小,中,大", look: "外觀", agent: "這個 Agent", details: "Agent 詳細資料",
|
|
31
31
|
verifiedUntil: "已驗證 · 以你的身分發言到 {0}" },
|
|
32
32
|
});
|
|
@@ -77,7 +77,7 @@ export function AgentSheetButton({ name, inst, current, items = [], extra = [],
|
|
|
77
77
|
${usage ? html`<${UsageDialog} owner=${navKey} onClose=${() => setUsage(false)} />` : null}`;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
export function AgentSheet({ name, inst, current, items = [], extra = [], chat = null, verifiedUntil = null, onUsage, onClose }) {
|
|
80
|
+
export function AgentSheet({ name, inst, current, items = [], extra = [], chat = null, verifiedUntil = null, onUsage, onClose, targetLabel = null }) {
|
|
81
81
|
const [look, setLook] = useState(false);
|
|
82
82
|
const size = useStore(textSizeStore).size;
|
|
83
83
|
const by = (key) => items.find((i) => i && i.key === key);
|
|
@@ -94,6 +94,7 @@ export function AgentSheet({ name, inst, current, items = [], extra = [], chat =
|
|
|
94
94
|
const details = by("details") || (current !== "details" && supportsInstanceFeature(inst, "details")
|
|
95
95
|
? { key: "details", icon: "info", onSelect: () => navigate(detailsPath(name)) } : null);
|
|
96
96
|
return html`<${Dialog} title=${t("agentSheet.sheet", name)} onClose=${onClose} cls="chat-sheet">
|
|
97
|
+
${targetLabel ? html`<h3 class="menu-heading chat-sheet-head">${targetLabel}</h3>` : null}
|
|
97
98
|
<div class="chat-sheet-tiles">
|
|
98
99
|
${current !== "chat" ? tile("chat", t("app.chat"), () => navigate(chatPath(name))) : null}
|
|
99
100
|
${current !== "view" && supportsInstanceFeature(inst, "view") ? tile("view", t("app.view"), () => navigate(viewPath(name))) : null}
|
|
@@ -115,3 +116,5 @@ export function AgentSheet({ name, inst, current, items = [], extra = [], chat =
|
|
|
115
116
|
${verifiedUntil ? html`<div class="chat-sheet-foot">✓ ${t("agentSheet.verifiedUntil", untilClock(verifiedUntil))}</div>` : null}
|
|
116
117
|
</${Dialog}>`;
|
|
117
118
|
}
|
|
119
|
+
|
|
120
|
+
AgentSheet.sidebarTargetVersion = 1;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// a test runs both over one list of cases). Pure: no DOM, no history.
|
|
3
3
|
|
|
4
4
|
// #2347 §10: Config is gone from Fleet — each of its settings has one home in Settings (/ui/fleet/config leads there).
|
|
5
|
-
export const FLEET_TABS = ["tasks", "schedules", "teams", "org", "cache", "usage", "authorizations"];
|
|
5
|
+
export const FLEET_TABS = ["tasks", "schedules", "teams", "org", "cache", "usage", "authorizations", "host-health"];
|
|
6
6
|
// #2347: two groups — "You" changes only you or this browser; "Fleet" changes AgEnD for everyone.
|
|
7
7
|
export const SETTINGS_GROUPS = Object.freeze([
|
|
8
8
|
Object.freeze({ id: "you", sections: Object.freeze(["preferences", "look"]) }),
|