@songsid/agend 2.4.0-beta.2 → 2.4.0-beta.4
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/agent-cli.js +1 -1
- package/dist/agent-endpoint.d.ts +1 -1
- package/dist/agent-endpoint.js +8 -2
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-token-header.d.ts +1 -1
- package/dist/agent-token-header.js +1 -1
- package/dist/auth-api.d.ts +3 -0
- package/dist/auth-api.js +15 -1
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/agy-model-switch.d.ts +22 -0
- package/dist/backend/agy-model-switch.js +62 -0
- package/dist/backend/agy-model-switch.js.map +1 -0
- package/dist/backend/antigravity.js +60 -3
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/cli-runtime-switch.d.ts +71 -0
- package/dist/backend/cli-runtime-switch.js +176 -0
- package/dist/backend/cli-runtime-switch.js.map +1 -0
- package/dist/backend/codex-model-switch.d.ts +41 -0
- package/dist/backend/codex-model-switch.js +170 -0
- package/dist/backend/codex-model-switch.js.map +1 -0
- package/dist/backend/credential-profile.js +1 -1
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/grok-model-switch.d.ts +16 -0
- package/dist/backend/grok-model-switch.js +45 -0
- package/dist/backend/grok-model-switch.js.map +1 -0
- package/dist/backend/grok.js +1 -1
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/muse.d.ts +2 -0
- package/dist/backend/muse.js +7 -3
- package/dist/backend/muse.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/mcp-server.js +10 -1
- package/dist/channel/mcp-server.js.map +1 -1
- package/dist/channel/mcp-tools.js +8 -0
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/classic-channel-manager.d.ts +1 -1
- package/dist/classic-channel-manager.js +1 -1
- package/dist/cli-audited.js +12 -12
- package/dist/cli-audited.js.map +1 -1
- package/dist/daemon.d.ts +48 -2
- package/dist/daemon.js +302 -21
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-consumed-watch.js +3 -0
- package/dist/delivery-consumed-watch.js.map +1 -1
- package/dist/event-log.d.ts +1 -1
- package/dist/event-log.js +1 -1
- package/dist/fleet-manager.d.ts +104 -2
- package/dist/fleet-manager.js +665 -27
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +10 -0
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +2 -0
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +18 -0
- package/dist/general-knowledge/skills/hub/SKILL.md +154 -0
- package/dist/general-knowledge/skills/model-discovery/SKILL.md +4 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +17 -3
- package/dist/hub/admin-dashboard.d.ts +85 -0
- package/dist/hub/admin-dashboard.js +161 -0
- package/dist/hub/admin-dashboard.js.map +1 -0
- package/dist/hub/attachments/store.d.ts +2 -0
- package/dist/hub/attachments/store.js +6 -0
- package/dist/hub/attachments/store.js.map +1 -1
- package/dist/hub/client.d.ts +10 -0
- package/dist/hub/client.js +72 -10
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +20 -0
- package/dist/hub/compose/member.js +212 -17
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +8 -0
- package/dist/hub/compose/server.js +13 -2
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/display-name.d.ts +10 -0
- package/dist/hub/display-name.js +35 -0
- package/dist/hub/display-name.js.map +1 -0
- package/dist/hub/execution/service.d.ts +1 -0
- package/dist/hub/execution/service.js +1 -1
- package/dist/hub/execution/service.js.map +1 -1
- package/dist/hub/fleet-info.d.ts +12 -0
- package/dist/hub/fleet-info.js +14 -0
- package/dist/hub/fleet-info.js.map +1 -0
- package/dist/hub/fleet-update-model.d.ts +100 -0
- package/dist/hub/fleet-update-model.js +15 -0
- package/dist/hub/fleet-update-model.js.map +1 -0
- package/dist/hub/fleet-updates.d.ts +46 -0
- package/dist/hub/fleet-updates.js +282 -0
- package/dist/hub/fleet-updates.js.map +1 -0
- package/dist/hub/fleet-versions.d.ts +28 -0
- package/dist/hub/fleet-versions.js +80 -0
- package/dist/hub/fleet-versions.js.map +1 -0
- package/dist/hub/http/compose.d.ts +2 -0
- package/dist/hub/http/compose.js +192 -16
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/deps.d.ts +1 -0
- package/dist/hub/http/schema.js +13 -1
- package/dist/hub/http/schema.js.map +1 -1
- package/dist/hub/member/display-name.d.ts +9 -0
- package/dist/hub/member/display-name.js +71 -0
- package/dist/hub/member/display-name.js.map +1 -0
- package/dist/hub/member/exposure-api.d.ts +4 -0
- package/dist/hub/member/exposure-api.js +8 -3
- package/dist/hub/member/exposure-api.js.map +1 -1
- package/dist/hub/member/exposures.d.ts +4 -0
- package/dist/hub/member/exposures.js +20 -0
- package/dist/hub/member/exposures.js.map +1 -1
- package/dist/hub/member/pairing-api.js +3 -2
- package/dist/hub/member/pairing-api.js.map +1 -1
- package/dist/hub/member/recommendations.d.ts +37 -0
- package/dist/hub/member/recommendations.js +129 -0
- package/dist/hub/member/recommendations.js.map +1 -0
- package/dist/hub/member/room-ask.d.ts +60 -1
- package/dist/hub/member/room-ask.js +254 -24
- package/dist/hub/member/room-ask.js.map +1 -1
- package/dist/hub/member/room-post-answers.d.ts +52 -0
- package/dist/hub/member/room-post-answers.js +152 -0
- package/dist/hub/member/room-post-answers.js.map +1 -0
- package/dist/hub/member/room-post-receipt.d.ts +21 -0
- package/dist/hub/member/room-post-receipt.js +49 -0
- package/dist/hub/member/room-post-receipt.js.map +1 -0
- package/dist/hub/member/room-post.d.ts +100 -0
- package/dist/hub/member/room-post.js +223 -0
- package/dist/hub/member/room-post.js.map +1 -0
- package/dist/hub/member/updates.d.ts +92 -0
- package/dist/hub/member/updates.js +316 -0
- package/dist/hub/member/updates.js.map +1 -0
- package/dist/hub/protocol.d.ts +658 -1
- package/dist/hub/protocol.js +90 -13
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/published-version.d.ts +3 -0
- package/dist/hub/published-version.js +35 -0
- package/dist/hub/published-version.js.map +1 -0
- package/dist/hub/recommendation-model.d.ts +36 -0
- package/dist/hub/recommendation-model.js +9 -0
- package/dist/hub/recommendation-model.js.map +1 -0
- package/dist/hub/recommendations.d.ts +58 -0
- package/dist/hub/recommendations.js +211 -0
- package/dist/hub/recommendations.js.map +1 -0
- package/dist/hub/representative.d.ts +3 -0
- package/dist/hub/representative.js +2 -1
- package/dist/hub/representative.js.map +1 -1
- package/dist/hub/room-context-model.d.ts +43 -0
- package/dist/hub/room-context-model.js +12 -0
- package/dist/hub/room-context-model.js.map +1 -0
- package/dist/hub/rooms/agents.d.ts +41 -9
- package/dist/hub/rooms/agents.js +183 -21
- package/dist/hub/rooms/agents.js.map +1 -1
- package/dist/hub/rooms/assistant.d.ts +1 -6
- package/dist/hub/rooms/assistant.js +7 -2
- package/dist/hub/rooms/assistant.js.map +1 -1
- package/dist/hub/rooms/automation.d.ts +24 -0
- package/dist/hub/rooms/automation.js +66 -0
- package/dist/hub/rooms/automation.js.map +1 -0
- package/dist/hub/rooms/buttons.d.ts +85 -0
- package/dist/hub/rooms/buttons.js +62 -0
- package/dist/hub/rooms/buttons.js.map +1 -0
- package/dist/hub/rooms/context-cursor.d.ts +18 -0
- package/dist/hub/rooms/context-cursor.js +61 -0
- package/dist/hub/rooms/context-cursor.js.map +1 -0
- package/dist/hub/rooms/context.d.ts +1 -1
- package/dist/hub/rooms/context.js +4 -4
- package/dist/hub/rooms/context.js.map +1 -1
- package/dist/hub/rooms/mentions.d.ts +15 -0
- package/dist/hub/rooms/mentions.js +43 -0
- package/dist/hub/rooms/mentions.js.map +1 -0
- package/dist/hub/rooms/post-replies.d.ts +23 -0
- package/dist/hub/rooms/post-replies.js +114 -0
- package/dist/hub/rooms/post-replies.js.map +1 -0
- package/dist/hub/rooms/schema.d.ts +9 -0
- package/dist/hub/rooms/schema.js +43 -0
- package/dist/hub/rooms/schema.js.map +1 -1
- package/dist/hub/rooms/service.d.ts +136 -1
- package/dist/hub/rooms/service.js +727 -18
- package/dist/hub/rooms/service.js.map +1 -1
- package/dist/hub/rooms/types.d.ts +27 -3
- package/dist/hub/rooms.js +1 -1
- package/dist/hub/rooms.js.map +1 -1
- package/dist/hub/runtime.d.ts +1 -1
- package/dist/hub/runtime.js +12 -0
- package/dist/hub/runtime.js.map +1 -1
- package/dist/hub/server.d.ts +6 -1
- package/dist/hub/server.js +75 -5
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/settings-directory-proof.js +22 -1
- package/dist/hub/settings-directory-proof.js.map +1 -1
- package/dist/hub/types.d.ts +133 -2
- package/dist/hub-contact-windows.d.ts +11 -0
- package/dist/hub-contact-windows.js +56 -0
- package/dist/hub-contact-windows.js.map +1 -0
- package/dist/hub-pairing-summary.d.ts +1 -1
- package/dist/hub-room-conversation.d.ts +14 -0
- package/dist/hub-room-conversation.js +60 -0
- package/dist/hub-room-conversation.js.map +1 -0
- package/dist/hub-update-notice.d.ts +12 -0
- package/dist/hub-update-notice.js +35 -0
- package/dist/hub-update-notice.js.map +1 -0
- package/dist/locale.js +58 -2
- package/dist/locale.js.map +1 -1
- package/dist/native-mcp.js +9 -6
- package/dist/native-mcp.js.map +1 -1
- package/dist/outbound-handlers.d.ts +14 -4
- package/dist/outbound-handlers.js +54 -1
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +12 -0
- package/dist/outbound-schemas.js +12 -0
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/pane-port.d.ts +2 -0
- package/dist/queued-handoffs.d.ts +16 -4
- package/dist/queued-handoffs.js +18 -1
- package/dist/queued-handoffs.js.map +1 -1
- package/dist/runtime-cli-install.js +13 -10
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/settings-api.d.ts +1 -0
- package/dist/settings-api.js +87 -0
- package/dist/settings-api.js.map +1 -1
- package/dist/tmux-manager.d.ts +2 -0
- package/dist/tmux-manager.js +2 -0
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tool-permissions.js +3 -0
- package/dist/tool-permissions.js.map +1 -1
- package/dist/ui/chat-msg-actions.js +3 -222
- package/dist/ui/hub-admin-overview.js +189 -0
- package/dist/ui/hub-client.js +36 -4
- package/dist/ui/hub-fleet-versions.js +393 -0
- package/dist/ui/hub-room-agent-strings.js +28 -0
- package/dist/ui/hub-room-composer.js +16 -8
- package/dist/ui/hub-room-members-strings.js +2 -2
- package/dist/ui/hub-room-members.js +3 -2
- package/dist/ui/hub-room-notify.js +161 -0
- package/dist/ui/hub-room-search.js +126 -0
- package/dist/ui/hub-room-strings.js +47 -1
- package/dist/ui/hub-room-thread.js +243 -35
- package/dist/ui/hub-room-unread.js +2 -1
- package/dist/ui/hub-strings.js +8 -0
- package/dist/ui/image-annotate.js +2 -283
- package/dist/ui/image-lightbox.js +2 -176
- package/dist/ui/image-zoom.js +2 -242
- package/dist/ui/notice-hub-update.js +94 -0
- package/dist/ui/panel-chat.js +121 -12
- package/dist/ui/panel-hub.js +133 -19
- package/dist/ui/panel-notices.js +3 -1
- package/dist/ui/panel-settings.js +1 -1
- package/dist/ui/settings-hub-updates.js +67 -0
- package/dist/ui/settings-hub.js +28 -3
- package/dist/ui/settings-registry.js +1 -0
- package/dist/ui/settings-update.js +11 -5
- package/dist/ui/settings-web-authority.js +1 -1
- package/dist/ui/shared/app-i18n.js +2 -0
- package/dist/ui/shared/app-nav.js +6 -2
- package/dist/ui/shared/app-prefs.js +2 -1
- package/dist/ui/shared/app-shell.js +29 -4
- package/dist/ui/shared/app-update.js +90 -8
- package/dist/ui/shared/app.css +33 -0
- package/dist/ui/shared/chat-composer.js +6 -3
- package/dist/ui/shared/chat-msg-actions.js +225 -0
- package/dist/ui/shared/chat-thread.js +70 -5
- package/dist/ui/shared/chat-work-bar.css +48 -0
- package/dist/ui/shared/hub-chat.css +16 -2
- package/dist/ui/shared/hub-owner.css +104 -0
- package/dist/ui/shared/hub-rooms-u2.css +16 -0
- package/dist/ui/shared/hub.css +5 -0
- package/dist/ui/shared/image-annotate.js +306 -0
- package/dist/ui/shared/image-lightbox.js +183 -0
- package/dist/ui/shared/image-zoom.js +242 -0
- package/dist/ui/shared/instance-nav.js +36 -7
- package/dist/ui/shared/model-picker.css +4 -3
- package/dist/ui/shared/view-strings.js +8 -0
- package/dist/ui/shared/web-authorize.js +2 -2
- package/dist/update-dispatch.d.ts +8 -1
- package/dist/update-dispatch.js +16 -1
- package/dist/update-dispatch.js.map +1 -1
- package/dist/update-idle.d.ts +65 -0
- package/dist/update-idle.js +190 -0
- package/dist/update-idle.js.map +1 -0
- package/dist/update-launch.d.ts +1 -1
- package/dist/update-launch.js +9 -2
- package/dist/update-launch.js.map +1 -1
- 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/profile-timeline.d.ts +2 -0
- package/dist/usage/profile-timeline.js +4 -0
- package/dist/usage/profile-timeline.js.map +1 -1
- package/dist/usage/providers.js +4 -4
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/quota-history.d.ts +1 -1
- package/dist/view-api.js +1 -1
- package/dist/view-api.js.map +1 -1
- package/dist/web-api.js +19 -2
- package/dist/web-api.js.map +1 -1
- package/dist/web-notices.d.ts +3 -0
- package/dist/web-notices.js +17 -2
- package/dist/web-notices.js.map +1 -1
- package/dist/web-prefs.js +1 -0
- package/dist/web-prefs.js.map +1 -1
- package/dist/web-update.d.ts +15 -1
- package/package.json +1 -1
|
@@ -73,6 +73,7 @@ register("app", {
|
|
|
73
73
|
brand: "AgEnD", fleet: "Fleet", fleetOverview: "Fleet", view: "View", settings: "Settings", instances: "Instances", newInstance: "New instance", newAgent: "New agent",
|
|
74
74
|
collapse: "Hide the sidebar", expand: "Show the sidebar", openMenu: "Open the sidebar", closeMenu: "Close the sidebar",
|
|
75
75
|
resizeSidebar: "Sidebar width", resizeSidebarHint: "Drag to resize · double-click to reset",
|
|
76
|
+
sidebarDensity: "Sidebar agent list", sidebarDetailed: "Detailed", sidebarCompact: "Compact",
|
|
76
77
|
names: "Names", namesNickname: "Nickname first", namesInstance: "Real name first",
|
|
77
78
|
theme: "Theme", themeSystem: "System", themeLight: "Light", themeDark: "Dark", language: "Language",
|
|
78
79
|
previews: "Allow HTML previews", tour: "Tour", tourTitle: "Show the web chat tour again",
|
|
@@ -123,6 +124,7 @@ register("app", {
|
|
|
123
124
|
brand: "AgEnD", fleet: "Fleet", fleetOverview: "Fleet 概覽", view: "檢視", settings: "設定", instances: "Agent", newInstance: "新增 Agent", newAgent: "新增 Agent",
|
|
124
125
|
collapse: "隱藏側邊欄", expand: "顯示側邊欄", openMenu: "打開側邊欄", closeMenu: "關閉側邊欄",
|
|
125
126
|
resizeSidebar: "側邊欄寬度", resizeSidebarHint: "拖曳調整寬度 · 按兩下恢復預設",
|
|
127
|
+
sidebarDensity: "側邊欄 Agent 清單", sidebarDetailed: "詳細", sidebarCompact: "精簡",
|
|
126
128
|
names: "名稱", namesNickname: "暱稱優先", namesInstance: "實際名稱優先",
|
|
127
129
|
theme: "主題", themeSystem: "跟隨系統", themeLight: "淺色", themeDark: "深色", language: "語言",
|
|
128
130
|
previews: "允許預覽 HTML", tour: "導覽", tourTitle: "再看一次網頁聊天導覽",
|
|
@@ -95,7 +95,11 @@ export function onLinkClick(e) {
|
|
|
95
95
|
if ((a.getAttribute("href") || "").startsWith("#")) return;
|
|
96
96
|
const url = new URL(a.getAttribute("href"), win.location.href);
|
|
97
97
|
if (url.hash && url.pathname === win.location.pathname && url.search === win.location.search) return;
|
|
98
|
-
|
|
98
|
+
const route = url.origin === win.location.origin ? parseRoute(url.pathname) : null;
|
|
99
|
+
if (!route) return;
|
|
99
100
|
e.preventDefault();
|
|
100
|
-
|
|
101
|
+
// M-3131: a place in Settings (/settings/access#webAuthority) keeps its hash — Settings reveals the tab that owns it
|
|
102
|
+
// (#2347), as it does for a typed or pasted address.
|
|
103
|
+
const keepHash = route.panel === "settings" || (navigation && (navStore.get().workspace || url.searchParams.has("compare")));
|
|
104
|
+
navigate(url.pathname + url.search + (keepHash ? url.hash : ""));
|
|
101
105
|
}
|
|
@@ -31,6 +31,7 @@ export const SYNCED = {
|
|
|
31
31
|
"nav.collapsed": { ls: "agend_instance_collapsed", ...json },
|
|
32
32
|
"nav.filter": { ls: "agend_instance_filter", ...json },
|
|
33
33
|
"nav.favorites": { ls: "agend_favorites", ...json }, // #1664
|
|
34
|
+
"nav.density": { ls: "agend_nav_density", toLocal: (v) => (v === "compact" ? v : null), fromLocal: (s) => (s === "compact" ? s : undefined) },
|
|
34
35
|
"nav.sort": { ls: "agend_nav_sort", ...json }, // #2179
|
|
35
36
|
"preview.optIn": { ls: "agend_html_preview", toLocal: (v) => (v ? "on" : null), fromLocal: (s) => (s === "on" ? true : undefined) },
|
|
36
37
|
"names.primary": { ls: "agend_names_primary", toLocal: (v) => (v === "instance" ? v : null), fromLocal: (s) => (s === "instance" ? s : undefined) }, // #1722
|
|
@@ -86,7 +87,7 @@ const listeners = new Set();
|
|
|
86
87
|
// this page's own in prefInForce) but not sent: `held` keeps it until savePrefsHeld sends them all, or discardHeldPrefs
|
|
87
88
|
// puts back what the host has (the same path as another device's change: apply and onPrefsChanged).
|
|
88
89
|
// Only keys Settings itself changes (a card's own size, card.sizeByInstance, is set from the card, outside Settings).
|
|
89
|
-
export const HELD_KEYS = Object.freeze(new Set(["theme", "lang", "names.primary", "preview.optIn", "fx.show", "color.show", "color.off", "card.size"]));
|
|
90
|
+
export const HELD_KEYS = Object.freeze(new Set(["theme", "lang", "names.primary", "nav.density", "preview.optIn", "fx.show", "color.show", "color.off", "card.size"]));
|
|
90
91
|
let holding = 0;
|
|
91
92
|
const held = new Map(); // key → value chosen in Settings, shown here, not saved yet
|
|
92
93
|
const heldFrom = new Map(); // key → its cached form before it was held (a choice back to it is no change)
|
|
@@ -17,7 +17,7 @@ import { applyPageTheme, pageNow, resolvedMode, themesStore } from "./app-themes
|
|
|
17
17
|
import { ErrorState, Skeleton } from "./ui-states.js";
|
|
18
18
|
import { StaleTabPrompt, isStaleModuleError } from "./stale-tab.js";
|
|
19
19
|
import { Dialog } from "./ui-dialog.js";
|
|
20
|
-
import { InstanceNav, RosterNav, namesStore, setNamesPrimary } from "./instance-nav.js";
|
|
20
|
+
import { InstanceNav, RosterNav, namesStore, setNamesPrimary, sidebarDensityStore, setSidebarDensity } from "./instance-nav.js";
|
|
21
21
|
import { usageRailStore } from "./header-tools.js";
|
|
22
22
|
import { RightRail, sidePanelStore } from "./side-panel.js";
|
|
23
23
|
import { OwnerCssKeepBar } from "./owner-css.js";
|
|
@@ -510,6 +510,7 @@ export function DevicePrefs({ labels = false, fields = ["theme", "language", "na
|
|
|
510
510
|
const [theme, setTheme] = useState(typeof AgendTheme !== "undefined" ? AgendTheme.get() : "system");
|
|
511
511
|
const [l, setL] = useState(lang());
|
|
512
512
|
const names = useStore(namesStore); // #1722
|
|
513
|
+
const density = useStore(sidebarDensityStore).value;
|
|
513
514
|
// #1665: what is in force, as it changes — another device's choice arriving while this is open is shown at once.
|
|
514
515
|
useEffect(() => (typeof AgendTheme !== "undefined" && typeof AgendTheme.onChange === "function" ? AgendTheme.onChange(setTheme) : undefined), []);
|
|
515
516
|
useEffect(() => onLang(setL), []);
|
|
@@ -524,6 +525,9 @@ export function DevicePrefs({ labels = false, fields = ["theme", "language", "na
|
|
|
524
525
|
${shows("names") ? html`<label class="pref"><${Icon} name="user" size=${16} /><span class=${labels ? "pref-label" : "sr-only"}>${t("app.names")}</span>
|
|
525
526
|
<select id=${labels ? "pref-names" : undefined} value=${names.primary} aria-label=${t("app.names")} onChange=${(e) => setNamesPrimary(e.target.value)}>
|
|
526
527
|
<option value="nickname">${t("app.namesNickname")}</option><option value="instance">${t("app.namesInstance")}</option></select></label>` : null}
|
|
528
|
+
${shows("density") ? html`<label class="pref"><${Icon} name="sidebar" size=${16} /><span class=${labels ? "pref-label" : "sr-only"}>${t("app.sidebarDensity")}</span>
|
|
529
|
+
<select id=${labels ? "pref-density" : undefined} value=${density} aria-label=${t("app.sidebarDensity")} onChange=${(e) => setSidebarDensity(e.target.value)}>
|
|
530
|
+
<option value="detailed">${t("app.sidebarDetailed")}</option><option value="compact">${t("app.sidebarCompact")}</option></select></label>` : null}
|
|
527
531
|
</div>`;
|
|
528
532
|
}
|
|
529
533
|
|
|
@@ -539,8 +543,19 @@ function PrefsPopover() {
|
|
|
539
543
|
* The header every panel shows: ☰ (phone, or a collapsed sidebar), its title and status, then its actions. `nav`
|
|
540
544
|
* (#1523 N2): an instance page's view switch — beside the title on a wide screen, a row of tabs under it on a phone.
|
|
541
545
|
*/
|
|
546
|
+
// M-3115 (phone v2): inside an agent's pages a phone has no bottom tabs; the header's first button goes back to the
|
|
547
|
+
// agents (the drawer) and carries what Needs you counts. Kept beside its caller: a retained dictionary has no such word.
|
|
548
|
+
register("phoneNav", {
|
|
549
|
+
en: { back: "Back to your agents", backCount: "Back to your agents · {0} waiting" },
|
|
550
|
+
"zh-TW": { back: "回到 Agent 清單", backCount: "回到 Agent 清單 · {0} 件待處理" },
|
|
551
|
+
});
|
|
552
|
+
/** What Needs you counts: its items and the agents' proposals (the tab's badge, the sidebar's). */
|
|
553
|
+
export function needsCount(app) { return (app.needs || []).length + (app.proposals || []).length; }
|
|
554
|
+
|
|
542
555
|
export function PanelHeader({ title, sub, children, headingRef, nav, notice, pageControls, pageActions }) {
|
|
543
556
|
const shell = useStore(shellStore);
|
|
557
|
+
const { route } = useStore(navStore), app = useStore(appStore);
|
|
558
|
+
const agent = !!openInstanceOf(route) && !guestPage(), waiting = agent ? needsCount(app) : 0;
|
|
544
559
|
const admin = useCanCreate();
|
|
545
560
|
const canCreate = admin && !!newInstanceOpener;
|
|
546
561
|
const pane = paneContext.usePane?.();
|
|
@@ -549,8 +564,10 @@ export function PanelHeader({ title, sub, children, headingRef, nav, notice, pag
|
|
|
549
564
|
if (pane?.Header) return html`<${pane.Header} title=${title} sub=${sub} headingRef=${headingRef} nav=${nav} notice=${notice}
|
|
550
565
|
pageControls=${pageControls} pageActions=${pageActions} />`;
|
|
551
566
|
return html`<header data-trust="header" class=${`panel-head${shell.collapsed ? " collapsed" : ""}`}>
|
|
552
|
-
<button type="button" id="sbOpen" class
|
|
553
|
-
aria-label=${narrow() ? t("
|
|
567
|
+
<button type="button" id="sbOpen" class=${`icon-btn sb-open${agent ? " sb-back" : ""}`} onClick=${() => (narrow() ? openDrawer() : toggleSidebar())}
|
|
568
|
+
aria-label=${narrow() ? agent ? (waiting ? t("phoneNav.backCount", waiting) : t("phoneNav.back")) : t("app.openMenu") : t("app.expand")}
|
|
569
|
+
title=${narrow() ? agent ? t("phoneNav.back") : t("app.openMenu") : t("app.expand")} aria-controls="sidebar" aria-expanded=${shell.drawer ? "true" : "false"}><${Icon} name="menu" cls="ic-menu" />${agent
|
|
570
|
+
? html`<${Icon} name="back" cls="ic-back" />${waiting ? html`<span class="sb-badge" aria-hidden="true">${waiting > 99 ? "99+" : waiting}</span>` : null}` : null}</button>
|
|
554
571
|
${canCreate && shell.collapsed ? html`<button type="button" class="icon-btn sb-new" onClick=${requestNewInstance} aria-label=${t("app.newAgent")} title=${t("app.newAgent")}><${Icon} name="plus" /></button>` : null}
|
|
555
572
|
${searchOffered(admin) ? html`<button type="button" class="icon-btn sb-search" onClick=${() => openSearch()} aria-label=${t("app.search")} title=${t("app.searchTitle", searchShortcut())}><${Icon} name="search" /></button>` : null}
|
|
556
573
|
<div class="panel-title"><h1 ref=${headingRef} tabindex="-1">${title}</h1>${sub ? html`<div class="panel-sub">${sub}</div>` : null}</div>
|
|
@@ -680,6 +697,8 @@ register("pendingSummary", {
|
|
|
680
697
|
"general_location.confirm_windows": "Run General on {0}? Its current process must stop first. The chat stays here. The host conversation is kept; Windows uses its own conversation. Pending or uncertain input will not be sent to the other conversation.",
|
|
681
698
|
"general_location.history": "Host and Windows conversations stay separate. Switching does not copy or merge their history.",
|
|
682
699
|
"hub.exposure.summary.share": "Share \"{0}\" with the Hub",
|
|
700
|
+
"hub.exposure.summary.contactLimited": "While answering a Hub question, this agent may not contact other agents",
|
|
701
|
+
"hub.exposure.summary.contactAllowed": "While answering a Hub question, this agent may contact other agents",
|
|
683
702
|
"hub.exposure.summary.context": "Hub questions go to this agent's own conversation, with its folder and Settings tools",
|
|
684
703
|
"hub.exposure.summary.revision": "Revision: {0}",
|
|
685
704
|
"hub.pairing.summary.connect": "Connect this fleet to the Hub at {0}",
|
|
@@ -721,6 +740,8 @@ register("pendingSummary", {
|
|
|
721
740
|
"general_location.confirm_windows": "要讓 General 在 {0} 執行嗎?必須先停止目前的程序。聊天位置不變。主機上的對話會保留,Windows 使用自己的對話。待處理或結果不明的輸入不會送到另一段對話。",
|
|
722
741
|
"general_location.history": "主機與 Windows 各自保留對話,切換時不會複製或合併對話紀錄。",
|
|
723
742
|
"hub.exposure.summary.share": "將「{0}」分享給 Hub",
|
|
743
|
+
"hub.exposure.summary.contactLimited": "回答 Hub 提問時,這個 Agent 不能聯絡其他 Agent",
|
|
744
|
+
"hub.exposure.summary.contactAllowed": "回答 Hub 提問時,這個 Agent 可以聯絡其他 Agent",
|
|
724
745
|
"hub.exposure.summary.context": "Hub 提問會送到這個 Agent 自己的對話,使用其資料夾與設定的工具",
|
|
725
746
|
"hub.exposure.summary.revision": "修訂版本:{0}",
|
|
726
747
|
"hub.pairing.summary.connect": "將這個 Fleet 連接到 {0} 的 Hub",
|
|
@@ -763,6 +784,8 @@ const pendingSummaryArguments = Object.fromEntries([
|
|
|
763
784
|
["general_location.confirm_windows", "s"],
|
|
764
785
|
["general_location.history", ""],
|
|
765
786
|
["hub.exposure.summary.share", "s"],
|
|
787
|
+
["hub.exposure.summary.contactLimited", ""],
|
|
788
|
+
["hub.exposure.summary.contactAllowed", ""],
|
|
766
789
|
["hub.exposure.summary.context", ""],
|
|
767
790
|
["hub.exposure.summary.revision", "n"],
|
|
768
791
|
["hub.pairing.summary.connect", "s"],
|
|
@@ -1286,7 +1309,9 @@ export function Shell({ panels, onNewInstance, viewOnly = false }) {
|
|
|
1286
1309
|
// AgEnD Hub P1 (S3b): a Hub workspace has none of the fleet's lines, rails, tabs or bars (their endpoints are the fleet's).
|
|
1287
1310
|
const hub = hubMarks().hub;
|
|
1288
1311
|
const popout = shell.popout === true && !!openInstanceOf(nav.route);
|
|
1289
|
-
|
|
1312
|
+
// M-3115: an agent's own pages (its chat, View, Log, Details) — a phone shows them without the bottom tabs.
|
|
1313
|
+
const inAgent = !!openInstanceOf(nav.route) && !guest;
|
|
1314
|
+
const cls = ["shell", popout ? "chat-popout" : "", shell.collapsed ? "sb-collapsed" : "", shell.drawer ? "sb-open" : "", shell.keyboard ? "kb-open" : "", guest ? "guest" : "", inAgent ? "in-agent" : ""].filter(Boolean).join(" ");
|
|
1290
1315
|
return html`<div ref=${root} class=${cls}>
|
|
1291
1316
|
<a data-trust="navigation" class="skip" href="#main">${t("app.skip")}</a>
|
|
1292
1317
|
${popout ? null : html`<${Sidebar} route=${nav.route} onNewInstance=${onNewInstance} viewOnly=${viewOnly} />`}
|
|
@@ -29,6 +29,9 @@ register("update", {
|
|
|
29
29
|
dismiss: "Dismiss", adminOnly: "Only a fleet admin can update AgEnD.", running: "An update is already running.",
|
|
30
30
|
upToDate: "AgEnD v{0} is up to date.", stableOnly: "v{0} (stable) is available. Updating from the web stays on this install's line.",
|
|
31
31
|
failedToStart: "The update could not be started: {0}", startedToast: "Update started.",
|
|
32
|
+
hubAvailable: "{0} recommends AgEnD v{1} (current v{2})", hubSub: "Some Hub features need it. Only admins see this.",
|
|
33
|
+
hubLine: "the version {0} recommends", recChanged: "The Hub's recommended version changed. Look at the banner again.",
|
|
34
|
+
hubAsked: "the version {0} ({1}) asked for", requestGone: "This update request is no longer waiting.",
|
|
32
35
|
},
|
|
33
36
|
"zh-TW": {
|
|
34
37
|
available: "AgEnD v{0} 已推出(目前 v{1})", availableSub: "{0} · 只有管理員看得到", now: "立即更新", later: "稍後",
|
|
@@ -47,6 +50,9 @@ register("update", {
|
|
|
47
50
|
dismiss: "關閉", adminOnly: "只有 fleet 管理員可以更新 AgEnD。", running: "已經有一個更新在進行中。",
|
|
48
51
|
upToDate: "AgEnD v{0} 已是最新版。", stableOnly: "v{0}(穩定版)已推出。網頁更新會留在這個安裝的版本線。",
|
|
49
52
|
failedToStart: "無法開始更新:{0}", startedToast: "已開始更新。",
|
|
53
|
+
hubAvailable: "{0} 建議更新到 AgEnD v{1}(目前 v{2})", hubSub: "部分 Hub 功能需要這個版本。只有管理員看得到。",
|
|
54
|
+
hubLine: "{0} 建議的版本", recChanged: "Hub 建議的版本已變更,請再看一次橫幅。",
|
|
55
|
+
hubAsked: "{0}({1})要求的版本", requestGone: "這個更新要求已經不在等待中。",
|
|
50
56
|
},
|
|
51
57
|
});
|
|
52
58
|
|
|
@@ -56,13 +62,47 @@ const STEP = { preparing: 1, downloading: 2, installed: 3, stopping: 3, starting
|
|
|
56
62
|
function remembered(key) { try { return localStorage.getItem(key); } catch { return null; } }
|
|
57
63
|
function remember(key, value) { try { localStorage.setItem(key, value); } catch { /* this page only */ } }
|
|
58
64
|
const LATER_KEY = "agend_update_later", DISMISSED_KEY = "agend_update_dismissed";
|
|
65
|
+
// M-3140: Later on the Hub's line hides it for a day ("<hubId>:<revision>@<ms>"); new advice shows at once.
|
|
66
|
+
const LATER_HUB_KEY = "agend_update_later_hub", LATER_HUB_MS = 24 * 60 * 60 * 1000;
|
|
59
67
|
|
|
60
68
|
/**
|
|
61
69
|
* `info`: GET /ui/update's answer (null: none — an older server, a guest, signed out). `loadedVersion`: the version this
|
|
62
70
|
* tab was loaded on (the first answer's): a later answer naming another one means this tab runs the old page.
|
|
63
71
|
*/
|
|
64
72
|
export const updateStore = createStore({ info: null, loadedVersion: null, skew: 0, starting: false, later: remembered(LATER_KEY),
|
|
65
|
-
dismissed: remembered(DISMISSED_KEY), reloadDismissed: null, log: null });
|
|
73
|
+
dismissed: remembered(DISMISSED_KEY), reloadDismissed: null, log: null, laterHub: remembered(LATER_HUB_KEY) });
|
|
74
|
+
|
|
75
|
+
/** Semver "a > b" (major.minor.patch, then a release over its prereleases, then prerelease identifiers) — the server's rule. */
|
|
76
|
+
export function newerVersion(a, b) {
|
|
77
|
+
const parse = (v) => { const m = /^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/.exec(String(v || "")); return m ? { core: [+m[1], +m[2], +m[3]], pre: m[4] ? m[4].split(".") : null } : null; };
|
|
78
|
+
const x = parse(a), y = parse(b);
|
|
79
|
+
if (!x || !y) return false;
|
|
80
|
+
for (let i = 0; i < 3; i++) if (x.core[i] !== y.core[i]) return x.core[i] > y.core[i];
|
|
81
|
+
if (!x.pre || !y.pre) return !x.pre && !!y.pre;
|
|
82
|
+
for (let i = 0; i < Math.max(x.pre.length, y.pre.length); i++) {
|
|
83
|
+
const p = x.pre[i], q = y.pre[i];
|
|
84
|
+
if (p === undefined) return false; if (q === undefined) return true;
|
|
85
|
+
const pn = /^\d+$/.test(p), qn = /^\d+$/.test(q);
|
|
86
|
+
if (pn && qn) { if (+p !== +q) return +p > +q; } else if (pn !== qn) return !pn; else if (p !== q) return p > q;
|
|
87
|
+
}
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* M-3140: the Hub's advice this admin should be shown, or null. One banner (spec §3.3): when the install's own update
|
|
93
|
+
* already reaches the advised version, today's line says it; the Hub's line only when its version is the higher need.
|
|
94
|
+
*/
|
|
95
|
+
export function hubNeed(info) {
|
|
96
|
+
const rec = info && info.admin ? info.hubRecommendation : null;
|
|
97
|
+
if (!rec || typeof rec.version !== "string" || !newerVersion(rec.version, info.current)) return null;
|
|
98
|
+
const offer = info.offer;
|
|
99
|
+
if (offer && offer.installable && !newerVersion(rec.version, offer.version)) return null;
|
|
100
|
+
return rec;
|
|
101
|
+
}
|
|
102
|
+
function hubLaterActive(laterHub, rec, now = Date.now()) {
|
|
103
|
+
const m = /^(.*)@(\d+)$/.exec(laterHub || "");
|
|
104
|
+
return !!m && m[1] === `${rec.hubId}:${rec.revision}` && now - Number(m[2]) < LATER_HUB_MS && now >= Number(m[2]);
|
|
105
|
+
}
|
|
66
106
|
|
|
67
107
|
export function updateActive(info) { return !!(info && info.progress && ACTIVE.has(info.progress.stage)); }
|
|
68
108
|
|
|
@@ -96,22 +136,55 @@ function channelWord(channel) { return t(`update.channel_${channel === "alpha" |
|
|
|
96
136
|
function sameLine(channel) { return t(`update.same_${channel === "alpha" || channel === "latest" ? channel : "beta"}`); }
|
|
97
137
|
|
|
98
138
|
/** The one confirmation (the leader's D1: the admin's own, no General card), then the start. From the line, Settings or /update. */
|
|
99
|
-
export async function openUpdateDialog() {
|
|
139
|
+
export async function openUpdateDialog() { return startUpdate(null); }
|
|
140
|
+
/** M-3140: the same confirmation and start, pinned to the Hub's recommended version (the server re-reads its own advice). */
|
|
141
|
+
export async function openHubUpdateDialog() { return startUpdate("hub"); }
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* M-3145 (versions spec §4.4; M-3144 #3963): Update now on an owner's notice about an update this Hub's administrator
|
|
145
|
+
* asked for. The notice is not the authority: the page rereads the Fleet's own copy of the request
|
|
146
|
+
* (GET /api/settings/hub/fleet-updates/:id), asks the same question naming that version, and starts it by the
|
|
147
|
+
* request's id — never a version (`hubRequestId`). Waiting or expired only (an expired one starts as a new local update).
|
|
148
|
+
*/
|
|
149
|
+
export async function openHubRequestedUpdate({ requestId, hubName = "", requestedBy = "" } = {}) {
|
|
100
150
|
let info = updateStore.get().info;
|
|
101
151
|
if (!info) info = await refreshUpdate();
|
|
102
152
|
if (!info || !info.admin) { toast(t("update.adminOnly"), false); return { ok: false }; }
|
|
103
153
|
if (updateActive(info)) { toast(t("update.running")); return { ok: false }; }
|
|
154
|
+
let req = null;
|
|
155
|
+
try { const r = await fetch(`/api/settings/hub/fleet-updates/${encodeURIComponent(String(requestId || ""))}`, { cache: "no-store" }); if (r.ok) req = await r.json(); } catch { req = null; }
|
|
156
|
+
if (!req || (req.state !== "waiting" && req.state !== "expired") || typeof req.version !== "string") { toast(t("update.requestGone"), false); return { ok: false }; }
|
|
157
|
+
const yes = await confirmDialog({ title: t("update.confirmTitle"), confirmLabel: t("update.confirmGo"),
|
|
158
|
+
message: t("update.confirmBody", req.version, t("update.hubAsked", requestedBy, hubName)) });
|
|
159
|
+
if (!yes) return { ok: false };
|
|
160
|
+
return postStart({ hubRequestId: req.id || requestId });
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
async function startUpdate(kind) {
|
|
164
|
+
let info = updateStore.get().info;
|
|
165
|
+
if (!info) info = await refreshUpdate();
|
|
166
|
+
if (!info || !info.admin) { toast(t("update.adminOnly"), false); return { ok: false }; }
|
|
167
|
+
if (updateActive(info)) { toast(t("update.running")); return { ok: false }; }
|
|
168
|
+
const rec = kind === "hub" ? hubNeed(info) : null;
|
|
169
|
+
if (kind === "hub" && !rec) { toast(t("update.recChanged"), false); return { ok: false }; }
|
|
104
170
|
const offer = info.offer;
|
|
105
|
-
if (!
|
|
106
|
-
|
|
171
|
+
if (!rec) {
|
|
172
|
+
if (!offer) { toast(t("update.upToDate", info.current)); return { ok: false }; }
|
|
173
|
+
if (!offer.installable) { toast(t("update.stableOnly", offer.version), false); return { ok: false }; }
|
|
174
|
+
}
|
|
107
175
|
const yes = await confirmDialog({ title: t("update.confirmTitle"), confirmLabel: t("update.confirmGo"),
|
|
108
|
-
message: t("update.confirmBody", offer.version, sameLine(offer.channel)) });
|
|
176
|
+
message: rec ? t("update.confirmBody", rec.version, t("update.hubLine", rec.hubName)) : t("update.confirmBody", offer.version, sameLine(offer.channel)) });
|
|
109
177
|
if (!yes) return { ok: false };
|
|
178
|
+
return postStart(rec ? { recommended: { version: rec.version, revision: rec.revision } } : {});
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/** The start itself, after the one question: what the update is pinned to (`extra`), the progress or why not. */
|
|
182
|
+
async function postStart(extra) {
|
|
110
183
|
updateStore.set({ starting: true });
|
|
111
184
|
const key = `update-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
112
185
|
let res = null, body = null;
|
|
113
186
|
try {
|
|
114
|
-
res = await fetch("/ui/update/start", { method: "POST", headers: { "Content-Type": "application/json", "Idempotency-Key": key }, body: JSON.stringify({ confirm: "update-agend" }) });
|
|
187
|
+
res = await fetch("/ui/update/start", { method: "POST", headers: { "Content-Type": "application/json", "Idempotency-Key": key }, body: JSON.stringify({ confirm: "update-agend", ...extra }) });
|
|
115
188
|
try { body = await res.json(); } catch { body = null; }
|
|
116
189
|
} catch { res = null; }
|
|
117
190
|
updateStore.set({ starting: false });
|
|
@@ -120,7 +193,8 @@ export async function openUpdateDialog() {
|
|
|
120
193
|
await refreshUpdate();
|
|
121
194
|
return { ok: true };
|
|
122
195
|
}
|
|
123
|
-
|
|
196
|
+
if (body && body.error === "recommendation_changed") toast(t("update.recChanged"), false);
|
|
197
|
+
else toast(t("update.failedToStart", (body && body.error) || (res ? String(res.status) : "network")), false);
|
|
124
198
|
await refreshUpdate();
|
|
125
199
|
return { ok: false };
|
|
126
200
|
}
|
|
@@ -155,6 +229,8 @@ function Dismiss({ onClick }) {
|
|
|
155
229
|
}
|
|
156
230
|
|
|
157
231
|
/** The updater's own words, on request (never on the line itself). */
|
|
232
|
+
/** The last update's log (the line's See the full log; an owner's rolled-back notice). */
|
|
233
|
+
export async function openUpdateLog() { return openLog(); }
|
|
158
234
|
async function openLog() {
|
|
159
235
|
let body = null;
|
|
160
236
|
try { const r = await fetch("/ui/update/log", { cache: "no-store" }); if (r.ok) body = await r.json(); } catch { body = null; }
|
|
@@ -205,7 +281,13 @@ export function UpdateLine() {
|
|
|
205
281
|
} else if (p && p.stage === "complete" && p.web && s.dismissed !== String(p.started_at)) {
|
|
206
282
|
line = html`<${Line} tone="ok" icon="check" title=${t("update.current", info.current)}>
|
|
207
283
|
<${Dismiss} onClick=${() => { remember(DISMISSED_KEY, String(p.started_at)); updateStore.set({ dismissed: String(p.started_at) }); }} /></${Line}>`;
|
|
208
|
-
} else if (info
|
|
284
|
+
} else if (hubNeed(info) && !hubLaterActive(s.laterHub, hubNeed(info))) {
|
|
285
|
+
// M-3140 (spec §3.3): who is asking, then today's buttons — Update now pinned to the advised version.
|
|
286
|
+
const rec = hubNeed(info);
|
|
287
|
+
line = html`<${Line} title=${t("update.hubAvailable", rec.hubName, rec.version, info.current)} sub=${[t("update.hubSub")]}>
|
|
288
|
+
<button type="button" class="btn btn-sm btn-primary" disabled=${s.starting} onClick=${() => { void openHubUpdateDialog(); }}>${t("update.now")}</button>
|
|
289
|
+
<button type="button" class="btn btn-sm" onClick=${() => { const v = `${rec.hubId}:${rec.revision}@${Date.now()}`; remember(LATER_HUB_KEY, v); updateStore.set({ laterHub: v }); }}>${t("update.later")}</button></${Line}>`;
|
|
290
|
+
} else if (info.offer && info.offer.installable && s.later !== info.offer.version && !hubNeed(info)) {
|
|
209
291
|
const o = info.offer;
|
|
210
292
|
line = html`<${Line} title=${t("update.available", o.version, info.current)} sub=${[t("update.availableSub", channelWord(o.channel))]}>
|
|
211
293
|
<button type="button" class="btn btn-sm btn-primary" disabled=${s.starting} onClick=${openUpdateDialog}>${t("update.now")}</button>
|
package/dist/ui/shared/app.css
CHANGED
|
@@ -286,6 +286,7 @@ html:has(.shell), html:has(.shell) body { overflow: hidden; }
|
|
|
286
286
|
padding: max(var(--s-1), env(safe-area-inset-top)) max(var(--s-3), env(safe-area-inset-right)) var(--s-1) max(var(--s-3), env(safe-area-inset-left));
|
|
287
287
|
}
|
|
288
288
|
.panel-head .sb-open { display: none; }
|
|
289
|
+
.sb-open .ic-back, .sb-open .sb-badge { display: none; } /* M-3115: the phone's ‹ (below); elsewhere ☰ only */
|
|
289
290
|
.sb-collapsed .panel-head .sb-open { display: inline-flex; }
|
|
290
291
|
/* #2074: a collapsed sidebar's "New agent", beside its ☰ (a phone opens the drawer, which has the row). */
|
|
291
292
|
.panel-head .sb-new { margin-left: calc(-1 * var(--s-1)); }
|
|
@@ -1225,6 +1226,7 @@ img.amb-p { object-fit: contain; }
|
|
|
1225
1226
|
hiding it 48 px from the bottom took that room away under a reader still scrolling — the wheel's last step was cut
|
|
1226
1227
|
short, or the view clamped back. Its dock is sticky and 0 px tall; the pill floats above it. */
|
|
1227
1228
|
.jump-dock { position: sticky; bottom: 0; height: 0; z-index: 5; }
|
|
1229
|
+
.jump-count { display: none; } /* No unread count on 最新 (the user, before beta.3); a tab on an older panel-chat.js still draws one: hidden */
|
|
1228
1230
|
.jump-latest {
|
|
1229
1231
|
position: absolute; bottom: var(--s-3); left: 50%; transform: translateX(-50%); white-space: nowrap; display: inline-flex; align-items: center; gap: var(--s-1);
|
|
1230
1232
|
background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-full); box-shadow: var(--shadow-2);
|
|
@@ -1487,6 +1489,21 @@ img.amb-p { object-fit: contain; }
|
|
|
1487
1489
|
padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
|
|
1488
1490
|
}
|
|
1489
1491
|
.kb-open .tabs { display: none; }
|
|
1492
|
+
/* M-3115 (phone v2): inside an agent's pages there are no bottom tabs — the header's first button (‹, with what Needs
|
|
1493
|
+
you counts) goes back to the agents, and ⋯ reaches Needs you, Fleet and Settings. The lists keep the tabs. */
|
|
1494
|
+
.in-agent .tabs { display: none; }
|
|
1495
|
+
.in-agent .main { padding-bottom: 0; }
|
|
1496
|
+
/* M-3166: …so nothing under the composer holds the home-indicator inset any more. Once ✓ Verified hides the line under it
|
|
1497
|
+
(below), the box sat in the screen's rounded corners. The dock keeps the inset itself, with the keyboard down (up, the
|
|
1498
|
+
keyboard covers that area, and the box sits on it: #2478). */
|
|
1499
|
+
.in-agent:not(.kb-open) .dock { padding-bottom: max(var(--s-2), env(safe-area-inset-bottom)); }
|
|
1500
|
+
.sb-back .ic-menu { display: none; }
|
|
1501
|
+
.sb-back .ic-back { display: inline-block; }
|
|
1502
|
+
.sb-back { position: relative; }
|
|
1503
|
+
.sb-back .sb-badge { display: block; position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-full); background: var(--danger-fill); color: var(--on-danger); font-size: var(--fs-xs); line-height: 16px; text-align: center; font-weight: var(--fw-semibold); }
|
|
1504
|
+
/* ✓ Verified moved into ⋯: a line under the composer that would say only that is not drawn (Not verified, waiting for
|
|
1505
|
+
Confirm, and what pressing Authorize answered still are). */
|
|
1506
|
+
.composer-row:has(.webauth-row[data-state="verified"]):not(:has(.webauth-notice, .guest-note)) { display: none; }
|
|
1490
1507
|
/* #2478: with the keyboard up the line under the composer goes too — the box sits on the keyboard; back on blur. */
|
|
1491
1508
|
.kb-open .composer-row { display: none; }
|
|
1492
1509
|
/* M-2733: on a phone the line under the composer was flush with the box's rounded edge, 4px under it and on the tab
|
|
@@ -1577,6 +1594,22 @@ img.amb-p { object-fit: contain; }
|
|
|
1577
1594
|
.inst.just:not(.active) { animation: inst-just 2.4s ease-out 1; }
|
|
1578
1595
|
@keyframes inst-just { from { box-shadow: inset 0 0 0 1.5px var(--accent); } to { box-shadow: inset 0 0 0 1.5px transparent; } }
|
|
1579
1596
|
@media (prefers-reduced-motion: reduce) { .inst.just:not(.active) { animation: none; } } /* as specific as the rule it stops */
|
|
1597
|
+
/* M-3129: v4 compact sidebar. Same tokens, links, hover/selection and group headers; no avatar. */
|
|
1598
|
+
.inst-nav.compact .v-li { height: 30px; }
|
|
1599
|
+
.inst-nav.compact .v-inst { height: 30px; min-height: 30px; padding-block: 0; gap: var(--s-2); }
|
|
1600
|
+
.inst-nav.compact .inst-text { flex-direction: row; align-items: center; gap: var(--s-2); }
|
|
1601
|
+
.inst-nav.compact .inst-line { flex: 1; min-width: 0; }
|
|
1602
|
+
.inst-nav.compact .inst-line2 { flex: none; }
|
|
1603
|
+
.inst-nav.compact .inst-when { color: var(--text-3); font-weight: var(--fw-normal); }
|
|
1604
|
+
.inst-nav.compact .inst-row-menu > .icon-btn { height: 28px; min-height: 28px; }
|
|
1605
|
+
.inst-status.off { background: var(--text-2); }
|
|
1606
|
+
.inst-status.hollow { box-sizing: border-box; background: var(--bg-sidebar); border: 2px solid var(--text-2); }
|
|
1607
|
+
@media (max-width: 899px), (pointer: coarse) {
|
|
1608
|
+
/* New Settings controls meet the phone tap minimum; existing smaller controls are grandfathered by the UI gate. */
|
|
1609
|
+
.p-settings .prefs.labelled #pref-density { min-height: var(--tap); }
|
|
1610
|
+
.inst-nav.compact .v-li, .inst-nav.compact .v-inst { height: 40px; min-height: 40px; }
|
|
1611
|
+
.inst-nav.compact .inst-row-menu > .icon-btn { height: 40px; min-height: 40px; min-width: 40px; }
|
|
1612
|
+
}
|
|
1580
1613
|
/* #2179: how the list sorts — the button says it (the accent while "Recent replies" is on); its menu under it. */
|
|
1581
1614
|
.inst-head { position: relative; }
|
|
1582
1615
|
.nav-sort { position: static; flex: none; } /* the menu spans the header's width, under it — never past the sidebar's edge */
|
|
@@ -21,7 +21,7 @@ export const touchScreen = () => typeof matchMedia === "function" && matchMedia(
|
|
|
21
21
|
* `send`: { hidden, disabled, label, onClick } — keep it shown (disabled when there is nothing to send) so the box keeps one width. `controls` / `expanded` / `activeDescendant`: the box's palette ARIA.
|
|
22
22
|
*/
|
|
23
23
|
export function ComposerInput({ inputRef, value, placeholder, onValue, onKeyDown, onPaste, attach = null, stop, send,
|
|
24
|
-
controls, expanded = false, activeDescendant, ids = {} }) {
|
|
24
|
+
controls, expanded = false, activeDescendant, ids = {}, tools = null }) {
|
|
25
25
|
const own = useRef(null), input = inputRef || own, fileIn = useRef(null);
|
|
26
26
|
const composing = useRef(false);
|
|
27
27
|
// A render while composing (another part of the page changed) gives the box what it holds, so it never writes it.
|
|
@@ -50,9 +50,12 @@ export function ComposerInput({ inputRef, value, placeholder, onValue, onKeyDown
|
|
|
50
50
|
aria-activedescendant=${activeDescendant} onInput=${onInput} onKeyDown=${onKeyDown} onPaste=${onPaste}
|
|
51
51
|
oncompositionstart=${onCompositionStart} oncompositionend=${onCompositionEnd} onBlur=${onCompositionEnd}
|
|
52
52
|
placeholder=" "></textarea><span class="composer-ph" aria-hidden="true">${placeholder}</span></span>
|
|
53
|
-
|
|
53
|
+
${/* M-3115 (phone v2): what the row holds beside the box (the Fleet chat's context ring and model picker); none elsewhere. */ ""}
|
|
54
|
+
${tools || null}
|
|
55
|
+
${/* M-3115: `send.stop` — the button stops the reply instead (a phone's empty box while the agent works). */ ""}
|
|
56
|
+
<button id=${ids.sendBtn || "sendBtn"} type="button" class=${`btn btn-primary btn-send${send.stop ? " is-stop" : ""}`} hidden=${send.hidden} disabled=${send.disabled}
|
|
54
57
|
onMouseDown=${(e) => e.preventDefault()}
|
|
55
|
-
aria-label=${send.label} title=${send.label} onClick=${send.onClick}><${Icon} name
|
|
58
|
+
aria-label=${send.label} title=${send.title || send.label} onClick=${send.onClick}><${Icon} name=${send.stop ? "stop" : "send"} size=${16} /><span class="send-label">${send.label}</span></button>
|
|
56
59
|
</div>`;
|
|
57
60
|
}
|
|
58
61
|
|