@songsid/agend 2.3.5-alpha.12 → 2.3.5-alpha.14
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/THIRD_PARTY_NOTICES.md +4 -0
- package/dist/agent-export.d.ts +74 -0
- package/dist/agent-export.js +362 -0
- package/dist/agent-export.js.map +1 -0
- package/dist/agent-workspace.d.ts +1 -2
- package/dist/agent-workspace.js +8 -29
- package/dist/agent-workspace.js.map +1 -1
- package/dist/auth-api.js +3 -1
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/codex.d.ts +7 -14
- package/dist/backend/codex.js +25 -29
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/grok-mcp.d.ts +5 -0
- package/dist/backend/grok-mcp.js +221 -0
- package/dist/backend/grok-mcp.js.map +1 -0
- package/dist/backend/grok.d.ts +0 -10
- package/dist/backend/grok.js +5 -82
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/types.d.ts +6 -1
- package/dist/backend/types.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/cli.js +45 -12
- package/dist/cli.js.map +1 -1
- package/dist/codex-pane-ownership.d.ts +13 -0
- package/dist/codex-pane-ownership.js +192 -0
- package/dist/codex-pane-ownership.js.map +1 -0
- package/dist/daemon.d.ts +2 -0
- package/dist/daemon.js +89 -8
- package/dist/daemon.js.map +1 -1
- package/dist/fleet-manager.d.ts +15 -1
- package/dist/fleet-manager.js +72 -17
- package/dist/fleet-manager.js.map +1 -1
- package/dist/hub/client.d.ts +1 -1
- package/dist/hub/client.js +11 -0
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +2 -2
- package/dist/hub/compose/member.js +11 -3
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/join/local.d.ts +1 -0
- package/dist/hub/join/local.js +8 -3
- package/dist/hub/join/local.js.map +1 -1
- package/dist/hub/member/exposure-api.d.ts +2 -0
- package/dist/hub/member/exposure-api.js +4 -2
- package/dist/hub/member/exposure-api.js.map +1 -1
- package/dist/hub/member/pairing-api.d.ts +2 -2
- package/dist/hub/member/pairing-api.js +2 -2
- package/dist/hub/member/pairing-api.js.map +1 -1
- package/dist/hub/server.js +8 -0
- package/dist/hub/server.js.map +1 -1
- package/dist/hub-pairing-summary.d.ts +3 -1
- package/dist/hub-pairing-summary.js +6 -3
- package/dist/hub-pairing-summary.js.map +1 -1
- package/dist/install-user-systemd.d.ts +20 -0
- package/dist/install-user-systemd.js +55 -0
- package/dist/install-user-systemd.js.map +1 -0
- package/dist/linux-launchers.d.ts +88 -0
- package/dist/linux-launchers.js +296 -0
- package/dist/linux-launchers.js.map +1 -0
- package/dist/locale.js +91 -4
- package/dist/locale.js.map +1 -1
- package/dist/runtime-client-store.js +5 -0
- package/dist/runtime-client-store.js.map +1 -1
- package/dist/runtime-pane-private.d.ts +2 -0
- package/dist/runtime-pane-private.js +25 -0
- package/dist/runtime-pane-private.js.map +1 -1
- package/dist/runtime-pane-private.ps1 +74 -7
- package/dist/selection-card.d.ts +4 -3
- package/dist/selection-card.js +2 -1
- package/dist/selection-card.js.map +1 -1
- package/dist/service-installer.js +11 -2
- package/dist/service-installer.js.map +1 -1
- package/dist/settings-change.d.ts +2 -0
- package/dist/settings-change.js +74 -31
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-confirmation.d.ts +23 -0
- package/dist/settings-confirmation.js +13 -2
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.d.ts +4 -0
- package/dist/settings-effect.js +14 -14
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +3 -1
- package/dist/settings-http-confirmation.js +12 -7
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-summary.d.ts +24 -0
- package/dist/settings-summary.js +42 -0
- package/dist/settings-summary.js.map +1 -0
- package/dist/transcript-delta-reader.d.ts +9 -1
- package/dist/transcript-delta-reader.js +37 -8
- package/dist/transcript-delta-reader.js.map +1 -1
- package/dist/ui/agent-details-settings.js +253 -0
- package/dist/ui/agent-export-dialog.js +169 -0
- package/dist/ui/agent-export-strings.js +81 -0
- package/dist/ui/agent-instructions-field.js +69 -0
- package/dist/ui/agent-page-strings.js +148 -0
- package/dist/ui/chat-quote.js +12 -17
- package/dist/ui/hub-client.js +1 -1
- package/dist/ui/hub-company-join-strings.js +1 -1
- package/dist/ui/hub-company-join.js +7 -0
- package/dist/ui/hub-strings.js +4 -0
- package/dist/ui/native-instance-settings.js +47 -14
- package/dist/ui/panel-details.js +38 -14
- package/dist/ui/panel-fleet.js +2 -2
- package/dist/ui/panel-settings.js +12 -9
- package/dist/ui/settings-access-overview.js +24 -3
- package/dist/ui/settings-confirm.js +5 -5
- package/dist/ui/settings-dialogs.js +210 -100
- package/dist/ui/settings-hub-company-join.js +69 -14
- package/dist/ui/settings-hub.js +13 -5
- package/dist/ui/settings-layout.js +0 -2
- package/dist/ui/settings-model.js +15 -0
- package/dist/ui/shared/access-overview.css +48 -0
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app-shell.js +144 -3
- package/dist/ui/shared/app.css +74 -50
- package/dist/ui/shared/instance-nav.js +5 -1
- package/dist/ui/shared/view-strings.js +2 -0
- package/dist/update-dispatch.d.ts +62 -0
- package/dist/update-dispatch.js +69 -2
- package/dist/update-dispatch.js.map +1 -1
- package/dist/web-api.d.ts +2 -0
- package/dist/web-api.js +49 -0
- package/dist/web-api.js.map +1 -1
- package/dist/web-session.d.ts +4 -2
- package/dist/web-session.js +5 -2
- package/dist/web-session.js.map +1 -1
- package/dist/windows-shortcuts.d.ts +29 -5
- package/dist/windows-shortcuts.js +52 -9
- package/dist/windows-shortcuts.js.map +1 -1
- package/dist/workspace-file-policy.d.ts +2 -0
- package/dist/workspace-file-policy.js +31 -0
- package/dist/workspace-file-policy.js.map +1 -0
- package/dist/workspace-follow.js +2 -1
- package/dist/workspace-follow.js.map +1 -1
- package/launcher/agend-install.cjs +7 -1
- package/package.json +2 -2
- package/templates/icons/agend-restart.ico +0 -0
- package/templates/icons/agend.ico +0 -0
- package/templates/runtime-assets/runtime-pane-private.ps1 +74 -7
- package/templates/windows-shortcuts.ps1 +45 -12
|
@@ -20,6 +20,10 @@ import { backendLabel } from "/assets/instance-nav.js";
|
|
|
20
20
|
import {AgentRuntimeSettings} from "./agent-runtime-settings.js";
|
|
21
21
|
import "./settings-strings.js"; // its words, wherever a picker of this file is used (#2072: Fleet's create dialog too)
|
|
22
22
|
import "./settings-shared-strings.js";
|
|
23
|
+
import { pt } from "./agent-page-strings.js";
|
|
24
|
+
import { InfoTip } from "./settings-shared.js";
|
|
25
|
+
import { INSTRUCTIONS_MAX_CHARS, InstructionsField } from "./agent-instructions-field.js";
|
|
26
|
+
import { AgentTemplateTools } from "./agent-export-dialog.js";
|
|
23
27
|
import { backendChoices, modelChoices, OTHER_MODEL, useBackendRows } from "./settings-catalog.js";
|
|
24
28
|
import {
|
|
25
29
|
ACCESS_MODES, AGENT_MODES, CH_TYPES, DASHBOARD_CHOICES, DASHBOARD_FEATURES, HANG_TIMEOUT_DEFAULT_MINUTES, LOG_LEVELS, TOOL_PROGRESS, TOOL_SETS,
|
|
@@ -103,7 +107,9 @@ export function ModelSelect({ value, onChange, disabled, id, backend, instance,
|
|
|
103
107
|
${managed ? html`${state.phase !== "load_error" ? html`<div class="model-catalog-status"><span class="note" role="status" aria-live="polite">${note}</span></div>` : null}<${ModelRefresh} state=${state} disabled=${disabled} initialFailure=${tn("modelCatalogFailed")} />` : null}</div>`;
|
|
104
108
|
}
|
|
105
109
|
export function Impact({ schema, field }) { return html`<span class="impact">${impactText(impactOf(schema, field))}</span>`; }
|
|
106
|
-
export function Label({ text, schema, field, htmlFor, mark }) {
|
|
110
|
+
export function Label({ text, schema, field, htmlFor, mark, tip }) {
|
|
111
|
+
// with an ⓘ the label, the ⓘ and the timing sit in one header (the ⓘ is a button, never inside a label).
|
|
112
|
+
if (tip) return html`<div class="s-lab"><label for=${htmlFor}>${text}</label>${mark ? html`${mark}` : null}<${InfoTip} text=${tip} name=${text} />${field ? html`<${Impact} schema=${schema} field=${field} />` : null}</div>`;
|
|
107
113
|
return html`<label for=${htmlFor}>${text}${mark ? html` ${mark}` : null}${field ? html` <${Impact} schema=${schema} field=${field} />` : null}</label>`;
|
|
108
114
|
}
|
|
109
115
|
/** #2347 §10: the mark of a value nobody set — what is in effect is the built-in default. */
|
|
@@ -289,7 +295,11 @@ function EmojiPicker({ cat, keyName, platform, channel, onPick, onClose }) {
|
|
|
289
295
|
|
|
290
296
|
// ── Agent ──
|
|
291
297
|
|
|
292
|
-
|
|
298
|
+
/**
|
|
299
|
+
* one agent's form — its draft, validation and patch — shared by the Settings dialog (AgentDialog) and the
|
|
300
|
+
* Details & settings page (agent-details-settings.js). Nothing here writes: `stage()` hands the patch to ctx.stageAgent.
|
|
301
|
+
*/
|
|
302
|
+
export function useAgentForm({ name, inst, ctx }) {
|
|
293
303
|
const { fleet, schema } = ctx;
|
|
294
304
|
const defaults = fleet.defaults || {};
|
|
295
305
|
const [f, setF] = useState(() => agentForm(inst, defaults, name));
|
|
@@ -303,6 +313,9 @@ export function AgentDialog({ name, inst, ctx, onClose }) {
|
|
|
303
313
|
const errors = {
|
|
304
314
|
auto: f.inherit.auto_pause_after ? "" : nonNegative(f.auto_pause_after),
|
|
305
315
|
hang: f.inherit.hang ? "" : positive(f.hang),
|
|
316
|
+
// Agent instructions (systemPrompt) over the editor's limit: only a text being edited — one already saved that is longer stays as it is.
|
|
317
|
+
instructions: (f.systemPrompt || "").length > INSTRUCTIONS_MAX_CHARS && f.systemPrompt !== (inst.systemPrompt || "") ? "instrTooLong" : "",
|
|
318
|
+
cards: Number.isInteger(Number(f.board_cards_at_once)) && Number(f.board_cards_at_once) >= 1 && String(f.board_cards_at_once).trim() !== "" ? "" : "mustBePositiveInteger",
|
|
306
319
|
};
|
|
307
320
|
// #3008 G1: a fleet with no chat connection has one General at most — ticking a second says which one it is, right
|
|
308
321
|
// by the checkbox (kept ticked, Save waits), by the name the chat list shows (the leader's string 18).
|
|
@@ -310,7 +323,7 @@ export function AgentDialog({ name, inst, ctx, onClose }) {
|
|
|
310
323
|
? Object.entries(fleet.instances || {}).find(([other, c]) => other !== name && c && (c.general_topic === true || (other === "general" && c.general_topic !== false))) : null;
|
|
311
324
|
const generalError = otherGeneral ? tn("oneGeneral", ctx.shortName(otherGeneral[0], otherGeneral[1])) : "";
|
|
312
325
|
const failoverWarn = !f.inherit.model_failover && !f.model_failover.trim() ? "failoverEmpty" : "";
|
|
313
|
-
const ready = !errors.auto && !errors.hang && !generalError;
|
|
326
|
+
const ready = !errors.auto && !errors.hang && !errors.cards && !errors.instructions && !generalError;
|
|
314
327
|
// #3212: the agent's own credential profile for its CLI ("" = none: it follows the fleet default). Host agents only.
|
|
315
328
|
const acctBackend = f.backend || defaults.backend || "claude-code";
|
|
316
329
|
const ownAccount = (inst.backend_options && inst.backend_options[acctBackend] && inst.backend_options[acctBackend].credential_profile) || "";
|
|
@@ -322,11 +335,11 @@ export function AgentDialog({ name, inst, ctx, onClose }) {
|
|
|
322
335
|
opts[acctBackend] = { ...(opts[acctBackend] || {}), credential_profile: acct || null };
|
|
323
336
|
return { ...patch, backend_options: opts };
|
|
324
337
|
};
|
|
325
|
-
const stage = () => {
|
|
338
|
+
const stage = (done) => {
|
|
326
339
|
if (!ready) return;
|
|
327
340
|
const patch = pending();
|
|
328
341
|
if (Object.keys(patch).length) ctx.stageAgent(name, inst, patch);
|
|
329
|
-
|
|
342
|
+
if (done) done();
|
|
330
343
|
};
|
|
331
344
|
// What an override shows while it inherits: the default.
|
|
332
345
|
const shown = (k, own, dflt) => (f.inherit[k] ? dflt : own);
|
|
@@ -334,83 +347,157 @@ export function AgentDialog({ name, inst, ctx, onClose }) {
|
|
|
334
347
|
const dh = defaults.hang_detector || {};
|
|
335
348
|
const inh = (k, value, target, kind, set = hasOwn(defaults, k)) => ({ text: valueText(value, kind), builtin: !set, from: target ? inAgentDefaults(target) : null });
|
|
336
349
|
const inheritedBackend = !inst.backend && f.backend === (defaults.backend || "claude-code");
|
|
337
|
-
const L = (text, field, id) => html`<${Label} text=${text} schema=${schema} field=${field} htmlFor=${id} />`;
|
|
338
|
-
return
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
350
|
+
const L = (text, field, id, tip) => html`<${Label} text=${text} schema=${schema} field=${field} htmlFor=${id} tip=${tip} />`;
|
|
351
|
+
return { name, inst, ctx, fleet, schema, defaults, f, setF, set, setInherit, emojis, setEmojis, ids, kiroUi, errors, generalError, failoverWarn, ready,
|
|
352
|
+
acctBackend, acct, setAcct, pending, stage, shown, dh, inh, inheritedBackend, L };
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/** The agent dialog's categories, in order (the Details & settings page lists the same ones, with Overview before them). */
|
|
356
|
+
export const AGENT_CATEGORIES = ["basic", "runtime", "work", "channel", "adv"];
|
|
357
|
+
|
|
358
|
+
/** A card of a category: its title, and what is in it (`span`: across both columns of a wide page). */
|
|
359
|
+
const Card = ({ title, span, cls = "", children }) => html`<section class=${`card${span ? " ap-span2" : ""}${cls ? ` ${cls}` : ""}`}><h3>${title}</h3>${children}</section>`;
|
|
360
|
+
/** A note under a setting: an ⓘ line in the page's words. */
|
|
361
|
+
const Info = ({ children }) => html`<p class="s-info"><span aria-hidden="true">ⓘ</span><span>${children}</span></p>`;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* the fields of one category of a fleet agent (the same fields, ids and patch the dialog always had, grouped by what they
|
|
365
|
+
* do and each with its ⓘ). `m`: useAgentForm's result. `onDelete`: the page's "Delete agent…" (the dialog has none).
|
|
366
|
+
*/
|
|
367
|
+
export function AgentFields({ m, cat, onDelete }) {
|
|
368
|
+
const { f, set, setInherit, schema, defaults, inst, name, ctx, errors, shown, inh, L, ids, kiroUi, acct, acctBackend, setAcct, inheritedBackend, generalError, failoverWarn, setF, emojis, setEmojis } = m;
|
|
369
|
+
const windows = inst.runtime === "windows";
|
|
370
|
+
if (cat === "basic") return html`<div class="ap-grid"><${Card} title=${pt("cardName")} span=${true}>
|
|
371
|
+
<div class="grid2">
|
|
372
|
+
<div class="field">${L(tn("displayName"), "instance.display_name", "ag-dn", pt("tip_displayName"))}
|
|
373
|
+
<${Override} inherit=${f.inherit.display_name} onInherit=${setInherit("display_name")} inherited=${inh("display_name", defaults.display_name || name, null, "", !!defaults.display_name)}>
|
|
374
|
+
<input id="ag-dn" type="text" placeholder=${name} disabled=${f.inherit.display_name} value=${shown("display_name", f.display_name, defaults.display_name || "")} onInput=${(e) => set("display_name")(e.target.value)} /></${Override}></div>
|
|
375
|
+
<div class="field">${L(tn("tags"), "instance.tags", undefined, pt("tip_tags"))}<${ChipList} items=${f.tags} onChange=${set("tags")} placeholder=${tn("tagPlaceholder")} label=${tn("tags")} /></div>
|
|
376
|
+
</div>
|
|
377
|
+
<div class="field">${L(tn("description"), "instance.description", "ag-desc", pt("tip_description"))}<input id="ag-desc" type="text" value=${f.description} onInput=${(e) => set("description")(e.target.value)} />
|
|
378
|
+
<p class="note">${pt("note_description")}</p></div></${Card}>
|
|
379
|
+
${windows ? null : html`<${Card} title=${pt("cardInstructions")} span=${true}>
|
|
380
|
+
<div class="field">${L(pt("lbl_instructions"), "instance.systemPrompt", "ag-sys", pt("tip_instructions"))}<${InstructionsField} id="ag-sys" value=${f.systemPrompt} saved=${inst.systemPrompt || ""} onChange=${set("systemPrompt")} />
|
|
381
|
+
<p class="note">${pt("note_instructions")}</p></div>
|
|
382
|
+
<${AgentTemplateTools} name=${name} m=${m} /></${Card}>`}</div>`;
|
|
383
|
+
if (cat === "runtime") return html`<div class="ap-grid">
|
|
384
|
+
<${Card} title=${pt("cardRuntime")}>
|
|
385
|
+
<${AgentRuntimeSettings} name=${name} inst=${{ ...inst, backend: f.backend }} inherited=${inheritedBackend ? html`<${Inherited} ...${inh("backend", f.backend, "#g-be", "backend")} />` : null} disabled=${Object.keys(m.pending()).length > 0 || ctx.staged?.size > 0} onChanged=${() => { ctx.reload(); if (m.onChanged) m.onChanged(); }} />
|
|
386
|
+
${!windows && capsOf(acctBackend)?.namedAccounts ? html`<${AccountSelect} id="ag-account" backend=${acctBackend} value=${acct} onChange=${setAcct} />` : null}
|
|
387
|
+
</${Card}>
|
|
388
|
+
<${Card} title=${pt("cardModel")}>
|
|
389
|
+
<div class="field">${L(tn("model"), "instance.model", "ag-model", pt("tip_model"))}<${ModelSelect} id="ag-model" value=${f.model} onChange=${set("model")}
|
|
390
|
+
backend=${acctBackend} instance=${name} profile=${windows ? undefined : acct} inherit=${tn("inheritValue", defaults.model || tn("modelCliDefault"))} /></div>
|
|
391
|
+
${acctBackend === "codex" && !windows ? html`<div class="field codex-speed">${L(tn("codexSpeed"), "instance.backend_options", "ag-speed", pt("tip_codexSpeed"))}
|
|
348
392
|
<${Select} id="ag-speed" value=${f.codex_speed} onChange=${set("codex_speed")}
|
|
349
393
|
options=${CODEX_SPEED_CHOICES.map((v) => ({ value: v, label: tn(v === "fast" ? "codexSpeedFast" : v === "standard" ? "codexSpeedStandard" : "codexSpeedDefault") }))} />
|
|
350
394
|
<p class="note">${tn("codexSpeedHint")}</p></div>` : null}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
inherited=${inh("model_failover", (defaults.model_failover && defaults.model_failover[0]) || tn("modelNone"), null, "", !!(defaults.model_failover && defaults.model_failover.length))}>
|
|
399
|
-
<${ModelSelect} id="ag-fo" disabled=${f.inherit.model_failover} backend=${f.backend || defaults.backend || "claude-code"} instance=${name} profile=${inst.runtime === "windows" ? undefined : acct} inherit=${tn("modelNone")}
|
|
400
|
-
value=${shown("model_failover", f.model_failover, (defaults.model_failover && defaults.model_failover[0]) || "")} onChange=${set("model_failover")} /></${Override}>
|
|
401
|
-
<${Feedback} warning=${failoverWarn} /></div>
|
|
402
|
-
</div>
|
|
403
|
-
<div class="field">${L(tn("systemPrompt"), "instance.systemPrompt", "ag-sys")}<input id="ag-sys" type="text" placeholder="e.g. file:prompts/dev.md" value=${f.systemPrompt} onInput=${(e) => set("systemPrompt")(e.target.value)} /></div>
|
|
404
|
-
<div class="field">${L(tn("tags"), "instance.tags")}<${ChipList} items=${f.tags} onChange=${set("tags")} placeholder=${tn("tagPlaceholder")} label=${tn("tags")} /></div>
|
|
405
|
-
<label class="check"><input id="ag-general" type="checkbox" checked=${f.general_topic} onChange=${(e) => set("general_topic")(e.target.checked)} /><span>${tn("generalTopicField")}</span>
|
|
406
|
-
<${Impact} schema=${schema} field="instance.general_topic" /></label>
|
|
395
|
+
<div class="field">${L(tn("modelFailover"), "instance.model_failover", "ag-fo", pt("tip_failover"))}
|
|
396
|
+
<${Override} inherit=${f.inherit.model_failover} onInherit=${setInherit("model_failover")}
|
|
397
|
+
inherited=${inh("model_failover", (defaults.model_failover && defaults.model_failover[0]) || tn("modelNone"), null, "", !!(defaults.model_failover && defaults.model_failover.length))}>
|
|
398
|
+
<${ModelSelect} id="ag-fo" disabled=${f.inherit.model_failover} backend=${acctBackend} instance=${name} profile=${windows ? undefined : acct} inherit=${tn("modelNone")}
|
|
399
|
+
value=${shown("model_failover", f.model_failover, (defaults.model_failover && defaults.model_failover[0]) || "")} onChange=${set("model_failover")} /></${Override}>
|
|
400
|
+
<${Feedback} warning=${failoverWarn} /></div>
|
|
401
|
+
<${Info}>${pt("note_effort")}</${Info}>
|
|
402
|
+
</${Card}></div>`;
|
|
403
|
+
if (cat === "work") return html`<div class="ap-grid">
|
|
404
|
+
<${Card} title=${pt("cardWorkdir")}>
|
|
405
|
+
<div class="field">${L(tn("workingDir"), "instance.working_directory", "ag-wd", pt("tip_workingDir"))}<input id="ag-wd" type="text" value=${f.working_directory} onInput=${(e) => set("working_directory")(e.target.value)} /></div>
|
|
406
|
+
<${Info}>${pt("note_workdir")}</${Info}></${Card}>
|
|
407
|
+
<${Card} title=${pt("cardIdle")}>
|
|
408
|
+
<div class="field">${L(`${tn("autoPause")} (${tn("minutes")})`, "instance.auto_pause_after", "ag-auto", pt("tip_autoPause"))}
|
|
409
|
+
<${Override} inherit=${f.inherit.auto_pause_after} onInherit=${setInherit("auto_pause_after")} inherited=${inh("auto_pause_after", defaults.auto_pause_after ?? 0, "#g-auto", "minutes")}>
|
|
410
|
+
<input id="ag-auto" type="number" min="0" step="1" placeholder=${tn("zeroDisabled")} class=${errors.auto ? "invalid" : ""} disabled=${f.inherit.auto_pause_after}
|
|
411
|
+
value=${shown("auto_pause_after", f.auto_pause_after, String(defaults.auto_pause_after ?? 0))} onInput=${(e) => set("auto_pause_after")(e.target.value)} /></${Override}>
|
|
412
|
+
<${Feedback} error=${errors.auto} /></div>
|
|
413
|
+
<div class="field">${L(`${tn("hangTimeout")} (${tn("minutes")})`, "instance.hang_detector", "ag-hang", pt("tip_hang"))}
|
|
414
|
+
<${Override} inherit=${f.inherit.hang} onInherit=${setInherit("hang")}
|
|
415
|
+
inherited=${inh("hang", m.dh.timeout_minutes ?? HANG_TIMEOUT_DEFAULT_MINUTES, "#g-hang", "minutes", hasOwn(m.dh, "timeout_minutes"))}>
|
|
416
|
+
<input id="ag-hang" type="number" min="0.1" step="0.5" class=${errors.hang ? "invalid" : ""} disabled=${f.inherit.hang}
|
|
417
|
+
value=${shown("hang", f.hang, String((defaults.hang_detector && defaults.hang_detector.timeout_minutes) ?? HANG_TIMEOUT_DEFAULT_MINUTES))} onInput=${(e) => set("hang")(e.target.value)} /></${Override}>
|
|
418
|
+
<${Feedback} error=${errors.hang} /></div></${Card}>
|
|
419
|
+
<${Card} title=${pt("cardTools")} span=${true}><div class="grid2">
|
|
420
|
+
${[["agent_mode", "agentMode", AGENT_MODES, defaults.agent_mode || "mcp", "#g-am", "tip_agentMode"], ["tool_set", "toolSet", TOOL_SETS, toolSetDefault(defaults, inst, name), "#g-ts", "tip_toolSet"]].map(([k, label, opts, dflt, target, tip]) => html`<div key=${k} class="field">
|
|
421
|
+
${L(tn(label), `instance.${k}`, `ag-${k}`, pt(tip))}
|
|
422
|
+
<${Override} inherit=${f.inherit[k]} onInherit=${setInherit(k)} inherited=${inh(k, dflt, target, "", hasOwn(defaults, k))}>
|
|
423
|
+
<${Select} id=${`ag-${k}`} value=${shown(k, f[k], dflt)} disabled=${f.inherit[k]} onChange=${set(k)}
|
|
424
|
+
options=${opts.includes(shown(k, f[k], dflt)) ? opts : [shown(k, f[k], dflt), ...opts]} /></${Override}></div>`)}
|
|
425
|
+
<div class="field">${L(tn("replyCompletionGuard"), "instance.reply_completion_guard", undefined, pt("tip_replyGuard"))}
|
|
426
|
+
<${Override} inherit=${f.inherit.reply_completion_guard} onInherit=${setInherit("reply_completion_guard")} inherited=${inh("reply_completion_guard", defaults.reply_completion_guard ?? true, "#g-reply")}>
|
|
427
|
+
<label class="check"><input aria-label=${tn("replyCompletionGuard")} type="checkbox" disabled=${f.inherit.reply_completion_guard} checked=${shown("reply_completion_guard", f.reply_completion_guard, defaults.reply_completion_guard ?? true)}
|
|
428
|
+
onChange=${(e) => set("reply_completion_guard")(e.target.checked)} /><span>${pt("checkEnable")}</span></label></${Override}>
|
|
429
|
+
<p class="note">${replyHint(f.backend, f.inherit.agent_mode ? defaults.agent_mode || "mcp" : f.agent_mode, kiroUi)}</p></div>
|
|
430
|
+
<div class="field">${L(tn("lightweight"), "instance.lightweight", undefined, pt("tip_lightweight"))}
|
|
431
|
+
<${Override} inherit=${f.inherit.lightweight} onInherit=${setInherit("lightweight")} inherited=${inh("lightweight", defaults.lightweight ?? false, null)}>
|
|
432
|
+
<label class="check"><input aria-label=${tn("lightweight")} type="checkbox" disabled=${f.inherit.lightweight} checked=${shown("lightweight", f.lightweight, defaults.lightweight ?? false)}
|
|
433
|
+
onChange=${(e) => set("lightweight")(e.target.checked)} /><span>${pt("checkEnable")}</span></label></${Override}></div>
|
|
434
|
+
</div></${Card}></div>`;
|
|
435
|
+
if (cat === "channel") {
|
|
436
|
+
const channel = f.channel_id || ids[0] || null;
|
|
437
|
+
return html`<div class="ap-grid">
|
|
438
|
+
<${Card} title=${pt("cardChannel")}>
|
|
439
|
+
<div class="field">${L(tn("channelBinding"), "instance.topic_id", "ag-ch", pt("tip_channel"))}<${Select} id="ag-ch" value=${f.channel_id} onChange=${set("channel_id")} options=${["", ...ids]} /></div>
|
|
440
|
+
<div class="field">${L(tn("generalTopicField"), "instance.general_topic", undefined, pt("tip_general"))}
|
|
441
|
+
<label class="check"><input aria-label=${tn("generalTopicField")} id="ag-general" type="checkbox" checked=${f.general_topic} onChange=${(e) => set("general_topic")(e.target.checked)} /><span>${pt("checkEnable")}</span></label></div>
|
|
407
442
|
${generalError ? html`<p class="feedback error" role="alert" id="ag-general-one">${generalError}</p>` : null}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
443
|
+
${[["tool_progress", "toolProgress", TOOL_PROGRESS, defaults.tool_progress ?? "off", "#g-tp", "tip_toolProgress"], ["cross_instance_visibility", "crossInstanceVisibility", VISIBILITY_MODES, visibilityDefault(defaults), "#g-vis", "tip_visibility"]].map(([k, label, opts, dflt, target, tip]) => html`<div key=${k} class="field">
|
|
444
|
+
${L(tn(label), `instance.${k}`, `ag-${k}`, pt(tip))}
|
|
445
|
+
<${Override} inherit=${f.inherit[k]} onInherit=${setInherit(k)}
|
|
446
|
+
inherited=${inh(k, dflt, target, k, k === "cross_instance_visibility" ? VISIBILITY_MODES.includes(defaults[k]) : hasOwn(defaults, k))}>
|
|
447
|
+
<${Select} id=${`ag-${k}`} value=${shown(k, f[k], dflt)} disabled=${f.inherit[k]} onChange=${set(k)}
|
|
448
|
+
options=${choiceOptions(k, opts.includes(shown(k, f[k], dflt)) || k === "cross_instance_visibility" ? opts : [shown(k, f[k], dflt), ...opts])} /></${Override}>
|
|
449
|
+
${k === "cross_instance_visibility" ? html`<p class="note">${tn("crossInstanceVisibilityHint")}</p>` : null}</div>`)}
|
|
450
|
+
</${Card}>
|
|
451
|
+
<${Card} title=${html`${pt("cardEmojis")} <${InfoTip} text=${pt("tip_emojis")} name=${pt("cardEmojis")} /> <${Impact} schema=${schema} field="instance.status_emojis" />`}>
|
|
452
|
+
<${Info}>${pt("emojisWhat")}</${Info}>
|
|
453
|
+
<p class="note">${tn("statusEmojisInstance")}</p>
|
|
454
|
+
<${StatusEmojiEditor} own=${inst.status_emojis} platform=${ctx.channelType(channel)} channel=${channel}
|
|
455
|
+
previewBody=${(map) => ({ channel_id: channel, instance_config: map })} onChange=${setEmojis} />
|
|
456
|
+
</${Card}></div>`;
|
|
457
|
+
}
|
|
458
|
+
// adv
|
|
459
|
+
return html`<div class="ap-grid">
|
|
460
|
+
${windows ? html`<${Card} title=${pt("cardSystemPrompt")} span=${true}>
|
|
461
|
+
<div class="field">${L(tn("systemPrompt"), "instance.systemPrompt", "ag-sys", pt("tip_systemPrompt"))}<input id="ag-sys" type="text" placeholder="e.g. file:prompts/dev.md" value=${f.systemPrompt} onInput=${(e) => set("systemPrompt")(e.target.value)} /></div>
|
|
462
|
+
<p class="note">${pt("note_systemPrompt")}</p></${Card}>` : null}
|
|
463
|
+
<${Card} title=${pt("cardLogging")}>
|
|
464
|
+
<div class="field">${L(tn("logLevel"), "instance.log_level", "ag-log_level", pt("tip_logLevel"))}
|
|
465
|
+
<${Override} inherit=${f.inherit.log_level} onInherit=${setInherit("log_level")} inherited=${inh("log_level", defaults.log_level || "info", "#g-ll", "", hasOwn(defaults, "log_level"))}>
|
|
466
|
+
<${Select} id="ag-log_level" value=${shown("log_level", f.log_level, defaults.log_level || "info")} disabled=${f.inherit.log_level} onChange=${set("log_level")}
|
|
467
|
+
options=${LOG_LEVELS.includes(shown("log_level", f.log_level, defaults.log_level || "info")) ? LOG_LEVELS : [shown("log_level", f.log_level, defaults.log_level || "info"), ...LOG_LEVELS]} /></${Override}></div>
|
|
468
|
+
<div class="field">${L(pt("lbl_resumeWork"), "instance.resume_interrupted_work", undefined, pt("tip_resumeWork"))}
|
|
469
|
+
<label class="check"><input aria-label=${pt("lbl_resumeWork")} id="ag-resume" type="checkbox" checked=${f.resume_interrupted_work} onChange=${(e) => set("resume_interrupted_work")(e.target.checked)} /><span>${pt("checkEnable")}</span></label></div>
|
|
470
|
+
<div class="field">${L(pt("lbl_mcpProxy"), "instance.mcp_proxy_reply", undefined, pt("tip_mcpProxy"))}
|
|
471
|
+
<label class="check"><input aria-label=${pt("lbl_mcpProxy")} id="ag-mcp-proxy" type="checkbox" checked=${f.mcp_proxy_reply} onChange=${(e) => set("mcp_proxy_reply")(e.target.checked)} /><span>${pt("checkEnable")}</span></label></div></${Card}>
|
|
472
|
+
<${Card} title=${pt("cardBoard")}>
|
|
473
|
+
<div class="field">${L(pt("lbl_boardCards"), "instance.board_cards_at_once", "ag-cards", pt("tip_boardCards"))}
|
|
474
|
+
<input id="ag-cards" type="number" min="1" step="1" class=${errors.cards ? "invalid" : ""} value=${f.board_cards_at_once} onInput=${(e) => set("board_cards_at_once")(e.target.value)} />
|
|
475
|
+
${errors.cards ? html`<p class="feedback error" role="alert">${pt(errors.cards)}</p>` : null}</div></${Card}>
|
|
476
|
+
<${Card} title=${pt("cardDashboard")} span=${true}>
|
|
477
|
+
<fieldset class="field dash-perms"><legend>${L(tn("dashboardAccess"), "instance.dashboard")}</legend>
|
|
478
|
+
<p class="note">${tn("dashboardAccessHint")}</p>
|
|
479
|
+
<div class="grid2">${DASHBOARD_FEATURES.map((feature) => html`<div key=${feature} class="field">
|
|
480
|
+
<label for=${`ag-dash-${feature}`}>${tn(`dashboard_${feature}`)}</label>
|
|
481
|
+
<select id=${`ag-dash-${feature}`} value=${f.dashboard[feature]} onChange=${(e) => setF((x) => ({ ...x, dashboard: { ...x.dashboard, [feature]: e.target.value } }))}>
|
|
482
|
+
${DASHBOARD_CHOICES.map((c) => html`<option key=${c} value=${c}>${c === "inherit"
|
|
483
|
+
? tn("dashboardInherit", tn(dashboardDefault(defaults, feature) ? "dashboardOn" : "dashboardOff")) : tn(c === "on" ? "dashboardOn" : "dashboardOff")}</option>`)}
|
|
484
|
+
</select></div>`)}</div>
|
|
485
|
+
</fieldset></${Card}>
|
|
486
|
+
${onDelete ? html`<${Card} title=${pt("cardElsewhere")} span=${true}><${Info}>${pt("elsewhere")}</${Info}></${Card}>
|
|
487
|
+
<${Card} title=${pt("cardDanger")} span=${true} cls="ap-danger"><div class="field-row"><button type="button" class="btn btn-danger btn-sm" onClick=${onDelete}>${pt("deleteAgent")}</button>
|
|
488
|
+
<span class="note">${pt("deleteNote")}</span></div></${Card}>` : null}
|
|
489
|
+
</div>`;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
export function AgentDialog({ name, inst, ctx, onClose }) {
|
|
493
|
+
const m = useAgentForm({ name, inst, ctx });
|
|
494
|
+
m.onChanged = () => onClose();
|
|
495
|
+
return html`<${EditDialog} title=${ctx.shortName(name, inst)} subtitle=${tn("idLine", name)} onClose=${onClose} onStage=${() => m.stage(onClose)} ready=${m.ready} drawer=${true} impacts=${Object.keys(m.pending()).map((k) => `instance.${k}`)} schema=${m.schema}>
|
|
496
|
+
<${AgentFields} m=${m} cat="basic" />
|
|
497
|
+
<${AgentFields} m=${m} cat="runtime" />
|
|
498
|
+
<${AgentFields} m=${m} cat="work" />
|
|
499
|
+
<${Drawer} title=${pt("cat_channel")}><${AgentFields} m=${m} cat="channel" /></${Drawer}>
|
|
500
|
+
<${Drawer} title=${pt("cat_adv")}><${AgentFields} m=${m} cat="adv" /></${Drawer}>
|
|
414
501
|
</${EditDialog}>`;
|
|
415
502
|
}
|
|
416
503
|
|
|
@@ -688,7 +775,11 @@ export function NewBotDialog({ ctx, onClose }) {
|
|
|
688
775
|
|
|
689
776
|
// ── ClassicBot room ──
|
|
690
777
|
|
|
691
|
-
|
|
778
|
+
/** the ClassicBot room's categories (it has no basic info, workspace or advanced settings of its own). */
|
|
779
|
+
export const CLASSIC_CATEGORIES = ["runtime", "channel"];
|
|
780
|
+
|
|
781
|
+
/** One room's form — shared by the Settings dialog (ClassicDialog) and the Details & settings page. */
|
|
782
|
+
export function useClassicForm({ room, ctx }) {
|
|
692
783
|
const { fleet, classic, schema } = ctx;
|
|
693
784
|
const cd = (classic && classic.defaults) || {}, fd = fleet.defaults || {};
|
|
694
785
|
const inherited = {
|
|
@@ -728,13 +819,13 @@ export function ClassicDialog({ room, ctx, onClose }) {
|
|
|
728
819
|
reply_triggers: hasOwn(c, "reply_triggers") ? c.reply_triggers : null,
|
|
729
820
|
collab: !!c.collab, context_lines: c.context_lines ?? cd.context_lines ?? 5, web_echo: classicWebEchoEffective(c, fleet),
|
|
730
821
|
});
|
|
731
|
-
const stage = async () => {
|
|
822
|
+
const stage = async (done) => {
|
|
732
823
|
if (!ready) return;
|
|
733
824
|
const patch = pending();
|
|
734
|
-
if (!Object.keys(patch).length) {
|
|
825
|
+
if (!Object.keys(patch).length) { if (done) done(); return; }
|
|
735
826
|
if (!lease.current()) return;
|
|
736
827
|
ctx.stageClassic(c, patch);
|
|
737
|
-
|
|
828
|
+
if (done) done();
|
|
738
829
|
};
|
|
739
830
|
// #2347 §10: what a room inherits, from where — ClassicBot defaults when they set it, else Agent defaults ("default"
|
|
740
831
|
// when neither does) — with a link there.
|
|
@@ -743,36 +834,55 @@ export function ClassicDialog({ room, ctx, onClose }) {
|
|
|
743
834
|
return { text: valueText(inherited[k], kind), builtin: !own && !hasOwn(fd, k),
|
|
744
835
|
from: own ? { section: "chat", target: classicTarget, label: "changeInClassic" } : inAgentDefaults(agentTarget) };
|
|
745
836
|
};
|
|
746
|
-
const L = (text, field, id) => html`<${Label} text=${text} schema=${schema} field=${field} htmlFor=${id} />`;
|
|
747
|
-
return
|
|
748
|
-
|
|
749
|
-
|
|
837
|
+
const L = (text, field, id, tip) => html`<${Label} text=${text} schema=${schema} field=${field} htmlFor=${id} tip=${tip} />`;
|
|
838
|
+
return { room, ctx, c, f, set, setInherit, errors, ready, runtime, classicMode, fd, inherited, roomInh, pending, stage, schema, L };
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
/** The fields of one category of a ClassicBot room: the dialog's fields, grouped, each with its ⓘ. */
|
|
842
|
+
export function ClassicFields({ m, cat }) {
|
|
843
|
+
const { c, f, set, setInherit, errors, classicMode, fd, inherited, roomInh, schema, L } = m;
|
|
844
|
+
if (cat === "runtime") return html`<div class="ap-grid"><${Card} title=${pt("cardRuntime")} span=${true}><div class="grid2">
|
|
845
|
+
<div class="field">${L(tn("backend"), "classic.backend", "cl-be", pt("tip_classicBackend"))}<${BackendSelect} id="cl-be" value=${f.backend} onChange=${set("backend")} />
|
|
750
846
|
${!c.backend && f.backend === inherited.backend ? html`<${Inherited} ...${roomInh("backend", "backend", "#g-cbe", "#g-be")} />` : null}</div>
|
|
751
|
-
<div class="field">${L(tn("model"), "classic.model", "cl-model")}<${ModelSelect} id="cl-model" value=${f.model} onChange=${set("model")}
|
|
847
|
+
<div class="field">${L(tn("model"), "classic.model", "cl-model", pt("tip_classicModel"))}<${ModelSelect} id="cl-model" value=${f.model} onChange=${set("model")}
|
|
752
848
|
backend=${f.backend} instance=${c.instanceName} inherit=${tn("inheritValue", inherited.model || tn("modelCliDefault"))} /></div>
|
|
753
|
-
<div class="field">${L(`${tn("autoPause")} (${tn("minutes")})`, "classic.auto_pause_after", "cl-auto")}
|
|
849
|
+
<div class="field">${L(`${tn("autoPause")} (${tn("minutes")})`, "classic.auto_pause_after", "cl-auto", pt("tip_classicAutoPause"))}
|
|
754
850
|
<${Override} inherit=${f.inherit.auto_pause_after} onInherit=${setInherit("auto_pause_after")} inherited=${roomInh("auto_pause_after", "minutes", "#classicbot", "#g-auto")}>
|
|
755
851
|
<input id="cl-auto" type="number" min="0" step="1" class=${errors.auto ? "invalid" : ""} disabled=${f.inherit.auto_pause_after}
|
|
756
852
|
value=${f.inherit.auto_pause_after ? String(inherited.auto_pause_after) : f.auto_pause_after} onInput=${(e) => set("auto_pause_after")(e.target.value)} /></${Override}>
|
|
757
|
-
<${Feedback} error=${errors.auto} /></div
|
|
758
|
-
|
|
853
|
+
<${Feedback} error=${errors.auto} /></div></div></${Card}></div>`;
|
|
854
|
+
return html`<div class="ap-grid">
|
|
855
|
+
<${Card} title=${pt("cardReplies")}>
|
|
856
|
+
<div class="field">${L(tn("toolProgress"), "classic.tool_progress", "cl-tp", pt("tip_classicToolProgress"))}
|
|
759
857
|
<${Override} inherit=${f.inherit.tool_progress} onInherit=${setInherit("tool_progress")} inherited=${roomInh("tool_progress", "tool_progress", "#g-ctp", "#g-tp")}>
|
|
760
858
|
<${Select} id="cl-tp" disabled=${f.inherit.tool_progress} value=${f.inherit.tool_progress ? inherited.tool_progress : f.tool_progress} onChange=${set("tool_progress")} options=${choiceOptions("tool_progress", TOOL_PROGRESS)} /></${Override}></div>
|
|
761
|
-
<div class="field">${L(tn("replyCompletionGuard"), "classic.reply_completion_guard")}
|
|
859
|
+
<div class="field">${L(tn("replyCompletionGuard"), "classic.reply_completion_guard", undefined, pt("tip_classicReplyGuard"))}
|
|
762
860
|
<${Override} inherit=${f.inherit.reply_completion_guard} onInherit=${setInherit("reply_completion_guard")} inherited=${roomInh("reply_completion_guard", "", "#g-creply", "#g-reply")}>
|
|
763
|
-
<label class="check"><input type="checkbox" disabled=${f.inherit.reply_completion_guard} checked=${f.inherit.reply_completion_guard ? inherited.reply_completion_guard : f.reply_completion_guard}
|
|
764
|
-
onChange=${(e) => set("reply_completion_guard")(e.target.checked)} /><span>${
|
|
861
|
+
<label class="check"><input aria-label=${tn("replyCompletionGuard")} type="checkbox" disabled=${f.inherit.reply_completion_guard} checked=${f.inherit.reply_completion_guard ? inherited.reply_completion_guard : f.reply_completion_guard}
|
|
862
|
+
onChange=${(e) => set("reply_completion_guard")(e.target.checked)} /><span>${pt("checkEnable")}</span></label></${Override}>
|
|
765
863
|
<p class="note">${replyHint(f.backend, classicMode, fd.kiro_ui)}</p></div>
|
|
766
|
-
<div class="field">${L(tn("replyTriggers"), "classic.reply_triggers")}
|
|
864
|
+
<div class="field">${L(tn("replyTriggers"), "classic.reply_triggers", undefined, pt("tip_classicReplyTriggers"))}
|
|
767
865
|
<${Override} inherit=${f.inherit.reply_triggers} onInherit=${setInherit("reply_triggers")} inherited=${roomInh("reply_triggers", "", "#g-creply-triggers", "#g-reply-triggers")}>
|
|
768
|
-
<label class="check"><input type="checkbox" disabled=${f.inherit.reply_triggers} checked=${f.inherit.reply_triggers ? inherited.reply_triggers : f.reply_triggers} onChange=${(e) => set("reply_triggers")(e.target.checked)} /><span>${
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
<div class="field">${L(tn("
|
|
866
|
+
<label class="check"><input aria-label=${tn("replyTriggers")} type="checkbox" disabled=${f.inherit.reply_triggers} checked=${f.inherit.reply_triggers ? inherited.reply_triggers : f.reply_triggers} onChange=${(e) => set("reply_triggers")(e.target.checked)} /><span>${pt("checkEnable")}</span></label></${Override}><p class="note">${tn("replyTriggersHint")}</p></div>
|
|
867
|
+
</${Card}>
|
|
868
|
+
<${Card} title=${pt("cardCollab")}>
|
|
869
|
+
<div class="field">${L(tn("collabMode"), "classic.collab", undefined, pt("tip_classicCollab"))}
|
|
870
|
+
<label class="check"><input aria-label=${tn("collabMode")} type="checkbox" checked=${f.collab} onChange=${(e) => set("collab")(e.target.checked)} /><span>${pt("checkEnable")}</span></label></div>
|
|
871
|
+
<div class="field">${L(tn("webEcho"), "classic.web_echo", undefined, pt("tip_classicWebEcho"))}
|
|
872
|
+
<label class="check"><input aria-label=${tn("webEcho")} type="checkbox" checked=${f.web_echo} onChange=${(e) => set("web_echo")(e.target.checked)} /><span>${pt("checkEnable")}</span></label></div>
|
|
873
|
+
<div class="field">${L(tn("contextLines"), "classic.context_lines", "cl-ctx", pt("tip_classicContext"))}
|
|
774
874
|
<input id="cl-ctx" type="number" min="0" step="1" class=${errors.context ? "invalid" : ""} value=${f.context_lines} onInput=${(e) => set("context_lines")(e.target.value)} />
|
|
775
875
|
<${Feedback} error=${errors.context} /></div>
|
|
876
|
+
</${Card}></div>`;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
export function ClassicDialog({ room, ctx, onClose }) {
|
|
880
|
+
const m = useClassicForm({ room, ctx });
|
|
881
|
+
const { c, runtime } = m;
|
|
882
|
+
return html`<${EditDialog} title=${c.name || c.instanceName} subtitle=${`${tn("idLine", c.instanceName)} · ${tn(`exec_${runtime.execution}`)}`} onClose=${onClose} onStage=${() => m.stage(onClose)} ready=${m.ready} impacts=${Object.keys(m.pending()).map((k) => `classic.${k}`)} schema=${m.schema}>
|
|
883
|
+
<${ClassicFields} m=${m} cat="runtime" />
|
|
884
|
+
<${ClassicFields} m=${m} cat="channel" />
|
|
885
|
+
<${Drawer} title=${tn("advancedSection")}>
|
|
776
886
|
<div class="dlg-inline-actions">
|
|
777
887
|
${runtime.status === "running" ? html`<button type="button" class="btn btn-sm" onClick=${() => { onClose(); ctx.pauseWake(c.instanceName, "pause"); }}>${tn("pause")}</button>` : null}
|
|
778
888
|
${runtime.status === "paused" ? html`<button type="button" class="btn btn-sm" onClick=${() => { onClose(); ctx.pauseWake(c.instanceName, "wake"); }}>${tn("wake")}</button>` : null}
|