@songsid/agend 2.4.0-beta.22 → 2.4.0-beta.24
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-instructions.md +4 -3
- package/dist/agent-cli.js +32 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-file-read.js +2 -2
- package/dist/agent-file-read.js.map +1 -1
- package/dist/agent-whats-new.js +17 -1
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/auth-api.d.ts +2 -0
- package/dist/auth-api.js +5 -2
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/web-authority.d.ts +17 -3
- package/dist/authority/web-authority.js +56 -3
- package/dist/authority/web-authority.js.map +1 -1
- package/dist/backend/claude-code.d.ts +15 -0
- package/dist/backend/claude-code.js +8 -3
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/claude-mcp-carry.d.ts +63 -0
- package/dist/backend/claude-mcp-carry.js +242 -0
- package/dist/backend/claude-mcp-carry.js.map +1 -0
- package/dist/build-provenance.json +1 -1
- package/dist/channel/mcp-tools.js +15 -7
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/classic-channel-manager.d.ts +1 -1
- package/dist/classic-channel-manager.js +2 -2
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/config-validator.js +6 -0
- package/dist/config-validator.js.map +1 -1
- package/dist/contact-auth-api.js +3 -1
- package/dist/contact-auth-api.js.map +1 -1
- package/dist/contact-auth-service.js +1 -1
- package/dist/contact-auth-service.js.map +1 -1
- package/dist/contact-auth-store.d.ts +28 -2
- package/dist/contact-auth-store.js +72 -4
- package/dist/contact-auth-store.js.map +1 -1
- package/dist/contact-change-proposals.d.ts +18 -1
- package/dist/contact-change-proposals.js +38 -4
- package/dist/contact-change-proposals.js.map +1 -1
- package/dist/contact-state-view.d.ts +103 -0
- package/dist/contact-state-view.js +80 -0
- package/dist/contact-state-view.js.map +1 -0
- package/dist/daemon.d.ts +11 -0
- package/dist/daemon.js +66 -15
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard-permissions.d.ts +8 -0
- package/dist/dashboard-permissions.js +8 -0
- package/dist/dashboard-permissions.js.map +1 -1
- package/dist/delivery-outbox.d.ts +15 -1
- package/dist/delivery-outbox.js +60 -2
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/fleet-manager.d.ts +157 -15
- package/dist/fleet-manager.js +522 -78
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/admin/SKILL.md +52 -0
- package/dist/general-knowledge/skills/concepts/SKILL.md +31 -21
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +6 -0
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +6 -3
- package/dist/general-knowledge/skills/fleet-config/SKILL.md +3 -3
- package/dist/general-knowledge/skills/hub/SKILL.md +6 -1
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +1 -1
- package/dist/general-knowledge/skills/task-board/SKILL.md +17 -0
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +4 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +75 -12
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
- package/dist/general-role.d.ts +1 -1
- package/dist/general-role.js +1 -0
- package/dist/general-role.js.map +1 -1
- package/dist/hub/client.js +6 -1
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +2 -1
- package/dist/hub/compose/member.js +3 -2
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.js +2 -1
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/http/compose.js +5 -0
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/protocol.d.ts +21 -0
- package/dist/hub/protocol.js +3 -0
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/question-close-model.d.ts +17 -0
- package/dist/hub/question-close-model.js +7 -0
- package/dist/hub/question-close-model.js.map +1 -0
- package/dist/hub/representative.d.ts +5 -0
- package/dist/hub/representative.js +51 -1
- package/dist/hub/representative.js.map +1 -1
- package/dist/hub/rooms/direct-view.js +1 -0
- package/dist/hub/rooms/direct-view.js.map +1 -1
- package/dist/hub/rooms/types.d.ts +1 -1
- package/dist/hub/rooms.d.ts +3 -0
- package/dist/hub/rooms.js +27 -1
- package/dist/hub/rooms.js.map +1 -1
- package/dist/hub/server.js +6 -1
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/types.d.ts +2 -2
- package/dist/human-delivery-receipts.d.ts +12 -2
- package/dist/human-delivery-receipts.js +19 -4
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +2 -0
- package/dist/instance-lifecycle.js +29 -1
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/instructions.js +1 -1
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +110 -12
- package/dist/locale.js.map +1 -1
- package/dist/needs-you-hub.d.ts +3 -0
- package/dist/needs-you-hub.js +31 -5
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +16 -1
- package/dist/needs-you.js +7 -1
- package/dist/needs-you.js.map +1 -1
- package/dist/office-share-page.js +2 -2
- package/dist/office-share-page.js.map +1 -1
- package/dist/office-share.js +2 -1
- package/dist/office-share.js.map +1 -1
- package/dist/outbound-handlers.d.ts +4 -0
- package/dist/outbound-handlers.js +69 -11
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +5 -1
- package/dist/outbound-schemas.js +10 -7
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/public-web-gateway.js +21 -0
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/reply-buttons-controller.d.ts +2 -1
- package/dist/reply-buttons-controller.js +1 -1
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/request-context-compatibility.d.ts +20 -0
- package/dist/request-context-compatibility.js +74 -0
- package/dist/request-context-compatibility.js.map +1 -0
- package/dist/request-context-protocol.d.ts +137 -0
- package/dist/request-context-protocol.js +38 -0
- package/dist/request-context-protocol.js.map +1 -0
- package/dist/request-context-store.d.ts +25 -0
- package/dist/request-context-store.js +137 -0
- package/dist/request-context-store.js.map +1 -0
- package/dist/scheduler/db.js +26 -0
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/task-board-text.d.ts +2 -0
- package/dist/scheduler/task-board-text.js +12 -0
- package/dist/scheduler/task-board-text.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +102 -2
- package/dist/scheduler/task-board.js +242 -24
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/scheduler/task-files.d.ts +80 -0
- package/dist/scheduler/task-files.js +357 -0
- package/dist/scheduler/task-files.js.map +1 -0
- package/dist/settings-api.d.ts +2 -0
- package/dist/settings-api.js +6 -1
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +1 -0
- package/dist/settings-baseline.js +1 -1
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-effect.d.ts +2 -0
- package/dist/settings-effect.js +5 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/task-attach-client.d.ts +43 -0
- package/dist/task-attach-client.js +125 -0
- package/dist/task-attach-client.js.map +1 -0
- package/dist/task-board-tool.d.ts +12 -0
- package/dist/task-board-tool.js +107 -6
- package/dist/task-board-tool.js.map +1 -1
- package/dist/task-file-limits.d.ts +15 -0
- package/dist/task-file-limits.js +21 -0
- package/dist/task-file-limits.js.map +1 -0
- package/dist/tool-permissions.d.ts +32 -0
- package/dist/tool-permissions.js +64 -1
- package/dist/tool-permissions.js.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/ui/accounts-keepalive.js +2 -1
- package/dist/ui/agent-details-settings.js +7 -5
- package/dist/ui/agent-who-can-use-strings.js +125 -0
- package/dist/ui/agent-who-can-use.js +238 -0
- package/dist/ui/chat-activity.js +2 -1
- package/dist/ui/chat-pins.js +2 -1
- package/dist/ui/claude-credentials.js +2 -1
- package/dist/ui/contact-auth-strings.js +28 -17
- package/dist/ui/contact-authorizations.js +6 -4
- package/dist/ui/contact-needs.js +6 -1
- package/dist/ui/contact-permissions.js +6 -4
- package/dist/ui/contact-tool-groups.js +1 -1
- package/dist/ui/contact-verify-need.js +46 -0
- package/dist/ui/fleet-cache.js +2 -1
- package/dist/ui/fleet-office-card.js +23 -5
- package/dist/ui/fleet-office-editor.js +5 -5
- package/dist/ui/fleet-office-pack.d.ts +10 -0
- package/dist/ui/fleet-office-pack.js +65 -2
- package/dist/ui/fleet-office-skin.js +52 -14
- package/dist/ui/fleet-office-store.js +33 -2
- package/dist/ui/fleet-office-vehicles.js +130 -0
- package/dist/ui/fleet-office-zones.js +27 -10
- package/dist/ui/fleet-office.js +128 -40
- package/dist/ui/fleet-org.js +6 -1
- package/dist/ui/fleet-tab-icons.js +19 -0
- package/dist/ui/fleet-task-activity.js +11 -83
- package/dist/ui/fleet-task-archive.js +111 -0
- package/dist/ui/fleet-task-card.js +6 -4
- package/dist/ui/fleet-task-common.js +2 -2
- package/dist/ui/fleet-task-edit.js +8 -1
- package/dist/ui/fleet-task-files.js +196 -0
- package/dist/ui/fleet-task-md.js +98 -0
- package/dist/ui/fleet-task-menu.js +1 -1
- package/dist/ui/fleet-task-stats.js +2 -2
- package/dist/ui/fleet-task-view.js +14 -9
- package/dist/ui/fleet-tasks.js +42 -18
- package/dist/ui/fleet-usage.js +2 -1
- package/dist/ui/hub-admin-overview.js +2 -1
- package/dist/ui/hub-agent-intro.js +2 -1
- package/dist/ui/hub-assistant-admin.js +2 -1
- package/dist/ui/hub-directory-notices.js +2 -1
- package/dist/ui/hub-enrolment-code.js +2 -1
- package/dist/ui/hub-my-agents.js +2 -1
- package/dist/ui/hub-quick-pairing.js +2 -1
- package/dist/ui/hub-role-audit.js +2 -1
- package/dist/ui/hub-role-forms.js +3 -2
- package/dist/ui/hub-role-view.js +3 -2
- package/dist/ui/hub-roles.js +2 -1
- package/dist/ui/hub-room-agent-strings.js +2 -1
- package/dist/ui/hub-room-list.js +2 -1
- package/dist/ui/hub-room-owner-requests.js +2 -1
- package/dist/ui/hub-room-pins.js +2 -1
- package/dist/ui/hub-room-strings.js +2 -2
- package/dist/ui/hub-room-thread.js +1 -1
- package/dist/ui/log-row.js +4 -3
- package/dist/ui/office-share-dialog.js +2 -1
- package/dist/ui/office-share-page.js +2 -1
- package/dist/ui/page-share-dialog.js +3 -2
- package/dist/ui/panel-chat.js +2 -1
- package/dist/ui/panel-details.js +5 -2
- package/dist/ui/panel-fleet.js +10 -5
- package/dist/ui/panel-hub.js +2 -1
- package/dist/ui/panel-needs.js +34 -6
- package/dist/ui/panel-notices.js +2 -1
- package/dist/ui/panel-runtimes.js +2 -1
- package/dist/ui/panel-settings.js +15 -1
- package/dist/ui/panel-windows-cli.js +3 -2
- package/dist/ui/runtime-cli-install.js +2 -1
- package/dist/ui/settings-appearance.js +2 -1
- package/dist/ui/settings-guests.js +4 -3
- package/dist/ui/settings-hub-member-address.js +2 -1
- package/dist/ui/settings-hub-setup.js +2 -1
- package/dist/ui/settings-hub-web-address.js +2 -1
- package/dist/ui/settings-hub.js +2 -1
- package/dist/ui/settings-registry.js +1 -0
- package/dist/ui/settings-shared-strings.js +9 -0
- package/dist/ui/settings-shared.js +6 -1
- package/dist/ui/settings-update.js +2 -1
- package/dist/ui/settings-web-authority.js +2 -1
- package/dist/ui/shared/agent-sheet.js +2 -1
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app-needs.js +8 -1
- package/dist/ui/shared/app-session.js +4 -3
- package/dist/ui/shared/app-shell.js +6 -2
- package/dist/ui/shared/app.css +93 -11
- package/dist/ui/shared/chat-strings.js +4 -4
- package/dist/ui/shared/chat-time.js +7 -4
- package/dist/ui/shared/clock-text.js +57 -0
- package/dist/ui/shared/device-roles.js +6 -5
- package/dist/ui/shared/instance-nav.js +17 -22
- package/dist/ui/shared/task-board.css +64 -0
- package/dist/ui/shared/usage-dialog.js +2 -1
- package/dist/ui/shared/view-strings.js +0 -14
- package/dist/ui/shared/web-authorize.js +3 -2
- package/dist/ui/subagent-row.js +2 -1
- package/dist/web-api.d.ts +18 -2
- package/dist/web-api.js +159 -27
- package/dist/web-api.js.map +1 -1
- package/dist/web-login.d.ts +6 -1
- package/dist/web-login.js +8 -3
- package/dist/web-login.js.map +1 -1
- package/dist/web-office-acts.d.ts +16 -0
- package/dist/web-office-acts.js +27 -9
- package/dist/web-office-acts.js.map +1 -1
- package/dist/web-office-pack-read.js +1 -1
- package/dist/web-office-pack-read.js.map +1 -1
- package/dist/web-office-skins.d.ts +5 -3
- package/dist/web-office-skins.js +20 -16
- package/dist/web-office-skins.js.map +1 -1
- package/dist/web-session-authorization.d.ts +3 -0
- package/dist/web-session-authorization.js +1 -1
- package/dist/web-session-authorization.js.map +1 -1
- package/dist/web-settings-patch.d.ts +27 -0
- package/dist/web-settings-patch.js +67 -0
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/workflow-templates/default.md +1 -0
- package/package.json +1 -1
|
@@ -1098,6 +1098,9 @@ function taskBoardDefaults(d, f) {
|
|
|
1098
1098
|
if (w[field] === false || hasOwn(tb, key)) out[key] = w[field]; else delete out[key];
|
|
1099
1099
|
}
|
|
1100
1100
|
if (w.wakeLeader !== saved.wakeLeader) { if (w.wakeLeader) out.leader = w.wakeLeader; else delete out.leader; }
|
|
1101
|
+
// M-3668: the archive age is kept as saved unless changed (nothing saved stays absent: the form shows the default).
|
|
1102
|
+
const days = f ? f.archiveDays : archiveForm(d).archiveDays;
|
|
1103
|
+
if (Number(days) !== Number(archiveForm(d).archiveDays)) out.archive_after_days = Number(days);
|
|
1101
1104
|
return out;
|
|
1102
1105
|
}
|
|
1103
1106
|
/**
|
|
@@ -1108,6 +1111,13 @@ function wakesForm(d) {
|
|
|
1108
1111
|
const tb = d.task_board || {};
|
|
1109
1112
|
return { wakeComment: tb.comment_wakes !== false, wakeProgress: tb.progress_wakes !== false, wakeLeader: typeof tb.leader === "string" ? tb.leader.trim() : "" };
|
|
1110
1113
|
}
|
|
1114
|
+
/** M-3668: `defaults.task_board.archive_after_days` as the form holds it (unset or not a whole number 0–3650: the default, 3). */
|
|
1115
|
+
const ARCHIVE_DAYS_DEFAULT = 3;
|
|
1116
|
+
function archiveForm(d) {
|
|
1117
|
+
const v = (d.task_board || {}).archive_after_days;
|
|
1118
|
+
return { archiveDays: String(Number.isInteger(v) && v >= 0 && v <= 3650 ? v : ARCHIVE_DAYS_DEFAULT) };
|
|
1119
|
+
}
|
|
1120
|
+
const daysInRange = (v) => { const n = Number(v); return String(v).trim() !== "" && Number.isInteger(n) && n >= 0 && n <= 3650 ? "" : "archiveRange"; };
|
|
1111
1121
|
const minutesInRange = (v) => { const n = Number(v); return String(v).trim() !== "" && Number.isFinite(n) && n >= 1 && n <= 1440 ? "" : "livenessRange"; };
|
|
1112
1122
|
|
|
1113
1123
|
/** General's form, from the saved defaults (`d`) and ClassicBot's (`c`). */
|
|
@@ -1125,6 +1135,8 @@ function generalForm(d, c, fleet = {}, schema = {}) {
|
|
|
1125
1135
|
...livenessForm(d),
|
|
1126
1136
|
// Which task board news wakes an agent.
|
|
1127
1137
|
...wakesForm(d),
|
|
1138
|
+
// M-3668: when a finished card leaves the board.
|
|
1139
|
+
...archiveForm(d),
|
|
1128
1140
|
// #2347 §10 review: unset startup concurrency is automatic (deriveSpawnConcurrency: 2–10 by free memory and cores),
|
|
1129
1141
|
// not 10 — an empty field, and a save that leaves it unset (the defaults merge replaces `startup` whole).
|
|
1130
1142
|
concurrency: startup.concurrency == null ? "" : String(startup.concurrency), stagger: String(startup.stagger_delay_ms ?? 500),
|
|
@@ -1161,6 +1173,7 @@ function General({ ctx, part = "all" }) {
|
|
|
1161
1173
|
const errors = {
|
|
1162
1174
|
auto: nonNegative(f.auto), hang: positive(f.hang),
|
|
1163
1175
|
liveQuiet: minutesInRange(f.liveQuiet), livePrompt: minutesInRange(f.livePrompt), liveCrash: minutesInRange(f.liveCrash),
|
|
1176
|
+
archiveDays: daysInRange(f.archiveDays),
|
|
1164
1177
|
concurrency: f.concurrency.trim() !== "" && (!Number.isInteger(num(f.concurrency)) || num(f.concurrency) < 1 || num(f.concurrency) > 20) ? "concurrencyRange" : "",
|
|
1165
1178
|
stagger: !Number.isFinite(num(f.stagger)) || f.stagger.trim() === "" || num(f.stagger) < 0 || num(f.stagger) > 30000 ? "staggerRange" : "",
|
|
1166
1179
|
};
|
|
@@ -1174,7 +1187,7 @@ function General({ ctx, part = "all" }) {
|
|
|
1174
1187
|
useEffect(() => {
|
|
1175
1188
|
if (!ready) {
|
|
1176
1189
|
// Where it is (#2382 review): the bar in another section names it and goes there.
|
|
1177
|
-
const at = { auto: "#g-auto", hang: "#g-hang", concurrency: "#g-conc", stagger: "#g-stag", liveQuiet: "#g-live-quiet", livePrompt: "#g-live-prompt", liveCrash: "#g-live-crash" }[Object.keys(errors).find((k) => errors[k])];
|
|
1190
|
+
const at = { auto: "#g-auto", hang: "#g-hang", concurrency: "#g-conc", stagger: "#g-stag", liveQuiet: "#g-live-quiet", livePrompt: "#g-live-prompt", liveCrash: "#g-live-crash", archiveDays: "#g-archive-days" }[Object.keys(errors).find((k) => errors[k])];
|
|
1178
1191
|
syncStage(ctx, "defaults:invalid", { label: tn("updateDefaults"), invalid: tn(firstError), section: "agent-defaults", target: at });
|
|
1179
1192
|
return;
|
|
1180
1193
|
}
|
|
@@ -1244,6 +1257,7 @@ function General({ ctx, part = "all" }) {
|
|
|
1244
1257
|
return { liveOn: !hasOwn(lv, "enabled"), liveQuiet: !hasOwn(lv, "quiet_minutes"), livePrompt: !hasOwn(lv, "prompt_minutes"), liveCrash: !hasOwn(lv, "crash_grace_minutes") }; })(),
|
|
1245
1258
|
// Each wake switch nobody set is the built-in default (on; no leader).
|
|
1246
1259
|
wakeComment: !hasOwn(d.task_board || {}, "comment_wakes"), wakeProgress: !hasOwn(d.task_board || {}, "progress_wakes"), wakeLeader: !hasOwn(d.task_board || {}, "leader"),
|
|
1260
|
+
archiveDays: !hasOwn(d.task_board || {}, "archive_after_days"),
|
|
1247
1261
|
};
|
|
1248
1262
|
const fromDefaults = (k, value, target) => ({ text: valueText(value, k), builtin: !hasOwn(d, k), from: inAgentDefaults(target) });
|
|
1249
1263
|
const L = (text, field, id) => html`<${Label} text=${text} schema=${schema} field=${field} htmlFor=${id} />`;
|
|
@@ -6,6 +6,7 @@ import { Icon } from "/assets/ui-icons.js";
|
|
|
6
6
|
import { CliPicker, CliProductMark, cliLabel } from "./cli-picker.js";
|
|
7
7
|
import { ModelSelect } from "./settings-dialogs.js";
|
|
8
8
|
import { useWindowsCliCatalog, WindowsCliDiscoveryStatus, WindowsCliHostIdentity } from "./windows-cli-catalog.js";
|
|
9
|
+
import { dateTimeText, timeText } from "/assets/clock-text.js";
|
|
9
10
|
|
|
10
11
|
register("wincli", {
|
|
11
12
|
"zh-TW": { intro:"在 Windows 上執行一次性任務,使用本機已安裝的 CLI 和登入。", probe:"偵測 Windows CLI", probing:"正在偵測…", newTask:"派送 Windows Codex 任務", folder:"Windows 工作目錄", prompt:"任務內容", access:"檔案存取", readOnly:"唯讀", write:"工作目錄可寫入", limits:"目前支援 Codex 單次任務,同時一個,五分鐘後請求取消。使用 CLI 的沙箱與核准政策;此頁不提供互動核准按鈕。Claude 目前提供偵測。", run:"開始任務", results:"任務與結果", refresh:"更新", signedIn:"已登入", signedOut:"尚未登入", unknown:"登入狀態未知", missing:"未找到執行檔", empty:"還沒有任務。", cancel:"取消任務", starting:"準備啟動", running:"執行中", cancelling:"正在取消", cancelled:"已取消", completed:"已完成", failed:"失敗", waiting:"正在接收 Windows CLI 的輸出…", uncertain:"提交結果不明,請按「更新」確認任務狀態,勿立即重送。" },
|
|
@@ -64,7 +65,7 @@ function TaskResult({ task, latest, cancel }) {
|
|
|
64
65
|
const [expanded, setExpanded] = useState(latest || active(task));
|
|
65
66
|
const tone = task.status === "completed" ? "ready" : task.status === "failed" ? "failed" : active(task) ? "working" : "neutral";
|
|
66
67
|
return html`<details class="windows-cli-task" open=${expanded || active(task)} onToggle=${e => setExpanded(e.currentTarget.open)}>
|
|
67
|
-
<summary><span class=${`windows-cli-task-state tone-${tone}`}><span class="windows-cli-dot"></span>${tn(task.status)}</span><time dateTime=${new Date(task.startedAt).toISOString()}>${
|
|
68
|
+
<summary><span class=${`windows-cli-task-state tone-${tone}`}><span class="windows-cli-dot"></span>${tn(task.status)}</span><time dateTime=${new Date(task.startedAt).toISOString()}>${timeText(task.startedAt, { hour:"2-digit", minute:"2-digit" }, [])}</time><${Icon} name="chevron" size=${16} /></summary>
|
|
68
69
|
<code class="windows-cli-path windows-cli-task-cwd">${task.cwd}</code>
|
|
69
70
|
<div class="windows-cli-task-detail"><span class="windows-cli-output-label"><${Icon} name="view" size=${14} />${tn("output")}</span><pre class="windows-cli-output" tabIndex="0">${task.output || tn(active(task) ? "waiting" : "noOutput")}</pre>${task.error ? html`<p class="error">${task.error}</p>` : null}
|
|
70
71
|
${cancel && ["starting","running"].includes(task.status) ? html`<button type="button" class="btn btn-sm btn-ghost danger" onClick=${() => cancel(task.id)}><${Icon} name="stop" size=${14} />${tn("cancel")}</button>` : null}
|
|
@@ -152,7 +153,7 @@ export function WindowsCliPanel({ navKey, embedded = false, machineId = "", mach
|
|
|
152
153
|
},[clis]);
|
|
153
154
|
return html`<div class=${embedded ? "p-windows-cli windows-cli-settings" : "panel p-windows-cli"}>${!embedded ? html`<${PanelHeader} title="Windows CLI" />` : null}
|
|
154
155
|
<div class=${embedded ? "windows-cli-settings-body" : "panel-body"}><div class="windows-cli-content">
|
|
155
|
-
<header class="windows-cli-intro"><div>${diagnostic ? html`<p>${discovery.data?.probedAt ? t("wincli.lastDetection",
|
|
156
|
+
<header class="windows-cli-intro"><div>${diagnostic ? html`<p>${discovery.data?.probedAt ? t("wincli.lastDetection",dateTimeText(discovery.data.probedAt)) : tn("neverDetection")}</p>` : html`<span class="windows-cli-eyebrow"><${Icon} name="view" size=${14} />${tn("native")}</span><h2>${tn(machineId ? "remoteWorkspace" : "workspace")}</h2><p>${tn(machineId ? "remoteIntro" : "intro")}</p>`}</div>
|
|
156
157
|
<button type="button" class="btn windows-cli-probe" disabled=${probing || !online || !approved} onClick=${probe}><${Icon} name="restart" size=${16} cls=${probing ? "windows-cli-spin" : ""} />${tn(probing ? "probing" : "probe")}</button>
|
|
157
158
|
</header>
|
|
158
159
|
${!diagnostic ? html`<${WindowsCliHostIdentity} inventory=${discovery.data} machineId=${machineId} machine=${machine} />` : null}
|
|
@@ -4,6 +4,7 @@ import { confirmDialog } from "/assets/ui-confirm.js";
|
|
|
4
4
|
import { ErrorState, Skeleton } from "/assets/ui-states.js";
|
|
5
5
|
import { CLI_CAPS } from "./cli-caps.js";
|
|
6
6
|
import { confirmedWrite } from "./settings-confirm.js";
|
|
7
|
+
import { dateTimeText } from "/assets/clock-text.js";
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* #3190 Part 3b: install a CLI on a paired Windows computer, from Settings → Runtime. The page sends only a CLI id; the Runtime on that computer decides the
|
|
@@ -203,7 +204,7 @@ export function CliInstall({ machine, lease, onChanged }) {
|
|
|
203
204
|
<ul class="runtime-cli-install-list" aria-label=${text("title")}>${INSTALL_CLIS.map(row)}</ul>
|
|
204
205
|
${view && !view.switches ? html`<p class="note" role="status">${text("unreadable")}</p>` : null}
|
|
205
206
|
${switchState && !allowed ? html`<p class="note runtime-cli-install-off" role="status">${text("switchOff")}</p><${CommandCard} label=${text("switchCommand")} command=${SWITCH_COMMAND} />` : null}
|
|
206
|
-
${allowed ? html`<p class="note">${switchState.until ? text("switchUntil",
|
|
207
|
+
${allowed ? html`<p class="note">${switchState.until ? text("switchUntil", dateTimeText(switchState.until)) : text("switchOn")}</p>` : null}
|
|
207
208
|
${running ? html`<p class="note" role="status" aria-busy="true"><span class="out-spin" aria-hidden="true"></span> ${text("installing")}</p>` : null}
|
|
208
209
|
${note ? html`<p class="note" role="status">${note}</p>` : null}
|
|
209
210
|
${error ? html`<p class="runtime-error" role="alert">${error}</p>` : null}`}
|
|
@@ -22,6 +22,7 @@ import { ownChoiceImpact } from "./settings-model.js";
|
|
|
22
22
|
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
23
23
|
import { colorsOff, defaultPlaces, identityClasses, identityOf, PLACEMENTS, paintIdentity, setColorsOff, setDefaultPlaces, useIdentityColors } from "/assets/identity-color.js";
|
|
24
24
|
import { CardTitle } from "./settings-learn.js";
|
|
25
|
+
import { dateTimeText } from "/assets/clock-text.js";
|
|
25
26
|
import "./settings-strings.js";
|
|
26
27
|
|
|
27
28
|
const tn = (k, ...v) => t(`settings.${k}`, ...v);
|
|
@@ -587,7 +588,7 @@ function OwnerCssCard() {
|
|
|
587
588
|
</div>
|
|
588
589
|
${state.versions.length ? html`<details class="s-css-versions"><summary>${tn("cssVersions", state.versions.length)}</summary>
|
|
589
590
|
<ul class="s-css-list">${state.versions.map((v) => html`<li key=${v.sha}>
|
|
590
|
-
<code>${short(v.sha)}</code><span class="muted">${
|
|
591
|
+
<code>${short(v.sha)}</code><span class="muted">${dateTimeText(v.at)} · ${kib(v.bytes)}</span>
|
|
591
592
|
${v.sha === state.active ? html`<span class="pill">${tn("cssCurrent")}</span>`
|
|
592
593
|
: html`<button type="button" class="btn btn-sm" disabled=${busy} onClick=${() => restore(v.sha)}>${tn("cssRestore")}</button>`}
|
|
593
594
|
</li>`)}</ul></details>` : null}
|
|
@@ -19,6 +19,7 @@ import { DEFAULT_SCHEMA, impactOf } from "./settings-model.js";
|
|
|
19
19
|
import "./settings-strings.js";
|
|
20
20
|
import { layoutText } from "./settings-layout.js";
|
|
21
21
|
import { Feedback, Impact, InEffect } from "./settings-dialogs.js";
|
|
22
|
+
import { dateTimeText, timeText } from "/assets/clock-text.js";
|
|
22
23
|
|
|
23
24
|
const tn = (k, ...v) => t(`settings.${k}`, ...v);
|
|
24
25
|
const PLATFORMS = { discord: "Discord", telegram: "Telegram" };
|
|
@@ -112,7 +113,7 @@ function Names({ id, all, rooms = [], value, wrote = [], onChange }) {
|
|
|
112
113
|
${rooms.map((r) => box(r.name, r.display_name || r.name, !!r.display_name))}</div>`;
|
|
113
114
|
}
|
|
114
115
|
|
|
115
|
-
const clock = (ms) =>
|
|
116
|
+
const clock = (ms) => timeText(ms, { hour: "2-digit", minute: "2-digit" }, []);
|
|
116
117
|
const COOLDOWN_MS = 60_000;
|
|
117
118
|
|
|
118
119
|
/** A draft as staged (#2365 review: carried in the staged change, so leaving the section and coming back keeps it). */
|
|
@@ -326,13 +327,13 @@ export function GuestsSection({ ctx, staged }) {
|
|
|
326
327
|
${people === null ? html`<${Skeleton} variant="rows" lines=${3} />` : !candidates.length ? html`<p class="note" id="grantsNoPeople">${tn("grantsNoPeople")}</p>`
|
|
327
328
|
: html`<ul class="g-pick">${candidates.map((p) => html`<li key=${accountKey(p)} class="g-cand" data-account=${accountKey(p)}>
|
|
328
329
|
<span class="g-av" aria-hidden="true">${(p.name || "?").slice(0, 1).toUpperCase()}</span>
|
|
329
|
-
<div class="g-id"><strong>${p.name}</strong> <span class="note">${PLATFORMS[p.platform] || p.platform}${p.username ? ` · @${p.username}` : ""} · <span class="g-when">${tn("grantsLastSeen",
|
|
330
|
+
<div class="g-id"><strong>${p.name}</strong> <span class="note">${PLATFORMS[p.platform] || p.platform}${p.username ? ` · @${p.username}` : ""} · <span class="g-when">${tn("grantsLastSeen", dateTimeText(p.lastSeen))}</span></span>
|
|
330
331
|
${p.instances && p.instances.length ? html`<div class="note">${wroteTo(p.instances)}</div>` : null}</div>
|
|
331
332
|
<button type="button" class="btn btn-sm" onClick=${() => { const k = accountKey(p); setGrant(k, { ...(p.name ? { name: p.name } : {}), instances: choosable.filter((n) => (p.instances || []).includes(n)) }); setEditing(k); }}>${tn("grantsChoose")}</button></li>`)}</ul>`}</div></details>`}
|
|
332
333
|
</fieldset>
|
|
333
334
|
${overview && overview.audit ? html`<details class="s-guest-audit"><summary>${tn("grantsRecent")}</summary>${!overview.audit.length ? html`<p class="note" id="grantsRecentNone">${tn("grantsRecentNone")}</p>`
|
|
334
335
|
: html`<ul class="g-audit" id="grantsRecentList">${overview.audit.map((e, i) => html`<li key=${`${e.at}-${i}`} class="g-audit-row" data-kind=${e.kind}>
|
|
335
|
-
<span class="g-when">${
|
|
336
|
+
<span class="g-when">${dateTimeText(e.at)}</span> <strong>${e.name}</strong>
|
|
336
337
|
${e.kind === "grant" ? html`${e.added.map((n) => html` <span key=${`+${n}`} class="g-wrote g-add">+${n}</span>`)}${e.removed.map((n) => html` <span key=${`-${n}`} class="g-wrote g-del">−${n}</span>`)}${e.level ? html` <span class="g-wrote g-level-to">${tn("grantsAuditLevel", tn(e.level === "trusted" ? "grantsLevelTrusted" : "grantsLevelChat"))}</span>` : null}
|
|
337
338
|
<span class="note"> · <span class="g-wrote">${tn(e.via === "confirmed" ? "grantsAuditConfirmed" : "grantsAuditDirect")}</span>${e.endedSessions ? html` · <span class="g-wrote">${tn("grantsAuditEnded", e.endedSessions)}</span>` : null}</span>`
|
|
338
339
|
: html` <span class="note">${e.outcome === "sent" ? tn("grantsAuditCodeSent") : tn("grantsAuditCodeNot", auditOutcome(e.outcome))}</span>`}</li>`)}</ul>`}</details>` : null}
|
|
@@ -9,6 +9,7 @@ import { Skeleton, ErrorState } from "/assets/ui-states.js";
|
|
|
9
9
|
import { register, t, lang } from "/assets/app-i18n.js";
|
|
10
10
|
import { api } from "./settings-confirm.js";
|
|
11
11
|
import { typedOrigin, shownAddress, defaultListen } from "./settings-hub-web-address.js";
|
|
12
|
+
import { clockFormat } from "/assets/clock-text.js";
|
|
12
13
|
|
|
13
14
|
register("hubMemberAddress", {
|
|
14
15
|
en: {
|
|
@@ -94,7 +95,7 @@ const errorText = (r) => {
|
|
|
94
95
|
if (Number.isSafeInteger(r.retryAt) && r.retryAt > 0) {
|
|
95
96
|
try {
|
|
96
97
|
const at = new Date(Math.ceil(r.retryAt / 60_000) * 60_000);
|
|
97
|
-
if (!Number.isNaN(at.getTime())) time =
|
|
98
|
+
if (!Number.isNaN(at.getTime())) time = clockFormat({ hour: "2-digit", minute: "2-digit" }, lang()).format(at);
|
|
98
99
|
} catch { /* Fall back to the no-time wording. */ }
|
|
99
100
|
}
|
|
100
101
|
return copy(time ? "err_joining" : "err_joining_no_time", time);
|
|
@@ -5,6 +5,7 @@ import { Skeleton, ErrorState } from "/assets/ui-states.js";
|
|
|
5
5
|
import { api } from "./settings-confirm.js";
|
|
6
6
|
import { hs, setupError } from "./settings-hub-setup-strings.js";
|
|
7
7
|
import { HUB_NAME_MAX } from "./hub-client.js"; // M-3235: the one Hub-name maximum (what the brand shows)
|
|
8
|
+
import { dateTimeText } from "/assets/clock-text.js";
|
|
8
9
|
// These words travel with the new renderer, even when the tab retains the setup dictionary.
|
|
9
10
|
register("hubSetupReady", {
|
|
10
11
|
en: {
|
|
@@ -224,7 +225,7 @@ export function HubSetupSettings() {
|
|
|
224
225
|
].map(([key, value]) => html`<div class="kv"><span class="k">${hs(key)}</span><span class="v mono">${value}</span></div>`)}
|
|
225
226
|
<div class="kv"><span class="k">${hs("ca")}</span><span class="v">${form.ca === "system" ? hs("system") : html`<span>${fingerprints.map(fp => html`<${Fingerprint} value=${fp} />`)}</span>`}</span></div>
|
|
226
227
|
</div></details>
|
|
227
|
-
<p class="note">${hs("expires")}: ${
|
|
228
|
+
<p class="note">${hs("expires")}: ${dateTimeText(review.expiresAt)}</p><p class="note">${hs("reviewHint")}</p>` : null}
|
|
228
229
|
<div class="s-row">
|
|
229
230
|
${step > 1 ? html`<button class="btn" type="button" onClick=${() => { clearDraft(); setFailureCode(""); setStep(step === 4 ? (form.certificate === "import" ? 1 : 2) : step - 1); }}>${hs("back")}</button>` : null}
|
|
230
231
|
${step < 4 ? html`<button class="btn btn-primary" type="submit">${hs(step === 3 ? "test" : "next")}</button>` : html`<button class="btn btn-primary" type="button" disabled=${!review} onClick=${commit}>${hs("create")}</button>`}
|
|
@@ -8,6 +8,7 @@ import { html, useEffect, useState } from "/assets/app-html.js";
|
|
|
8
8
|
import { Skeleton } from "/assets/ui-states.js";
|
|
9
9
|
import { register, t, lang } from "/assets/app-i18n.js";
|
|
10
10
|
import { api } from "./settings-confirm.js";
|
|
11
|
+
import { clockFormat } from "/assets/clock-text.js";
|
|
11
12
|
|
|
12
13
|
register("hubWebAddress", {
|
|
13
14
|
en: {
|
|
@@ -88,7 +89,7 @@ const errorText = (r) => {
|
|
|
88
89
|
try {
|
|
89
90
|
// Round up: the displayed minute must not invite a retry before the exact deadline.
|
|
90
91
|
const at = new Date(Math.ceil(r.retryAt / 60_000) * 60_000);
|
|
91
|
-
if (!Number.isNaN(at.getTime())) time =
|
|
92
|
+
if (!Number.isNaN(at.getTime())) time = clockFormat({ hour: "2-digit", minute: "2-digit" }, lang()).format(at);
|
|
92
93
|
} catch { /* The no-time wording also supports an older response or browser. */ }
|
|
93
94
|
}
|
|
94
95
|
return copy(time ? "err_joining" : "err_joining_no_time", time);
|
package/dist/ui/settings-hub.js
CHANGED
|
@@ -23,6 +23,7 @@ import { hp } from "./hub-pairing-progress-strings.js";
|
|
|
23
23
|
import { hpf, pairingCodeState, pairingFailure } from "./hub-pairing-form-strings.js";
|
|
24
24
|
import { HubPageSharingSettings } from "./settings-hub-page-sharing.js";
|
|
25
25
|
import { HubUpdateConsent } from "./settings-hub-updates.js";
|
|
26
|
+
import { timeText } from "/assets/clock-text.js";
|
|
26
27
|
|
|
27
28
|
register("hubSharingFleet", {
|
|
28
29
|
en: { hint: "To pause and resume without clearing the allow list, open this agent under My agents on the Hub. Turning Share off stops sharing." },
|
|
@@ -170,7 +171,7 @@ export function HubConnectCard({ embedded = false, onPairing, labels = {}, prefi
|
|
|
170
171
|
<p class="note">${hw("hubProgressHidden")}</p>`
|
|
171
172
|
: html`<p class="hub-steps-lead">${hw("pendingSteps")}</p>
|
|
172
173
|
<ul class="hub-steps">${step(p.ownerConfirmed, "ownerStep")}${step(p.adminApproved, "adminStep")}</ul>`}
|
|
173
|
-
${Number.isFinite(p.expiresAt) ? html`<p class="note">${hw("expires",
|
|
174
|
+
${Number.isFinite(p.expiresAt) ? html`<p class="note">${hw("expires", timeText(p.expiresAt))}</p>` : null}
|
|
174
175
|
<div class="field-row"><button type="button" class="btn" disabled=${busy} onClick=${cancel}>${hw("cancel")}</button></div>
|
|
175
176
|
</div>`;
|
|
176
177
|
} else if (p.state === "paired") {
|
|
@@ -90,6 +90,7 @@ const ROWS = [
|
|
|
90
90
|
["defaults.liveness-crash", "agent-defaults", "#g-live-crash", "settings.livenessCrash", "defaults.task_board.liveness.crash_grace_minutes", ["crashed", "crash grace", "minutes"], ["當掉", "恢復"]],
|
|
91
91
|
["defaults.wake-comment", "agent-defaults", "#g-wake-comment", "settings.wakesComment", "defaults.task_board.comment_wakes", ["comment", "mention", "@", "wake", "task board", "card"], ["留言", "提及", "叫醒", "任務板", "卡片"]],
|
|
92
92
|
["defaults.wake-progress", "agent-defaults", "#g-wake-progress", "settings.wakesProgress", "defaults.task_board.progress_wakes", ["progress", "finished", "watchers", "dispatcher", "wake", "task board", "card"], ["進度", "完成", "關注者", "派工者", "叫醒", "任務板", "卡片"]],
|
|
93
|
+
["defaults.task-archive", "agent-defaults", "#g-archive-days", "settings.archiveTitle", "defaults.task_board.archive_after_days", ["archive", "archived", "finished", "done", "days", "task board", "card"], ["封存", "完成", "天", "任務板", "卡片"]],
|
|
93
94
|
["defaults.wake-leader", "agent-defaults", "#g-wake-leader", "settings.wakesLeader", "defaults.task_board.leader", ["leader", "task board leader", "lead", "progress", "task board"], ["看板負責人", "leader", "負責人", "進度", "任務板"]],
|
|
94
95
|
["defaults.concurrency", "agent-defaults", "#g-conc", "settings.concurrency", "startup.concurrency", ["startup", "concurrency", "parallel", "spawn"], ["啟動", "並行"]],
|
|
95
96
|
["defaults.project-roots", "agent-defaults", "#g-roots", "settings.projectRootsTitle", "project_roots", ["project roots", "folders", "directory", "where agents work", "working directory"], ["專案資料夾", "資料夾", "目錄", "工作目錄"]],
|
|
@@ -58,6 +58,11 @@ register("settings", {
|
|
|
58
58
|
wakesLeader: "Board leader",
|
|
59
59
|
wakesLeaderNone: "No leader",
|
|
60
60
|
wakesLeaderGone: "{0} (not an agent of this fleet)",
|
|
61
|
+
// M-3668: when finished cards leave the board.
|
|
62
|
+
archiveTitle: "Archive finished cards after",
|
|
63
|
+
archiveUnit: "days (0 = never)",
|
|
64
|
+
archiveHint: "A finished or cancelled main task leaves its project's board this many days after it finished. It waits in the project's Archive list, search still finds it, and moving it to To do brings it back. Nothing is deleted. 0 keeps every finished card on the board.",
|
|
65
|
+
archiveRange: "A whole number of days from 0 to 3650.",
|
|
61
66
|
wakesLeaderHint: "Hears the progress of cards that are in no project, and of cards whose project has no lead of its own. No leader: only such a card's dispatcher and watchers hear it.",
|
|
62
67
|
hostTag: "this host", switchOn: "On", switchOff: "Off", hangUnit: "minutes without output → alert", tipLabel: "About \u201c{0}\u201d",
|
|
63
68
|
usageCount: "{0}/{1} in use", usageOwn: "{0} custom", usagePartly: "{0} partly custom", usageMany: "{0} agents",
|
|
@@ -140,6 +145,10 @@ register("settings", {
|
|
|
140
145
|
wakesLeader: "看板負責人",
|
|
141
146
|
wakesLeaderNone: "不指定",
|
|
142
147
|
wakesLeaderGone: "{0}(不是這個 Fleet 的 Agent)",
|
|
148
|
+
archiveTitle: "完成的卡片封存於",
|
|
149
|
+
archiveUnit: "天後(0 = 不封存)",
|
|
150
|
+
archiveHint: "完成或取消的主任務,完成這麼多天後就離開專案看板,移到專案的封存清單;搜尋仍找得到,移回「待辦」即可重新開啟,不會刪除任何卡片。設為 0 時,完成的卡片都留在看板上。",
|
|
151
|
+
archiveRange: "請輸入 0 到 3650 之間的整數天數。",
|
|
143
152
|
wakesLeaderHint: "沒有專案的卡片、以及專案沒有自己負責人的卡片,進度會通知這個 Agent。不指定:這類卡片只有派工者和關注者會收到。",
|
|
144
153
|
hostTag: "此主機", switchOn: "開", switchOff: "關", hangUnit: "分鐘沒輸出就提醒", tipLabel: "「{0}」的說明",
|
|
145
154
|
usageCount: "{0}/{1} 套用中", usageOwn: "{0} 自訂", usagePartly: "{0} 部分自訂", usageMany: "{0} 個 Agent",
|
|
@@ -87,11 +87,13 @@ export const FIELDS = Object.freeze({
|
|
|
87
87
|
liveness: { keys: ["liveOn", "liveQuiet", "livePrompt", "liveCrash"], path: "defaults.task_board" },
|
|
88
88
|
// Which task board news wakes an agent (fleet-level; no agent overrides it; read at every card write, so it applies at once).
|
|
89
89
|
taskWakes: { keys: ["wakeComment", "wakeProgress", "wakeLeader"], path: "defaults.task_board" },
|
|
90
|
+
// M-3668: how many days after it finished a main task leaves the board (fleet-level; read at every board read).
|
|
91
|
+
taskArchive: { keys: ["archiveDays"], path: "defaults.task_board" },
|
|
90
92
|
concurrency: { keys: ["concurrency"], path: "fleet.spawn_concurrency" },
|
|
91
93
|
stagger: { keys: ["stagger"], path: "fleet.spawn_stagger_ms" },
|
|
92
94
|
});
|
|
93
95
|
/** How many fields the Advanced drawer holds (the title says so). */
|
|
94
|
-
export const ADVANCED_COUNT =
|
|
96
|
+
export const ADVANCED_COUNT = 13;
|
|
95
97
|
|
|
96
98
|
/** The parts of a field that agents override one by one (one part: the field itself). */
|
|
97
99
|
const partsOf = (spec) => spec.parts || [{ keys: spec.keys, own: spec.own, owns: spec.owns }];
|
|
@@ -383,6 +385,9 @@ export function SharedAgentSettings({ ctx, form }) {
|
|
|
383
385
|
<div key=${k} class="s-hang-row"><${Switch} id=${id} name=${tn(label)} checked=${f[k]} onChange=${set(k)} /><span>${tn(label)}</span></div><${Info}>${tn(hint)}</${Info}>`)}
|
|
384
386
|
<div class="s-hang-row"><label for="g-wake-leader">${tn("wakesLeader")}</label>
|
|
385
387
|
<${Select} id="g-wake-leader" value=${f.wakeLeader} onChange=${set("wakeLeader")} options=${leaderOptions} /></div><${Info}>${tn("wakesLeaderHint")}</${Info}>${note("taskWakes")}</div>
|
|
388
|
+
<div id="g-archive" class=${fc("field", "archiveDays")}>${head("taskArchive", "g-archive-days", tn("archiveTitle"), null, { mark: mark("archiveDays") })}
|
|
389
|
+
<div class="s-hang-row"><input id="g-archive-days" type="number" min="0" max="3650" step="1" class=${errors.archiveDays ? "invalid" : ""} value=${f.archiveDays} onInput=${(e) => set("archiveDays")(e.target.value)} />
|
|
390
|
+
<span class="s-unit">${tn("archiveUnit")}</span></div><${Feedback} error=${errors.archiveDays} /><${Info}>${tn("archiveHint")}</${Info}>${note("taskArchive")}</div>
|
|
386
391
|
<div class=${fc("field", "concurrency")}>${head("concurrency", "g-conc", tn("concurrency"), tn("tipConcurrency"), { mark: mark("concurrency") })}
|
|
387
392
|
<input id="g-conc" type="number" min="1" max="20" step="1" class=${errors.concurrency ? "invalid" : ""} value=${f.concurrency} onInput=${(e) => set("concurrency")(e.target.value)} />
|
|
388
393
|
<${Feedback} error=${errors.concurrency} warning=${warnings.concurrency} />${f.concurrency.trim() === "" ? html`<${InEffect} text=${tn("concurrencyAuto")} tip=${defaultTip} />` : null}${note("concurrency")}</div>
|
|
@@ -7,6 +7,7 @@ import { register, t, lang } from "/assets/app-i18n.js";
|
|
|
7
7
|
import { useStore } from "/assets/app-store.js";
|
|
8
8
|
import { toast } from "/assets/ui-toast.js";
|
|
9
9
|
import { checkUpdateNow, hubNeed, openHubUpdateDialog, openUpdateDialog, refreshUpdate, updateActive, updateStore } from "/assets/app-update.js";
|
|
10
|
+
import { dateTimeText } from "/assets/clock-text.js";
|
|
10
11
|
|
|
11
12
|
register("supdate", {
|
|
12
13
|
en: { title: "Version and update", current: "Current version", line: "Update line", latest: "Latest", checked: "Last checked",
|
|
@@ -29,7 +30,7 @@ function channelOf(version) {
|
|
|
29
30
|
return !pre ? "latest" : pre[1] === "alpha" ? "alpha" : "beta";
|
|
30
31
|
}
|
|
31
32
|
function when(ms) {
|
|
32
|
-
try { return
|
|
33
|
+
try { return dateTimeText(ms, { dateStyle: "medium", timeStyle: "short" }, lang() === "zh-TW" ? "zh-TW" : "en-US"); } catch { return ""; }
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
export function UpdateSection() {
|
|
@@ -16,6 +16,7 @@ import { editsOf, keepDraft, syncStage } from "./settings-draft.js";
|
|
|
16
16
|
import { resetWebAuthorization } from "/assets/web-authorize.js";
|
|
17
17
|
import "./settings-strings.js";
|
|
18
18
|
import { layoutText } from "./settings-layout.js";
|
|
19
|
+
import { dateTimeText } from "/assets/clock-text.js";
|
|
19
20
|
import "./settings-revoke-strings.js"; // the revoke card's own words: a file of its own (PR #3553 review: a retained settings-access-strings.js would lack them)
|
|
20
21
|
import "./settings-access-strings.js"; // revAuthorityBriefWeb / revAuthorityEnabledWeb / revAuthorityRule: an older settings-layout.js from a tab that visited Fleet first lacks them (#3061)
|
|
21
22
|
|
|
@@ -80,7 +81,7 @@ export function WebAuthorityCard({ ctx, staged, disabled = false }) {
|
|
|
80
81
|
const hoursError = f.hours !== null && (!Number.isFinite(f.hours) || f.hours < overview.hours.min || f.hours > overview.hours.max) ? "vaHoursRange" : "";
|
|
81
82
|
const stuckOff = f.enabled && original.enabled && !overview.state.enabled;
|
|
82
83
|
const warnHosts = !f.loopbackOnly && overview.lanHosts.length > 0;
|
|
83
|
-
const when = (ms) =>
|
|
84
|
+
const when = (ms) => dateTimeText(ms);
|
|
84
85
|
const canRevoke = !!(overview.you && overview.you.canRevoke); // AGEND-138: only the verified owner (the server decides)
|
|
85
86
|
|
|
86
87
|
const fc = (cls, key) => `${cls}${!sameValue(f[key], original[key]) ? " s-dirty" : ""}`;
|
|
@@ -21,6 +21,7 @@ import { setTextSize, textSizeStore, TEXT_SIZES, usageOffered } from "./header-t
|
|
|
21
21
|
import { UsageDialog } from "./usage-dialog.js";
|
|
22
22
|
import { supportsInstanceFeature } from "./instance-nav.js";
|
|
23
23
|
import { assetUrl } from "./asset-url.js";
|
|
24
|
+
import { timeText } from "./clock-text.js";
|
|
24
25
|
|
|
25
26
|
register("agentSheet", {
|
|
26
27
|
en: { sheet: "{0}: more", search: "Search", files: "Files & changes", card: "Card", usage: "Usage", model: "Model & effort", backend: "CLI backend",
|
|
@@ -59,7 +60,7 @@ export function usePhone() {
|
|
|
59
60
|
const CONTROLS = ["start", "restart", "stop", "pause", "wake", "delete"];
|
|
60
61
|
/** The item keys the sheet places itself (a tile or a row of its own), never under Appearance. */
|
|
61
62
|
const PLACED = ["details", "splitChat", "settings", "workspace", "fullWidth", "pins", ...CONTROLS];
|
|
62
|
-
const untilClock = (ms) => { try { return
|
|
63
|
+
const untilClock = (ms) => { try { return timeText(ms, { hour: "2-digit", minute: "2-digit" }, []); } catch { return ""; } };
|
|
63
64
|
|
|
64
65
|
/**
|
|
65
66
|
* The header's ⋯ on a phone, and its sheet.
|
|
@@ -121,7 +121,7 @@ register("app", {
|
|
|
121
121
|
confirmTitle: "Please confirm", confirmOk: "Continue", cancel: "Cancel",
|
|
122
122
|
sidePanelLeave: "Leave {0} without saving? Your changes there will be lost.", sidePanelDiscard: "Discard changes",
|
|
123
123
|
// The server's own wording (src/locale.ts needs.reason.*), so the web says what Discord says.
|
|
124
|
-
needs_reason_kiro_choice: "Kiro needs your decision", needs_reason_hang: "Not responding", needs_reason_exited: "Exited", needs_reason_assist: "Waiting at its terminal", needs_reason_question: "Asking you a question", needs_reason_permission: "Permission needed", needs_reason_dangerous_command: "Dangerous command waiting", needs_reason_login: "Waiting to connect its AI account", needs_reason_dialog: "Waiting at a dialog", needs_reason_terminal_input: "May be waiting for input", needs_reason_auth_paused: "Paused: AI account not connected", needs_reason_host_health: "Host health", needs_reason_stale_auth: "Codex needs a restart", needs_stale_auth_detail: "Codex cannot refresh this agent’s current sign-in. Restart the agent; sign in again only if Codex asks.", needs_reason_backend_signin: "AI account needs connecting", needs_reason_config_invalid: "Configuration file needs attention", needs_reason_hub_proposal: "Hub action proposed: review locally", needs_reason_hub_execution_hold: "Hub work held: review locally", needs_reason_hub_share_lapsed: "Hub share needs to be shared again: its backend or folder changed", needs_reason_hub_unavailable: "Hub not running", needs_reason_config_fallback: "Running on stored configuration", config_history_edit: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. The next restart would use the stored valid copy from {4}. Correct the YAML error; the file has not been changed by AgEnD.", config_history_no_history: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. No stored valid copy is available, so the next restart cannot recover automatically. Correct the YAML error before restarting; the file has not been changed by AgEnD.", config_history_fallback: "{0}, line {1}, column {2}: {3}. AgEnD started using the stored valid copy from {4}. Correct the YAML error and reload the settings. The file on disk has not been changed by AgEnD.", needs_reason_general_windows_offline: "General’s Windows PC is offline", needs_reason_general_location_hold: "Run General on", needs_reason_native_pane_hold: "Windows agent needs attention", needs_reason_model_switch: "Claude model switched", needs_reason_crashed: "Crashed", needs_reason_backend_missing: "AI CLI not installed", needs_reason_usage_limit: "Usage limit reached · reset time unknown", needs_reason_delivery_uncertain: "Could not confirm delivery", needs_reason_delivery_failed: "Delivery failed", needs_reason_missed_offline: "Missed while AgEnD was offline", needs_reason_task_review: "Waiting for your confirmation", needs_reason_task_blocked: "Blocked: asks you", needs_reason_task_stalled: "Its assignee went quiet",
|
|
124
|
+
needs_reason_kiro_choice: "Kiro needs your decision", needs_reason_hang: "Not responding", needs_reason_exited: "Exited", needs_reason_assist: "Waiting at its terminal", needs_reason_question: "Asking you a question", needs_reason_permission: "Permission needed", needs_reason_dangerous_command: "Dangerous command waiting", needs_reason_login: "Waiting to connect its AI account", needs_reason_dialog: "Waiting at a dialog", needs_reason_terminal_input: "May be waiting for input", needs_reason_auth_paused: "Paused: AI account not connected", needs_reason_host_health: "Host health", needs_reason_stale_auth: "Codex needs a restart", needs_stale_auth_detail: "Codex cannot refresh this agent’s current sign-in. Restart the agent; sign in again only if Codex asks.", needs_reason_backend_signin: "AI account needs connecting", needs_reason_config_invalid: "Configuration file needs attention", needs_reason_hub_proposal: "Hub action proposed: review locally", needs_reason_hub_execution_hold: "Hub work held: review locally", needs_reason_hub_share_lapsed: "Hub share needs to be shared again: its backend or folder changed", needs_reason_hub_unavailable: "Hub not running", needs_reason_config_fallback: "Running on stored configuration", config_history_edit: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. The next restart would use the stored valid copy from {4}. Correct the YAML error; the file has not been changed by AgEnD.", config_history_no_history: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. No stored valid copy is available, so the next restart cannot recover automatically. Correct the YAML error before restarting; the file has not been changed by AgEnD.", config_history_fallback: "{0}, line {1}, column {2}: {3}. AgEnD started using the stored valid copy from {4}. Correct the YAML error and reload the settings. The file on disk has not been changed by AgEnD.", needs_reason_general_windows_offline: "General’s Windows PC is offline", needs_reason_general_location_hold: "Run General on", needs_reason_native_pane_hold: "Windows agent needs attention", needs_reason_model_switch: "Claude model switched", needs_reason_crashed: "Crashed", needs_reason_backend_missing: "AI CLI not installed", needs_reason_mcp_missing: "MCP servers missing after an AI account switch", needs_mcp_missing_detail: "{0} ({1} → {2})", needs_mcp_missing_sep: ", ", needs_reason_usage_limit: "Usage limit reached · reset time unknown", needs_reason_delivery_uncertain: "Could not confirm delivery", needs_reason_delivery_failed: "Delivery failed", needs_reason_missed_offline: "Missed while AgEnD was offline", needs_reason_task_review: "Waiting for your confirmation", needs_reason_task_blocked: "Blocked: asks you", needs_reason_task_stalled: "Its assignee went quiet",
|
|
125
125
|
},
|
|
126
126
|
"zh-TW": {
|
|
127
127
|
brand: "AgEnD", fleet: "Fleet", fleetOverview: "Fleet 概覽", view: "檢視", settings: "設定", instances: "Agent", newInstance: "新增 Agent", newAgent: "新增 Agent",
|
|
@@ -171,6 +171,6 @@ register("app", {
|
|
|
171
171
|
search: "搜尋", searchTitle: "搜尋聊天、agent 之間的訊息與任務({0})",
|
|
172
172
|
confirmTitle: "請確認", confirmOk: "繼續", cancel: "取消",
|
|
173
173
|
sidePanelLeave: "不儲存就離開「{0}」?你在那裡的修改會遺失。", sidePanelDiscard: "捨棄修改",
|
|
174
|
-
needs_reason_kiro_choice: "Kiro 需要你決定", needs_reason_hang: "沒有回應", needs_reason_exited: "已結束", needs_reason_assist: "在終端機上等待", needs_reason_question: "正在問你問題", needs_reason_permission: "需要權限", needs_reason_dangerous_command: "危險指令待確認", needs_reason_login: "等待連接 AI 帳號", needs_reason_dialog: "停在對話框", needs_reason_terminal_input: "可能在等輸入", needs_reason_auth_paused: "已暫停:AI 帳號未連接", needs_reason_host_health: "主機狀態", needs_reason_stale_auth: "Codex 需要重新啟動", needs_stale_auth_detail: "Codex 無法更新這個 Agent 執行中使用的登入。請重新啟動 Agent;只有 Codex 要求時才需要重新登入。", needs_reason_backend_signin: "需要連接 AI 帳號", needs_reason_config_invalid: "設定檔需要處理", needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_share_lapsed: "Hub 分享需要重新分享:它的後端或資料夾換了", needs_reason_hub_unavailable: "Hub 未在執行", needs_reason_config_fallback: "正在使用儲存的設定副本", config_history_edit: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。下次重新啟動會改用 {4} 儲存的有效副本。請修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_no_history: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。沒有可用的有效副本,下次重新啟動將無法自動恢復。請在重新啟動前修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_fallback: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 已使用 {4} 儲存的有效副本啟動。請修正 YAML 錯誤並重新載入設定。AgEnD 未更動磁碟上的檔案。", needs_reason_general_windows_offline: "General 所在的 Windows 電腦已離線", needs_reason_general_location_hold: "General 執行位置", needs_reason_native_pane_hold: "Windows Agent 需要處理", needs_reason_model_switch: "Claude 模型已切換", needs_reason_crashed: "已崩潰", needs_reason_backend_missing: "AI CLI 沒有安裝", needs_reason_usage_limit: "用量已達上限 · 恢復時間未知", needs_reason_delivery_uncertain: "無法確認是否送達", needs_reason_delivery_failed: "傳送失敗", needs_reason_missed_offline: "AgEnD 離線時錯過", needs_reason_task_review: "等你確認", needs_reason_task_blocked: "卡住,在問你", needs_reason_task_stalled: "接手者很久沒有動靜",
|
|
174
|
+
needs_reason_kiro_choice: "Kiro 需要你決定", needs_reason_hang: "沒有回應", needs_reason_exited: "已結束", needs_reason_assist: "在終端機上等待", needs_reason_question: "正在問你問題", needs_reason_permission: "需要權限", needs_reason_dangerous_command: "危險指令待確認", needs_reason_login: "等待連接 AI 帳號", needs_reason_dialog: "停在對話框", needs_reason_terminal_input: "可能在等輸入", needs_reason_auth_paused: "已暫停:AI 帳號未連接", needs_reason_host_health: "主機狀態", needs_reason_stale_auth: "Codex 需要重新啟動", needs_stale_auth_detail: "Codex 無法更新這個 Agent 執行中使用的登入。請重新啟動 Agent;只有 Codex 要求時才需要重新登入。", needs_reason_backend_signin: "需要連接 AI 帳號", needs_reason_config_invalid: "設定檔需要處理", needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_share_lapsed: "Hub 分享需要重新分享:它的後端或資料夾換了", needs_reason_hub_unavailable: "Hub 未在執行", needs_reason_config_fallback: "正在使用儲存的設定副本", config_history_edit: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。下次重新啟動會改用 {4} 儲存的有效副本。請修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_no_history: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。沒有可用的有效副本,下次重新啟動將無法自動恢復。請在重新啟動前修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_fallback: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 已使用 {4} 儲存的有效副本啟動。請修正 YAML 錯誤並重新載入設定。AgEnD 未更動磁碟上的檔案。", needs_reason_general_windows_offline: "General 所在的 Windows 電腦已離線", needs_reason_general_location_hold: "General 執行位置", needs_reason_native_pane_hold: "Windows Agent 需要處理", needs_reason_model_switch: "Claude 模型已切換", needs_reason_crashed: "已崩潰", needs_reason_backend_missing: "AI CLI 沒有安裝", needs_reason_mcp_missing: "切換 AI 帳號後缺少 MCP 伺服器", needs_mcp_missing_detail: "{0}({1} → {2})", needs_mcp_missing_sep: "、", needs_reason_usage_limit: "用量已達上限 · 恢復時間未知", needs_reason_delivery_uncertain: "無法確認是否送達", needs_reason_delivery_failed: "傳送失敗", needs_reason_missed_offline: "AgEnD 離線時錯過", needs_reason_task_review: "等你確認", needs_reason_task_blocked: "卡住,在問你", needs_reason_task_stalled: "接手者很久沒有動靜",
|
|
175
175
|
},
|
|
176
176
|
});
|
|
@@ -11,7 +11,12 @@ import { modelSwitchText } from "./model-observation.js";
|
|
|
11
11
|
// The toggle asks Notification.requestPermission() on that click only. Not offered on a phone (the constructor is
|
|
12
12
|
// missing or throws there; Discord's notification is the one to rely on) or on a plain-HTTP LAN address.
|
|
13
13
|
import { appStore, createStore } from "./app-store.js";
|
|
14
|
-
import { t } from "./app-i18n.js";
|
|
14
|
+
import { register, t } from "./app-i18n.js";
|
|
15
|
+
// M-3749: a tab that retains an older app-i18n.js still words the missing-MCP item (registered by its consumer, too).
|
|
16
|
+
register("app", {
|
|
17
|
+
en: { needs_reason_mcp_missing: "MCP servers missing after an AI account switch", needs_mcp_missing_detail: "{0} ({1} → {2})", needs_mcp_missing_sep: ", " },
|
|
18
|
+
"zh-TW": { needs_reason_mcp_missing: "切換 AI 帳號後缺少 MCP 伺服器", needs_mcp_missing_detail: "{0}({1} → {2})", needs_mcp_missing_sep: "、" },
|
|
19
|
+
});
|
|
15
20
|
|
|
16
21
|
const STORE_KEY = "agend_needs_notify";
|
|
17
22
|
const TERMINAL_WAIT_MS = 5000;
|
|
@@ -62,6 +67,8 @@ export async function setNotify(on, env = globalThis) {
|
|
|
62
67
|
|
|
63
68
|
export const configDetail = (item) => {
|
|
64
69
|
if (item.modelSwitch) return modelSwitchText(item.modelSwitch);
|
|
70
|
+
// M-3749: the missing MCP servers in the page's language (zh: 「、」 and 「()」).
|
|
71
|
+
if (item.mcpMissing && Array.isArray(item.mcpMissing.names)) return t("app.needs_mcp_missing_detail", item.mcpMissing.names.join(t("app.needs_mcp_missing_sep")), item.mcpMissing.from, item.mcpMissing.to);
|
|
65
72
|
const issue = item.configIssue;
|
|
66
73
|
return issue ? t(`app.config_history_${issue.mode === "fallback" ? "fallback" : issue.time ? "edit" : "no_history"}`, issue.file, issue.line, issue.column, issue.reason, issue.time || "") : item.detail;
|
|
67
74
|
};
|
|
@@ -9,6 +9,7 @@ import { t, lang } from "./app-i18n.js";
|
|
|
9
9
|
import { AuthorizeChip, useWebAuthorization } from "./web-authorize.js";
|
|
10
10
|
import { roleName } from "./device-roles.js"; // its own file: a retained older web-authorize.js has no roleName (PR #3553 review)
|
|
11
11
|
import { appStore } from "./app-store.js";
|
|
12
|
+
import { timeText, unitText } from "./clock-text.js";
|
|
12
13
|
|
|
13
14
|
async function getJson(url) {
|
|
14
15
|
try {
|
|
@@ -16,8 +17,8 @@ async function getJson(url) {
|
|
|
16
17
|
return r.ok ? await r.json() : null;
|
|
17
18
|
} catch { return null; }
|
|
18
19
|
}
|
|
19
|
-
const clock = (ms) =>
|
|
20
|
-
const span = (ms) => { const m = Math.max(1, Math.round(ms / 60000)); return m >= 90 ?
|
|
20
|
+
const clock = (ms) => timeText(ms, { hour: "2-digit", minute: "2-digit" }, lang() === "zh-TW" ? "zh-TW" : undefined);
|
|
21
|
+
const span = (ms) => { const m = Math.max(1, Math.round(ms / 60000)); return m >= 90 ? unitText(Math.round(m / 60), "h") : unitText(m, "min"); };
|
|
21
22
|
|
|
22
23
|
export function SessionMenu() {
|
|
23
24
|
const [me, setMe] = useState(undefined); // undefined: not read yet; null: signed out
|
|
@@ -58,7 +59,7 @@ export function SessionMenu() {
|
|
|
58
59
|
${!me ? html`<h3>${t("app.signedOut")}</h3><a class="btn" href=${`/signin?next=${encodeURIComponent(location.pathname)}`}>${t("app.signIn")}</a>` : html`
|
|
59
60
|
<h3>${t("app.signedIn")} · ${me.label}</h3>
|
|
60
61
|
<p class="sub">${t("app.expires", clock(me.expiresAt), span(me.idleMs))}</p>
|
|
61
|
-
${me.tier === "guest" || me.tier === "read" || (me.tier === "admin" && auth.st) ? html`<p class="role" data-role=${me.tier === "admin" ? (auth.st.state === "verified" ? "owner" : "admin") : me.tier}><span class="sub">${t("webauth.role")}</span> <strong>${roleName(me.tier, !!auth.st && auth.st.state === "verified")}</strong></p>` : null}
|
|
62
|
+
${me.tier === "guest" || me.tier === "read" || (me.tier === "admin" && auth.st) ? html`<p class="role" data-role=${me.tier === "admin" ? (auth.st.state === "verified" ? "owner" : "admin") : me.tier}><span class="sub">${t("webauth.role")}</span> <strong>${me.tier === "guest" ? roleName("guest", typeof me.verifiedUntil === "number", typeof me.verifiedUntil === "number" ? clock(me.verifiedUntil).replace(/ /g, "\u00a0") : undefined) : roleName(me.tier, !!auth.st && auth.st.state === "verified")}</strong></p>` : null}
|
|
62
63
|
<${AuthorizeChip} />
|
|
63
64
|
<div class="row">
|
|
64
65
|
<button type="button" class="btn" onClick=${() => act("POST", "/auth/logout", () => { location.href = "/signin"; })}><${Icon} name="user" size=${16} />${t("app.signOut")}</button>
|
|
@@ -309,8 +309,12 @@ function drawTitle() {
|
|
|
309
309
|
document.title = `${titleCount ? `(${titleCount}) ` : ""}${titleBase ? `${titleBase} · AgEnD` : "AgEnD"}`;
|
|
310
310
|
}
|
|
311
311
|
export function setTitle(text) { titleBase = text || ""; drawTitle(); }
|
|
312
|
+
// M-3710 (#4447 capture check): Needs you's "N contact requests need a verified browser" counts as its N requests, so a
|
|
313
|
+
// count stays the same when the browser is verified and the requests replace the line.
|
|
314
|
+
const needsWeight = (i) => (i?.type === "contact" && i.reason === "contact_verify_needed" ? Math.max(1, Math.floor(Number(i.contactVerify?.count) || 1)) : 1);
|
|
315
|
+
const needsTotal = (needs) => needs.reduce((n, i) => n + needsWeight(i), 0);
|
|
312
316
|
appStore.subscribe((s) => {
|
|
313
|
-
const n = Array.isArray(s.needs) ? s.needs
|
|
317
|
+
const n = Array.isArray(s.needs) ? needsTotal(s.needs) : 0;
|
|
314
318
|
if (n !== titleCount) { titleCount = n; drawTitle(); }
|
|
315
319
|
});
|
|
316
320
|
|
|
@@ -569,7 +573,7 @@ register("phoneNav", {
|
|
|
569
573
|
export function needsCount(app) {
|
|
570
574
|
const needs = Array.isArray(app.needs) ? app.needs : [], proposals = Array.isArray(app.proposals) ? app.proposals : [];
|
|
571
575
|
const suggestions = needs.filter(i => i?.type === "contact" && i.reason === "contact_restricted_suggestion").length;
|
|
572
|
-
return needs
|
|
576
|
+
return needsTotal(needs) - suggestions + (suggestions ? 1 : 0) + proposals.length;
|
|
573
577
|
}
|
|
574
578
|
|
|
575
579
|
export function PanelHeader({ title, sub, children, headingRef, nav, notice, pageControls, pageActions, back = null }) {
|