@songsid/agend 2.3.5-alpha.2 → 2.3.5-alpha.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/agend-home.d.ts +13 -0
- package/dist/agend-home.js +42 -0
- package/dist/agend-home.js.map +1 -1
- package/dist/agent-runtime-api.d.ts +4 -0
- package/dist/agent-runtime-api.js +59 -0
- package/dist/agent-runtime-api.js.map +1 -0
- package/dist/agent-runtime-change.d.ts +74 -0
- package/dist/agent-runtime-change.js +102 -0
- package/dist/agent-runtime-change.js.map +1 -0
- package/dist/auth-api.d.ts +21 -0
- package/dist/auth-api.js +95 -4
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/web-authority.d.ts +12 -2
- package/dist/authority/web-authority.js +25 -4
- package/dist/authority/web-authority.js.map +1 -1
- package/dist/backend/claude-code.js +16 -1
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex-footer-hints.d.ts +4 -0
- package/dist/backend/codex-footer-hints.js +27 -0
- package/dist/backend/codex-footer-hints.js.map +1 -0
- package/dist/backend/codex.js +19 -11
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/kiro-identity.d.ts +2 -0
- package/dist/backend/kiro-identity.js +13 -6
- package/dist/backend/kiro-identity.js.map +1 -1
- package/dist/backend/kiro.js +18 -3
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend-availability.d.ts +6 -0
- package/dist/backend-availability.js +13 -5
- package/dist/backend-availability.js.map +1 -1
- package/dist/channel/mcp-tools.js +1 -1
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/cli.js +6 -9
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +12 -1
- package/dist/config-validator.js.map +1 -1
- package/dist/daemon.d.ts +5 -0
- package/dist/daemon.js +107 -30
- package/dist/daemon.js.map +1 -1
- package/dist/fleet-manager.d.ts +146 -8
- package/dist/fleet-manager.js +1030 -166
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +6 -1
- package/dist/fleet-windows-runtime.js +77 -1
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/fleet-yaml-patch.d.ts +3 -0
- package/dist/fleet-yaml-patch.js +103 -0
- package/dist/fleet-yaml-patch.js.map +1 -0
- package/dist/general-binding.d.ts +85 -0
- package/dist/general-binding.js +298 -0
- package/dist/general-binding.js.map +1 -0
- package/dist/general-host-owner.d.ts +8 -0
- package/dist/general-host-owner.js +26 -0
- package/dist/general-host-owner.js.map +1 -0
- package/dist/general-instance.d.ts +7 -0
- package/dist/general-instance.js +20 -3
- package/dist/general-instance.js.map +1 -1
- package/dist/general-knowledge/skills/model-discovery/SKILL.md +2 -0
- package/dist/general-role.d.ts +5 -0
- package/dist/general-role.js +26 -0
- package/dist/general-role.js.map +1 -0
- package/dist/instance-lifecycle.d.ts +1 -0
- package/dist/instance-lifecycle.js +26 -4
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +2 -0
- package/dist/instructions.js +6 -0
- package/dist/instructions.js.map +1 -1
- package/dist/kiro-resume-summary.d.ts +37 -0
- package/dist/kiro-resume-summary.js +85 -0
- package/dist/kiro-resume-summary.js.map +1 -0
- package/dist/locale.js +59 -0
- package/dist/locale.js.map +1 -1
- package/dist/login-controller.js +9 -1
- package/dist/login-controller.js.map +1 -1
- package/dist/native-pane-lifecycle.js +4 -1
- package/dist/native-pane-lifecycle.js.map +1 -1
- package/dist/native-pane-manager.d.ts +1 -0
- package/dist/native-pane-manager.js +23 -2
- package/dist/native-pane-manager.js.map +1 -1
- package/dist/needs-you-hub.js +1 -1
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +8 -1
- package/dist/needs-you.js +5 -2
- package/dist/needs-you.js.map +1 -1
- package/dist/office-share-page.js +1 -1
- package/dist/office-share-page.js.map +1 -1
- package/dist/package-preimage.js +27 -2
- package/dist/package-preimage.js.map +1 -1
- package/dist/pane-port.d.ts +11 -0
- package/dist/public-web-gateway.js +9 -0
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +11 -0
- package/dist/public-web-link.js +13 -0
- package/dist/public-web-link.js.map +1 -1
- package/dist/quickstart-api.js +9 -5
- package/dist/quickstart-api.js.map +1 -1
- package/dist/quickstart.d.ts +1 -0
- package/dist/quickstart.js +4 -1
- package/dist/quickstart.js.map +1 -1
- package/dist/reply-buttons-controller.js +10 -0
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/runtime-api.js +84 -9
- package/dist/runtime-api.js.map +1 -1
- package/dist/runtime-build-info.d.ts +9 -0
- package/dist/runtime-build-info.js +57 -0
- package/dist/runtime-build-info.js.map +1 -0
- package/dist/runtime-bundle.d.ts +3 -1
- package/dist/runtime-bundle.js +17 -8
- package/dist/runtime-bundle.js.map +1 -1
- package/dist/runtime-cli.d.ts +6 -1
- package/dist/runtime-cli.js +46 -11
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client-store.d.ts +20 -1
- package/dist/runtime-client-store.js +56 -4
- package/dist/runtime-client-store.js.map +1 -1
- package/dist/runtime-client.d.ts +12 -0
- package/dist/runtime-client.js +43 -7
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-connection.d.ts +22 -0
- package/dist/runtime-connection.js +93 -0
- package/dist/runtime-connection.js.map +1 -0
- package/dist/runtime-coordinator.d.ts +9 -0
- package/dist/runtime-coordinator.js +81 -34
- package/dist/runtime-coordinator.js.map +1 -1
- package/dist/runtime-general-protocol.d.ts +22 -0
- package/dist/runtime-general-protocol.js +57 -0
- package/dist/runtime-general-protocol.js.map +1 -0
- package/dist/runtime-general-workspace.d.ts +17 -0
- package/dist/runtime-general-workspace.js +213 -0
- package/dist/runtime-general-workspace.js.map +1 -0
- package/dist/runtime-pane-assets.d.ts +1 -1
- package/dist/runtime-pane-assets.js +1 -1
- package/dist/runtime-pane-assets.js.map +1 -1
- package/dist/runtime-pane-boot.d.ts +7 -0
- package/dist/runtime-pane-boot.js +23 -0
- package/dist/runtime-pane-boot.js.map +1 -1
- package/dist/runtime-pane-host.d.ts +1 -0
- package/dist/runtime-pane-host.js +22 -1
- package/dist/runtime-pane-host.js.map +1 -1
- package/dist/runtime-pane-mcp.d.ts +8 -0
- package/dist/runtime-pane-mcp.js +15 -2
- package/dist/runtime-pane-mcp.js.map +1 -1
- package/dist/runtime-pane-port.d.ts +6 -1
- package/dist/runtime-pane-port.js +21 -0
- package/dist/runtime-pane-port.js.map +1 -1
- package/dist/runtime-pane-protocol.d.ts +4 -1
- package/dist/runtime-pane-protocol.js +7 -1
- package/dist/runtime-pane-protocol.js.map +1 -1
- package/dist/runtime-protocol.d.ts +13 -0
- package/dist/runtime-protocol.js +18 -0
- package/dist/runtime-protocol.js.map +1 -1
- package/dist/settings-api.d.ts +5 -0
- package/dist/settings-api.js +37 -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-confirmation.d.ts +1 -0
- package/dist/settings-confirmation.js +1 -0
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.d.ts +4 -0
- package/dist/settings-effect.js +36 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +4 -0
- package/dist/settings-http-confirmation.js +20 -1
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-request-capability.d.ts +2 -0
- package/dist/settings-request-capability.js +4 -0
- package/dist/settings-request-capability.js.map +1 -1
- package/dist/settings-route-lifetime.d.ts +14 -0
- package/dist/settings-route-lifetime.js +48 -0
- package/dist/settings-route-lifetime.js.map +1 -0
- package/dist/settings-transaction.d.ts +4 -0
- package/dist/settings-transaction.js +9 -0
- package/dist/settings-transaction.js.map +1 -1
- package/dist/setup-form.js +6 -3
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-i18n.js +3 -0
- package/dist/setup-i18n.js.map +1 -1
- package/dist/stall-reporter.d.ts +21 -0
- package/dist/stall-reporter.js +82 -0
- package/dist/stall-reporter.js.map +1 -0
- package/dist/tmux-control.d.ts +2 -2
- package/dist/tmux-control.js +4 -2
- package/dist/tmux-control.js.map +1 -1
- package/dist/tmux-exec-helper.d.ts +6 -3
- package/dist/tmux-exec-helper.js +115 -53
- package/dist/tmux-exec-helper.js.map +1 -1
- package/dist/tool-permissions.js +2 -1
- package/dist/tool-permissions.js.map +1 -1
- package/dist/tunnel/cloudflared-install.d.ts +4 -0
- package/dist/tunnel/cloudflared-install.js +20 -1
- package/dist/tunnel/cloudflared-install.js.map +1 -1
- package/dist/tunnel/cloudflared.d.ts +8 -1
- package/dist/tunnel/cloudflared.js +34 -6
- package/dist/tunnel/cloudflared.js.map +1 -1
- package/dist/tunnel/lease.d.ts +3 -3
- package/dist/tunnel/lease.js +23 -19
- package/dist/tunnel/lease.js.map +1 -1
- package/dist/tunnel/manager.js +6 -7
- package/dist/tunnel/manager.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/ui/agent-proposals.js +2 -2
- package/dist/ui/agent-runtime-settings.js +67 -0
- package/dist/ui/agent-runtime.js +20 -2
- package/dist/ui/backend-signin.js +36 -21
- package/dist/ui/general-location.js +71 -0
- package/dist/ui/native-instance-settings.js +5 -8
- package/dist/ui/native-pane-recovery.js +1 -1
- package/dist/ui/panel-chat.js +5 -2
- package/dist/ui/panel-fleet.js +4 -2
- package/dist/ui/panel-needs.js +2 -0
- package/dist/ui/panel-runtimes.js +136 -33
- package/dist/ui/panel-settings.js +227 -138
- package/dist/ui/panel-windows-cli.js +77 -41
- package/dist/ui/settings-agent-filters.js +94 -0
- package/dist/ui/settings-appearance.js +122 -23
- package/dist/ui/settings-dialogs.js +13 -7
- package/dist/ui/settings-guests.js +25 -11
- package/dist/ui/settings-layout.js +245 -0
- package/dist/ui/settings-model.js +10 -1
- package/dist/ui/settings-outside.js +176 -0
- package/dist/ui/settings-registry.js +6 -3
- package/dist/ui/settings-shortcuts.js +65 -0
- package/dist/ui/settings-strings.js +95 -0
- package/dist/ui/settings-web-authority.js +14 -11
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app-shell.js +17 -7
- package/dist/ui/shared/app.css +1038 -13
- package/dist/ui/shared/instance-nav.js +16 -5
- package/dist/ui/shared/machine-name.js +13 -0
- package/dist/ui/shared/panel-view.js +266 -17
- package/dist/ui/shared/qrcode.module.js +2237 -0
- package/dist/ui/shared/settings-width.js +31 -0
- package/dist/ui/shared/signin.js +39 -5
- package/dist/ui/shared/tokens.css +1 -0
- package/dist/ui/shared/ui-dialog.js +2 -2
- package/dist/ui/shared/ui-menu.js +3 -3
- package/dist/ui/shared/vendor/qrcode-generator.LICENSE +27 -0
- package/dist/ui/shared/vendor/vendor.json +19 -2
- package/dist/ui/shared/view-strings.js +28 -0
- package/dist/ui/windows-cli-catalog.js +41 -12
- package/dist/unattended-install.d.ts +1 -1
- package/dist/unattended-install.js +19 -5
- package/dist/unattended-install.js.map +1 -1
- package/dist/update-check.d.ts +2 -8
- package/dist/update-check.js +2 -5
- package/dist/update-check.js.map +1 -1
- package/dist/view-api.d.ts +15 -0
- package/dist/view-api.js +94 -33
- package/dist/view-api.js.map +1 -1
- package/dist/web-api.d.ts +13 -0
- package/dist/web-api.js +80 -0
- package/dist/web-api.js.map +1 -1
- package/dist/web-login.d.ts +4 -3
- package/dist/web-login.js +23 -14
- package/dist/web-login.js.map +1 -1
- package/dist/web-only-fleet.d.ts +20 -0
- package/dist/web-only-fleet.js +21 -0
- package/dist/web-only-fleet.js.map +1 -1
- package/dist/web-remote-access.d.ts +152 -0
- package/dist/web-remote-access.js +368 -0
- package/dist/web-remote-access.js.map +1 -0
- package/dist/web-session.d.ts +12 -0
- package/dist/web-session.js +22 -8
- package/dist/web-session.js.map +1 -1
- package/dist/windows-agents.d.ts +15 -1
- package/dist/windows-agents.js +37 -10
- package/dist/windows-agents.js.map +1 -1
- package/dist/windows-cli-api.js +2 -1
- package/dist/windows-cli-api.js.map +1 -1
- package/dist/windows-cli-worker.d.ts +1 -0
- package/dist/windows-cli-worker.js +2 -2
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +1 -0
- package/dist/windows-cli.js +7 -2
- package/dist/windows-cli.js.map +1 -1
- package/launcher/agend-install.cjs +16 -2
- package/package.json +1 -1
|
@@ -12,16 +12,19 @@ import { GUESTS_SETTINGS } from "./settings-guests.js";
|
|
|
12
12
|
const L = (en, zh) => ({ en, "zh-TW": zh });
|
|
13
13
|
/** [id, section, target, labelKey | label, config key, words en, words zh] */
|
|
14
14
|
const ROWS = [
|
|
15
|
+
["general.location", "agent-defaults", "#general-location", null, null, ["general", "windows", "paired PC", "host", "location"], ["General", "Windows", "電腦", "主機", "執行位置"], L("Run General on", "General 執行位置")],
|
|
15
16
|
// You · Preferences
|
|
16
17
|
["profile.name", "preferences", "#profile-name", "settings.profileTitle", null, ["name", "display name", "who agents see", "profile"], ["名字", "名稱", "顯示名稱", "個人資料"]],
|
|
17
|
-
["prefs.theme", "
|
|
18
|
+
["prefs.theme", "look", "#pref-theme", "app.theme", null, ["theme", "dark", "light", "dark mode", "colour scheme"], ["主題", "深色", "淺色", "外觀"]],
|
|
18
19
|
["prefs.lang", "preferences", "#pref-lang", "app.language", null, ["language", "dashboard language", "english", "chinese", "locale"], ["語言", "介面語言", "中文", "英文"]],
|
|
19
20
|
["prefs.names", "preferences", "#pref-names", "app.names", null, ["names", "nickname", "real name", "instance name", "display"], ["名稱", "暱稱", "實名"]],
|
|
20
21
|
["prefs.previews", "preferences", "#pref-previews", "chat.previews", null, ["html preview", "preview", "iframe"], ["預覽", "HTML 預覽"]],
|
|
21
22
|
["prefs.tour", "preferences", "#tourBtn", "chat.tour", null, ["tour", "help", "walkthrough", "guide"], ["導覽", "說明", "教學"]],
|
|
22
|
-
["
|
|
23
|
-
["device.
|
|
23
|
+
["prefs.shortcuts", "preferences", "#keyboardShortcutsBtn", null, null, ["keyboard shortcuts", "hotkeys", "keys", "help", "ctrl", "command"], ["快捷鍵", "快速鍵", "鍵盤", "說明"], L("Keyboard shortcuts", "快捷鍵")],
|
|
24
|
+
["device.motion", "look", "#fx-follow-reduced-motion", "settings.themesFollowMotion", null, ["reduced motion", "animation", "effects", "accessibility"], ["減少動態", "動畫", "特效", "無障礙"]],
|
|
25
|
+
["device.css-off", "look", "#css-off-here", "settings.cssDeviceOff", null, ["custom css", "css off", "this device", "safe"], ["自訂 CSS", "關閉 CSS", "這個裝置"]],
|
|
24
26
|
// You · Look
|
|
27
|
+
["device.settings-width", "look", "#settings-content-width", null, null, ["settings width", "content width", "layout", "wide", "compact", "this device"], ["設定寬度", "內容寬度", "版型", "寬版", "窄版", "此裝置"], L("Settings content width", "設定頁內容寬度")],
|
|
25
28
|
["look.themes", "look", "#fx-show-themes", "settings.themesShow", "fx.show", ["agent themes", "themes", "effects", "widgets"], ["主題", "agent 的主題", "特效", "小工具"]],
|
|
26
29
|
["look.colours", "look", ".s-colors", "settings.colorTitle", "color.show", ["identity colour", "color", "colour", "turn off colours"], ["識別色", "顏色", "關閉顏色"]],
|
|
27
30
|
["look.cards", "look", ".s-card-size", "settings.cardSizeTitle", "card.size", ["identity card", "card size", "portrait", "banner"], ["身分卡", "卡片大小"]],
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Help for existing handlers only. Keyboard behavior stays with app-shell.js, panel-chat.js,
|
|
2
|
+
// chat-render.js (composerKey) and panel-settings.js; this module registers no keyboard listener.
|
|
3
|
+
import { html } from "/assets/app-html.js";
|
|
4
|
+
import { register, t } from "/assets/app-i18n.js";
|
|
5
|
+
import { isMacLike, showDialog } from "/assets/app-shell.js";
|
|
6
|
+
import { Dialog } from "/assets/ui-dialog.js";
|
|
7
|
+
import { Icon } from "/assets/ui-icons.js";
|
|
8
|
+
|
|
9
|
+
register("settingsShortcuts", {
|
|
10
|
+
en: {
|
|
11
|
+
title: "Keyboard shortcuts", button: "View shortcuts",
|
|
12
|
+
hint: "Find the existing shortcuts for search, chat and settings.",
|
|
13
|
+
intro: "Shortcuts work in the contexts below. Search availability depends on your account and the fleet's settings.",
|
|
14
|
+
globalTitle: "Search across the fleet", globalAction: "Open search",
|
|
15
|
+
globalScope: "Works in text fields too, on pages that offer search. Does not run while another modal dialog is open or while an input method is composing. Do not hold Alt or Shift.",
|
|
16
|
+
chatSearchTitle: "Search the current chat", chatSearchAction: "Search within this agent",
|
|
17
|
+
chatSearchScope: "On an agent's chat page, when search is available. Other pages keep the browser's Find command. The same dialog and input-method restrictions apply.",
|
|
18
|
+
composerTitle: "Chat input", send: "Send the message or run the typed command", newline: "Add a new line",
|
|
19
|
+
composerScope: "In the chat composer with a physical keyboard. Enter does not send during input-method composition. On a touch screen, Enter adds a line; use Send to send. Alt, Ctrl or Command with Enter also adds a line.",
|
|
20
|
+
settingsTitle: "Settings search", settingsAction: "Focus Search settings",
|
|
21
|
+
settingsScope: "Only on Settings pages, outside inputs, textareas, selects and editable content. Does not run during input-method composition or with Ctrl, Command or Alt held.",
|
|
22
|
+
closeHint: "Closes this help dialog and returns focus to View shortcuts.",
|
|
23
|
+
},
|
|
24
|
+
"zh-TW": {
|
|
25
|
+
title: "快捷鍵", button: "查看快捷鍵",
|
|
26
|
+
hint: "查看搜尋、聊天與設定目前支援的快捷鍵。",
|
|
27
|
+
intro: "快捷鍵依下列情境使用;搜尋是否提供,取決於你的帳號權限與 Fleet 設定。",
|
|
28
|
+
globalTitle: "全域搜尋", globalAction: "開啟搜尋",
|
|
29
|
+
globalScope: "提供搜尋的頁面中,輸入欄內也可使用。其他對話框開啟時或輸入法組字時不觸發;請勿同時按住 Alt 或 Shift。",
|
|
30
|
+
chatSearchTitle: "搜尋目前聊天", chatSearchAction: "搜尋目前 Agent 的對話",
|
|
31
|
+
chatSearchScope: "在提供搜尋功能的 Agent 聊天頁使用;其他頁面保留瀏覽器的尋找功能。對話框與輸入法的限制同上。",
|
|
32
|
+
composerTitle: "聊天輸入", send: "送出訊息或執行輸入的指令", newline: "新增一行",
|
|
33
|
+
composerScope: "適用於聊天輸入框與實體鍵盤;輸入法組字時,Enter 不會送出。觸控螢幕的 Enter 會換行,請按「送出」傳送。Alt、Ctrl 或 Command 加 Enter 也會換行。",
|
|
34
|
+
settingsTitle: "設定搜尋", settingsAction: "聚焦「搜尋設定」",
|
|
35
|
+
settingsScope: "僅限設定頁面,且焦點不在輸入欄、文字區、選單或可編輯內容內。輸入法組字時,或同時按住 Ctrl、Command、Alt 時不觸發。",
|
|
36
|
+
closeHint: "關閉此說明,焦點會回到「查看快捷鍵」。",
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export const shortcutsText = (key) => t(`settingsShortcuts.${key}`);
|
|
41
|
+
|
|
42
|
+
/** The Settings preference row is intentionally independent of saved preferences. */
|
|
43
|
+
export function ShortcutsHelpRow() {
|
|
44
|
+
return html`<div class="s-pref-help-row s-pref-shortcuts-row"><div><strong>${shortcutsText("title")}</strong><p class="sub">${shortcutsText("hint")}</p></div>
|
|
45
|
+
<button type="button" id="keyboardShortcutsBtn" class="btn" aria-haspopup="dialog" onClick=${openShortcuts}><${Icon} name="info" size=${16} />${shortcutsText("button")}</button></div>`;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function openShortcuts() { showDialog(ShortcutsDialog); }
|
|
49
|
+
|
|
50
|
+
/** Reuse the shared modal's native Escape, backdrop and focus-restoration behavior. */
|
|
51
|
+
export function ShortcutsDialog({ onClose }) {
|
|
52
|
+
const modifier = isMacLike() ? "⌘" : "Ctrl";
|
|
53
|
+
const keys = (parts) => html`<span class="settings-shortcut-keys">${parts.map((key, i) => html`${i ? html`<span aria-hidden="true">+</span>` : null}<kbd key=${key}>${key}</kbd>`)}</span>`;
|
|
54
|
+
const row = (parts, action) => html`<div class="settings-shortcut-row">${keys(parts)}<span>${shortcutsText(action)}</span></div>`;
|
|
55
|
+
return html`<${Dialog} title=${shortcutsText("title")} onClose=${onClose} wide=${true}
|
|
56
|
+
actions=${html`<button type="button" class="btn btn-primary" onClick=${onClose}>${t("app.close")}</button>`}>
|
|
57
|
+
<div class="settings-shortcuts"><p class="settings-shortcuts-intro">${shortcutsText("intro")}</p>
|
|
58
|
+
<section><h3>${shortcutsText("globalTitle")}</h3>${row([modifier, "K"], "globalAction")}<p>${shortcutsText("globalScope")}</p></section>
|
|
59
|
+
<section><h3>${shortcutsText("chatSearchTitle")}</h3>${row([modifier, "F"], "chatSearchAction")}<p>${shortcutsText("chatSearchScope")}</p></section>
|
|
60
|
+
<section><h3>${shortcutsText("composerTitle")}</h3>${row(["Enter"], "send")}${row(["Shift", "Enter"], "newline")}<p>${shortcutsText("composerScope")}</p></section>
|
|
61
|
+
<section><h3>${shortcutsText("settingsTitle")}</h3>${row(["/"], "settingsAction")}<p>${shortcutsText("settingsScope")}</p></section>
|
|
62
|
+
<p class="settings-shortcuts-close"><kbd>Escape</kbd> ${shortcutsText("closeHint")}</p>
|
|
63
|
+
</div>
|
|
64
|
+
</${Dialog}>`;
|
|
65
|
+
}
|
|
@@ -63,6 +63,7 @@ register("settings", {
|
|
|
63
63
|
systemPrompt: "System prompt",
|
|
64
64
|
tags: "Tags",
|
|
65
65
|
generalTopicField: "General topic (fleet dispatcher)",
|
|
66
|
+
oneGeneral: "{0} is already the General. Untick it first.",
|
|
66
67
|
runtimeResources: "Runtime & Resources",
|
|
67
68
|
autoPause: "Auto-pause after",
|
|
68
69
|
minutes: "minutes",
|
|
@@ -753,6 +754,7 @@ register("settings", {
|
|
|
753
754
|
systemPrompt: "System prompt",
|
|
754
755
|
tags: "標籤",
|
|
755
756
|
generalTopicField: "General topic(fleet 分派器)",
|
|
757
|
+
oneGeneral: "{0} 已經是 General,請先取消勾選它。",
|
|
756
758
|
runtimeResources: "執行環境與資源",
|
|
757
759
|
autoPause: "閒置後自動暫停",
|
|
758
760
|
minutes: "分鐘",
|
|
@@ -1331,3 +1333,96 @@ register("settings", {
|
|
|
1331
1333
|
help6: "存取、密鑰或連線的變更,要等 fleet 管理員在聊天中確認後才會套用。",
|
|
1332
1334
|
},
|
|
1333
1335
|
});
|
|
1336
|
+
|
|
1337
|
+
// Settings UX presentation labels.
|
|
1338
|
+
register("settings", {
|
|
1339
|
+
"en": {
|
|
1340
|
+
"prefsProfileGroup": "Personal details",
|
|
1341
|
+
"prefsContentGroup": "Language and content",
|
|
1342
|
+
"prefsAccountScope": "Your account",
|
|
1343
|
+
"prefsHelpGroup": "Help and guidance",
|
|
1344
|
+
"prefsTourHint": "Walk through the controls in an Agent conversation.",
|
|
1345
|
+
"prefsReplayTour": "Replay tour",
|
|
1346
|
+
"prefsLookHint": "Theme, appearance and effects are in Look",
|
|
1347
|
+
"prefsNameImmediate": "Save name applies this change immediately, separately from the other preferences.",
|
|
1348
|
+
"prefsSaveName": "Save name",
|
|
1349
|
+
"lookDisplayGroup": "Display and layout",
|
|
1350
|
+
"lookThemeHint": "Choose the theme used on your signed-in devices.",
|
|
1351
|
+
"lookIdentityGroup": "Agent identity",
|
|
1352
|
+
"lookMotionGroup": "Themes and motion",
|
|
1353
|
+
"lookPreview": "Preview",
|
|
1354
|
+
"lookPreviewHint": "A sample of your current colours and default card size."
|
|
1355
|
+
},
|
|
1356
|
+
"zh-TW": {
|
|
1357
|
+
"prefsProfileGroup": "個人資料",
|
|
1358
|
+
"prefsContentGroup": "語言與內容",
|
|
1359
|
+
"prefsAccountScope": "你的帳號",
|
|
1360
|
+
"prefsHelpGroup": "使用說明",
|
|
1361
|
+
"prefsTourHint": "重新了解 Agent 對話中的常用操作。",
|
|
1362
|
+
"prefsReplayTour": "重新播放導覽",
|
|
1363
|
+
"prefsLookHint": "主題、外觀與動態效果請前往「外觀」",
|
|
1364
|
+
"prefsNameImmediate": "「儲存名字」會立即套用,與其他偏好的儲存分開。",
|
|
1365
|
+
"prefsSaveName": "儲存名字",
|
|
1366
|
+
"lookDisplayGroup": "顯示與版面",
|
|
1367
|
+
"lookThemeHint": "選擇你登入的裝置所使用的主題。",
|
|
1368
|
+
"lookIdentityGroup": "Agent 識別",
|
|
1369
|
+
"lookMotionGroup": "主題與動態效果",
|
|
1370
|
+
"lookPreview": "預覽",
|
|
1371
|
+
"lookPreviewHint": "目前識別色與預設身分卡大小的示意。"
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
);
|
|
1375
|
+
|
|
1376
|
+
// Settings UX presentation labels.
|
|
1377
|
+
register("settings", {
|
|
1378
|
+
"en": {
|
|
1379
|
+
"uiAgentColumnName": "Name",
|
|
1380
|
+
"uiAgentColumnCli": "CLI & model",
|
|
1381
|
+
"uiListColumnState": "Status",
|
|
1382
|
+
"uiListColumnActions": "Actions",
|
|
1383
|
+
"uiRuntimeWindowsLocal": "Local Windows",
|
|
1384
|
+
"uiRuntimeWindowsRemote": "Windows runtime",
|
|
1385
|
+
"uiConnectionColumnService": "Service & connection",
|
|
1386
|
+
"uiConnectionColumnInfo": "Connection details",
|
|
1387
|
+
"uiClassicColumnRoom": "Room",
|
|
1388
|
+
"uiProviderKeyActionHint": "Verify and apply each key separately. These actions do not wait for the page Save button.",
|
|
1389
|
+
"uiDefaultsModelsTitle": "Models & language",
|
|
1390
|
+
"uiDefaultsWorkTitle": "Work behavior",
|
|
1391
|
+
"uiDefaultsCollaborationTitle": "Collaboration & replies",
|
|
1392
|
+
"uiDefaultsCapabilitiesTitle": "Agent capabilities & permissions",
|
|
1393
|
+
"uiDefaultsWorkspaceTitle": "Workspace rules",
|
|
1394
|
+
"uiDefaultsAdvancedTitle": "Advanced execution policies"
|
|
1395
|
+
},
|
|
1396
|
+
"zh-TW": {
|
|
1397
|
+
"uiAgentColumnName": "名稱",
|
|
1398
|
+
"uiAgentColumnCli": "CLI 與模型",
|
|
1399
|
+
"uiListColumnState": "狀態",
|
|
1400
|
+
"uiListColumnActions": "操作",
|
|
1401
|
+
"uiRuntimeWindowsLocal": "Windows 本機",
|
|
1402
|
+
"uiRuntimeWindowsRemote": "Windows Runtime",
|
|
1403
|
+
"uiConnectionColumnService": "服務與連線",
|
|
1404
|
+
"uiConnectionColumnInfo": "連線資訊",
|
|
1405
|
+
"uiClassicColumnRoom": "房間",
|
|
1406
|
+
"uiProviderKeyActionHint": "每組金鑰會分別驗證並套用,不需等待頁面底部的儲存。",
|
|
1407
|
+
"uiDefaultsModelsTitle": "模型與語言",
|
|
1408
|
+
"uiDefaultsWorkTitle": "工作行為",
|
|
1409
|
+
"uiDefaultsCollaborationTitle": "協作與回覆",
|
|
1410
|
+
"uiDefaultsCapabilitiesTitle": "Agent 能力與權限",
|
|
1411
|
+
"uiDefaultsWorkspaceTitle": "工作區規則",
|
|
1412
|
+
"uiDefaultsAdvancedTitle": "進階執行策略"
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
);
|
|
1416
|
+
|
|
1417
|
+
register("settings", {
|
|
1418
|
+
"en": {
|
|
1419
|
+
"lookBrandGroup": "Brand",
|
|
1420
|
+
"lookIconMore": "Icon update help",
|
|
1421
|
+
"prefsNameImmediate": "Name changes save immediately."
|
|
1422
|
+
},
|
|
1423
|
+
"zh-TW": {
|
|
1424
|
+
"lookBrandGroup": "品牌",
|
|
1425
|
+
"lookIconMore": "圖示更新說明",
|
|
1426
|
+
"prefsNameImmediate": "名字會立即儲存。"
|
|
1427
|
+
}
|
|
1428
|
+
});
|
|
@@ -14,6 +14,7 @@ import { DEFAULT_SCHEMA, impactOf, sameValue } from "./settings-model.js";
|
|
|
14
14
|
import { editsOf, keepDraft, syncStage } from "./settings-draft.js";
|
|
15
15
|
import { resetWebAuthorization } from "/assets/web-authorize.js";
|
|
16
16
|
import "./settings-strings.js";
|
|
17
|
+
import { layoutText } from "./settings-layout.js";
|
|
17
18
|
|
|
18
19
|
const tn = (k, ...v) => t(`settings.${k}`, ...v);
|
|
19
20
|
|
|
@@ -64,7 +65,7 @@ export function WebAuthorityCard({ ctx, staged, disabled = false }) {
|
|
|
64
65
|
syncStage(ctx, "verified_authority", body ? { label: tn("vaTitle"), count: Object.keys(body).length,
|
|
65
66
|
impact: impactOf(ctx.schema || DEFAULT_SCHEMA, "web.verified_authority"), request: { method: "PUT", url: "/api/settings/fleet/web", body: { verified_authority: body } } } : null);
|
|
66
67
|
}, [f, original, overview]);
|
|
67
|
-
const card = (body) => html`<section class="card s-web-authority"><h3>${tn("vaTitle")}</h3><p class="note">${tn("vaHint")}</p>${
|
|
68
|
+
const card = (body) => html`<section class="card s-web-authority"><h3>${tn("vaTitle")}</h3><p class="note s-authority-brief">${layoutText("revAuthorityBrief")}</p>${body}<details class="s-setting-details"><summary>${layoutText("revAuthorityDetails")}</summary><p class="note">${tn("vaHint")}</p><p class="note">${tn("vaEnabledHint")}</p><p class="note">${tn("vaLoopbackOnlyHint")}</p></details></section>`;
|
|
68
69
|
if (failed) return card(html`<p class="note" role="status">${tn("vaLoadFailed")} <button type="button" class="btn btn-sm" onClick=${load}>${t("app.retry")}</button></p>`);
|
|
69
70
|
if (!overview || !f) return card(html`<p class="note">${t("app.loading")}</p>`);
|
|
70
71
|
|
|
@@ -86,26 +87,28 @@ export function WebAuthorityCard({ ctx, staged, disabled = false }) {
|
|
|
86
87
|
|
|
87
88
|
return card(html`<fieldset class="s-va-fields" disabled=${disabled}>
|
|
88
89
|
${stuckOff ? html`<p class="note s-va-warn" role="status" id="vaStuckOff">${tn("vaStuckOff")}</p>` : null}
|
|
89
|
-
<label class=${fc("check", "enabled")}><input id="vaEnabled" type="checkbox" checked=${f.enabled} onChange=${(e) => set({ enabled: e.target.checked })} /><span>${
|
|
90
|
-
<p class="note">${
|
|
91
|
-
<label class=${fc("check", "loopbackOnly")}><input id="vaLoopbackOnly" type="checkbox" checked=${f.loopbackOnly} onChange=${(e) => set({ loopbackOnly: e.target.checked })} /><span>${
|
|
92
|
-
<p class="note">${
|
|
90
|
+
<label class=${fc("check", "enabled")}><input class="s-ui-toggle" id="vaEnabled" type="checkbox" checked=${f.enabled} onChange=${(e) => set({ enabled: e.target.checked })} /><span>${layoutText("revAuthorityEnabled")}</span></label>
|
|
91
|
+
<p class="note">${layoutText("revAuthorityEnabledHint")}</p>
|
|
92
|
+
<label class=${fc("check", "loopbackOnly")}><input class="s-ui-toggle" id="vaLoopbackOnly" type="checkbox" checked=${f.loopbackOnly} onChange=${(e) => set({ loopbackOnly: e.target.checked })} /><span>${layoutText("revAuthorityLocal")}</span></label>
|
|
93
|
+
<p class="note">${layoutText("revAuthorityLocalHint")}</p>
|
|
93
94
|
${warnHosts ? html`<p class="note s-va-warn" role="status" id="vaLanWarning">${tn("vaLanWarning", overview.lanHosts.join(", "))}</p>` : null}
|
|
94
|
-
${overview.namedHost || original.namedLink ? html`<label class=${fc("check", "namedLink")}><input id="vaNamedLink" type="checkbox" checked=${f.namedLink} onChange=${(e) => set({ namedLink: e.target.checked })} /><span>${tn("vaNamedLink", overview.namedHost || "—")}</span></label>
|
|
95
|
-
<p class="note">${tn("vaNamedLinkHint")}</p>` : null}
|
|
96
|
-
${/* §0.3: always shown — any fleet can open the temporary public link with /web. */ ""}
|
|
97
|
-
<label class=${fc("check", "quickLink")}><input id="vaQuickLink" type="checkbox" checked=${f.quickLink} onChange=${(e) => set({ quickLink: e.target.checked })} /><span>${tn("vaQuickLink")}</span></label>
|
|
98
|
-
<p class="note">${tn("vaQuickLinkHint")}</p>
|
|
99
95
|
<div class=${fc("field", "hours")}><label for="vaHours">${tn("vaHours", overview.hours.min, overview.hours.max)}</label>
|
|
100
96
|
<input id="vaHours" type="number" min=${overview.hours.min} max=${overview.hours.max} step="any"
|
|
101
97
|
class=${hoursError ? "invalid" : ""} value=${hoursText} onInput=${(e) => set({ hours: onHoursText(e.target.value) })} />
|
|
102
98
|
<${Feedback} error=${hoursError} />
|
|
103
99
|
${hoursText.trim() === "" ? html`<${InEffect} text=${tn("hoursValue", overview.hours.default)} />` : null}</div>
|
|
100
|
+
<p class="note s-authority-public-warning">${layoutText("revAuthorityPublicWarning")}</p>
|
|
101
|
+
<details class="s-authority-links"><summary>${layoutText("revAuthorityLinks")}</summary><div> ${overview.namedHost || original.namedLink ? html`<label class=${fc("check", "namedLink")}><input class="s-ui-toggle" id="vaNamedLink" type="checkbox" checked=${f.namedLink} onChange=${(e) => set({ namedLink: e.target.checked })} /><span>${tn("vaNamedLink", overview.namedHost || "—")}</span></label>
|
|
102
|
+
<p class="note">${tn("vaNamedLinkHint")}</p>` : null}
|
|
103
|
+
${/* §0.3: always shown — any fleet can open the temporary public link with /web. */ ""}
|
|
104
|
+
<label class=${fc("check", "quickLink")}><input class="s-ui-toggle" id="vaQuickLink" type="checkbox" checked=${f.quickLink} onChange=${(e) => set({ quickLink: e.target.checked })} /><span>${tn("vaQuickLink")}</span></label>
|
|
105
|
+
<p class="note">${tn("vaQuickLinkHint")}</p>
|
|
106
|
+
</div></details>
|
|
104
107
|
<h4>${tn("vaSessionsTitle")}</h4>
|
|
105
108
|
${overview.authorized.length
|
|
106
109
|
? html`<ul class="s-va-sessions" id="vaSessions">${overview.authorized.map((a) => html`<li key=${a.handle} data-handle=${a.handle}>
|
|
107
110
|
<strong>${a.label}</strong> <span class="note">${a.account}</span>${a.named ? html` <span class="note s-va-named">${tn("vaSessionNamed")}</span>` : null}${a.quick ? html` <span class="note s-va-named s-va-quick">${tn("vaSessionQuick")}</span>` : null}<br /><span class="note">${tn("vaSessionUntil", when(a.authorizedAt), when(a.until))}</span></li>`)}</ul>`
|
|
108
111
|
: html`<p class="note" id="vaSessionsNone">${tn("vaSessionsNone")}</p>`}
|
|
109
112
|
</fieldset>
|
|
110
|
-
<div class="save-row"><button type="button" class="btn btn-danger" id="vaRevoke" disabled=${disabled} onClick=${revoke}>${tn("vaRevoke")}</button></div>`);
|
|
113
|
+
<div class="save-row s-authority-revoke"><button type="button" class="btn btn-danger" id="vaRevoke" disabled=${disabled} onClick=${revoke}>${tn("vaRevoke")}</button></div>`);
|
|
111
114
|
}
|
|
@@ -111,7 +111,7 @@ register("app", {
|
|
|
111
111
|
confirmTitle: "Please confirm", confirmOk: "Continue", cancel: "Cancel",
|
|
112
112
|
sidePanelLeave: "Leave {0} without saving? Your changes there will be lost.", sidePanelDiscard: "Discard changes",
|
|
113
113
|
// The server's own wording (src/locale.ts needs.reason.*), so the web says what Discord says.
|
|
114
|
-
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: "Sign-in needed", needs_reason_dialog: "Waiting at a dialog", needs_reason_terminal_input: "May be waiting for input", needs_reason_auth_paused: "Paused: sign-in needed", needs_reason_backend_signin: "Backend sign-in needed", needs_reason_config_invalid: "Configuration file needs attention", 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_native_pane_hold: "Windows agent needs attention", needs_reason_crashed: "Crashed", 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_task_review: "Waiting for your confirmation", needs_reason_task_blocked: "Blocked: asks you",
|
|
114
|
+
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: "Sign-in needed", needs_reason_dialog: "Waiting at a dialog", needs_reason_terminal_input: "May be waiting for input", needs_reason_auth_paused: "Paused: sign-in needed", needs_reason_backend_signin: "Backend sign-in needed", needs_reason_config_invalid: "Configuration file needs attention", 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_crashed: "Crashed", 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_task_review: "Waiting for your confirmation", needs_reason_task_blocked: "Blocked: asks you",
|
|
115
115
|
},
|
|
116
116
|
"zh-TW": {
|
|
117
117
|
brand: "AgEnD", fleet: "Fleet", fleetOverview: "Fleet 概覽", view: "檢視", settings: "設定", instances: "Instances", newInstance: "新增 instance", newAgent: "新增 Agent",
|
|
@@ -156,6 +156,6 @@ register("app", {
|
|
|
156
156
|
search: "搜尋", searchTitle: "搜尋聊天、agent 之間的訊息與任務({0})",
|
|
157
157
|
confirmTitle: "請確認", confirmOk: "繼續", cancel: "取消",
|
|
158
158
|
sidePanelLeave: "不儲存就離開「{0}」?你在那裡的修改會遺失。", sidePanelDiscard: "捨棄修改",
|
|
159
|
-
needs_reason_hang: "沒有回應", needs_reason_exited: "已結束", needs_reason_assist: "在終端機上等待", needs_reason_question: "正在問你問題", needs_reason_permission: "需要權限", needs_reason_dangerous_command: "危險指令待確認", needs_reason_login: "需要登入", needs_reason_dialog: "停在對話框", needs_reason_terminal_input: "可能在等輸入", needs_reason_auth_paused: "已暫停:需要登入", needs_reason_backend_signin: "後端需要登入", needs_reason_config_invalid: "設定檔需要處理", 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_native_pane_hold: "Windows 代理需要處理", needs_reason_crashed: "已崩潰", needs_reason_usage_limit: "用量已達上限 · 恢復時間未知", needs_reason_delivery_uncertain: "無法確認是否送達", needs_reason_delivery_failed: "傳送失敗", needs_reason_task_review: "等你確認", needs_reason_task_blocked: "卡住,在問你",
|
|
159
|
+
needs_reason_hang: "沒有回應", needs_reason_exited: "已結束", needs_reason_assist: "在終端機上等待", needs_reason_question: "正在問你問題", needs_reason_permission: "需要權限", needs_reason_dangerous_command: "危險指令待確認", needs_reason_login: "需要登入", needs_reason_dialog: "停在對話框", needs_reason_terminal_input: "可能在等輸入", needs_reason_auth_paused: "已暫停:需要登入", needs_reason_backend_signin: "後端需要登入", needs_reason_config_invalid: "設定檔需要處理", 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 代理需要處理", needs_reason_crashed: "已崩潰", needs_reason_usage_limit: "用量已達上限 · 恢復時間未知", needs_reason_delivery_uncertain: "無法確認是否送達", needs_reason_delivery_failed: "傳送失敗", needs_reason_task_review: "等你確認", needs_reason_task_blocked: "卡住,在問你",
|
|
160
160
|
},
|
|
161
161
|
});
|
|
@@ -21,6 +21,7 @@ import { useWebAuthorization } from "./web-authorize.js";
|
|
|
21
21
|
import { RightRail, sidePanelStore } from "./side-panel.js";
|
|
22
22
|
import { OwnerCssKeepBar } from "./owner-css.js";
|
|
23
23
|
import { AgentWidget, fleetBinds, sidebarWidget, sidebarWidgetStore } from "./agent-widget.js";
|
|
24
|
+
import { initSettingsContentWidth } from "./settings-width.js";
|
|
24
25
|
|
|
25
26
|
/** Shell state shared with panels: the phone drawer, the collapsed sidebar, extensions a panel module adds. */
|
|
26
27
|
export const shellStore = createStore({ drawer: false, collapsed: readCollapsed(), keyboard: false, dialog: null, side: null, banner: null });
|
|
@@ -127,6 +128,13 @@ export function clampSidebarWidth(w, vw) {
|
|
|
127
128
|
return Math.round(Math.min(max, Math.max(SIDEBAR_W.min, w)));
|
|
128
129
|
}
|
|
129
130
|
function storedSidebarWidth() { try { const v = Number(localStorage.getItem(SIDEBAR_W_KEY)); return Number.isFinite(v) && v > 0 ? v : null; } catch { return null; } }
|
|
131
|
+
|
|
132
|
+
// #2978 merge (stale tabs, quality rule 3): Settings' content width lives in its own module — a tab opened before an
|
|
133
|
+
// upgrade keeps this shell module, and a lazily loaded Settings panel that imported these names from here would fail to
|
|
134
|
+
// load at all. Re-exported, so the shell and its callers are unchanged.
|
|
135
|
+
export { SETTINGS_CONTENT_WIDTH_KEY, SETTINGS_CONTENT_WIDTHS, DEFAULT_SETTINGS_CONTENT_WIDTH, settingsContentWidthStore,
|
|
136
|
+
initSettingsContentWidth, setSettingsContentWidth } from "./settings-width.js";
|
|
137
|
+
|
|
130
138
|
/** { width: px | null } — null: the default width (tokens.css). */
|
|
131
139
|
export const sidebarWidthStore = createStore({ width: null });
|
|
132
140
|
/** Set the width (clamped to this viewport); `save`: this device keeps it. null: back to the default, nothing kept. */
|
|
@@ -422,23 +430,24 @@ function ViewOnlyNav({ route }) {
|
|
|
422
430
|
* This browser's theme and language (#1604: Settings → This device; for the anonymous View reader, the footer's
|
|
423
431
|
* popover). The same stores as ever: AgendTheme (theme.js) and setLang (app-i18n.js) — only where they are shown moved.
|
|
424
432
|
*/
|
|
425
|
-
export function DevicePrefs({ labels = false } = {}) {
|
|
433
|
+
export function DevicePrefs({ labels = false, fields = ["theme", "language", "names"] } = {}) {
|
|
426
434
|
const [theme, setTheme] = useState(typeof AgendTheme !== "undefined" ? AgendTheme.get() : "system");
|
|
427
435
|
const [l, setL] = useState(lang());
|
|
428
436
|
const names = useStore(namesStore); // #1722
|
|
429
437
|
// #1665: what is in force, as it changes — another device's choice arriving while this is open is shown at once.
|
|
430
438
|
useEffect(() => (typeof AgendTheme !== "undefined" && typeof AgendTheme.onChange === "function" ? AgendTheme.onChange(setTheme) : undefined), []);
|
|
431
439
|
useEffect(() => onLang(setL), []);
|
|
440
|
+
const shows = (field) => fields.includes(field);
|
|
432
441
|
return html`<div class=${`prefs${labels ? " labelled" : ""}`}>
|
|
433
|
-
|
|
442
|
+
${shows("theme") ? html`<label class="pref"><${Icon} name="sun" size=${16} /><span class=${labels ? "pref-label" : "sr-only"}>${t("app.theme")}</span>
|
|
434
443
|
<select id=${labels ? "pref-theme" : undefined} value=${theme} aria-label=${t("app.theme")} onChange=${(e) => { setTheme(e.target.value); if (typeof AgendTheme !== "undefined") AgendTheme.set(e.target.value); savePref("theme", e.target.value); }}>
|
|
435
|
-
<option value="system">${t("app.themeSystem")}</option><option value="light">${t("app.themeLight")}</option><option value="dark">${t("app.themeDark")}</option></select></label
|
|
436
|
-
|
|
444
|
+
<option value="system">${t("app.themeSystem")}</option><option value="light">${t("app.themeLight")}</option><option value="dark">${t("app.themeDark")}</option></select></label>` : null}
|
|
445
|
+
${shows("language") ? html`<label class="pref"><${Icon} name="globe" size=${16} /><span class=${labels ? "pref-label" : "sr-only"}>${t("app.language")}</span>
|
|
437
446
|
<select id=${labels ? "pref-lang" : undefined} value=${l} aria-label=${t("app.language")} onChange=${(e) => { setL(e.target.value); setLang(e.target.value); savePref("lang", e.target.value); }}>
|
|
438
|
-
<option value="en">English</option><option value="zh-TW">中文</option></select></label
|
|
439
|
-
|
|
447
|
+
<option value="en">English</option><option value="zh-TW">中文</option></select></label>` : null}
|
|
448
|
+
${shows("names") ? html`<label class="pref"><${Icon} name="user" size=${16} /><span class=${labels ? "pref-label" : "sr-only"}>${t("app.names")}</span>
|
|
440
449
|
<select id=${labels ? "pref-names" : undefined} value=${names.primary} aria-label=${t("app.names")} onChange=${(e) => setNamesPrimary(e.target.value)}>
|
|
441
|
-
<option value="nickname">${t("app.namesNickname")}</option><option value="instance">${t("app.namesInstance")}</option></select></label
|
|
450
|
+
<option value="nickname">${t("app.namesNickname")}</option><option value="instance">${t("app.namesInstance")}</option></select></label>` : null}
|
|
442
451
|
</div>`;
|
|
443
452
|
}
|
|
444
453
|
|
|
@@ -769,6 +778,7 @@ export function Shell({ panels, onNewInstance, viewOnly = false }) {
|
|
|
769
778
|
const nav = useStore(navStore);
|
|
770
779
|
const shell = useStore(shellStore);
|
|
771
780
|
const root = useRef(null);
|
|
781
|
+
useLayoutEffect(() => { initSettingsContentWidth(); }, []);
|
|
772
782
|
usePageTheme(root, nav.route);
|
|
773
783
|
const [, relang] = useState(0);
|
|
774
784
|
// A language switch re-renders everything and gives the panel a new lease (its key includes the language).
|