@songsid/agend 2.3.5-beta.1 → 2.3.5-beta.3
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 +3 -3
- package/dist/agent-cli.js +5 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-whats-new.js +4 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/auth-api.d.ts +3 -1
- package/dist/auth-api.js +6 -2
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/claude-code.d.ts +3 -0
- package/dist/backend/claude-code.js +72 -13
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/cli-env-probe.js +6 -2
- package/dist/backend/cli-env-probe.js.map +1 -1
- package/dist/backend/codex.d.ts +5 -3
- package/dist/backend/codex.js +31 -13
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/kiro.js +1 -1
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/types.d.ts +9 -1
- package/dist/backend/types.js.map +1 -1
- package/dist/bundled-tmux-guard.d.ts +4 -0
- package/dist/bundled-tmux-guard.js +7 -0
- package/dist/bundled-tmux-guard.js.map +1 -1
- package/dist/cache-service.d.ts +6 -0
- package/dist/cache-service.js +105 -0
- package/dist/cache-service.js.map +1 -1
- package/dist/channel/access-manager.d.ts +1 -6
- package/dist/channel/access-manager.js +4 -94
- package/dist/channel/access-manager.js.map +1 -1
- package/dist/channel/adapters/discord.d.ts +0 -2
- package/dist/channel/adapters/discord.js +0 -8
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +0 -3
- package/dist/channel/adapters/telegram.js +1 -30
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/mcp-tools.js +4 -4
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/types.d.ts +0 -2
- package/dist/claude-model-minimum.d.ts +7 -0
- package/dist/claude-model-minimum.js +16 -0
- package/dist/claude-model-minimum.js.map +1 -0
- package/dist/cli.js +1 -19
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +2 -1
- package/dist/config-validator.js.map +1 -1
- package/dist/daemon.d.ts +46 -1
- package/dist/daemon.js +193 -29
- package/dist/daemon.js.map +1 -1
- package/dist/decision-list.d.ts +2 -0
- package/dist/decision-list.js +1 -1
- package/dist/decision-list.js.map +1 -1
- package/dist/fleet-manager.d.ts +95 -0
- package/dist/fleet-manager.js +491 -113
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-process-handlers.d.ts +1 -1
- package/dist/fleet-process-handlers.js +3 -2
- package/dist/fleet-process-handlers.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +28 -18
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +9 -1
- package/dist/general-knowledge/skills/delegation-playbook/SKILL.md +4 -1
- package/dist/general-knowledge/skills/fleet-config/SKILL.md +12 -0
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +1 -1
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +4 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +16 -11
- package/dist/general-knowledge/steering/core-rules.md +6 -4
- package/dist/instance-lifecycle.d.ts +4 -1
- package/dist/instance-lifecycle.js +20 -1
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.js +29 -6
- package/dist/instructions.js.map +1 -1
- package/dist/kiro-history-scan.d.ts +26 -0
- package/dist/kiro-history-scan.js +141 -0
- package/dist/kiro-history-scan.js.map +1 -0
- package/dist/kiro-history-worker.d.ts +1 -0
- package/dist/kiro-history-worker.js +9 -0
- package/dist/kiro-history-worker.js.map +1 -0
- package/dist/kiro-history.d.ts +20 -0
- package/dist/kiro-history.js +96 -0
- package/dist/kiro-history.js.map +1 -0
- package/dist/kiro-usage-run.d.ts +2 -0
- package/dist/kiro-usage-run.js +4 -1
- package/dist/kiro-usage-run.js.map +1 -1
- package/dist/locale.js +107 -97
- package/dist/locale.js.map +1 -1
- package/dist/login-flows.d.ts +4 -0
- package/dist/login-flows.js +8 -4
- package/dist/login-flows.js.map +1 -1
- package/dist/office-levels.d.ts +4 -3
- package/dist/office-levels.js +3 -3
- package/dist/office-levels.js.map +1 -1
- package/dist/outbound-handlers.js +33 -13
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +16 -0
- package/dist/outbound-schemas.js +8 -2
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/quickstart-api.js +2 -2
- package/dist/quickstart-api.js.map +1 -1
- package/dist/reply-buttons-controller.d.ts +5 -1
- package/dist/reply-buttons-controller.js +8 -4
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/reply-buttons.d.ts +6 -2
- package/dist/reply-buttons.js +7 -3
- package/dist/reply-buttons.js.map +1 -1
- package/dist/scheduler/db.d.ts +10 -0
- package/dist/scheduler/db.js +38 -11
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/types.d.ts +6 -1
- package/dist/setup-i18n.js +4 -4
- package/dist/setup-i18n.js.map +1 -1
- package/dist/structured-signin.js +3 -1
- package/dist/structured-signin.js.map +1 -1
- package/dist/subagent-records.d.ts +42 -0
- package/dist/subagent-records.js +159 -0
- package/dist/subagent-records.js.map +1 -0
- package/dist/subagent-service.d.ts +27 -0
- package/dist/subagent-service.js +199 -0
- package/dist/subagent-service.js.map +1 -0
- package/dist/team-membership.d.ts +7 -0
- package/dist/team-membership.js +10 -0
- package/dist/team-membership.js.map +1 -0
- package/dist/tips.js +4 -4
- package/dist/tips.js.map +1 -1
- package/dist/tmux-manager.d.ts +1 -1
- package/dist/tmux-manager.js +4 -1
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tool-permissions.d.ts +2 -3
- package/dist/tool-permissions.js +3 -3
- package/dist/tool-permissions.js.map +1 -1
- package/dist/topic-commands.js +1 -1
- package/dist/topic-commands.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.js.map +1 -1
- package/dist/ui/backend-signin.js +62 -62
- package/dist/ui/chat-commands.js +7 -0
- package/dist/ui/chat-store.js +9 -4
- package/dist/ui/chat-strings.js +25 -25
- package/dist/ui/fleet-cache.js +3 -3
- package/dist/ui/fleet-canvas.js +2 -2
- package/dist/ui/fleet-office-editor.js +1 -1
- package/dist/ui/fleet-office.js +1 -1
- package/dist/ui/fleet-org.js +2 -2
- package/dist/ui/fleet-task-card.js +1 -1
- package/dist/ui/fleet-task-common.js +7 -7
- package/dist/ui/model-picker.js +64 -0
- package/dist/ui/panel-chat.js +47 -16
- package/dist/ui/panel-fleet.js +8 -8
- package/dist/ui/panel-needs.js +3 -3
- package/dist/ui/panel-settings.js +16 -6
- package/dist/ui/settings-catalog.js +19 -4
- package/dist/ui/settings-dialogs.js +28 -9
- package/dist/ui/settings-guests.js +1 -1
- package/dist/ui/settings-quota-notice.js +8 -6
- package/dist/ui/settings-registry.js +3 -1
- package/dist/ui/settings-strings.js +36 -30
- package/dist/ui/settings-update.js +69 -0
- package/dist/ui/shared/app-i18n.js +12 -6
- package/dist/ui/shared/app-shell.js +10 -3
- package/dist/ui/shared/app-update.js +215 -0
- package/dist/ui/shared/app.css +48 -2
- package/dist/ui/shared/instance-nav.js +1 -1
- package/dist/ui/shared/model-picker.css +21 -0
- package/dist/ui/shared/setup-host-text.js +8 -5
- package/dist/ui/shared/signin.js +35 -17
- package/dist/ui/shared/subagent-row.css +15 -0
- package/dist/ui/shared/view-strings.js +17 -17
- package/dist/ui/shared/web-authorize.js +4 -4
- package/dist/ui/structured-signin.js +26 -26
- package/dist/ui/subagent-row.js +64 -0
- package/dist/ui/web-terminal/terminal.js +9 -9
- package/dist/update-dispatch.d.ts +32 -4
- package/dist/update-dispatch.js +146 -16
- package/dist/update-dispatch.js.map +1 -1
- package/dist/update-launch.d.ts +1 -1
- package/dist/update-launch.js +2 -2
- package/dist/update-launch.js.map +1 -1
- package/dist/update-marker.d.ts +2 -2
- package/dist/update-marker.js +4 -3
- package/dist/update-marker.js.map +1 -1
- package/dist/usage/providers.d.ts +1 -0
- package/dist/usage/providers.js +13 -9
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage-rollup.d.ts +3 -0
- package/dist/usage-rollup.js +2 -0
- package/dist/usage-rollup.js.map +1 -1
- package/dist/view-api.d.ts +2 -8
- package/dist/view-api.js +3 -9
- package/dist/view-api.js.map +1 -1
- package/dist/web-api.d.ts +14 -0
- package/dist/web-api.js +216 -2
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.js +2 -1
- package/dist/web-auth.js.map +1 -1
- package/dist/web-commands.d.ts +8 -0
- package/dist/web-commands.js +6 -0
- package/dist/web-commands.js.map +1 -1
- package/dist/web-update.d.ts +77 -0
- package/dist/web-update.js +102 -0
- package/dist/web-update.js.map +1 -0
- package/package.json +3 -2
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAkFA,MAAM,CAAC,MAAM,qBAAqB,GAAkC,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;AAC/F,MAAM,CAAC,MAAM,4BAA4B,GAAuB,WAAW,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CACvC,MAAkI,EAClI,IAAY;IAEZ,KAAK,MAAM,KAAK,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,CAAC,EAAE,CAAC;QACpG,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAK,qBAA2C,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO,KAA2B,CAAC;IACpI,CAAC;IACD,OAAO,4BAA4B,CAAC;AACtC,CAAC"}
|
|
@@ -15,103 +15,103 @@ import { mountStructuredSignIns } from "./structured-signin.js";
|
|
|
15
15
|
|
|
16
16
|
register("signin", {
|
|
17
17
|
en: {
|
|
18
|
-
title: "
|
|
19
|
-
checking: "Checking whether {0} is
|
|
20
|
-
confirmDevice: "AgEnD
|
|
21
|
-
confirmTerminal: "AgEnD
|
|
22
|
-
stillSignedIn: "It is still
|
|
23
|
-
logoutFirst: "It
|
|
24
|
-
publicNote: "Not at this machine? A temporary public link opens the terminal from anywhere, for this
|
|
25
|
-
go: "
|
|
18
|
+
title: "Connect your {0} account",
|
|
19
|
+
checking: "Checking whether your {0} account is connected…",
|
|
20
|
+
confirmDevice: "AgEnD starts {0}'s own authorization on this machine. You get a link and an authorization code here: finish on {0}'s official website.",
|
|
21
|
+
confirmTerminal: "AgEnD starts {0}'s own authorization on this machine and opens it as a terminal in your browser (only that authorization, no shell). You get the link and a one-time access code here.",
|
|
22
|
+
stillSignedIn: "It is still connected: connecting again replaces that connection.",
|
|
23
|
+
logoutFirst: "It disconnects first ({0}), then connects again.",
|
|
24
|
+
publicNote: "Not at this machine? A temporary public link opens the terminal from anywhere, for this authorization only.",
|
|
25
|
+
go: "Connect",
|
|
26
26
|
goPublic: "Use a temporary public link",
|
|
27
27
|
cancel: "Cancel",
|
|
28
28
|
close: "Close",
|
|
29
29
|
starting: "Starting…",
|
|
30
|
-
deviceStep: "
|
|
31
|
-
linkStep: "Open this page to
|
|
32
|
-
terminalStep: "Open the
|
|
33
|
-
openTerminal: "Open the
|
|
30
|
+
deviceStep: "Finish on the provider's official website: open this page and enter the authorization code:",
|
|
31
|
+
linkStep: "Open this page to authorize on the provider's official website; if it gives you an authorization code, paste it into the authorization terminal:",
|
|
32
|
+
terminalStep: "Open the authorization terminal and enter this access code there. It works once, for {0} minutes.",
|
|
33
|
+
openTerminal: "Open the authorization terminal",
|
|
34
34
|
accessCode: "Access code",
|
|
35
|
-
code: "
|
|
35
|
+
code: "Authorization code",
|
|
36
36
|
copy: "Copy",
|
|
37
37
|
copied: "Copied",
|
|
38
|
-
publicLink: "Public link: anyone with the link and the code could use it — keep both to yourself.",
|
|
38
|
+
publicLink: "Public link: anyone with the link and the access code could use it — keep both to yourself.",
|
|
39
39
|
loopback: "This terminal listens on the machine's own address only. Open it on that machine, or set web_terminal.bind for your network.",
|
|
40
|
-
waitingHint: "Waiting for the
|
|
41
|
-
signedIn: "{0} is
|
|
42
|
-
ended: "The
|
|
43
|
-
cancelSignIn: "Cancel
|
|
44
|
-
cancelled: "
|
|
45
|
-
running: "
|
|
40
|
+
waitingHint: "Waiting for the provider's authorization link…",
|
|
41
|
+
signedIn: "Your {0} account is connected.",
|
|
42
|
+
ended: "The authorization ended.",
|
|
43
|
+
cancelSignIn: "Cancel connecting",
|
|
44
|
+
cancelled: "Connecting cancelled.",
|
|
45
|
+
running: "Connecting your {0} account (started on {1}).",
|
|
46
46
|
open: "Open",
|
|
47
47
|
expired: "That took too long — start again.",
|
|
48
|
-
notHere: "
|
|
49
|
-
notAdmin: "Only a fleet admin signed in on this machine or its network can
|
|
50
|
-
notOffered: "A public link is not offered for this
|
|
48
|
+
notHere: "Connecting an AI account is not available over the public link. Open the dashboard on the machine running AgEnD, or use /login in your chat.",
|
|
49
|
+
notAdmin: "Only a fleet admin signed in on this machine or its network can connect an AI account.",
|
|
50
|
+
notOffered: "A public link is not offered for this authorization.",
|
|
51
51
|
failed: "That did not work.",
|
|
52
|
-
listTitle: "
|
|
53
|
-
browserRunning: "
|
|
52
|
+
listTitle: "AI accounts",
|
|
53
|
+
browserRunning: "Connecting your {0} account on this machine",
|
|
54
54
|
consoleFallback: "Use console fallback",
|
|
55
|
-
listHint: "
|
|
56
|
-
stUsable: "
|
|
57
|
-
stNotSignedIn: "not
|
|
55
|
+
listHint: "Connect AI accounts: each AI account connected on this machine, and each credential profile an agent uses. Connecting finishes on the provider's official website.",
|
|
56
|
+
stUsable: "connected",
|
|
57
|
+
stNotSignedIn: "not connected",
|
|
58
58
|
stNotInstalled: "not installed",
|
|
59
59
|
stTooOld: "too old",
|
|
60
60
|
stUnknown: "not checked",
|
|
61
|
-
signIn: "
|
|
62
|
-
signInAgain: "
|
|
63
|
-
onHost: "
|
|
61
|
+
signIn: "Connect account",
|
|
62
|
+
signInAgain: "Reconnect",
|
|
63
|
+
onHost: "Connect on the machine: {0}",
|
|
64
64
|
install: "Install on the machine: {0}",
|
|
65
65
|
update: "Update on the machine: {0}",
|
|
66
66
|
profile: "{0} · profile {1}",
|
|
67
67
|
},
|
|
68
68
|
"zh-TW": {
|
|
69
|
-
title: "
|
|
70
|
-
checking: "正在確認 {0}
|
|
71
|
-
confirmDevice: "AgEnD
|
|
72
|
-
confirmTerminal: "AgEnD
|
|
73
|
-
stillSignedIn: "
|
|
74
|
-
logoutFirst: "
|
|
75
|
-
publicNote: "
|
|
76
|
-
go: "
|
|
69
|
+
title: "連接 {0} 帳號",
|
|
70
|
+
checking: "正在確認 {0} 帳號是否已連接…",
|
|
71
|
+
confirmDevice: "AgEnD 會在這台機器上啟動 {0} 自己的授權流程。這裡會給你一個連結和授權碼,請前往 {0} 官方網站完成授權。",
|
|
72
|
+
confirmTerminal: "AgEnD 會在這台機器上啟動 {0} 自己的授權流程,並在瀏覽器以終端機開啟(只有這個授權流程,沒有 shell)。這裡會給你連結和一次性存取碼。",
|
|
73
|
+
stillSignedIn: "目前仍是連接狀態:重新連接會取代原本的連接。",
|
|
74
|
+
logoutFirst: "會先撤銷連接({0}),再重新連接。",
|
|
75
|
+
publicNote: "不在這台機器前?臨時公開連結可以從任何地方開啟終端機,只用於這次授權。",
|
|
76
|
+
go: "連接",
|
|
77
77
|
goPublic: "使用臨時公開連結",
|
|
78
78
|
cancel: "取消",
|
|
79
79
|
close: "關閉",
|
|
80
80
|
starting: "啟動中…",
|
|
81
|
-
deviceStep: "
|
|
82
|
-
linkStep: "
|
|
83
|
-
terminalStep: "
|
|
84
|
-
openTerminal: "
|
|
81
|
+
deviceStep: "前往官方網站完成授權:開啟這個頁面,輸入授權碼:",
|
|
82
|
+
linkStep: "開啟這個頁面,在官方網站完成授權;如果網站給你一組授權碼,請貼到授權終端機:",
|
|
83
|
+
terminalStep: "開啟授權終端機,在那裡輸入這個存取碼。只能用一次,{0} 分鐘內有效。",
|
|
84
|
+
openTerminal: "開啟授權終端機",
|
|
85
85
|
accessCode: "存取碼",
|
|
86
|
-
code: "
|
|
86
|
+
code: "授權碼",
|
|
87
87
|
copy: "複製",
|
|
88
88
|
copied: "已複製",
|
|
89
|
-
publicLink: "
|
|
89
|
+
publicLink: "公開連結:拿到連結和存取碼的人都能使用——兩者都只留給自己。",
|
|
90
90
|
loopback: "這個終端機只在本機位址上接聽。請在那台機器上開啟,或為你的網路設定 web_terminal.bind。",
|
|
91
|
-
waitingHint: "
|
|
92
|
-
signedIn: "{0}
|
|
93
|
-
ended: "
|
|
94
|
-
cancelSignIn: "
|
|
95
|
-
cancelled: "
|
|
96
|
-
running: "
|
|
91
|
+
waitingHint: "等待官方網站的授權連結…",
|
|
92
|
+
signedIn: "{0} 帳號已連接。",
|
|
93
|
+
ended: "授權流程已結束。",
|
|
94
|
+
cancelSignIn: "取消連接",
|
|
95
|
+
cancelled: "已取消連接。",
|
|
96
|
+
running: "正在連接 {0} 帳號(從 {1} 啟動)。",
|
|
97
97
|
open: "開啟",
|
|
98
98
|
expired: "等太久了——請重新開始。",
|
|
99
|
-
notHere: "
|
|
100
|
-
notAdmin: "只有在這台機器或它的網路上登入的 fleet
|
|
101
|
-
notOffered: "
|
|
99
|
+
notHere: "公開連結上不能連接 AI 帳號。請在執行 AgEnD 的機器上開啟儀表板,或在聊天裡用 /login。",
|
|
100
|
+
notAdmin: "只有在這台機器或它的網路上登入的 fleet 管理員,才能連接 AI 帳號。",
|
|
101
|
+
notOffered: "這次授權不提供公開連結。",
|
|
102
102
|
failed: "沒有成功。",
|
|
103
|
-
listTitle: "
|
|
104
|
-
browserRunning: "
|
|
103
|
+
listTitle: "AI 帳號",
|
|
104
|
+
browserRunning: "正在這台機器連接 {0} 帳號",
|
|
105
105
|
consoleFallback: "改用主控台備援",
|
|
106
|
-
listHint: "
|
|
107
|
-
stUsable: "
|
|
108
|
-
stNotSignedIn: "
|
|
106
|
+
listHint: "連接 AI 帳號:這台機器上連接的每個 AI 帳號,以及 Agent 使用的每個憑證設定檔。連接時會前往供應商官方網站完成授權。",
|
|
107
|
+
stUsable: "已連接",
|
|
108
|
+
stNotSignedIn: "未連接",
|
|
109
109
|
stNotInstalled: "未安裝",
|
|
110
110
|
stTooOld: "版本太舊",
|
|
111
111
|
stUnknown: "未檢查",
|
|
112
|
-
signIn: "
|
|
113
|
-
signInAgain: "
|
|
114
|
-
onHost: "
|
|
112
|
+
signIn: "連接帳號",
|
|
113
|
+
signInAgain: "重新連接",
|
|
114
|
+
onHost: "在機器上連接:{0}",
|
|
115
115
|
install: "在機器上安裝:{0}",
|
|
116
116
|
update: "在機器上更新:{0}",
|
|
117
117
|
profile: "{0} · 設定檔 {1}",
|
package/dist/ui/chat-commands.js
CHANGED
|
@@ -31,6 +31,13 @@ export function paletteFor(draft, allowed) {
|
|
|
31
31
|
return CHAT_COMMANDS.filter((c) => c.name.startsWith(m[1]) && (!allowed || allowed.includes(c.name)));
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* M-2738 (the leader's D3): `/update` in a web chat is AgEnD's own update, never a message to the agent — it opens the
|
|
36
|
+
* app's Update dialog (an admin's; the dialog says so to anyone else). Offered in the palette after the agent's own.
|
|
37
|
+
*/
|
|
38
|
+
export const UPDATE_COMMAND = Object.freeze({ name: "update", arg: "" });
|
|
39
|
+
export function isUpdateLine(draft) { return /^\/update\s*$/.test((draft || "").trim()); }
|
|
40
|
+
|
|
34
41
|
/** `/name args` for a known command → { command, args }; anything else (unknown, not a command) → null. */
|
|
35
42
|
export function parseCommandLine(draft) {
|
|
36
43
|
const m = /^\/([a-z]+)(?:[ \t]+([\s\S]*))?$/.exec((draft || "").trim());
|
package/dist/ui/chat-store.js
CHANGED
|
@@ -523,21 +523,26 @@ export function createChatStore(deps) {
|
|
|
523
523
|
async function runCommand(target, command, args, opts = {}) {
|
|
524
524
|
if (!target || !commandFree(target)) return;
|
|
525
525
|
const alive = opts.alive || (() => true);
|
|
526
|
-
|
|
526
|
+
if (!alive()) return;
|
|
527
|
+
const previous = s.commands[target];
|
|
528
|
+
const pending = { command, busy: true, ...(opts.action && previous?.command === command ? { choices: previous.choices } : {}) };
|
|
529
|
+
s.commands[target] = pending;
|
|
527
530
|
changed(target);
|
|
528
531
|
const post = async (extra) => {
|
|
529
|
-
try { return await api("POST", "/ui/command", { instance: target, command, ...(args ? { args } : {}), ...extra }); }
|
|
532
|
+
try { return await api("POST", "/ui/command", { instance: target, command, ...(args ? { args } : {}), ...(opts.action ? { action: opts.action } : {}), ...extra }); }
|
|
530
533
|
catch (err) { return { error: err && err.message ? err.message : t("chat.disconnected") }; }
|
|
531
534
|
};
|
|
532
535
|
let r = await post({});
|
|
536
|
+
if (!alive() || s.commands[target] !== pending) return;
|
|
533
537
|
if (r && r.confirm) {
|
|
534
538
|
const yes = deps.confirm ? await deps.confirm({ title: `/${command}`, message: r.confirm.message, confirmLabel: t(command === "backend" ? "chat.cmdConfirmBackend" : "chat.cmdConfirm"), danger: true }) : false;
|
|
535
|
-
if (!yes || !alive()) { delete s.commands[target]; changed(target); return; }
|
|
539
|
+
if (!yes || !alive() || s.commands[target] !== pending) { if (s.commands[target] === pending) { delete s.commands[target]; changed(target); } return; }
|
|
536
540
|
r = await post({ confirm: r.confirm.token });
|
|
541
|
+
if (!alive() || s.commands[target] !== pending) return;
|
|
537
542
|
}
|
|
538
543
|
const follow = r && r.follow && r.follow.kind === "compact" ? r.follow : null;
|
|
539
544
|
showCommand(target, r && r.choices ? { command, busy: false, choices: r.choices }
|
|
540
|
-
: r && r.error ? { command, busy: false, error: r.error }
|
|
545
|
+
: r && r.error ? { command, busy: false, error: r.error, ...(opts.action ? { choices: pending.choices } : {}) }
|
|
541
546
|
: { command, busy: false, text: (r && r.text) || "", ...(r && r.sent === true ? { sent: true } : {}), ...(follow ? { compact: follow.id ? "running" : "unknown", watch: follow.id } : {}) });
|
|
542
547
|
changed(target);
|
|
543
548
|
}
|
package/dist/ui/chat-strings.js
CHANGED
|
@@ -22,12 +22,12 @@ register("chat", {
|
|
|
22
22
|
compactTimeout: "No sign that compaction finished within {0} minutes — check the agent's own chat.",
|
|
23
23
|
compactLost: "Can't follow this compaction: the command did not reach the agent, or the agent stopped or changed backend.",
|
|
24
24
|
compactNotCompacted: "kiro did not compact the conversation: it was too short, or the compaction was stopped.",
|
|
25
|
-
cmdChoose: "Choose", cmdCurrent: "current", cmdSignIn: "
|
|
25
|
+
cmdChoose: "Choose", cmdCurrent: "current", cmdSignIn: "Connect account", cmdSignInTo: "Connect your {0} account", chipCompact: "Compact", chipClear: "Clear…", chipContext: "Context {0}% used",
|
|
26
26
|
chipModel: "Model: {0} — choose another", chipEffort: "Effort: {0} — choose another",
|
|
27
27
|
cmd_ctx: "Context use, model and effort", cmd_compact: "Compact the conversation", cmd_clear: "Clear the conversation (asks first)",
|
|
28
28
|
cmd_model: "Show or switch the model", cmd_backend: "Switch the CLI backend, then model and effort (restarts)", cmd_effort: "Show or set the reasoning effort", cmd_cancel: "Stop the current reply",
|
|
29
29
|
cmd_btw: "A side question that does not interrupt", cmd_steer: "Send into the current turn", cmd_pause: "Pause the instance",
|
|
30
|
-
cmd_wake: "Wake a paused instance", cmd_save: "Save the conversation to a file",
|
|
30
|
+
cmd_wake: "Wake a paused instance", cmd_save: "Save the conversation to a file", cmd_update: "Update AgEnD (opens the Update dialog)",
|
|
31
31
|
tourTitle: "Welcome to web chat", tourStep: "{0} of {1}", tourBack: "Back", tourNext: "Next", tourDone: "Got it", tourSkip: "Skip",
|
|
32
32
|
tour1: "Pick an instance in the list to chat with it. On a phone, ☰ opens the list.",
|
|
33
33
|
tour2: "This is the agent's conversation. If it also has a Telegram or Discord chat, web echo (Settings → Chat & connections) decides whether what you send here shows there too.",
|
|
@@ -150,32 +150,32 @@ register("chat", {
|
|
|
150
150
|
waking: "正在喚醒 {0}…", retrySend: "重試傳送",
|
|
151
151
|
you: "你", sending: "傳送中…", uploadingFile: "正在上傳 {0}", uploadWaiting: "等待中", uploadFailed: "失敗",
|
|
152
152
|
uploadNoConnection: "上傳中斷了,請檢查網路連線", sendNoConnection: "沒有送到 AgEnD,請檢查網路連線", notSentBecause: "沒有送出:{0}", deleteUnsent: "刪除",
|
|
153
|
-
sendFailure_wake_capacity: "
|
|
154
|
-
sendFailure_wake_credentials: "
|
|
155
|
-
sendFailure_wake_timeout: "
|
|
156
|
-
sendFailure_instance_stopped: "
|
|
157
|
-
sendFailure_delivery_unavailable: "
|
|
158
|
-
sendFailure_delivery_changed: "
|
|
153
|
+
sendFailure_wake_capacity: "目前沒有空位可喚醒這個 Agent。請等其他 Agent 閒置後重試。",
|
|
154
|
+
sendFailure_wake_credentials: "Agent 無法登入。請先在主機檢查它的帳號,再重試。",
|
|
155
|
+
sendFailure_wake_timeout: "Agent 未能及時就緒。請重試,或在主機檢查它的狀態。",
|
|
156
|
+
sendFailure_instance_stopped: "這個 Agent 已停止或移除。請先在主機啟動它,再重試。",
|
|
157
|
+
sendFailure_delivery_unavailable: "Agent 目前無法接收這則訊息。請在主機檢查它的狀態,再重試。",
|
|
158
|
+
sendFailure_delivery_changed: "訊息送出前,登入或 Agent 狀態已改變。必要時請重新登入,再重試。",
|
|
159
159
|
sendFailure_reply_gone: "你回覆的訊息已不在這個聊天裡。內容還在:可以不帶回覆直接送出,或改回覆其他訊息。",
|
|
160
160
|
reply: "回覆", replyingTo: "回覆 {0}", replyCancel: "取消回覆(Esc)", replyHidden: "之前的一則訊息", replyPhoto: "[圖片]", replyFile: "[檔案]",
|
|
161
161
|
replyGone: "那則訊息已不在這個聊天裡。", replyJump: "顯示被回覆的訊息", copyText: "複製文字", copyLink: "複製連結", msgMenu: "訊息",
|
|
162
162
|
|
|
163
163
|
cmdConfirm: "清空", cmdConfirmBackend: "切換並重新啟動", cmdRunning: "執行 /{0} 中…", cmdNotCommand: "這裡沒有這個指令——按 Enter 會當成一般訊息送出。", cmdNotGuests: "訪客在這裡不能使用這個指令。", cmdDismiss: "關閉", cmdCommands: "指令",
|
|
164
164
|
compactRunning: "壓縮中…", compactDone: "✅ 對話已壓縮", compactUnknown: "這個後端不會回報壓縮何時完成。",
|
|
165
|
-
compactTimeout: "{0}
|
|
166
|
-
compactLost: "
|
|
165
|
+
compactTimeout: "{0} 分鐘內沒有看到壓縮完成的紀錄,請到 Agent 自己的對話確認。",
|
|
166
|
+
compactLost: "無法再追蹤這次壓縮:指令沒有送到 Agent,或 Agent 已停止、換了後端。",
|
|
167
167
|
compactNotCompacted: "kiro 沒有壓縮對話:對話太短,或壓縮被中止了。",
|
|
168
|
-
cmdChoose: "選擇", cmdCurrent: "目前", cmdSignIn: "
|
|
168
|
+
cmdChoose: "選擇", cmdCurrent: "目前", cmdSignIn: "連接帳號", cmdSignInTo: "連接 {0} 帳號", chipCompact: "壓縮", chipClear: "清空…", chipContext: "已用 {0}% 的 context",
|
|
169
169
|
chipModel: "模型:{0}——選擇其他", chipEffort: "推理強度:{0}——選擇其他",
|
|
170
170
|
cmd_ctx: "context 用量、模型與推理強度", cmd_compact: "壓縮對話", cmd_clear: "清空對話(會先確認)",
|
|
171
171
|
cmd_model: "查看或切換模型", cmd_backend: "切換 CLI backend,再選模型和推理強度(會重新啟動)", cmd_effort: "查看或設定推理強度", cmd_cancel: "停止目前的回覆",
|
|
172
|
-
cmd_btw: "不打斷目前工作的旁問", cmd_steer: "送進目前這一輪", cmd_pause: "暫停
|
|
173
|
-
cmd_wake: "喚醒已暫停的
|
|
172
|
+
cmd_btw: "不打斷目前工作的旁問", cmd_steer: "送進目前這一輪", cmd_pause: "暫停 Agent",
|
|
173
|
+
cmd_wake: "喚醒已暫停的 Agent", cmd_save: "把對話存成檔案", cmd_update: "更新 AgEnD(開啟更新對話框)",
|
|
174
174
|
tourTitle: "歡迎使用網頁聊天", tourStep: "{0} / {1}", tourBack: "上一步", tourNext: "下一步", tourDone: "知道了", tourSkip: "略過",
|
|
175
|
-
tour1: "在清單裡選一個
|
|
175
|
+
tour1: "在清單裡選一個 Agent,就能跟它對話。手機上請按 ☰ 打開清單。",
|
|
176
176
|
tour2: "這是這個 Agent 的對話。如果它也有 Telegram 或 Discord 聊天,在這裡送出的訊息是否也出現在那裡,由「設定 → 聊天與連線」的網頁轉發決定。",
|
|
177
177
|
tour3: "按 📎 附上檔案和圖片,也可以直接貼上或拖到聊天裡。",
|
|
178
|
-
tour4: "Agent 工作時,輸入框會出現「中止回覆」:中斷目前的回覆,
|
|
178
|
+
tour4: "Agent 工作時,輸入框會出現「中止回覆」:中斷目前的回覆,Agent 本身會繼續運行。",
|
|
179
179
|
tour5: "看到「等你回應」標記,表示 Agent 在終端機上等你,例如權限詢問。到它的聊天裡按按鈕回應即可。",
|
|
180
180
|
a11yWorking: "{0} 開始工作", a11yIdle: "{0} 已完成", a11yReplied: "{0} 已回覆", conversationWith: "與 {0} 的對話",
|
|
181
181
|
stopping: "正在中止 {0}…", awaiting: "{0} 正在等你回應", approxNote: "從終端畫面判讀,僅供參考", elapsedTitle: "從這個頁面看到它開始工作起算(約略)",
|
|
@@ -189,7 +189,7 @@ register("chat", {
|
|
|
189
189
|
pvChanged: "預覽已停止——訊息內容變了。請再預覽一次。", pvTruncated: "內容被截斷——請 agent 改用 .html 檔案傳送。",
|
|
190
190
|
pvLoading: "正在讀取檔案…", pvAttOver: "這個檔案超過 50 MB,不提供預覽,請下載後開啟。",
|
|
191
191
|
pvLarge: "這個檔案比較大({0}),仍要預覽嗎?", pvAnyway: "仍要預覽",
|
|
192
|
-
pvAttGone: "
|
|
192
|
+
pvAttGone: "這裡已無法取得這個檔案(檔案已變更,或 Fleet 已重新啟動)。請 agent 再傳一次。",
|
|
193
193
|
pvAttFailed: "無法讀取這個檔案,請再試一次。",
|
|
194
194
|
pvBannerAck: "我知道了", pvBannerAckTitle: "隱藏這則提醒,直到下次登入",
|
|
195
195
|
attGone: "AgEnD 重新啟動後找不到這個檔案(已移動、刪除或變更)。請 agent 再傳一次。", attUnavailable: "無法取得", yesterdayAt: "昨天 {0}",
|
|
@@ -221,17 +221,17 @@ register("chat", {
|
|
|
221
221
|
pvWhyOptin: "還沒允許 HTML 預覽。可從這張卡片的 ⋯ 選單或「設定 → 偏好設定」允許。",
|
|
222
222
|
pvWhyOptinPanel: "還沒允許 HTML 預覽。",
|
|
223
223
|
pvWhyNever: "這台裝置在這個工作階段已關閉預覽。",
|
|
224
|
-
pvWhyOrigin: "預覽已關閉:這個頁面位於 {0}
|
|
224
|
+
pvWhyOrigin: "預覽已關閉:這個頁面位於 {0},但 Fleet 認為它位於 {1}(有會改寫 Host 的反向代理)。請讓外部 Host 原樣傳入,或設定 web.preview_origin。",
|
|
225
225
|
pvUnknownAddress: "未知的網址", pvWhyServer: "這裡無法使用預覽。",
|
|
226
226
|
pvHtmlOver: "這段 HTML 超過 50 MB,不提供預覽,請下載後開啟。",
|
|
227
227
|
pvNoAnswer: "無法預覽:預覽在 3 秒內沒有回應。如果先前的預覽卡住了,它可能還在執行——請在新分頁開啟儀表板。透過 SSH 使用時,也要轉送預覽的連接埠。",
|
|
228
228
|
pvStoppedAnswering: "預覽沒有回應,已將它關閉。", pvSwitchedOff: "這台裝置已關閉預覽。",
|
|
229
|
-
pvAnother: "另一個預覽已開始。", pvWrongBoot: "
|
|
229
|
+
pvAnother: "另一個預覽已開始。", pvWrongBoot: "無法預覽:預覽連接埠上回應的不是這個 Fleet。",
|
|
230
230
|
pvBanner: "預覽會在隔離的框架裡執行 agent 的 HTML。它無法使用你的登入,但可能把資料傳出去。只預覽你信任的內容。預覽可能讓這個分頁變慢或卡住。",
|
|
231
|
-
pvServer_fleetOff: "
|
|
231
|
+
pvServer_fleetOff: "這個 Fleet 已關閉預覽(web.preview: false)。", pvServer_unchecked: "無法確認這個網址。",
|
|
232
232
|
pvServer_noPort: "預覽沒有可用的連接埠:請設定 web.preview_port(health_port 已是最大的連接埠)。",
|
|
233
233
|
pvServer_notListed: "{0} 不提供預覽:請把這個網址(含連接埠)加入 web.allowed_hosts,並設定 web.preview_origin。",
|
|
234
|
-
pvServer_needOrigin: "
|
|
234
|
+
pvServer_needOrigin: "透過通道或反向代理開啟儀表板時,預覽需要設定 web.preview_origin。",
|
|
235
235
|
pvServer_needHttps: "以 https 開啟儀表板時,預覽需要 https 的 web.preview_origin。",
|
|
236
236
|
pvServer_sameOrigin: "預覽的來源不能和儀表板相同。",
|
|
237
237
|
pvServer_publicLink: "公開連結的預覽已關閉(web.preview_on_public_link: false)。要預覽,請在執行 AgEnD 的那台機器上開啟儀表板。",
|
|
@@ -252,17 +252,17 @@ register("chat", {
|
|
|
252
252
|
copy: "複製", copyMessage: "複製這則回覆", copied: "已複製", copyFailed: "複製失敗", wrap: "換行", showAll: "展開全部 {0} 行", showMore: "顯示更多", showLess: "收合", showAllShort: "全部 {0} 行", showMoreShort: "更多", jumpLatest: "最新", newBelow: "{0} 則新訊息",
|
|
253
253
|
disconnected: "已斷線", tick_queued: "排在前一則訊息之後", tick_processing: "已交給 agent", tick_delivered: "agent 已收到", tick_failed: "未送達", tick_cancelled: "已被中止取消", reactedBy: "{0} 的回應",
|
|
254
254
|
promptAnswering: "回覆中…", promptGone: "這個提示已經結束", promptTextPlaceholder: "你的回答", promptTextSend: "送出回答", promptFor: "{0}:{1}",
|
|
255
|
-
working: "{0} 處理中…", stuck: "{0} 似乎卡住了", stopReply: "中止回覆", stopReplyTitle: "中止目前的回覆(同 Esc),並取消還在排隊的訊息。
|
|
255
|
+
working: "{0} 處理中…", stuck: "{0} 似乎卡住了", stopReply: "中止回覆", stopReplyTitle: "中止目前的回覆(同 Esc),並取消還在排隊的訊息。Agent 會繼續運行。", stopSent: "已中止",
|
|
256
256
|
file_empty: "空檔案", file_too_large: "超過 {0} MB", file_too_large_public: "超過 {0} MB,這是公開連結單次上傳的上限", file_too_many: "每則訊息最多 {0} 個檔案", file_too_much: "檔案合計會超過 {0} MB", removeFile: "移除", putBack: "放回輸入框",
|
|
257
257
|
noMessages: "直接在下方輸入任務。",
|
|
258
258
|
guestAllHidden: "這裡還沒有你能看到的訊息", guestAllHiddenHint: "這個 agent 最近只和其他 agent 往來,訪客看不到這些。有人在它的頻道說話後,對話會出現在這裡。",
|
|
259
|
-
pick: "選一個 Agent 開始聊天。", noAgents: "先建立一個 Agent,再開始聊天。", newAgent: "新增 Agent", notFound: "沒有叫「{0}」的
|
|
260
|
-
details: "
|
|
259
|
+
pick: "選一個 Agent 開始聊天。", noAgents: "先建立一個 Agent,再開始聊天。", newAgent: "新增 Agent", notFound: "沒有叫「{0}」的 Agent", notFoundHint: "它可能已被刪除或改名。", backToList: "選擇 Agent",
|
|
260
|
+
details: "Agent 詳細資料", fullWidth: "全寬", start: "啟動 Agent", stopInstance: "停止 Agent", restart: "重新啟動 Agent", delete: "刪除 Agent…",
|
|
261
261
|
started: "{0} 已啟動", stoppedInst: "{0} 已停止", restarted: "{0} 已重新啟動", instanceDeleted: "{0} 已刪除",
|
|
262
|
-
deleteTitle: "要刪除 {0} 嗎?", deleteHelp: "這會把
|
|
262
|
+
deleteTitle: "要刪除 {0} 嗎?", deleteHelp: "這會把 Agent 從 fleet 移除並停止它,並刪除它的聊天 topic(在 Discord 上是它的頻道與訊息記錄)。工作目錄會保留。請輸入「delete {0}」確認。", deleteGo: "刪除", cancel: "取消",
|
|
263
263
|
loadFailed: "載入失敗", tour: "聊天導覽", tourBtnTitle: "在 Agent 的聊天上開啟聊天導覽", tourNoAgent: "請先選一個 Agent,再開啟聊天導覽。",
|
|
264
264
|
dName: "名稱", dStatus: "狀態", dDisplay: "顯示名稱", dDescription: "說明", dDirectory: "目錄", dBackend: "Backend", dModel: "模型", dEffort: "Effort",
|
|
265
|
-
dCost: "花費", dCostNote: "(本次 session 累計)", dContext: "Context", dRate5: "5 小時額度", dRate7: "7 天額度", dActivity: "最近活動", dInstance: "
|
|
265
|
+
dCost: "花費", dCostNote: "(本次 session 累計)", dContext: "Context", dRate5: "5 小時額度", dRate7: "7 天額度", dActivity: "最近活動", dInstance: "Agent", dRuntime: "執行環境",
|
|
266
266
|
dConfig: "設定", dBinding: "綁定", dBindingGeneral: "{0} 的 General topic", dBindingTopic: "{0},topic {1}", dBindingNoTopic: "{0},尚未綁定 topic",
|
|
267
267
|
dBindingDefault: "{0}(預設:第一個連線)", dBindingRoom: "ClassicBot 房間 #{0}({1})",
|
|
268
268
|
dBindingNone: "未綁定(只用網頁)", dPrimary: "第一個連線", dTags: "標籤", dReadOnly: "這裡只能檢視——請到設定修改。",
|
package/dist/ui/fleet-cache.js
CHANGED
|
@@ -42,7 +42,7 @@ register("cache", {
|
|
|
42
42
|
fleetExpiry: "過期成本", fleetSaving: "保溫可省", fleetRecommended: "建議保溫", ofN: "{1} 個中的 {0} 個",
|
|
43
43
|
pricesNote: "牌價查證日期:{0}。", quotaNote: "訂閱方案:Anthropic 與 OpenAI 未公布快取讀取如何計入方案額度,因此節省金額以牌價計算為準,換算成額度則是估算。",
|
|
44
44
|
estimateNote: "估算:Codex 不記錄快取寫入,寫入量以該次請求未命中快取的輸入估算。",
|
|
45
|
-
notPricedNote: "有些模型不在價目表中,這些
|
|
45
|
+
notPricedNote: "有些模型不在價目表中,這些 Agent 以「輸入價格單位」比較。",
|
|
46
46
|
scanning: "仍在讀取 transcript——還剩 {0}。重新整理可看到更多。", scanningFirst: "第一次讀取 transcript 中——重新整理可看到更多。", refresh: "重新整理",
|
|
47
47
|
keepWarm: "建議保溫", leaveOff: "不需保溫", estimate: "估算", notPriced: "未定價",
|
|
48
48
|
requests: "請求數", pastTtl: "超過 TTL({0})", expired: "已過期(重寫)", rewritten: "重寫的 token",
|
|
@@ -56,12 +56,12 @@ register("cache", {
|
|
|
56
56
|
costsMoreUnits: "每次過期約需送 {0} 次 ping——保溫的花費比省下的多。",
|
|
57
57
|
unavailable: "不提供", creditBilled: "以 credit 計費,沒有快取資料", unsupported: "這個 CLI 沒有快取資料", noData: "尚未讀到任何請求",
|
|
58
58
|
shared: "與 {0} 共用工作目錄,無法分辨各自的 transcript",
|
|
59
|
-
empty: "沒有
|
|
59
|
+
empty: "沒有 Agent", emptyHint: "fleet 有 Agent 後會顯示在這裡。",
|
|
60
60
|
b0: "≤5分", b1: "≤30分", b2: "≤1時", b3: "≤2時", b4: "≤6時", b5: "≤24時", b6: ">24時", tokensUnit: "輸入 token 當量",
|
|
61
61
|
writeMix: "快取寫入 5 分 / 1 時", effectiveTtl: "實際存活", gapMiss: "{1} 個 5–60 分鐘空檔中有 {0} 個重寫", gapMissNone: "還沒有 5–60 分鐘的空檔",
|
|
62
62
|
effMeasured: "{0}(實測)", effLabel: "{0}(依寫入標記)", effUnproven: "尚無法判斷",
|
|
63
63
|
fleetSwitch: "建議改用 1 小時快取",
|
|
64
|
-
switchTo1h: "它的 5 分鐘快取確實會過期:{1} 個 5–60 分鐘空檔中有 {0} 個重寫。請為這個
|
|
64
|
+
switchTo1h: "它的 5 分鐘快取確實會過期:{1} 個 5–60 分鐘空檔中有 {0} 個重寫。請為這個 Agent 設定 prompt_cache_ttl: \"1h\"(backend_options.claude-code),而不是保溫。",
|
|
65
65
|
unproven: "以 5 分鐘 TTL 寫入,但目前只有 {0} 個 5–60 分鐘空檔,太少,無法判斷實際存活多久。保溫的數字以 5 分鐘估算。",
|
|
66
66
|
},
|
|
67
67
|
});
|
package/dist/ui/fleet-canvas.js
CHANGED
|
@@ -47,9 +47,9 @@ register("orgc", {
|
|
|
47
47
|
lgWork: "in progress (until its report)", lgReturn: "done (report back)", lgStale: "no report yet",
|
|
48
48
|
},
|
|
49
49
|
"zh-TW": {
|
|
50
|
-
view: "檢視", canvas: "畫布", list: "清單", office: "辦公室", find: "尋找
|
|
50
|
+
view: "檢視", canvas: "畫布", list: "清單", office: "辦公室", find: "尋找 Agent", findShort: "尋找", found: "找到 {0} 個", foundOne: "找到 1 個", noMatch: "沒有符合的",
|
|
51
51
|
zoomIn: "放大", zoomOut: "縮小", fit: "符合畫面",
|
|
52
|
-
label: "組織圖畫布。用 Tab 或方向鍵在
|
|
52
|
+
label: "組織圖畫布。用 Tab 或方向鍵在 Agent 之間移動,Enter 開啟聊天,+ 和 − 縮放,0 顯示整個 fleet。",
|
|
53
53
|
expand: "展開", collapse: "收合", members: "{0} 名成員", member: "1 名成員", inFolded: "找到 {0} 個 · 展開", noMembers: "沒有成員",
|
|
54
54
|
openChat: "開啟聊天", minimap: "總覽:點一下移到那裡",
|
|
55
55
|
live: "即時", liveOn: "隱藏即時往來", liveOff: "顯示即時往來", lgTask: "delegate_task", lgSend: "send_to_instance",
|
|
@@ -44,7 +44,7 @@ register("orge", {
|
|
|
44
44
|
add: "新增辦公室", newName: "新辦公室", name: "名稱", styleLabel: "風格", members: "成員", membersN: "已選 {0} 個", everyone: "全部",
|
|
45
45
|
picked: "指定", nobody: "沒有人(只有 NPC)", pickSome: "還沒選任何人:選人之前會顯示全部。",
|
|
46
46
|
nobodyNote: "這裡不坐任何 agent,只有風格裡的 NPC。",
|
|
47
|
-
teams: "Team", instances: "
|
|
47
|
+
teams: "Team", instances: "Agent", remove: "刪除", save: "儲存", cancel: "取消", saved: "辦公室已儲存。",
|
|
48
48
|
none: "還沒有辦公室:辦公室檢視會顯示整個 fleet。", nameNeeded: "每個辦公室都需要名稱。", tooMany: "最多 {0} 個辦公室。",
|
|
49
49
|
changed: "有人在這期間修改了辦公室,你的編輯沒有儲存。你可以保留你的編輯(儲存時會取代對方的修改),或載入對方的版本。",
|
|
50
50
|
changedUnread: "有人在這期間修改了辦公室,你的編輯沒有儲存,也無法讀取目前的清單。請再試一次。",
|
package/dist/ui/fleet-office.js
CHANGED
|
@@ -101,7 +101,7 @@ register("orgo", {
|
|
|
101
101
|
tileLabel: "{0} ({1})", openOffice: "Open the office {0}", lobbyTile: "Lobby tile (in no office)", lobbyEveryone: "Everyone is in an office", overviewNoEdit: "Pick one office to edit offices or a layout",
|
|
102
102
|
},
|
|
103
103
|
"zh-TW": {
|
|
104
|
-
label: "辦公室:每個 team 是一間房間,每個
|
|
104
|
+
label: "辦公室:每個 team 是一間房間,每個 Agent 一張桌子;General 和未加入 team 的 Agent 在大廳。拖曳平移;滾輪、雙指、+ 和 − 縮放,0 顯示整個場景,F 切換全螢幕。",
|
|
105
105
|
office: "辦公室", allOffice: "整個 fleet", show: "顯示", allTeams: "所有 team", lobby: "大廳(General、未加入 team)", lobbyRoom: "大廳",
|
|
106
106
|
people: "成員", peopleN: "成員({0})", findPerson: "尋找成員", everyone: "顯示全部", nobody: "沒有符合這個篩選的成員。",
|
|
107
107
|
unseated: "{0} 位沒有座位", skinUnknown: "這裡沒有它的風格「{0}」:以辦公桌顯示。", closed: "休息中", desks: "桌子", tapAgain: "再點一下開啟聊天",
|
package/dist/ui/fleet-org.js
CHANGED
|
@@ -23,10 +23,10 @@ register("org", {
|
|
|
23
23
|
sending: "Sending:", queuedNote: "(queued)", workingNote: "(in progress)",
|
|
24
24
|
},
|
|
25
25
|
"zh-TW": {
|
|
26
|
-
starting: "啟動中", queued: "等待啟動", title: "組織圖", general: "General", unteamed: "未加入 team", members: "{0} 名成員", member: "1 名成員", instances: "{0} 個
|
|
26
|
+
starting: "啟動中", queued: "等待啟動", title: "組織圖", general: "General", unteamed: "未加入 team", members: "{0} 名成員", member: "1 名成員", instances: "{0} 個 Agent", instance: "1 個 Agent",
|
|
27
27
|
needs: "等你回應", working: "工作中", idle: "閒置", stuck: "似乎卡住", paused: "已暫停", stopped: "已停止", crashed: "已當掉",
|
|
28
28
|
missing: "不在 fleet 中", thread_discord: "Discord 討論串", thread_telegram: "Telegram topic", openChat: "開啟聊天",
|
|
29
|
-
classic: "ClassicBot 頻道", empty: "還沒有
|
|
29
|
+
classic: "ClassicBot 頻道", empty: "還沒有 Agent", emptyHint: "fleet 有 Agent 和 team 後會顯示在這裡。",
|
|
30
30
|
noTeams: "還沒有 team——到 Fleet → Teams 定義後,組織圖會依 team 分組。", newTab: "(在新分頁開啟)",
|
|
31
31
|
sending: "傳送中:", queuedNote: "(排隊中)", workingNote: "(進行中)",
|
|
32
32
|
},
|
|
@@ -41,7 +41,7 @@ register("taskcard", {
|
|
|
41
41
|
conflict: "{0} 在你編輯時被改過了。已載入最新內容,你的修改還在,再存一次就會覆蓋。",
|
|
42
42
|
moveTo: "移到…", moveLabel: "改狀態", followsSubs: "有子任務,狀態會跟著子任務自動變化",
|
|
43
43
|
reopen: "重新打開", cancelCard: "取消這張卡", confirmMain: "確認主任務",
|
|
44
|
-
assignee: "負責人", nobody: "沒人負責", unassign: "(不指派)", other: "其他…", otherTitle: "指派給其他
|
|
44
|
+
assignee: "負責人", nobody: "沒人負責", unassign: "(不指派)", other: "其他…", otherTitle: "指派給其他 Agent", otherLabel: "Agent 名稱",
|
|
45
45
|
change: "改…", project: "專案", priority: "優先度", size: "大小", review: "你確認", reviewBox: "做完要停在待確認,等我確認",
|
|
46
46
|
reviewOn: "做完會停在待確認,等你確認", reviewOff: "做完直接完成,不等你確認",
|
|
47
47
|
parent: "主任務", deps: "相依", none: "沒有", edit: "編輯", depsTitle: "{0} 的相依", depsLabel: "要先完成的卡號,用逗號或空白分開(留空=沒有相依)",
|
|
@@ -92,7 +92,7 @@ register("tasks", {
|
|
|
92
92
|
projects: "專案", noProject: "未分類", noProjectDesc: "fleet 在專案以外開的 task",
|
|
93
93
|
newProject: "新增專案", newMain: "主任務", archived: "已封存", archive: "封存", restore: "恢復",
|
|
94
94
|
rename: "編輯專案", projectName: "名稱", projectDesc: "說明",
|
|
95
|
-
projectLead: "負責的
|
|
95
|
+
projectLead: "負責的 Agent", projectLeadNone: "無(General)", projectLeadHint: "這個專案裡等你處理的卡片(待確認或卡住)會在負責 Agent 的頻道顯示按鈕;若卡片是某個 Agent 派出的,則顯示在派出者的頻道。", projectLeadGone: "{0}(已不在 fleet 中)", projectLeadChip: "負責:{0}", create: "建立", save: "儲存", cancel: "取消",
|
|
96
96
|
projectCreated: "專案已建立", projectSaved: "專案已儲存",
|
|
97
97
|
noProjects: "還沒有專案", noProjectsHint: "專案是一組相關的工作:先建立專案,再在裡面開主任務。",
|
|
98
98
|
mainCount: "{0} 個主任務", mainOne: "1 個主任務", waiting: "等你確認 {0}", blockedN: "卡住 {0}", lastActivity: "最後動態 {0}",
|
|
@@ -101,9 +101,9 @@ register("tasks", {
|
|
|
101
101
|
everyone: "全部負責人", nobody: "沒人負責", filterLabel: "依負責人篩選",
|
|
102
102
|
recent: "近 7 天", all: "全部", toggleDone: "切換:只看近 7 天/全部",
|
|
103
103
|
emptyBoard: "這個專案還沒有主任務", emptyFiltered: "沒有符合篩選的主任務",
|
|
104
|
-
emptyBoardHint: "主任務是你要的成果,可大可小。指派給
|
|
104
|
+
emptyBoardHint: "主任務是你要的成果,可大可小。指派給 Agent,它會自己決定直接做,或先拆成子任務。",
|
|
105
105
|
subProgress: "子任務 {0}/{1}", showSubs: "展開子任務", hideSubs: "收起子任務", olderSubs: "另有 {0} 張比較早完成",
|
|
106
|
-
acceptance: "驗收條件", definition: "完成定義", waitsFor: "等 {0} 完成", comments: "留言", agentReplied: "
|
|
106
|
+
acceptance: "驗收條件", definition: "完成定義", waitsFor: "等 {0} 完成", comments: "留言", agentReplied: "Agent 有新回覆",
|
|
107
107
|
needsReview: "需確認", needsReviewTitle: "做完要停在待確認,等你確認", urgentTag: "緊急", highTag: "優先",
|
|
108
108
|
waitingTitle: "待你處理", waitingEmpty: "沒有等你處理的事。", confirm: "確認", sendBack: "退回", answer: "回覆",
|
|
109
109
|
confirmed: "已確認 {0}", sentBack: "已退回 {0}", answered: "已回覆 {0}",
|
|
@@ -116,8 +116,8 @@ register("tasks", {
|
|
|
116
116
|
goal: "目標", goalHint: "為什麼做、做完是什麼樣子", scope: "範圍", scopeHint: "做:…/不做:…",
|
|
117
117
|
definitionHint: "一行一項:能客觀判斷是否達成的條件", acceptanceHint: "一行一項",
|
|
118
118
|
context: "背景", contextHint: "檔案路徑、相關卡號、已經做的決定(只放指引)",
|
|
119
|
-
assignee: "負責人", assigneeHint: "交給哪個
|
|
120
|
-
boardOff: "{0}(看板已關閉)", boardOffHint: "關閉任務看板的
|
|
119
|
+
assignee: "負責人", assigneeHint: "交給哪個 Agent", project: "專案", size: "大小", priority: "優先度",
|
|
120
|
+
boardOff: "{0}(看板已關閉)", boardOffHint: "關閉任務看板的 Agent 不能被派卡:它沒有 task 工具,讀不到卡片。",
|
|
121
121
|
reviewBox: "做完要停在待確認,等我確認", created: "已開 {0}", titleRequired: "標題必填",
|
|
122
122
|
search: "搜尋卡片", searchHint: "搜尋標題、各欄位、驗收條件和留言", searchEmpty: "沒有符合的卡片", inField: "在{0}",
|
|
123
123
|
fieldgoal: "目標", fieldscope: "範圍", fieldcontext: "背景", fieldstate: "目前狀態", fieldresult: "產出", fieldblockedReason: "卡住原因",
|
|
@@ -134,7 +134,7 @@ register("tasks", {
|
|
|
134
134
|
"err.too_long": "{0}太長:{1} 字,上限 {2} 字", "err.state_lines": "目前狀態最多 {0} 行(現在 {1} 行)",
|
|
135
135
|
"err.acceptance_empty": "驗收條件不能是空的", "err.acceptance_max": "驗收條件最多 {0} 項",
|
|
136
136
|
"err.acceptance_no_item": "驗收條件沒有第 {0} 項(共 {1} 項)", "err.project_not_found": "找不到專案「{0}」",
|
|
137
|
-
"err.project_name_empty": "專案名稱不能是空的", "err.project_name_digits": "專案名稱不能只有數字", "err.lead_not_instance": "負責人必須是 fleet 裡的
|
|
137
|
+
"err.project_name_empty": "專案名稱不能是空的", "err.project_name_digits": "專案名稱不能只有數字", "err.lead_not_instance": "負責人必須是 fleet 裡的 Agent",
|
|
138
138
|
"err.project_name_taken": "已經有專案叫「{0}」", "err.project_archived": "專案「{0}」已封存,不能再開主任務",
|
|
139
139
|
"err.card_not_found": "找不到 {0}", "err.title_empty": "標題不能是空的", "err.scope_main_only": "範圍只用在主任務",
|
|
140
140
|
"err.blocked_reason_not_blocked": "只有卡住的卡才有卡住原因", "err.block_reason": "卡住要寫原因:需要誰回答什麼",
|
|
@@ -152,7 +152,7 @@ register("tasks", {
|
|
|
152
152
|
"note.back_to": "{0} 又有沒完成的子任務,已回到{1}", "note.deps_done": "{0} 的相依都完成了,可以開始",
|
|
153
153
|
"note.deps_unmet": "提醒:{0} 還沒完成",
|
|
154
154
|
// #2246 step 3:誰在做什麼(fleet-task-work.js)
|
|
155
|
-
instances: "
|
|
155
|
+
instances: "Agent", instancesTip: "fleet 有哪些 Agent、各在做什麼", instancesHead: "{0} 個 · 工作中 {1}",
|
|
156
156
|
workSentBack: "被退回", workDoing: "進行中", workBlocked: "卡住", workReview: "待確認", workMain: "負責",
|
|
157
157
|
workReady: "可以開始", workWaiting: "等前置", workSubs: "子任務 {0}/{1}", workClaimable: "沒人負責,可領",
|
|
158
158
|
workWaitsFor: "等 {0}", workNone: "看板上沒有它的卡", workNewComments: "有它還沒看過的留言",
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// M-2731: feature-owned words/styles travel with lazy panels, including tabs with an older shell/catalog module.
|
|
2
|
+
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
3
|
+
import { register, t } from "/assets/app-i18n.js";
|
|
4
|
+
import { Icon } from "/assets/ui-icons.js";
|
|
5
|
+
import { ErrorState } from "/assets/ui-states.js";
|
|
6
|
+
import * as catalogStore from "./settings-catalog.js";
|
|
7
|
+
register("modelPicker", {
|
|
8
|
+
en: { refresh: "Refresh models", refreshing: "Refreshing models…", refreshed: "Model list refreshed.", failed: "Could not refresh models. The previous list and selection are kept.", more: "More models…", backend: "Choose backend", model: "Choose model", next: "Choose a backend; next choose its model and reasoning effort.", current: "Selected", keep: "Refreshing keeps the selected model.", selectionHint: "Refresh keeps your selection; choose a model to apply it." },
|
|
9
|
+
"zh-TW": { refresh: "重新整理模型", refreshing: "正在重新整理模型…", refreshed: "模型清單已更新。", failed: "無法重新整理模型。已保留原清單與選擇。", more: "更多模型…", backend: "選擇後端", model: "選擇模型", next: "選擇後端;下一步選模型與推理強度", current: "已選擇", keep: "重新整理會保留已選模型。", selectionHint: "重新整理只更新清單;選擇模型才會套用。" },
|
|
10
|
+
});
|
|
11
|
+
export const mw = key => t(`modelPicker.${key}`);
|
|
12
|
+
export function modelPickerStyles() {
|
|
13
|
+
if (typeof document === "undefined" || !document.head || document.querySelector('link[href="/assets/model-picker.css"]')) return;
|
|
14
|
+
const link = document.createElement("link"); link.setAttribute("rel", "stylesheet"); link.setAttribute("href", "/assets/model-picker.css"); document.head.appendChild(link);
|
|
15
|
+
}
|
|
16
|
+
const answers = new Map(); // share only in-flight passive reads; the server owns catalog freshness
|
|
17
|
+
export function forgetModelPickerCatalogs() { answers.clear(); catalogStore.forgetCatalogs?.(); }
|
|
18
|
+
/** Selection remains owned by the form; rediscovery never calls its onChange or stages a change. */
|
|
19
|
+
export function useRefreshableModels(backend, instance) {
|
|
20
|
+
const target = { backend, ...(instance ? {instance} : {}) };
|
|
21
|
+
const key = JSON.stringify(target);
|
|
22
|
+
const [state, set] = useState({ key, models: [], phase: "loading" });
|
|
23
|
+
const generation = useRef(0);
|
|
24
|
+
const current = useRef(key), flight = useRef(null), mounted = useRef(true);
|
|
25
|
+
current.current = key;
|
|
26
|
+
useEffect(() => { mounted.current = true; return () => { mounted.current = false; }; }, []);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
let live = true; const gen = ++generation.current;
|
|
29
|
+
const url = `/ui/models?backend=${encodeURIComponent(backend || "")}${instance ? `&instance=${encodeURIComponent(instance)}` : ""}`;
|
|
30
|
+
const hit = answers.get(key), fresh = !!hit;
|
|
31
|
+
const promise = fresh ? hit.promise : typeof catalogStore.readModelCatalog === "function" ? catalogStore.readModelCatalog(target) : fetch(url, { credentials: "same-origin" }).then(async r => { if (!r.ok) throw Error(); const data = await r.json(); return Array.isArray(data.models) ? data.models : []; });
|
|
32
|
+
if (!fresh) { answers.set(key, { promise }); if (answers.size > 64) answers.delete(answers.keys().next().value); }
|
|
33
|
+
set({ key, models: [], phase: "loading" }); flight.current = null;
|
|
34
|
+
promise.finally(() => { if (answers.get(key)?.promise === promise) answers.delete(key); }).catch(() => {});
|
|
35
|
+
promise.then(models => { if (live && gen === generation.current) set({ key, models, phase: "idle" }); }, () => { if (answers.get(key)?.promise === promise) answers.delete(key); if (live && gen === generation.current) set({ key, models: [], phase: "error" }); });
|
|
36
|
+
return () => { live = false; };
|
|
37
|
+
}, [key]);
|
|
38
|
+
const shown = state.key === key ? state : { key, models: [], phase: "loading" };
|
|
39
|
+
async function refresh() {
|
|
40
|
+
if (flight.current || !backend) return;
|
|
41
|
+
const token = {}; flight.current = token; generation.current++;
|
|
42
|
+
set({ ...shown, phase: "busy" });
|
|
43
|
+
try {
|
|
44
|
+
const r = await fetch("/ui/models/refresh", { method: "POST", credentials: "same-origin", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ backend, ...(instance ? { instance } : {}) }) });
|
|
45
|
+
const data = await r.json();
|
|
46
|
+
if (!r.ok || data.refreshed !== true || !Array.isArray(data.models)) throw Error();
|
|
47
|
+
if (!mounted.current || current.current !== key || flight.current !== token) return;
|
|
48
|
+
answers.delete(key); // Retire the earlier passive flight before a remount can borrow it.
|
|
49
|
+
catalogStore.rememberModelCatalog?.(target, data);
|
|
50
|
+
set({ key, models: data.models, phase: "done" });
|
|
51
|
+
} catch { if (mounted.current && current.current === key && flight.current === token) set({ ...shown, phase: "error" }); }
|
|
52
|
+
finally { if (flight.current === token) flight.current = null; }
|
|
53
|
+
}
|
|
54
|
+
return { ...shown, refresh };
|
|
55
|
+
}
|
|
56
|
+
export function ModelRefresh({ state, disabled }) {
|
|
57
|
+
modelPickerStyles();
|
|
58
|
+
return html`<div class="model-refresh"><button type="button" class="btn" disabled=${disabled || state.phase === "busy"} onClick=${state.refresh}>
|
|
59
|
+
<${Icon} name="restart" size=${16} />${mw(state.phase === "busy" ? "refreshing" : "refresh")}</button>
|
|
60
|
+
<p class="note">${mw("keep")}</p>
|
|
61
|
+
${state.phase === "error" ? html`<${ErrorState} message=${mw("failed")} onRetry=${disabled ? undefined : state.refresh} />`
|
|
62
|
+
: state.phase === "done" ? html`<p class="note" role="status">${mw("refreshed")}</p>` : null}</div>`;
|
|
63
|
+
}
|
|
64
|
+
export const modelLabel = value => ({ sonnet: "Sonnet", opus: "Opus", haiku: "Haiku" }[value] || value);
|