@aiwayds/dsh-opentui 0.15.0 → 0.16.0
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/CHANGELOG.md +13 -0
- package/README.md +4 -2
- package/dist/client/index.js +853 -752
- package/dist/locales/en.json +908 -0
- package/dist/locales/zh-CN.json +908 -0
- package/package.json +3 -2
package/dist/client/index.js
CHANGED
|
@@ -33248,6 +33248,213 @@ var init_theme3 = __esm(() => {
|
|
|
33248
33248
|
ThemeProvider = themeContext.provider;
|
|
33249
33249
|
});
|
|
33250
33250
|
|
|
33251
|
+
// ../i18n/src/registry.ts
|
|
33252
|
+
import { existsSync as existsSync8, readdirSync as readdirSync2, readFileSync as readFileSync8 } from "fs";
|
|
33253
|
+
import { homedir as homedir3 } from "os";
|
|
33254
|
+
import { dirname as dirname3, join as join8 } from "path";
|
|
33255
|
+
function validateLocaleFile(raw) {
|
|
33256
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
33257
|
+
return { ok: false, errors: [{ key: "(file)", reason: "not a flat JSON object" }] };
|
|
33258
|
+
}
|
|
33259
|
+
const errors = [];
|
|
33260
|
+
const record = raw;
|
|
33261
|
+
const name = record["name"];
|
|
33262
|
+
if (typeof name !== "string" || name.length === 0) {
|
|
33263
|
+
errors.push({ key: "name", reason: "missing or not a non-empty string" });
|
|
33264
|
+
}
|
|
33265
|
+
for (const [key, value] of Object.entries(record)) {
|
|
33266
|
+
if (key === "name")
|
|
33267
|
+
continue;
|
|
33268
|
+
if (typeof value !== "string") {
|
|
33269
|
+
errors.push({ key, reason: `not a string (${value === null ? "null" : Array.isArray(value) ? "array" : typeof value})` });
|
|
33270
|
+
continue;
|
|
33271
|
+
}
|
|
33272
|
+
if (value.length === 0) {
|
|
33273
|
+
errors.push({ key, reason: "empty string" });
|
|
33274
|
+
continue;
|
|
33275
|
+
}
|
|
33276
|
+
const bad = hasIncompatiblePlaceholder(value);
|
|
33277
|
+
if (bad !== undefined)
|
|
33278
|
+
errors.push({ key, reason: `incompatible placeholder ${bad} (expected {param})` });
|
|
33279
|
+
}
|
|
33280
|
+
if (errors.length > 0)
|
|
33281
|
+
return { ok: false, errors };
|
|
33282
|
+
return { ok: true, table: raw };
|
|
33283
|
+
}
|
|
33284
|
+
function parseLocaleFile(text) {
|
|
33285
|
+
let raw;
|
|
33286
|
+
try {
|
|
33287
|
+
raw = JSON.parse(text);
|
|
33288
|
+
} catch (error) {
|
|
33289
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
33290
|
+
return { ok: false, errors: [{ key: "(file)", reason: `invalid JSON: ${reason}` }] };
|
|
33291
|
+
}
|
|
33292
|
+
return validateLocaleFile(raw);
|
|
33293
|
+
}
|
|
33294
|
+
function mergeTables(bundled, override) {
|
|
33295
|
+
return { ...bundled, ...override };
|
|
33296
|
+
}
|
|
33297
|
+
function userLocalesDir(dshHome) {
|
|
33298
|
+
const home = dshHome ?? process.env.DSH_HOME ?? join8(homedir3(), ".dsh");
|
|
33299
|
+
return join8(home, "locales");
|
|
33300
|
+
}
|
|
33301
|
+
function bundledLocalesDir() {
|
|
33302
|
+
let dir = dirname3(new URL(import.meta.url).pathname);
|
|
33303
|
+
for (let up = 0;up < 6; up++) {
|
|
33304
|
+
const candidate = join8(dir, "locales");
|
|
33305
|
+
if (existsSync8(join8(candidate, `${DEFAULT_LANGUAGE}.json`)))
|
|
33306
|
+
return candidate;
|
|
33307
|
+
const parent = dirname3(dir);
|
|
33308
|
+
if (parent === dir)
|
|
33309
|
+
break;
|
|
33310
|
+
dir = parent;
|
|
33311
|
+
}
|
|
33312
|
+
return join8(dirname3(new URL(import.meta.url).pathname), "..", "locales");
|
|
33313
|
+
}
|
|
33314
|
+
function loadLocales(options) {
|
|
33315
|
+
const bundledDir = options?.bundledDir ?? bundledLocalesDir();
|
|
33316
|
+
const languages = new Map;
|
|
33317
|
+
const warnings = [];
|
|
33318
|
+
if (existsSync8(bundledDir)) {
|
|
33319
|
+
for (const entry of readdirSync2(bundledDir)) {
|
|
33320
|
+
if (!entry.endsWith(".json"))
|
|
33321
|
+
continue;
|
|
33322
|
+
const id = entry.slice(0, -".json".length);
|
|
33323
|
+
const result = parseLocaleFile(readFileSync8(join8(bundledDir, entry), "utf8"));
|
|
33324
|
+
if (!result.ok) {
|
|
33325
|
+
warnings.push(`[i18n] bundled locale file rejected, skipping '${entry}': ${formatErrors(result.errors)}`);
|
|
33326
|
+
continue;
|
|
33327
|
+
}
|
|
33328
|
+
languages.set(id, result.table);
|
|
33329
|
+
}
|
|
33330
|
+
} else {
|
|
33331
|
+
warnings.push(`[i18n] bundled locales dir not found: ${bundledDir}`);
|
|
33332
|
+
}
|
|
33333
|
+
const userDir = options?.userDir ?? userLocalesDir();
|
|
33334
|
+
if (existsSync8(userDir)) {
|
|
33335
|
+
for (const entry of readdirSync2(userDir)) {
|
|
33336
|
+
if (!entry.endsWith(".json"))
|
|
33337
|
+
continue;
|
|
33338
|
+
const id = entry.slice(0, -".json".length);
|
|
33339
|
+
const result = parseLocaleFile(readFileSync8(join8(userDir, entry), "utf8"));
|
|
33340
|
+
if (!result.ok) {
|
|
33341
|
+
warnings.push(`[i18n] user locale file rejected, skipping '${entry}': ${formatErrors(result.errors)}`);
|
|
33342
|
+
continue;
|
|
33343
|
+
}
|
|
33344
|
+
const bundled = languages.get(id);
|
|
33345
|
+
languages.set(id, bundled ? mergeTables(bundled, result.table) : result.table);
|
|
33346
|
+
}
|
|
33347
|
+
}
|
|
33348
|
+
return { languages, warnings };
|
|
33349
|
+
}
|
|
33350
|
+
var DEFAULT_LANGUAGE = "en", PLACEHOLDER_NAME, PLACEHOLDER_SCAN, hasIncompatiblePlaceholder = (value) => {
|
|
33351
|
+
for (const match of value.matchAll(PLACEHOLDER_SCAN)) {
|
|
33352
|
+
const token = match[1] ?? "";
|
|
33353
|
+
if (!PLACEHOLDER_NAME.test(token))
|
|
33354
|
+
return match[0];
|
|
33355
|
+
}
|
|
33356
|
+
const legacy = value.match(/%[-0-9.]*[sdif@]/);
|
|
33357
|
+
if (legacy)
|
|
33358
|
+
return legacy[0];
|
|
33359
|
+
return;
|
|
33360
|
+
}, formatErrors = (errors) => errors.map((e) => `${e.key}: ${e.reason}`).join("; ");
|
|
33361
|
+
var init_registry = __esm(() => {
|
|
33362
|
+
PLACEHOLDER_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
33363
|
+
PLACEHOLDER_SCAN = /\{([^{}]*)\}/g;
|
|
33364
|
+
});
|
|
33365
|
+
|
|
33366
|
+
// ../i18n/src/t.ts
|
|
33367
|
+
function localeFromConfig(value) {
|
|
33368
|
+
if (typeof value !== "string")
|
|
33369
|
+
return DEFAULT_LANGUAGE;
|
|
33370
|
+
const norm = value.trim().replace(/[_]/g, "-").toLowerCase();
|
|
33371
|
+
if (norm === "" || norm === "en" || norm === "en-us" || norm === "en-gb")
|
|
33372
|
+
return DEFAULT_LANGUAGE;
|
|
33373
|
+
if (norm === "zh-cn" || norm === "zh" || norm === "zh-hans" || norm === "zh-hans-cn" || norm === "zh-sg" || norm === "zh-my") {
|
|
33374
|
+
return "zh-CN";
|
|
33375
|
+
}
|
|
33376
|
+
return DEFAULT_LANGUAGE;
|
|
33377
|
+
}
|
|
33378
|
+
function applyI18nConfig(config, options) {
|
|
33379
|
+
try {
|
|
33380
|
+
const loaded = loadLocales(options);
|
|
33381
|
+
state.languages = loaded.languages;
|
|
33382
|
+
state.warnings = [...loaded.warnings];
|
|
33383
|
+
const requested = config?.lang !== undefined ? config.lang : config?.hintsLocale;
|
|
33384
|
+
state.active = localeFromConfig(requested);
|
|
33385
|
+
if (typeof requested === "string" && /^(ja|ko)([-_].*)?$/i.test(requested.trim()) && !state.languages.has(requested.trim())) {
|
|
33386
|
+
state.warnings.push(`[i18n] language '${requested.trim()}' is not bundled \u2014 degraded to '${DEFAULT_LANGUAGE}'`);
|
|
33387
|
+
}
|
|
33388
|
+
if (!state.languages.has(state.active)) {
|
|
33389
|
+
state.warnings.push(`[i18n] language '${state.active}' not installed \u2014 falling back to '${DEFAULT_LANGUAGE}'`);
|
|
33390
|
+
state.active = DEFAULT_LANGUAGE;
|
|
33391
|
+
}
|
|
33392
|
+
} catch (error) {
|
|
33393
|
+
state.warnings.push(`[i18n] boot load failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
33394
|
+
state.languages = new Map;
|
|
33395
|
+
state.active = DEFAULT_LANGUAGE;
|
|
33396
|
+
}
|
|
33397
|
+
for (const warning of state.warnings)
|
|
33398
|
+
console.warn(warning);
|
|
33399
|
+
setLanguageSignal(state.active);
|
|
33400
|
+
return { language: state.active, warnings: state.warnings };
|
|
33401
|
+
}
|
|
33402
|
+
function activeLanguage() {
|
|
33403
|
+
const id = languageSignal();
|
|
33404
|
+
return state.languages.size === 0 ? DEFAULT_LANGUAGE : id;
|
|
33405
|
+
}
|
|
33406
|
+
function installedLanguages() {
|
|
33407
|
+
return [...state.languages.keys()].sort();
|
|
33408
|
+
}
|
|
33409
|
+
function setLanguage(id) {
|
|
33410
|
+
if (state.languages.size > 0 && !state.languages.has(id)) {
|
|
33411
|
+
console.warn(`[i18n] setLanguage('${id}') has no table \u2014 keeping '${state.active}'`);
|
|
33412
|
+
return;
|
|
33413
|
+
}
|
|
33414
|
+
state.active = id;
|
|
33415
|
+
setLanguageSignal(id);
|
|
33416
|
+
}
|
|
33417
|
+
function t(key, params) {
|
|
33418
|
+
try {
|
|
33419
|
+
const active = activeLanguage();
|
|
33420
|
+
const raw = table(active)?.[key] ?? table(DEFAULT_LANGUAGE)?.[key];
|
|
33421
|
+
if (typeof raw !== "string")
|
|
33422
|
+
return key;
|
|
33423
|
+
return params ? interpolate2(raw, params) : raw;
|
|
33424
|
+
} catch {
|
|
33425
|
+
return key;
|
|
33426
|
+
}
|
|
33427
|
+
}
|
|
33428
|
+
var state, languageSignal, setLanguageSignal, LANGUAGE_CHOICES, table = (id) => state.languages.get(id), safeString = (value) => {
|
|
33429
|
+
try {
|
|
33430
|
+
return String(value);
|
|
33431
|
+
} catch {
|
|
33432
|
+
return;
|
|
33433
|
+
}
|
|
33434
|
+
}, interpolate2 = (template, params) => template.replace(/\{([A-Za-z_][A-Za-z0-9_]*)\}/g, (placeholder, name) => {
|
|
33435
|
+
if (!Object.prototype.hasOwnProperty.call(params, name))
|
|
33436
|
+
return placeholder;
|
|
33437
|
+
return safeString(params[name]) ?? placeholder;
|
|
33438
|
+
});
|
|
33439
|
+
var init_t = __esm(() => {
|
|
33440
|
+
init_server();
|
|
33441
|
+
init_registry();
|
|
33442
|
+
state = { languages: new Map, active: DEFAULT_LANGUAGE, warnings: [] };
|
|
33443
|
+
[languageSignal, setLanguageSignal] = createSignal(DEFAULT_LANGUAGE);
|
|
33444
|
+
LANGUAGE_CHOICES = ["en", "zh-CN"];
|
|
33445
|
+
});
|
|
33446
|
+
|
|
33447
|
+
// ../i18n/src/index.ts
|
|
33448
|
+
var init_src = __esm(() => {
|
|
33449
|
+
init_registry();
|
|
33450
|
+
init_t();
|
|
33451
|
+
});
|
|
33452
|
+
|
|
33453
|
+
// ../tui-base/src/i18n.ts
|
|
33454
|
+
var init_i18n = __esm(() => {
|
|
33455
|
+
init_src();
|
|
33456
|
+
});
|
|
33457
|
+
|
|
33251
33458
|
// ../../node_modules/.pnpm/@opentui+keymap@0.8.1_@opentui+solid@0.8.1_solid-js@1.9.17_typescript@5.9.3_web-tree-si_cf27251ea086cee0c05f2add925b23c0/node_modules/@opentui/keymap/chunks/index-pjh5rp2p.js
|
|
33252
33459
|
function createLayerSlot(keymap) {
|
|
33253
33460
|
const { layers } = keymap[KEYMAP_EXTENSION_CONTEXT2]();
|
|
@@ -37914,7 +38121,7 @@ function getKeyMatchKey(input) {
|
|
|
37914
38121
|
return resolveKeyMatch(input);
|
|
37915
38122
|
}
|
|
37916
38123
|
var RESERVED_COMMAND_FIELDS, RESERVED_BINDING_FIELDS, RESERVED_LAYER_FIELDS, DEPTH_MAX = 16, COMPILED_DEPTH_MAX = 32, PLAIN_FUNCTION_KEYS, forwardTargets, external, DEFAULT_COMMAND_SEARCH_FIELDS, EMPTY_COMMAND_FIELDS, commandSearchCache, EMPTY_COMPILE_FIELDS, EMPTY_REQUIRES, EMPTY_MATCHERS, KEY_DISAMBIGUATION_DECISION, KEY_DEFERRED_DISAMBIGUATION_DECISION, NOOP = () => {}, NOOP2 = () => {}, MAX_STATE_CHANGE_FLUSH_ITERATIONS = 1000, EMPTY_DATA, Keymap;
|
|
37917
|
-
var
|
|
38124
|
+
var init_src2 = __esm(() => {
|
|
37918
38125
|
init_index_pjh5rp2p();
|
|
37919
38126
|
init_index_0a7ve4a3();
|
|
37920
38127
|
RESERVED_COMMAND_FIELDS = new Set(["name", "run", "fields", "attrs", "rejectedResult"]);
|
|
@@ -38809,8 +39016,8 @@ var namedSingleStrokeKeys, modifierKeyNames, namedSingleStrokeKeyPrefixes, modif
|
|
|
38809
39016
|
}));
|
|
38810
39017
|
}, DEAD_BINDING_WARNINGS_RESOURCE, ENABLED_FIELDS_RESOURCE, EMACS_BINDINGS_RESOURCE, EX_COMMANDS_RESOURCE, METADATA_FIELDS_RESOURCE, MOD_BINDINGS_RESOURCE, UNRESOLVED_COMMAND_WARNINGS_RESOURCE;
|
|
38811
39018
|
var init_addons = __esm(() => {
|
|
38812
|
-
|
|
38813
|
-
|
|
39019
|
+
init_src2();
|
|
39020
|
+
init_src2();
|
|
38814
39021
|
namedSingleStrokeKeys = new Set([
|
|
38815
39022
|
"up",
|
|
38816
39023
|
"down",
|
|
@@ -39503,7 +39710,7 @@ function createDefaultOpenTuiKeymap(renderer) {
|
|
|
39503
39710
|
return keymap;
|
|
39504
39711
|
}
|
|
39505
39712
|
var init_opentui2 = __esm(() => {
|
|
39506
|
-
|
|
39713
|
+
init_src2();
|
|
39507
39714
|
init_addons();
|
|
39508
39715
|
});
|
|
39509
39716
|
|
|
@@ -39990,7 +40197,7 @@ function formatOptions(config) {
|
|
|
39990
40197
|
var MODE, Context5, Keymap2;
|
|
39991
40198
|
var init_keymap = __esm(() => {
|
|
39992
40199
|
init_index_bun();
|
|
39993
|
-
|
|
40200
|
+
init_src2();
|
|
39994
40201
|
init_opentui();
|
|
39995
40202
|
init_extras();
|
|
39996
40203
|
init_opentui2();
|
|
@@ -40393,7 +40600,7 @@ function SessionComposer(props) {
|
|
|
40393
40600
|
footerRows: FOOTER_HEIGHT,
|
|
40394
40601
|
paletteRows: props.slashHeight?.() ?? 0,
|
|
40395
40602
|
terminalRows: dimensions().height
|
|
40396
|
-
}).height, _v$2 = composerBorderSides(dimensions().height), _v$3 = border().borderStyle, _v$4 = border().borderColor, _v$5 = dimensions().height > COMPOSER_COMPACT_TERMINAL_ROWS ? props.frameTitle?.() || (busy() ? STEER_TITLE : undefined) : undefined, _v$6 = border().borderColor, _v$7 = color.background(), _v$8 = maxLines(), _v$9 = props.placeholder ?? "
|
|
40603
|
+
}).height, _v$2 = composerBorderSides(dimensions().height), _v$3 = border().borderStyle, _v$4 = border().borderColor, _v$5 = dimensions().height > COMPOSER_COMPACT_TERMINAL_ROWS ? props.frameTitle?.() || (busy() ? STEER_TITLE : undefined) : undefined, _v$6 = border().borderColor, _v$7 = color.background(), _v$8 = maxLines(), _v$9 = props.placeholder ?? t("composer.placeholder"), _v$0 = color.placeholder(), _v$1 = color.unfocusedText(), _v$10 = color.text(), _v$11 = busy() ? busyColor() : color.text(), _v$12 = cursor();
|
|
40397
40604
|
_v$ !== _p$.e && (_p$.e = setProp(_el$, "height", _v$, _p$.e));
|
|
40398
40605
|
_v$2 !== _p$.t && (_p$.t = setProp(_el$, "border", _v$2, _p$.t));
|
|
40399
40606
|
_v$3 !== _p$.a && (_p$.a = setProp(_el$, "borderStyle", _v$3, _p$.a));
|
|
@@ -40443,6 +40650,7 @@ var init_session_composer = __esm(() => {
|
|
|
40443
40650
|
init_terminal_size();
|
|
40444
40651
|
init_composer_keybinds();
|
|
40445
40652
|
init_theme3();
|
|
40653
|
+
init_i18n();
|
|
40446
40654
|
init_keymap();
|
|
40447
40655
|
init_config();
|
|
40448
40656
|
init_semantic();
|
|
@@ -40545,7 +40753,7 @@ var init_string_width = __esm(() => {
|
|
|
40545
40753
|
});
|
|
40546
40754
|
|
|
40547
40755
|
// ../tui-base/src/routes/session/composer-context.tsx
|
|
40548
|
-
import { homedir as
|
|
40756
|
+
import { homedir as homedir4 } from "os";
|
|
40549
40757
|
function truncateLeft(text, limit) {
|
|
40550
40758
|
if (limit <= 0)
|
|
40551
40759
|
return "";
|
|
@@ -40638,7 +40846,7 @@ function ComposerContext(props) {
|
|
|
40638
40846
|
}
|
|
40639
40847
|
function safeHome() {
|
|
40640
40848
|
try {
|
|
40641
|
-
return
|
|
40849
|
+
return homedir4();
|
|
40642
40850
|
} catch {
|
|
40643
40851
|
return;
|
|
40644
40852
|
}
|
|
@@ -40768,7 +40976,7 @@ var init_chunk_FRNNS7AX = __esm(() => {
|
|
|
40768
40976
|
});
|
|
40769
40977
|
|
|
40770
40978
|
// ../../node_modules/.pnpm/remeda@2.26.0/node_modules/remeda/dist/chunk-VVM5DH6Z.js
|
|
40771
|
-
function
|
|
40979
|
+
function t2(...r) {
|
|
40772
40980
|
return u2(Object.entries, r);
|
|
40773
40981
|
}
|
|
40774
40982
|
var init_chunk_VVM5DH6Z = __esm(() => {
|
|
@@ -42561,7 +42769,7 @@ function DialogSelect(props) {
|
|
|
42561
42769
|
const grouped = createMemo(() => {
|
|
42562
42770
|
if (flatten())
|
|
42563
42771
|
return filtered().length ? [["", filtered()]] : [];
|
|
42564
|
-
const result = C(filtered(), i((x) => x.category ?? ""),
|
|
42772
|
+
const result = C(filtered(), i((x) => x.category ?? ""), t2());
|
|
42565
42773
|
return result;
|
|
42566
42774
|
});
|
|
42567
42775
|
const flat = createMemo(() => {
|
|
@@ -43515,210 +43723,16 @@ var init_dialog_select = __esm(() => {
|
|
|
43515
43723
|
fuzzysort = __toESM(require_fuzzysort(), 1);
|
|
43516
43724
|
});
|
|
43517
43725
|
|
|
43518
|
-
// ../i18n/src/registry.ts
|
|
43519
|
-
import { existsSync as existsSync8, readdirSync as readdirSync2, readFileSync as readFileSync8 } from "fs";
|
|
43520
|
-
import { homedir as homedir4 } from "os";
|
|
43521
|
-
import { dirname as dirname3, join as join8 } from "path";
|
|
43522
|
-
function validateLocaleFile(raw) {
|
|
43523
|
-
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
43524
|
-
return { ok: false, errors: [{ key: "(file)", reason: "not a flat JSON object" }] };
|
|
43525
|
-
}
|
|
43526
|
-
const errors = [];
|
|
43527
|
-
const record = raw;
|
|
43528
|
-
const name = record["name"];
|
|
43529
|
-
if (typeof name !== "string" || name.length === 0) {
|
|
43530
|
-
errors.push({ key: "name", reason: "missing or not a non-empty string" });
|
|
43531
|
-
}
|
|
43532
|
-
for (const [key, value] of Object.entries(record)) {
|
|
43533
|
-
if (key === "name")
|
|
43534
|
-
continue;
|
|
43535
|
-
if (typeof value !== "string") {
|
|
43536
|
-
errors.push({ key, reason: `not a string (${value === null ? "null" : Array.isArray(value) ? "array" : typeof value})` });
|
|
43537
|
-
continue;
|
|
43538
|
-
}
|
|
43539
|
-
if (value.length === 0) {
|
|
43540
|
-
errors.push({ key, reason: "empty string" });
|
|
43541
|
-
continue;
|
|
43542
|
-
}
|
|
43543
|
-
const bad = hasIncompatiblePlaceholder(value);
|
|
43544
|
-
if (bad !== undefined)
|
|
43545
|
-
errors.push({ key, reason: `incompatible placeholder ${bad} (expected {param})` });
|
|
43546
|
-
}
|
|
43547
|
-
if (errors.length > 0)
|
|
43548
|
-
return { ok: false, errors };
|
|
43549
|
-
return { ok: true, table: raw };
|
|
43550
|
-
}
|
|
43551
|
-
function parseLocaleFile(text) {
|
|
43552
|
-
let raw;
|
|
43553
|
-
try {
|
|
43554
|
-
raw = JSON.parse(text);
|
|
43555
|
-
} catch (error) {
|
|
43556
|
-
const reason = error instanceof Error ? error.message : String(error);
|
|
43557
|
-
return { ok: false, errors: [{ key: "(file)", reason: `invalid JSON: ${reason}` }] };
|
|
43558
|
-
}
|
|
43559
|
-
return validateLocaleFile(raw);
|
|
43560
|
-
}
|
|
43561
|
-
function mergeTables(bundled, override) {
|
|
43562
|
-
return { ...bundled, ...override };
|
|
43563
|
-
}
|
|
43564
|
-
function userLocalesDir(dshHome) {
|
|
43565
|
-
const home = dshHome ?? process.env.DSH_HOME ?? join8(homedir4(), ".dsh");
|
|
43566
|
-
return join8(home, "locales");
|
|
43567
|
-
}
|
|
43568
|
-
function bundledLocalesDir() {
|
|
43569
|
-
let dir = dirname3(new URL(import.meta.url).pathname);
|
|
43570
|
-
for (let up = 0;up < 6; up++) {
|
|
43571
|
-
const candidate = join8(dir, "locales");
|
|
43572
|
-
if (existsSync8(join8(candidate, `${DEFAULT_LANGUAGE}.json`)))
|
|
43573
|
-
return candidate;
|
|
43574
|
-
const parent = dirname3(dir);
|
|
43575
|
-
if (parent === dir)
|
|
43576
|
-
break;
|
|
43577
|
-
dir = parent;
|
|
43578
|
-
}
|
|
43579
|
-
return join8(dirname3(new URL(import.meta.url).pathname), "..", "locales");
|
|
43580
|
-
}
|
|
43581
|
-
function loadLocales(options) {
|
|
43582
|
-
const bundledDir = options?.bundledDir ?? bundledLocalesDir();
|
|
43583
|
-
const languages = new Map;
|
|
43584
|
-
const warnings = [];
|
|
43585
|
-
if (existsSync8(bundledDir)) {
|
|
43586
|
-
for (const entry of readdirSync2(bundledDir)) {
|
|
43587
|
-
if (!entry.endsWith(".json"))
|
|
43588
|
-
continue;
|
|
43589
|
-
const id = entry.slice(0, -".json".length);
|
|
43590
|
-
const result = parseLocaleFile(readFileSync8(join8(bundledDir, entry), "utf8"));
|
|
43591
|
-
if (!result.ok) {
|
|
43592
|
-
warnings.push(`[i18n] bundled locale file rejected, skipping '${entry}': ${formatErrors(result.errors)}`);
|
|
43593
|
-
continue;
|
|
43594
|
-
}
|
|
43595
|
-
languages.set(id, result.table);
|
|
43596
|
-
}
|
|
43597
|
-
} else {
|
|
43598
|
-
warnings.push(`[i18n] bundled locales dir not found: ${bundledDir}`);
|
|
43599
|
-
}
|
|
43600
|
-
const userDir = options?.userDir ?? userLocalesDir();
|
|
43601
|
-
if (existsSync8(userDir)) {
|
|
43602
|
-
for (const entry of readdirSync2(userDir)) {
|
|
43603
|
-
if (!entry.endsWith(".json"))
|
|
43604
|
-
continue;
|
|
43605
|
-
const id = entry.slice(0, -".json".length);
|
|
43606
|
-
const result = parseLocaleFile(readFileSync8(join8(userDir, entry), "utf8"));
|
|
43607
|
-
if (!result.ok) {
|
|
43608
|
-
warnings.push(`[i18n] user locale file rejected, skipping '${entry}': ${formatErrors(result.errors)}`);
|
|
43609
|
-
continue;
|
|
43610
|
-
}
|
|
43611
|
-
const bundled = languages.get(id);
|
|
43612
|
-
languages.set(id, bundled ? mergeTables(bundled, result.table) : result.table);
|
|
43613
|
-
}
|
|
43614
|
-
}
|
|
43615
|
-
return { languages, warnings };
|
|
43616
|
-
}
|
|
43617
|
-
var DEFAULT_LANGUAGE = "en", PLACEHOLDER_NAME, PLACEHOLDER_SCAN, hasIncompatiblePlaceholder = (value) => {
|
|
43618
|
-
for (const match of value.matchAll(PLACEHOLDER_SCAN)) {
|
|
43619
|
-
const token = match[1] ?? "";
|
|
43620
|
-
if (!PLACEHOLDER_NAME.test(token))
|
|
43621
|
-
return match[0];
|
|
43622
|
-
}
|
|
43623
|
-
const legacy = value.match(/%[-0-9.]*[sdif@]/);
|
|
43624
|
-
if (legacy)
|
|
43625
|
-
return legacy[0];
|
|
43626
|
-
return;
|
|
43627
|
-
}, formatErrors = (errors) => errors.map((e) => `${e.key}: ${e.reason}`).join("; ");
|
|
43628
|
-
var init_registry = __esm(() => {
|
|
43629
|
-
PLACEHOLDER_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
43630
|
-
PLACEHOLDER_SCAN = /\{([^{}]*)\}/g;
|
|
43631
|
-
});
|
|
43632
|
-
|
|
43633
|
-
// ../i18n/src/t.ts
|
|
43634
|
-
function localeFromConfig(value) {
|
|
43635
|
-
if (typeof value !== "string")
|
|
43636
|
-
return DEFAULT_LANGUAGE;
|
|
43637
|
-
const norm = value.trim().replace(/[_]/g, "-").toLowerCase();
|
|
43638
|
-
if (norm === "" || norm === "en" || norm === "en-us" || norm === "en-gb")
|
|
43639
|
-
return DEFAULT_LANGUAGE;
|
|
43640
|
-
if (norm === "zh-cn" || norm === "zh" || norm === "zh-hans" || norm === "zh-hans-cn" || norm === "zh-sg" || norm === "zh-my") {
|
|
43641
|
-
return "zh-CN";
|
|
43642
|
-
}
|
|
43643
|
-
return DEFAULT_LANGUAGE;
|
|
43644
|
-
}
|
|
43645
|
-
function applyI18nConfig(config, options) {
|
|
43646
|
-
try {
|
|
43647
|
-
const loaded = loadLocales(options);
|
|
43648
|
-
state.languages = loaded.languages;
|
|
43649
|
-
state.warnings = [...loaded.warnings];
|
|
43650
|
-
const requested = config?.lang !== undefined ? config.lang : config?.hintsLocale;
|
|
43651
|
-
state.active = localeFromConfig(requested);
|
|
43652
|
-
if (typeof requested === "string" && /^(ja|ko)([-_].*)?$/i.test(requested.trim()) && !state.languages.has(requested.trim())) {
|
|
43653
|
-
state.warnings.push(`[i18n] language '${requested.trim()}' is not bundled \u2014 degraded to '${DEFAULT_LANGUAGE}'`);
|
|
43654
|
-
}
|
|
43655
|
-
if (!state.languages.has(state.active)) {
|
|
43656
|
-
state.warnings.push(`[i18n] language '${state.active}' not installed \u2014 falling back to '${DEFAULT_LANGUAGE}'`);
|
|
43657
|
-
state.active = DEFAULT_LANGUAGE;
|
|
43658
|
-
}
|
|
43659
|
-
} catch (error) {
|
|
43660
|
-
state.warnings.push(`[i18n] boot load failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
43661
|
-
state.languages = new Map;
|
|
43662
|
-
state.active = DEFAULT_LANGUAGE;
|
|
43663
|
-
}
|
|
43664
|
-
for (const warning of state.warnings)
|
|
43665
|
-
console.warn(warning);
|
|
43666
|
-
return { language: state.active, warnings: state.warnings };
|
|
43667
|
-
}
|
|
43668
|
-
function activeLanguage() {
|
|
43669
|
-
return state.languages.size === 0 ? DEFAULT_LANGUAGE : state.active;
|
|
43670
|
-
}
|
|
43671
|
-
function installedLanguages() {
|
|
43672
|
-
return [...state.languages.keys()].sort();
|
|
43673
|
-
}
|
|
43674
|
-
function t3(key, params) {
|
|
43675
|
-
try {
|
|
43676
|
-
const raw = table(activeLanguage())?.[key] ?? table(DEFAULT_LANGUAGE)?.[key];
|
|
43677
|
-
if (typeof raw !== "string")
|
|
43678
|
-
return key;
|
|
43679
|
-
return params ? interpolate2(raw, params) : raw;
|
|
43680
|
-
} catch {
|
|
43681
|
-
return key;
|
|
43682
|
-
}
|
|
43683
|
-
}
|
|
43684
|
-
var state, LANGUAGE_CHOICES, table = (id) => state.languages.get(id), safeString = (value) => {
|
|
43685
|
-
try {
|
|
43686
|
-
return String(value);
|
|
43687
|
-
} catch {
|
|
43688
|
-
return;
|
|
43689
|
-
}
|
|
43690
|
-
}, interpolate2 = (template, params) => template.replace(/\{([A-Za-z_][A-Za-z0-9_]*)\}/g, (placeholder, name) => {
|
|
43691
|
-
if (!Object.prototype.hasOwnProperty.call(params, name))
|
|
43692
|
-
return placeholder;
|
|
43693
|
-
return safeString(params[name]) ?? placeholder;
|
|
43694
|
-
});
|
|
43695
|
-
var init_t = __esm(() => {
|
|
43696
|
-
init_registry();
|
|
43697
|
-
state = { languages: new Map, active: DEFAULT_LANGUAGE, warnings: [] };
|
|
43698
|
-
LANGUAGE_CHOICES = ["en", "zh-CN"];
|
|
43699
|
-
});
|
|
43700
|
-
|
|
43701
|
-
// ../i18n/src/index.ts
|
|
43702
|
-
var init_src2 = __esm(() => {
|
|
43703
|
-
init_registry();
|
|
43704
|
-
init_t();
|
|
43705
|
-
});
|
|
43706
|
-
|
|
43707
|
-
// ../tui-base/src/i18n.ts
|
|
43708
|
-
var init_i18n = __esm(() => {
|
|
43709
|
-
init_src2();
|
|
43710
|
-
});
|
|
43711
|
-
|
|
43712
43726
|
// ../tui-base/src/routes/session/delivery-choice.tsx
|
|
43713
43727
|
function deliveryOptions() {
|
|
43714
43728
|
return [{
|
|
43715
|
-
title:
|
|
43729
|
+
title: t("overlay.delivery.steerTitle"),
|
|
43716
43730
|
value: "steer",
|
|
43717
|
-
description:
|
|
43731
|
+
description: t("overlay.delivery.steerDescription")
|
|
43718
43732
|
}, {
|
|
43719
|
-
title:
|
|
43733
|
+
title: t("overlay.delivery.queueTitle"),
|
|
43720
43734
|
value: "queue",
|
|
43721
|
-
description:
|
|
43735
|
+
description: t("overlay.delivery.queueDescription")
|
|
43722
43736
|
}];
|
|
43723
43737
|
}
|
|
43724
43738
|
function openDeliveryChoice(dialog, text) {
|
|
@@ -43736,10 +43750,10 @@ function openDeliveryChoice(dialog, text) {
|
|
|
43736
43750
|
const preview = text.length > 60 ? `${text.slice(0, 57)}\u2026` : text;
|
|
43737
43751
|
dialog.replace(() => createComponent2(DialogSelect, {
|
|
43738
43752
|
get title() {
|
|
43739
|
-
return
|
|
43753
|
+
return t("overlay.delivery.title");
|
|
43740
43754
|
},
|
|
43741
43755
|
get description() {
|
|
43742
|
-
return
|
|
43756
|
+
return t("overlay.delivery.preview", {
|
|
43743
43757
|
text: preview
|
|
43744
43758
|
});
|
|
43745
43759
|
},
|
|
@@ -45549,12 +45563,12 @@ var init_dialog_prompt = __esm(() => {
|
|
|
45549
45563
|
function subagentMarkerSuffix(view) {
|
|
45550
45564
|
let suffix = "";
|
|
45551
45565
|
if (view.spinStopRound !== undefined) {
|
|
45552
|
-
suffix += ` ${
|
|
45566
|
+
suffix += ` ${t("panel.subagents.marker.spinStop", { round: String(view.spinStopRound) })}`;
|
|
45553
45567
|
} else if (view.hardStopRound !== undefined) {
|
|
45554
|
-
suffix += ` ${
|
|
45568
|
+
suffix += ` ${t("panel.subagents.marker.hardStop", { round: String(view.hardStopRound) })}`;
|
|
45555
45569
|
}
|
|
45556
45570
|
if (view.injectedRound !== undefined)
|
|
45557
|
-
suffix += ` ${
|
|
45571
|
+
suffix += ` ${t("panel.subagents.marker.injected")}`;
|
|
45558
45572
|
return suffix;
|
|
45559
45573
|
}
|
|
45560
45574
|
function subagentHardStopGlyph(view) {
|
|
@@ -45625,12 +45639,12 @@ function SubagentsPicker(props) {
|
|
|
45625
45639
|
const agent = titlecase(entry.label);
|
|
45626
45640
|
dialog.replace(() => createComponent2(DialogPrompt, {
|
|
45627
45641
|
get title() {
|
|
45628
|
-
return
|
|
45642
|
+
return t("panel.subagents.dialog.steerTitle", {
|
|
45629
45643
|
name: agent
|
|
45630
45644
|
});
|
|
45631
45645
|
},
|
|
45632
45646
|
get placeholder() {
|
|
45633
|
-
return
|
|
45647
|
+
return t("panel.subagents.dialog.steerPlaceholder");
|
|
45634
45648
|
},
|
|
45635
45649
|
onConfirm: (value) => {
|
|
45636
45650
|
const text = value.trim();
|
|
@@ -45639,11 +45653,11 @@ function SubagentsPicker(props) {
|
|
|
45639
45653
|
const sent = steerSubagent(entry.id, text);
|
|
45640
45654
|
dialog.clear();
|
|
45641
45655
|
if (sent) {
|
|
45642
|
-
printSteerFeedback(
|
|
45656
|
+
printSteerFeedback(t("panel.subagents.echo.steered", {
|
|
45643
45657
|
name: agent.toLowerCase()
|
|
45644
45658
|
}));
|
|
45645
45659
|
} else {
|
|
45646
|
-
printSteerFeedback(
|
|
45660
|
+
printSteerFeedback(t("panel.subagents.echo.rejected", {
|
|
45647
45661
|
name: agent
|
|
45648
45662
|
}));
|
|
45649
45663
|
}
|
|
@@ -45666,22 +45680,22 @@ function SubagentsPicker(props) {
|
|
|
45666
45680
|
priority: 2,
|
|
45667
45681
|
commands: [{
|
|
45668
45682
|
bind: "down",
|
|
45669
|
-
title:
|
|
45683
|
+
title: t("overlay.picker.keymap.next"),
|
|
45670
45684
|
group: "Subagents",
|
|
45671
45685
|
run: () => moveTo(store.selected + 1)
|
|
45672
45686
|
}, {
|
|
45673
45687
|
bind: "up",
|
|
45674
|
-
title:
|
|
45688
|
+
title: t("overlay.picker.keymap.previous"),
|
|
45675
45689
|
group: "Subagents",
|
|
45676
45690
|
run: () => moveTo(store.selected - 1)
|
|
45677
45691
|
}, {
|
|
45678
45692
|
bind: "return",
|
|
45679
|
-
title:
|
|
45693
|
+
title: t("overlay.picker.keymap.steerSelect"),
|
|
45680
45694
|
group: "Subagents",
|
|
45681
45695
|
run: select
|
|
45682
45696
|
}, {
|
|
45683
45697
|
bind: "ctrl+a",
|
|
45684
|
-
title:
|
|
45698
|
+
title: t("overlay.picker.keymap.toggleActive"),
|
|
45685
45699
|
group: "Subagents",
|
|
45686
45700
|
run: () => {
|
|
45687
45701
|
setShowAll((value) => !value);
|
|
@@ -45689,7 +45703,7 @@ function SubagentsPicker(props) {
|
|
|
45689
45703
|
}
|
|
45690
45704
|
}, {
|
|
45691
45705
|
bind: "escape",
|
|
45692
|
-
title:
|
|
45706
|
+
title: t("overlay.picker.keymap.close"),
|
|
45693
45707
|
group: "Subagents",
|
|
45694
45708
|
run: () => setOpen(false)
|
|
45695
45709
|
}]
|
|
@@ -45699,7 +45713,7 @@ function SubagentsPicker(props) {
|
|
|
45699
45713
|
enabled: !open() && dialog.stack.length === 0 && pickerToggleEnabled(subagentMarkerViews()),
|
|
45700
45714
|
commands: [{
|
|
45701
45715
|
id: "session.child.first",
|
|
45702
|
-
title:
|
|
45716
|
+
title: t("overlay.picker.keymap.toggle"),
|
|
45703
45717
|
group: "Session",
|
|
45704
45718
|
run: () => setOpen(true)
|
|
45705
45719
|
}]
|
|
@@ -45740,20 +45754,20 @@ function pickerShouldAutoClose(views) {
|
|
|
45740
45754
|
return !pickerToggleEnabled(views);
|
|
45741
45755
|
}
|
|
45742
45756
|
function pickerLineText(entries, selected, showAll) {
|
|
45743
|
-
const toggle = showAll ?
|
|
45757
|
+
const toggle = showAll ? t("overlay.picker.showActive") : t("overlay.picker.showInactive");
|
|
45744
45758
|
const entry = entries[selected];
|
|
45745
45759
|
if (entry === undefined) {
|
|
45746
|
-
return showAll ?
|
|
45760
|
+
return showAll ? t("overlay.picker.emptyInactive", {
|
|
45747
45761
|
toggle
|
|
45748
|
-
}) :
|
|
45762
|
+
}) : t("overlay.picker.emptyActive", {
|
|
45749
45763
|
toggle
|
|
45750
45764
|
});
|
|
45751
45765
|
}
|
|
45752
45766
|
const glyph = subagentHardStopGlyph(entry);
|
|
45753
45767
|
const suffix = subagentMarkerSuffix(entry);
|
|
45754
45768
|
const label = `${glyph ? `${glyph} ` : ""}${titlecase(entry.label)}`;
|
|
45755
|
-
const status = entry.status === "running" ?
|
|
45756
|
-
return
|
|
45769
|
+
const status = entry.status === "running" ? t("overlay.picker.statusRunning") : "";
|
|
45770
|
+
return t("overlay.picker.row", {
|
|
45757
45771
|
label,
|
|
45758
45772
|
status,
|
|
45759
45773
|
suffix: suffix ? ` ${suffix.trim()}` : "",
|
|
@@ -47107,7 +47121,7 @@ function todosSummaryLine(rows) {
|
|
|
47107
47121
|
if (done === todos.length)
|
|
47108
47122
|
return "";
|
|
47109
47123
|
const active = todos.find((todo) => todo.status === "in_progress");
|
|
47110
|
-
const head =
|
|
47124
|
+
const head = t("overlay.widgets.todosSummary", {
|
|
47111
47125
|
done,
|
|
47112
47126
|
total: todos.length
|
|
47113
47127
|
});
|
|
@@ -47136,10 +47150,10 @@ function todosTableLines(rows, width, terminalRows) {
|
|
|
47136
47150
|
index
|
|
47137
47151
|
})).sort((a, b) => statusRank(a.todo.status) - statusRank(b.todo.status) || (a.todo.status === "completed" ? b.index - a.index : a.index - b.index)).slice(0, TODO_MAX_ROWS).sort((a, b) => a.index - b.index);
|
|
47138
47152
|
const done = todos.filter((todo) => todo.status === "completed").length;
|
|
47139
|
-
const showing = window.length < todos.length ? ` \xB7 ${
|
|
47153
|
+
const showing = window.length < todos.length ? ` \xB7 ${t("overlay.widgets.todosShowing", {
|
|
47140
47154
|
ranges: compactRanges(window.map((entry) => entry.index + 1))
|
|
47141
47155
|
})}` : "";
|
|
47142
|
-
const header = clipToWidth(
|
|
47156
|
+
const header = clipToWidth(t("overlay.widgets.todosHeader", {
|
|
47143
47157
|
done,
|
|
47144
47158
|
total: todos.length
|
|
47145
47159
|
}) + showing, innerWidth);
|
|
@@ -47150,7 +47164,7 @@ function todosTableLines(rows, width, terminalRows) {
|
|
|
47150
47164
|
text: borderedRow(boxWidth, header),
|
|
47151
47165
|
tone: "muted"
|
|
47152
47166
|
}, {
|
|
47153
|
-
text: borderedRow(boxWidth, [padCell2("#", colWidths[0], "right"), padCell2("\u2713", colWidths[1]), padCell2(
|
|
47167
|
+
text: borderedRow(boxWidth, [padCell2("#", colWidths[0], "right"), padCell2("\u2713", colWidths[1]), padCell2(t("overlay.widgets.taskColumn"), colWidths[2])].join(TABLE_SEP)),
|
|
47154
47168
|
tone: "muted"
|
|
47155
47169
|
}];
|
|
47156
47170
|
for (const {
|
|
@@ -47191,7 +47205,7 @@ function thinkBlockLines(row, spin, maxLines = DOCK_WIDGET_MAX_LINES, now = Date
|
|
|
47191
47205
|
const secs = row.startedAt !== undefined ? `${((now - row.startedAt) / 1000).toFixed(1)}s` : "0.0s";
|
|
47192
47206
|
spin();
|
|
47193
47207
|
const picked = lines.length === 0 ? [""] : lines.slice(-n);
|
|
47194
|
-
return picked.map((line, index) => index === 0 ?
|
|
47208
|
+
return picked.map((line, index) => index === 0 ? t("overlay.widgets.thinkStreaming", {
|
|
47195
47209
|
secs,
|
|
47196
47210
|
line
|
|
47197
47211
|
}) : ` ${line}`);
|
|
@@ -47199,7 +47213,7 @@ function thinkBlockLines(row, spin, maxLines = DOCK_WIDGET_MAX_LINES, now = Date
|
|
|
47199
47213
|
if (row.elapsedSec !== undefined) {
|
|
47200
47214
|
const secs = `${row.elapsedSec.toFixed(1)}s`;
|
|
47201
47215
|
const picked = lines.length === 0 ? [""] : lines.slice(-n);
|
|
47202
|
-
return picked.map((line, index) => index === 0 ?
|
|
47216
|
+
return picked.map((line, index) => index === 0 ? t("overlay.widgets.thinkCollapsed", {
|
|
47203
47217
|
secs,
|
|
47204
47218
|
line
|
|
47205
47219
|
}) : ` ${line}`);
|
|
@@ -47291,7 +47305,7 @@ function activityRuleLines(rows, options = {}) {
|
|
|
47291
47305
|
text: "",
|
|
47292
47306
|
tone: "muted"
|
|
47293
47307
|
};
|
|
47294
|
-
const head = think.text === "" ?
|
|
47308
|
+
const head = think.text === "" ? t("overlay.widgets.activityTitle") : t("overlay.widgets.activityWithThink", {
|
|
47295
47309
|
text: think.text
|
|
47296
47310
|
});
|
|
47297
47311
|
return [{
|
|
@@ -47590,7 +47604,7 @@ function WidgetsDock(props) {
|
|
|
47590
47604
|
children: lineView
|
|
47591
47605
|
}), null);
|
|
47592
47606
|
effect((_p$) => {
|
|
47593
|
-
var _v$ = frameHeight(), _v$2 = activityFrameBorderColor(theme), _v$3 =
|
|
47607
|
+
var _v$ = frameHeight(), _v$2 = activityFrameBorderColor(theme), _v$3 = t("overlay.widgets.frameTitle");
|
|
47594
47608
|
_v$ !== _p$.e && (_p$.e = setProp(_el$3, "height", _v$, _p$.e));
|
|
47595
47609
|
_v$2 !== _p$.t && (_p$.t = setProp(_el$3, "borderColor", _v$2, _p$.t));
|
|
47596
47610
|
_v$3 !== _p$.a && (_p$.a = setProp(_el$3, "title", _v$3, _p$.a));
|
|
@@ -47937,7 +47951,7 @@ function Transcript(props) {
|
|
|
47937
47951
|
var _el$8 = createElement("box"), _el$9 = createElement("text");
|
|
47938
47952
|
insertNode(_el$8, _el$9);
|
|
47939
47953
|
setProp(_el$8, "flexShrink", 0);
|
|
47940
|
-
insert(_el$9, () =>
|
|
47954
|
+
insert(_el$9, () => t("transcript.loading"));
|
|
47941
47955
|
effect((_$p) => setProp(_el$9, "fg", color.loading(), _$p));
|
|
47942
47956
|
return _el$8;
|
|
47943
47957
|
}
|
|
@@ -47957,10 +47971,10 @@ function Transcript(props) {
|
|
|
47957
47971
|
setProp(_el$11, "wrapMode", "word");
|
|
47958
47972
|
insert(_el$11, (() => {
|
|
47959
47973
|
var _c$2 = memo2(() => row.state === "paused");
|
|
47960
|
-
return () => _c$2() ?
|
|
47974
|
+
return () => _c$2() ? t("transcript.pending.queue.paused", {
|
|
47961
47975
|
order: row.order ?? 1,
|
|
47962
47976
|
text: row.text
|
|
47963
|
-
}) :
|
|
47977
|
+
}) : t("transcript.pending.queue.waiting", {
|
|
47964
47978
|
order: row.order ?? 1,
|
|
47965
47979
|
text: row.text
|
|
47966
47980
|
});
|
|
@@ -47980,9 +47994,9 @@ function Transcript(props) {
|
|
|
47980
47994
|
setProp(_el$12, "wrapMode", "word");
|
|
47981
47995
|
insert(_el$12, (() => {
|
|
47982
47996
|
var _c$3 = memo2(() => row.state === "delivered");
|
|
47983
|
-
return () => _c$3() ?
|
|
47997
|
+
return () => _c$3() ? t("transcript.pending.steer.delivered", {
|
|
47984
47998
|
text: row.text
|
|
47985
|
-
}) :
|
|
47999
|
+
}) : t("transcript.pending.steer.injected", {
|
|
47986
48000
|
text: row.text
|
|
47987
48001
|
});
|
|
47988
48002
|
})());
|
|
@@ -48082,7 +48096,7 @@ function childLineText(child, isLast, spin, width) {
|
|
|
48082
48096
|
const track = isLast ? "\u2514\u2500 " : "\u251C\u2500 ";
|
|
48083
48097
|
const glyph = `${SPINNER_FRAMES2[spin() % SPINNER_FRAMES2.length]} `;
|
|
48084
48098
|
const elapsed = child.startedAt !== undefined ? ` \xB7 ${((Date.now() - child.startedAt) / 1000).toFixed(1)}s` : "";
|
|
48085
|
-
const rounds = ` \xB7 ${
|
|
48099
|
+
const rounds = ` \xB7 ${t("overlay.lastrequest.round", {
|
|
48086
48100
|
n: child.rounds
|
|
48087
48101
|
})}`;
|
|
48088
48102
|
const meta = `${elapsed}${rounds}`;
|
|
@@ -48360,7 +48374,7 @@ function hintLabel(id, busy) {
|
|
|
48360
48374
|
const key = busy ? keys.busy : keys.idle;
|
|
48361
48375
|
if (key === null)
|
|
48362
48376
|
return "";
|
|
48363
|
-
const label =
|
|
48377
|
+
const label = t(key);
|
|
48364
48378
|
return label === key ? "" : label;
|
|
48365
48379
|
}
|
|
48366
48380
|
function hintInState(id, busy) {
|
|
@@ -48389,7 +48403,7 @@ function hintsText(busy, shown = true, subagentsLive = false, hints = footerHint
|
|
|
48389
48403
|
function transcriptHintsText(shown = true) {
|
|
48390
48404
|
if (!shown)
|
|
48391
48405
|
return "";
|
|
48392
|
-
const body =
|
|
48406
|
+
const body = t(TRANSCRIPT_HINT_KEY);
|
|
48393
48407
|
return body === TRANSCRIPT_HINT_KEY ? "" : `\u2328 ${body}`;
|
|
48394
48408
|
}
|
|
48395
48409
|
function HintsLine(props) {
|
|
@@ -48510,7 +48524,7 @@ function formatMatchStatus(query, matchCount, matchIndex) {
|
|
|
48510
48524
|
if (!query.trim())
|
|
48511
48525
|
return "";
|
|
48512
48526
|
if (matchCount === 0)
|
|
48513
|
-
return
|
|
48527
|
+
return t("overlay.search.noMatches");
|
|
48514
48528
|
const current = (matchIndex % matchCount + matchCount) % matchCount;
|
|
48515
48529
|
return `${current + 1}/${matchCount}`;
|
|
48516
48530
|
}
|
|
@@ -48603,17 +48617,17 @@ function SearchOverlay(props) {
|
|
|
48603
48617
|
priority: 2,
|
|
48604
48618
|
commands: [{
|
|
48605
48619
|
bind: "escape",
|
|
48606
|
-
title:
|
|
48620
|
+
title: t("overlay.search.closeTitle"),
|
|
48607
48621
|
group: "Search",
|
|
48608
48622
|
run: close
|
|
48609
48623
|
}, {
|
|
48610
48624
|
bind: "return",
|
|
48611
|
-
title:
|
|
48625
|
+
title: t("overlay.search.nextMatch"),
|
|
48612
48626
|
group: "Search",
|
|
48613
48627
|
run: () => move(1)
|
|
48614
48628
|
}, {
|
|
48615
48629
|
bind: "shift+return",
|
|
48616
|
-
title:
|
|
48630
|
+
title: t("overlay.search.previousMatch"),
|
|
48617
48631
|
group: "Search",
|
|
48618
48632
|
run: () => move(-1)
|
|
48619
48633
|
}]
|
|
@@ -48623,7 +48637,7 @@ function SearchOverlay(props) {
|
|
|
48623
48637
|
enabled: !open() && dialog.stack.length === 0,
|
|
48624
48638
|
commands: [{
|
|
48625
48639
|
id: "session.search",
|
|
48626
|
-
title:
|
|
48640
|
+
title: t("overlay.search.commandTitle"),
|
|
48627
48641
|
group: "Session",
|
|
48628
48642
|
run: openBar
|
|
48629
48643
|
}]
|
|
@@ -48665,7 +48679,7 @@ function SearchOverlay(props) {
|
|
|
48665
48679
|
}
|
|
48666
48680
|
}), null);
|
|
48667
48681
|
effect((_p$) => {
|
|
48668
|
-
var _v$ = theme?.background.raised.base ?? "#1a1b26", _v$2 =
|
|
48682
|
+
var _v$ = theme?.background.raised.base ?? "#1a1b26", _v$2 = t("overlay.search.placeholder"), _v$3 = theme?.text.muted ?? "#565f89", _v$4 = theme?.text.base ?? "#e6e6e6", _v$5 = theme?.text.base ?? "#e6e6e6", _v$6 = focusedBorderColor(theme ?? undefined), _v$7 = cursor();
|
|
48669
48683
|
_v$ !== _p$.e && (_p$.e = setProp(_el$, "backgroundColor", _v$, _p$.e));
|
|
48670
48684
|
_v$2 !== _p$.t && (_p$.t = setProp(_el$2, "placeholder", _v$2, _p$.t));
|
|
48671
48685
|
_v$3 !== _p$.a && (_p$.a = setProp(_el$2, "placeholderColor", _v$3, _p$.a));
|
|
@@ -48962,20 +48976,46 @@ function createTurnCancel(props, onArm) {
|
|
|
48962
48976
|
const windowMs = props.windowMs ?? CTRL_C_QUIT_WINDOW_MS;
|
|
48963
48977
|
const gate = createCtrlCGate(windowMs);
|
|
48964
48978
|
let timer;
|
|
48979
|
+
let armedKey;
|
|
48965
48980
|
const disarm = () => {
|
|
48966
48981
|
if (timer)
|
|
48967
48982
|
clearTimeout(timer);
|
|
48968
48983
|
timer = undefined;
|
|
48969
|
-
|
|
48984
|
+
const key = armedKey;
|
|
48985
|
+
armedKey = undefined;
|
|
48986
|
+
if (key)
|
|
48987
|
+
onArm(false, key);
|
|
48988
|
+
};
|
|
48989
|
+
const arm = (key, beforeExpire) => {
|
|
48990
|
+
if (timer)
|
|
48991
|
+
clearTimeout(timer);
|
|
48992
|
+
armedKey = key;
|
|
48993
|
+
onArm(true, key);
|
|
48994
|
+
timer = setTimeout(() => {
|
|
48995
|
+
timer = undefined;
|
|
48996
|
+
beforeExpire?.();
|
|
48997
|
+
disarm();
|
|
48998
|
+
}, windowMs);
|
|
48970
48999
|
};
|
|
48971
49000
|
return {
|
|
48972
49001
|
escape() {
|
|
48973
49002
|
if (!props.busy() || props.escapeYields?.())
|
|
48974
49003
|
return false;
|
|
48975
|
-
props.
|
|
49004
|
+
if (!props.confirmStop) {
|
|
49005
|
+
props.interrupt();
|
|
49006
|
+
return true;
|
|
49007
|
+
}
|
|
49008
|
+
if (armedKey === "escape") {
|
|
49009
|
+
disarm();
|
|
49010
|
+
props.confirmStop();
|
|
49011
|
+
return true;
|
|
49012
|
+
}
|
|
49013
|
+
arm("escape");
|
|
48976
49014
|
return true;
|
|
48977
49015
|
},
|
|
48978
49016
|
ctrlC() {
|
|
49017
|
+
if (armedKey === "escape")
|
|
49018
|
+
disarm();
|
|
48979
49019
|
if (gate.press() === "quit") {
|
|
48980
49020
|
disarm();
|
|
48981
49021
|
props.quit();
|
|
@@ -48983,13 +49023,7 @@ function createTurnCancel(props, onArm) {
|
|
|
48983
49023
|
}
|
|
48984
49024
|
if (props.busy())
|
|
48985
49025
|
props.interrupt();
|
|
48986
|
-
|
|
48987
|
-
clearTimeout(timer);
|
|
48988
|
-
onArm(true);
|
|
48989
|
-
timer = setTimeout(() => {
|
|
48990
|
-
gate.reset();
|
|
48991
|
-
disarm();
|
|
48992
|
-
}, windowMs);
|
|
49026
|
+
arm("ctrl-c", () => gate.reset());
|
|
48993
49027
|
return true;
|
|
48994
49028
|
},
|
|
48995
49029
|
dispose: disarm
|
|
@@ -48997,15 +49031,15 @@ function createTurnCancel(props, onArm) {
|
|
|
48997
49031
|
}
|
|
48998
49032
|
function TurnCancelKeys(props) {
|
|
48999
49033
|
const theme = useThemeOptional();
|
|
49000
|
-
const [armed, setArmed] = createSignal(
|
|
49001
|
-
const cancel = createTurnCancel(props, setArmed);
|
|
49034
|
+
const [armed, setArmed] = createSignal(undefined);
|
|
49035
|
+
const cancel = createTurnCancel(props, (value, key) => setArmed(value ? key : undefined));
|
|
49002
49036
|
onCleanup(() => cancel.dispose());
|
|
49003
49037
|
Keymap2.createLayer(() => ({
|
|
49004
49038
|
mode: "global",
|
|
49005
49039
|
enabled: props.enabled(),
|
|
49006
49040
|
commands: [{
|
|
49007
49041
|
bind: "escape",
|
|
49008
|
-
title: "Interrupt current turn",
|
|
49042
|
+
title: props.confirmStop ? "Stop current turn (press Esc twice)" : "Interrupt current turn",
|
|
49009
49043
|
group: "Session",
|
|
49010
49044
|
run: () => cancel.escape()
|
|
49011
49045
|
}, {
|
|
@@ -49025,8 +49059,11 @@ function TurnCancelKeys(props) {
|
|
|
49025
49059
|
setProp(_el$, "height", 1);
|
|
49026
49060
|
setProp(_el$, "flexShrink", 0);
|
|
49027
49061
|
setProp(_el$, "paddingLeft", 1);
|
|
49028
|
-
insertNode(_el$2, createTextNode(`Press Ctrl+C again to quit`));
|
|
49029
49062
|
setProp(_el$2, "wrapMode", "none");
|
|
49063
|
+
insert(_el$2, (() => {
|
|
49064
|
+
var _c$ = memo2(() => armed() === "escape");
|
|
49065
|
+
return () => _c$() ? t("turn.stop.escHint") : "Press Ctrl+C again to quit";
|
|
49066
|
+
})());
|
|
49030
49067
|
effect((_$p) => setProp(_el$2, "fg", theme?.text.feedback.warning.base ?? "#e0af68", _$p));
|
|
49031
49068
|
return _el$;
|
|
49032
49069
|
}
|
|
@@ -49040,9 +49077,11 @@ var init_turn_cancel = __esm(() => {
|
|
|
49040
49077
|
init_index_bun();
|
|
49041
49078
|
init_index_bun();
|
|
49042
49079
|
init_index_bun();
|
|
49080
|
+
init_index_bun();
|
|
49043
49081
|
init_server();
|
|
49044
49082
|
init_keymap();
|
|
49045
49083
|
init_theme3();
|
|
49084
|
+
init_i18n();
|
|
49046
49085
|
});
|
|
49047
49086
|
|
|
49048
49087
|
// ../tui-base/src/routes/session/turn-overlay-controller.ts
|
|
@@ -49436,7 +49475,7 @@ function summarizeArgs(name, args, limit = 160) {
|
|
|
49436
49475
|
function ApprovalCard(props) {
|
|
49437
49476
|
return createComponent2(DialogConfirm, {
|
|
49438
49477
|
get title() {
|
|
49439
|
-
return
|
|
49478
|
+
return t("overlay.ask.approvalTitle", {
|
|
49440
49479
|
name: props.name
|
|
49441
49480
|
});
|
|
49442
49481
|
},
|
|
@@ -49445,8 +49484,8 @@ function ApprovalCard(props) {
|
|
|
49445
49484
|
},
|
|
49446
49485
|
get label() {
|
|
49447
49486
|
return {
|
|
49448
|
-
confirm:
|
|
49449
|
-
cancel:
|
|
49487
|
+
confirm: t("overlay.ask.allow"),
|
|
49488
|
+
cancel: t("overlay.ask.reject")
|
|
49450
49489
|
};
|
|
49451
49490
|
},
|
|
49452
49491
|
onConfirm: () => props.onVerdict("allowed-once"),
|
|
@@ -49483,14 +49522,14 @@ function askTabStrip(questions, picks, index, customs) {
|
|
|
49483
49522
|
}).join(" \xB7 ");
|
|
49484
49523
|
}
|
|
49485
49524
|
function askSentinelTitle(custom) {
|
|
49486
|
-
return custom ?
|
|
49525
|
+
return custom ? t("overlay.ask.customMark", {
|
|
49487
49526
|
answer: custom
|
|
49488
|
-
}) :
|
|
49527
|
+
}) : t("overlay.ask.sentinelLabel");
|
|
49489
49528
|
}
|
|
49490
49529
|
function askProgressTitle(questions, index) {
|
|
49491
49530
|
if (questions.length < 2)
|
|
49492
|
-
return
|
|
49493
|
-
return
|
|
49531
|
+
return t("overlay.ask.question");
|
|
49532
|
+
return t("overlay.ask.questionProgress", {
|
|
49494
49533
|
index: String(index + 1),
|
|
49495
49534
|
total: String(questions.length)
|
|
49496
49535
|
});
|
|
@@ -49560,9 +49599,9 @@ function AskPicker(props) {
|
|
|
49560
49599
|
function askQuestionRows(question, picks, custom, review) {
|
|
49561
49600
|
const multi = question.multiSelect === true;
|
|
49562
49601
|
const rows = question.options.map((option) => ({
|
|
49563
|
-
title: multi ? picks.includes(option) ?
|
|
49602
|
+
title: multi ? picks.includes(option) ? t("overlay.ask.checkedOption", {
|
|
49564
49603
|
option
|
|
49565
|
-
}) :
|
|
49604
|
+
}) : t("overlay.ask.uncheckedOption", {
|
|
49566
49605
|
option
|
|
49567
49606
|
}) : option,
|
|
49568
49607
|
value: option
|
|
@@ -49575,7 +49614,7 @@ function askQuestionRows(question, picks, custom, review) {
|
|
|
49575
49614
|
});
|
|
49576
49615
|
if (review)
|
|
49577
49616
|
rows.push({
|
|
49578
|
-
title:
|
|
49617
|
+
title: t("overlay.ask.reviewRow"),
|
|
49579
49618
|
value: {
|
|
49580
49619
|
kind: "review"
|
|
49581
49620
|
}
|
|
@@ -49608,7 +49647,7 @@ function AskQuestionsView(props) {
|
|
|
49608
49647
|
if (b.questions.length >= 2)
|
|
49609
49648
|
parts.push(askTabStrip(b.questions, b.picks, b.index, b.customs));
|
|
49610
49649
|
if (multi())
|
|
49611
|
-
parts.push(
|
|
49650
|
+
parts.push(t("overlay.ask.spaceToggle"));
|
|
49612
49651
|
return parts.join(" \xB7 ") || undefined;
|
|
49613
49652
|
};
|
|
49614
49653
|
const toggleHighlighted = () => {
|
|
@@ -49620,19 +49659,19 @@ function AskQuestionsView(props) {
|
|
|
49620
49659
|
const b = batch();
|
|
49621
49660
|
return [...b && b.questions.length >= 2 ? [{
|
|
49622
49661
|
id: "ask.prev_question",
|
|
49623
|
-
title:
|
|
49662
|
+
title: t("overlay.ask.prevQuestion"),
|
|
49624
49663
|
group: "Dialog",
|
|
49625
49664
|
bind: "left",
|
|
49626
49665
|
run: () => props.controller.switchFocus(-1)
|
|
49627
49666
|
}, {
|
|
49628
49667
|
id: "ask.next_question",
|
|
49629
|
-
title:
|
|
49668
|
+
title: t("overlay.ask.nextQuestion"),
|
|
49630
49669
|
group: "Dialog",
|
|
49631
49670
|
bind: "right",
|
|
49632
49671
|
run: () => props.controller.switchFocus(1)
|
|
49633
49672
|
}] : [], {
|
|
49634
49673
|
id: "ask.toggle",
|
|
49635
|
-
title:
|
|
49674
|
+
title: t("overlay.ask.toggleOption"),
|
|
49636
49675
|
group: "Dialog",
|
|
49637
49676
|
bind: "space",
|
|
49638
49677
|
run: toggleHighlighted
|
|
@@ -49643,7 +49682,7 @@ function AskQuestionsView(props) {
|
|
|
49643
49682
|
const q = question();
|
|
49644
49683
|
if (!b || !q)
|
|
49645
49684
|
return "";
|
|
49646
|
-
return
|
|
49685
|
+
return t("overlay.ask.title", {
|
|
49647
49686
|
title: askProgressTitle(b.questions, b.index),
|
|
49648
49687
|
prompt: truncate70(q.prompt)
|
|
49649
49688
|
});
|
|
@@ -49700,7 +49739,7 @@ function AskCustomInputView(props) {
|
|
|
49700
49739
|
mode: "modal",
|
|
49701
49740
|
commands: [{
|
|
49702
49741
|
id: "ask.custom_cancel",
|
|
49703
|
-
title:
|
|
49742
|
+
title: t("overlay.ask.customBackToOptions"),
|
|
49704
49743
|
group: "Dialog",
|
|
49705
49744
|
bind: "escape",
|
|
49706
49745
|
run: () => props.controller.cancelCustomEdit()
|
|
@@ -49721,14 +49760,14 @@ function AskCustomInputView(props) {
|
|
|
49721
49760
|
insert(_el$7, createComponent2(ReminderBadge, {}), null);
|
|
49722
49761
|
insert(_el$7, createComponent2(AskTitleText, {
|
|
49723
49762
|
get title() {
|
|
49724
|
-
return
|
|
49763
|
+
return t("overlay.ask.customTitle");
|
|
49725
49764
|
}
|
|
49726
49765
|
}), null);
|
|
49727
49766
|
return _el$7;
|
|
49728
49767
|
})();
|
|
49729
49768
|
},
|
|
49730
49769
|
get title() {
|
|
49731
|
-
return
|
|
49770
|
+
return t("overlay.ask.customTitle");
|
|
49732
49771
|
}
|
|
49733
49772
|
}), _el$6);
|
|
49734
49773
|
setProp(_el$6, "wrapMode", "word");
|
|
@@ -49749,7 +49788,7 @@ function AskCustomInputView(props) {
|
|
|
49749
49788
|
setProp(_el$4, "onInput", (text) => props.controller.patchCustom(text));
|
|
49750
49789
|
setProp(_el$4, "onSubmit", () => props.controller.commitCustom());
|
|
49751
49790
|
effect((_p$) => {
|
|
49752
|
-
var _v$ = props.ask()?.customDraft ?? "", _v$2 =
|
|
49791
|
+
var _v$ = props.ask()?.customDraft ?? "", _v$2 = t("overlay.ask.sentinelLabel"), _v$3 = theme?.text.muted, _v$4 = theme?.background.formfield.focused, _v$5 = theme?.text.formfield.focused, _v$6 = theme?.text.formfield.focused, _v$7 = cursorStyle();
|
|
49753
49792
|
_v$ !== _p$.e && (_p$.e = setProp(_el$4, "value", _v$, _p$.e));
|
|
49754
49793
|
_v$2 !== _p$.t && (_p$.t = setProp(_el$4, "placeholder", _v$2, _p$.t));
|
|
49755
49794
|
_v$3 !== _p$.a && (_p$.a = setProp(_el$4, "placeholderColor", _v$3, _p$.a));
|
|
@@ -49789,11 +49828,11 @@ function AskReviewView(props) {
|
|
|
49789
49828
|
const rows = b.questions.map((question, qi) => {
|
|
49790
49829
|
const picks = b.picks[qi] ?? [];
|
|
49791
49830
|
const custom = b.customs[qi];
|
|
49792
|
-
const answer = custom ?
|
|
49831
|
+
const answer = custom ? t("overlay.ask.customMark", {
|
|
49793
49832
|
answer: custom
|
|
49794
49833
|
}) : picks.length > 0 ? picks.join(", ") : "\u2014";
|
|
49795
49834
|
return {
|
|
49796
|
-
title:
|
|
49835
|
+
title: t("overlay.ask.reviewQuestionRow", {
|
|
49797
49836
|
prompt: truncate70(question.prompt),
|
|
49798
49837
|
picks: answer
|
|
49799
49838
|
}),
|
|
@@ -49804,7 +49843,7 @@ function AskReviewView(props) {
|
|
|
49804
49843
|
};
|
|
49805
49844
|
});
|
|
49806
49845
|
rows.push({
|
|
49807
|
-
title:
|
|
49846
|
+
title: t("overlay.ask.submitRow"),
|
|
49808
49847
|
value: {
|
|
49809
49848
|
kind: "submit"
|
|
49810
49849
|
}
|
|
@@ -49819,17 +49858,17 @@ function AskReviewView(props) {
|
|
|
49819
49858
|
insert(_el$9, createComponent2(ReminderBadge, {}), null);
|
|
49820
49859
|
insert(_el$9, createComponent2(AskTitleText, {
|
|
49821
49860
|
get title() {
|
|
49822
|
-
return
|
|
49861
|
+
return t("overlay.ask.reviewTitle");
|
|
49823
49862
|
}
|
|
49824
49863
|
}), null);
|
|
49825
49864
|
return _el$9;
|
|
49826
49865
|
})();
|
|
49827
49866
|
},
|
|
49828
49867
|
get title() {
|
|
49829
|
-
return
|
|
49868
|
+
return t("overlay.ask.reviewTitle");
|
|
49830
49869
|
},
|
|
49831
49870
|
get description() {
|
|
49832
|
-
return
|
|
49871
|
+
return t("overlay.ask.reviewDescription");
|
|
49833
49872
|
},
|
|
49834
49873
|
renderFilter: false,
|
|
49835
49874
|
get options() {
|
|
@@ -49838,7 +49877,7 @@ function AskReviewView(props) {
|
|
|
49838
49877
|
get bindings() {
|
|
49839
49878
|
return [{
|
|
49840
49879
|
id: "ask.back_to_questions",
|
|
49841
|
-
title:
|
|
49880
|
+
title: t("overlay.ask.editAnswers"),
|
|
49842
49881
|
group: "Dialog",
|
|
49843
49882
|
bind: "left",
|
|
49844
49883
|
run: () => props.controller.backToQuestions()
|
|
@@ -50186,51 +50225,51 @@ function loginStepTitle(stepTitle, error) {
|
|
|
50186
50225
|
}
|
|
50187
50226
|
async function commitLoginRoute(say, face, entry, key) {
|
|
50188
50227
|
if (!key.trim()) {
|
|
50189
|
-
say(
|
|
50228
|
+
say(t("command.login.cancelledEmptyKey"));
|
|
50190
50229
|
return;
|
|
50191
50230
|
}
|
|
50192
50231
|
const registered = await face.registerRoute(entry.id, providerProfileFor(entry));
|
|
50193
50232
|
if (!registered) {
|
|
50194
|
-
say(
|
|
50233
|
+
say(t("command.login.routeRegistrationFailed", { id: entry.id }));
|
|
50195
50234
|
return;
|
|
50196
50235
|
}
|
|
50197
50236
|
try {
|
|
50198
50237
|
await face.login(deriveKeyRef(entry.id), key);
|
|
50199
50238
|
} catch (e) {
|
|
50200
|
-
say(
|
|
50239
|
+
say(t("command.login.keyStoreFailed", { id: entry.id, detail: String(e instanceof Error ? e.message : e).slice(0, 150) }));
|
|
50201
50240
|
return;
|
|
50202
50241
|
}
|
|
50203
|
-
say(
|
|
50242
|
+
say(t("command.login.subscribed", { name: entry.name }));
|
|
50204
50243
|
}
|
|
50205
50244
|
async function offerCorruptedLogRepair(ctx, sessionId, broken) {
|
|
50206
50245
|
if (broken.length === 0) {
|
|
50207
|
-
ctx.say(
|
|
50246
|
+
ctx.say(t("command.repair.noBrokenLog", { id: sessionId }));
|
|
50208
50247
|
return false;
|
|
50209
50248
|
}
|
|
50210
50249
|
if (!ctx.seam.repairSessionLog) {
|
|
50211
|
-
ctx.say(
|
|
50250
|
+
ctx.say(t("command.repair.unavailable"));
|
|
50212
50251
|
return false;
|
|
50213
50252
|
}
|
|
50214
50253
|
const unrepairable = broken.filter((row) => !isRepairableLogRow(row));
|
|
50215
50254
|
if (unrepairable.length > 0) {
|
|
50216
|
-
ctx.say(
|
|
50255
|
+
ctx.say(t("command.repair.unrepairable", { id: sessionId, detail: repairConfirmBody(unrepairable).join("; ") }));
|
|
50217
50256
|
return false;
|
|
50218
50257
|
}
|
|
50219
50258
|
const confirm = await ctx.pickOne(`Session ${sessionId} has a broken log (${repairConfirmBody(broken).join("; ")}) \u2014 repair it?`, repairConfirmOptions());
|
|
50220
50259
|
if (confirm !== "repair") {
|
|
50221
|
-
ctx.say(
|
|
50260
|
+
ctx.say(t("command.repair.cancelled", { detail: repairConfirmBody(broken).join("; ") }));
|
|
50222
50261
|
return false;
|
|
50223
50262
|
}
|
|
50224
50263
|
for (const row of broken) {
|
|
50225
50264
|
const result = ctx.seam.repairSessionLog(row.path);
|
|
50226
50265
|
if (result.kind === "failed") {
|
|
50227
|
-
ctx.say(
|
|
50266
|
+
ctx.say(t("command.repair.failed", { name: row.name, detail: result.detail }));
|
|
50228
50267
|
return false;
|
|
50229
50268
|
}
|
|
50230
50269
|
if (result.kind === "clean") {
|
|
50231
|
-
ctx.say(
|
|
50270
|
+
ctx.say(t("command.repair.notNeeded", { name: row.name }));
|
|
50232
50271
|
} else {
|
|
50233
|
-
ctx.say(
|
|
50272
|
+
ctx.say(t("command.repair.done", { name: row.name, backupPath: result.backupPath }));
|
|
50234
50273
|
}
|
|
50235
50274
|
}
|
|
50236
50275
|
return true;
|
|
@@ -50250,7 +50289,7 @@ async function runCustomLoginChain(ctx, face, existingRoutes) {
|
|
|
50250
50289
|
for (;; ) {
|
|
50251
50290
|
value = await ctx.promptText?.(loginStepTitle(def.title, error), { mask: def.mask });
|
|
50252
50291
|
if (value === undefined) {
|
|
50253
|
-
ctx.say(
|
|
50292
|
+
ctx.say(t("command.login.cancelled"));
|
|
50254
50293
|
return;
|
|
50255
50294
|
}
|
|
50256
50295
|
const trimmed = value.trim();
|
|
@@ -50302,50 +50341,50 @@ function coreCommands() {
|
|
|
50302
50341
|
return [
|
|
50303
50342
|
{
|
|
50304
50343
|
name: "/help",
|
|
50305
|
-
description:
|
|
50344
|
+
description: t("command.help.description"),
|
|
50306
50345
|
run(ctx) {
|
|
50307
50346
|
for (const command of coreCommands())
|
|
50308
|
-
ctx.say(
|
|
50347
|
+
ctx.say(t("command.help.entry", { name: command.name, description: command.description }));
|
|
50309
50348
|
}
|
|
50310
50349
|
},
|
|
50311
50350
|
{
|
|
50312
50351
|
name: "/new",
|
|
50313
|
-
description:
|
|
50352
|
+
description: t("command.new.description"),
|
|
50314
50353
|
async run(ctx) {
|
|
50315
50354
|
ctx.seam.newSession();
|
|
50316
50355
|
ctx.clear();
|
|
50317
50356
|
await ctx.reload();
|
|
50318
|
-
ctx.say(
|
|
50357
|
+
ctx.say(t("command.new.created", { id: ctx.seam.currentSessionId() ?? "(unnamed)" }));
|
|
50319
50358
|
}
|
|
50320
50359
|
},
|
|
50321
50360
|
{
|
|
50322
50361
|
name: "/model",
|
|
50323
|
-
description:
|
|
50362
|
+
description: t("command.model.description"),
|
|
50324
50363
|
async run(ctx, argText) {
|
|
50325
50364
|
const pendingSelectionError = ctx.seam.lastSelectionError?.();
|
|
50326
50365
|
if (pendingSelectionError) {
|
|
50327
|
-
ctx.say(
|
|
50366
|
+
ctx.say(t("command.model.stagedSwitchFailed", { reason: pendingSelectionError }));
|
|
50328
50367
|
}
|
|
50329
50368
|
const arg = argText.trim();
|
|
50330
50369
|
if (arg) {
|
|
50331
50370
|
const [providerID, modelID] = arg.split("/");
|
|
50332
50371
|
if (!providerID || !modelID) {
|
|
50333
|
-
ctx.say(
|
|
50372
|
+
ctx.say(t("command.model.usage", { arg }));
|
|
50334
50373
|
return;
|
|
50335
50374
|
}
|
|
50336
50375
|
try {
|
|
50337
50376
|
await ctx.seam.selectModel(providerID, modelID);
|
|
50338
50377
|
} catch (error) {
|
|
50339
|
-
ctx.say(
|
|
50378
|
+
ctx.say(t("command.model.switchFailed", { reason: seamFailureReason(error) }));
|
|
50340
50379
|
return;
|
|
50341
50380
|
}
|
|
50342
|
-
ctx.say(
|
|
50381
|
+
ctx.say(t("command.model.set", { model: `${providerID}/${modelID}` }));
|
|
50343
50382
|
ctx.refreshFooter?.();
|
|
50344
50383
|
return;
|
|
50345
50384
|
}
|
|
50346
50385
|
const catalog = await ctx.seam.modelCatalog();
|
|
50347
50386
|
if (catalog.length === 0) {
|
|
50348
|
-
ctx.say(
|
|
50387
|
+
ctx.say(t("command.model.emptyCatalog"));
|
|
50349
50388
|
return;
|
|
50350
50389
|
}
|
|
50351
50390
|
const current = await ctx.seam.currentModelSelection();
|
|
@@ -50403,19 +50442,19 @@ function coreCommands() {
|
|
|
50403
50442
|
try {
|
|
50404
50443
|
await ctx.seam.selectModel(providerID, modelID);
|
|
50405
50444
|
} catch (error) {
|
|
50406
|
-
ctx.say(
|
|
50445
|
+
ctx.say(t("command.model.switchFailed", { reason: seamFailureReason(error) }));
|
|
50407
50446
|
return;
|
|
50408
50447
|
}
|
|
50409
|
-
ctx.say(
|
|
50448
|
+
ctx.say(t("command.model.setNoThink", { model: picked }));
|
|
50410
50449
|
if (keptEffort !== undefined) {
|
|
50411
50450
|
try {
|
|
50412
50451
|
await thinking?.selectEffort(keptEffort);
|
|
50413
50452
|
} catch (error) {
|
|
50414
|
-
ctx.say(
|
|
50453
|
+
ctx.say(t("command.thinking.switchFailed", { reason: seamFailureReason(error) }));
|
|
50415
50454
|
ctx.refreshFooter?.();
|
|
50416
50455
|
return;
|
|
50417
50456
|
}
|
|
50418
|
-
ctx.say(
|
|
50457
|
+
ctx.say(t("command.thinking.setNext", { effort: keptEffort }));
|
|
50419
50458
|
}
|
|
50420
50459
|
ctx.refreshFooter?.();
|
|
50421
50460
|
return;
|
|
@@ -50430,7 +50469,7 @@ function coreCommands() {
|
|
|
50430
50469
|
}))
|
|
50431
50470
|
]);
|
|
50432
50471
|
if (!effortPicked) {
|
|
50433
|
-
ctx.say(
|
|
50472
|
+
ctx.say(t("command.model.unchanged"));
|
|
50434
50473
|
return;
|
|
50435
50474
|
}
|
|
50436
50475
|
const effort = effortPicked === MODEL_DEFAULT_EFFORT_PICK ? undefined : effortPicked;
|
|
@@ -50438,35 +50477,35 @@ function coreCommands() {
|
|
|
50438
50477
|
try {
|
|
50439
50478
|
await ctx.seam.selectModel(providerID, modelID);
|
|
50440
50479
|
} catch (error) {
|
|
50441
|
-
ctx.say(
|
|
50480
|
+
ctx.say(t("command.model.switchFailed", { reason: seamFailureReason(error) }));
|
|
50442
50481
|
return;
|
|
50443
50482
|
}
|
|
50444
|
-
ctx.say(
|
|
50483
|
+
ctx.say(t("command.model.set", { model: picked }));
|
|
50445
50484
|
try {
|
|
50446
50485
|
await thinking?.selectEffort(effort);
|
|
50447
50486
|
} catch (error) {
|
|
50448
|
-
ctx.say(
|
|
50487
|
+
ctx.say(t("command.thinking.switchFailed", { reason: seamFailureReason(error) }));
|
|
50449
50488
|
ctx.refreshFooter?.();
|
|
50450
50489
|
return;
|
|
50451
50490
|
}
|
|
50452
|
-
ctx.say(
|
|
50491
|
+
ctx.say(t("command.thinking.setNext", { effort: effortPicked === MODEL_DEFAULT_EFFORT_PICK ? "model default" : effortPicked }));
|
|
50453
50492
|
ctx.refreshFooter?.();
|
|
50454
50493
|
}
|
|
50455
50494
|
},
|
|
50456
50495
|
{
|
|
50457
50496
|
name: "/login",
|
|
50458
|
-
description:
|
|
50497
|
+
description: t("command.login.description"),
|
|
50459
50498
|
async run(ctx, argText) {
|
|
50460
50499
|
const face = ctx.seam.login;
|
|
50461
50500
|
if (!face || !ctx.promptText) {
|
|
50462
|
-
ctx.say(
|
|
50501
|
+
ctx.say(t("command.login.unavailable"));
|
|
50463
50502
|
return;
|
|
50464
50503
|
}
|
|
50465
50504
|
const arg = argText.trim().toLowerCase();
|
|
50466
50505
|
if (arg) {
|
|
50467
50506
|
const entry = PROVIDER_CATALOG.find((e) => e.id === arg);
|
|
50468
50507
|
if (!entry) {
|
|
50469
|
-
ctx.say(
|
|
50508
|
+
ctx.say(t("command.login.unknownProvider", { provider: arg }));
|
|
50470
50509
|
return;
|
|
50471
50510
|
}
|
|
50472
50511
|
await commitCatalogLogin(ctx, face, entry);
|
|
@@ -50488,18 +50527,18 @@ function coreCommands() {
|
|
|
50488
50527
|
},
|
|
50489
50528
|
{
|
|
50490
50529
|
name: "/logout",
|
|
50491
|
-
description:
|
|
50530
|
+
description: t("command.logout.description"),
|
|
50492
50531
|
async run(ctx, argText) {
|
|
50493
50532
|
const face = ctx.seam.login;
|
|
50494
50533
|
if (!face) {
|
|
50495
|
-
ctx.say(
|
|
50534
|
+
ctx.say(t("command.logout.unavailable"));
|
|
50496
50535
|
return;
|
|
50497
50536
|
}
|
|
50498
50537
|
let routes;
|
|
50499
50538
|
try {
|
|
50500
50539
|
routes = await face.routes();
|
|
50501
50540
|
} catch (error) {
|
|
50502
|
-
ctx.say(
|
|
50541
|
+
ctx.say(t("command.logout.failed", { reason: seamFailureReason(error) }));
|
|
50503
50542
|
return;
|
|
50504
50543
|
}
|
|
50505
50544
|
const loggedIn = [];
|
|
@@ -50510,13 +50549,13 @@ function coreCommands() {
|
|
|
50510
50549
|
} catch {}
|
|
50511
50550
|
}
|
|
50512
50551
|
if (loggedIn.length === 0) {
|
|
50513
|
-
ctx.say(
|
|
50552
|
+
ctx.say(t("command.logout.none"));
|
|
50514
50553
|
return;
|
|
50515
50554
|
}
|
|
50516
50555
|
const arg = argText.trim();
|
|
50517
50556
|
let target = arg ? loggedIn.find((t) => t.id === arg) : undefined;
|
|
50518
50557
|
if (arg && !target) {
|
|
50519
|
-
ctx.say(
|
|
50558
|
+
ctx.say(t("command.logout.notLoggedIn", { provider: arg }));
|
|
50520
50559
|
return;
|
|
50521
50560
|
}
|
|
50522
50561
|
if (!target) {
|
|
@@ -50530,37 +50569,37 @@ function coreCommands() {
|
|
|
50530
50569
|
try {
|
|
50531
50570
|
await face.logout(target.ref);
|
|
50532
50571
|
} catch (error) {
|
|
50533
|
-
ctx.say(
|
|
50572
|
+
ctx.say(t("command.logout.routeFailed", { id: target.id, reason: seamFailureReason(error) }));
|
|
50534
50573
|
return;
|
|
50535
50574
|
}
|
|
50536
50575
|
if (target.custom) {
|
|
50537
|
-
ctx.say(
|
|
50576
|
+
ctx.say(t("command.logout.done", { name: target.name }));
|
|
50538
50577
|
return;
|
|
50539
50578
|
}
|
|
50540
50579
|
const cleared = await face.registerRoute(target.id, undefined).catch(() => false);
|
|
50541
|
-
ctx.say(cleared ?
|
|
50580
|
+
ctx.say(cleared ? t("command.logout.routeRemoved", { name: target.name }) : t("command.logout.routeRemoveFailed", { name: target.name }));
|
|
50542
50581
|
}
|
|
50543
50582
|
},
|
|
50544
50583
|
{
|
|
50545
50584
|
name: "/quit",
|
|
50546
|
-
description:
|
|
50585
|
+
description: t("command.quit.description"),
|
|
50547
50586
|
run(ctx) {
|
|
50548
50587
|
ctx.quit();
|
|
50549
50588
|
}
|
|
50550
50589
|
},
|
|
50551
50590
|
{
|
|
50552
50591
|
name: "/resume",
|
|
50553
|
-
description:
|
|
50592
|
+
description: t("command.resume.description"),
|
|
50554
50593
|
async run(ctx) {
|
|
50555
50594
|
let sessions;
|
|
50556
50595
|
try {
|
|
50557
50596
|
sessions = await ctx.seam.listSessions();
|
|
50558
50597
|
} catch (error) {
|
|
50559
|
-
ctx.say(
|
|
50598
|
+
ctx.say(t("command.resume.unavailable", { reason: seamFailureReason(error) }));
|
|
50560
50599
|
return;
|
|
50561
50600
|
}
|
|
50562
50601
|
if (sessions.length === 0) {
|
|
50563
|
-
ctx.say(
|
|
50602
|
+
ctx.say(t("command.resume.empty"));
|
|
50564
50603
|
return;
|
|
50565
50604
|
}
|
|
50566
50605
|
const visible = filterSessionsBySizeFloor(sessions);
|
|
@@ -50581,43 +50620,43 @@ function coreCommands() {
|
|
|
50581
50620
|
}
|
|
50582
50621
|
ctx.seam.resumeSession(picked);
|
|
50583
50622
|
await ctx.reload(picked);
|
|
50584
|
-
ctx.say(
|
|
50623
|
+
ctx.say(t("command.resume.done", { name: picked }));
|
|
50585
50624
|
}
|
|
50586
50625
|
},
|
|
50587
50626
|
{
|
|
50588
50627
|
name: "/clear",
|
|
50589
|
-
description:
|
|
50628
|
+
description: t("command.clear.description"),
|
|
50590
50629
|
run(ctx) {
|
|
50591
50630
|
ctx.clear();
|
|
50592
|
-
ctx.say(
|
|
50631
|
+
ctx.say(t("command.clear.done"));
|
|
50593
50632
|
}
|
|
50594
50633
|
},
|
|
50595
50634
|
{
|
|
50596
50635
|
name: "/flush",
|
|
50597
|
-
description:
|
|
50636
|
+
description: t("command.flush.description"),
|
|
50598
50637
|
run(ctx) {
|
|
50599
50638
|
if (!ctx.flushQueue) {
|
|
50600
|
-
ctx.say(
|
|
50639
|
+
ctx.say(t("command.flush.unavailable"));
|
|
50601
50640
|
return;
|
|
50602
50641
|
}
|
|
50603
50642
|
const result = ctx.flushQueue();
|
|
50604
50643
|
if (result.kind === "empty") {
|
|
50605
|
-
ctx.say(
|
|
50644
|
+
ctx.say(t("command.flush.empty"));
|
|
50606
50645
|
return;
|
|
50607
50646
|
}
|
|
50608
50647
|
if (result.kind === "busy") {
|
|
50609
|
-
ctx.say(
|
|
50648
|
+
ctx.say(t("command.flush.busy", { remaining: result.remaining }));
|
|
50610
50649
|
return;
|
|
50611
50650
|
}
|
|
50612
|
-
ctx.say(
|
|
50651
|
+
ctx.say(t("command.flush.flushed", { started: result.started, remaining: result.remaining }));
|
|
50613
50652
|
}
|
|
50614
50653
|
},
|
|
50615
50654
|
{
|
|
50616
50655
|
name: "/btw",
|
|
50617
|
-
description:
|
|
50656
|
+
description: t("command.btw.description"),
|
|
50618
50657
|
run(ctx, argText) {
|
|
50619
50658
|
if (!ctx.seam.btwAsk || !ctx.openBtw) {
|
|
50620
|
-
ctx.say(
|
|
50659
|
+
ctx.say(t("command.btw.unavailable"));
|
|
50621
50660
|
return;
|
|
50622
50661
|
}
|
|
50623
50662
|
ctx.openBtw(argText);
|
|
@@ -50625,15 +50664,15 @@ function coreCommands() {
|
|
|
50625
50664
|
},
|
|
50626
50665
|
{
|
|
50627
50666
|
name: "/session",
|
|
50628
|
-
description:
|
|
50667
|
+
description: t("command.session.description"),
|
|
50629
50668
|
async run(ctx) {
|
|
50630
50669
|
if (!ctx.seam.sessionInfo) {
|
|
50631
|
-
ctx.say(
|
|
50670
|
+
ctx.say(t("command.session.unavailable"));
|
|
50632
50671
|
return;
|
|
50633
50672
|
}
|
|
50634
50673
|
const info = await ctx.seam.sessionInfo();
|
|
50635
50674
|
if (!info || info.sessionId === null) {
|
|
50636
|
-
ctx.say(
|
|
50675
|
+
ctx.say(t("command.session.noActive"));
|
|
50637
50676
|
return;
|
|
50638
50677
|
}
|
|
50639
50678
|
for (const line of formatSessionInfoPanel(sessionInfoRows(info)))
|
|
@@ -50642,10 +50681,10 @@ function coreCommands() {
|
|
|
50642
50681
|
},
|
|
50643
50682
|
{
|
|
50644
50683
|
name: "/plugins",
|
|
50645
|
-
description:
|
|
50684
|
+
description: t("command.plugins.description"),
|
|
50646
50685
|
run(ctx) {
|
|
50647
50686
|
if (!ctx.seam.plugins) {
|
|
50648
|
-
ctx.say(
|
|
50687
|
+
ctx.say(t("command.plugins.unavailable"));
|
|
50649
50688
|
return;
|
|
50650
50689
|
}
|
|
50651
50690
|
if (ctx.openPlugins) {
|
|
@@ -50654,19 +50693,19 @@ function coreCommands() {
|
|
|
50654
50693
|
}
|
|
50655
50694
|
const plugins = ctx.seam.plugins();
|
|
50656
50695
|
if (plugins.length === 0) {
|
|
50657
|
-
ctx.say(
|
|
50696
|
+
ctx.say(t("command.plugins.none"));
|
|
50658
50697
|
return;
|
|
50659
50698
|
}
|
|
50660
50699
|
for (const plugin of plugins)
|
|
50661
|
-
ctx.say(
|
|
50700
|
+
ctx.say(t("command.plugins.entry", { name: plugin.name, version: plugin.version }));
|
|
50662
50701
|
}
|
|
50663
50702
|
},
|
|
50664
50703
|
{
|
|
50665
50704
|
name: "/skills",
|
|
50666
|
-
description:
|
|
50705
|
+
description: t("command.skills.description"),
|
|
50667
50706
|
run(ctx) {
|
|
50668
50707
|
if (!ctx.openSkills) {
|
|
50669
|
-
ctx.say(
|
|
50708
|
+
ctx.say(t("command.skills.unavailable"));
|
|
50670
50709
|
return;
|
|
50671
50710
|
}
|
|
50672
50711
|
ctx.openSkills();
|
|
@@ -50674,10 +50713,10 @@ function coreCommands() {
|
|
|
50674
50713
|
},
|
|
50675
50714
|
{
|
|
50676
50715
|
name: "/search",
|
|
50677
|
-
description:
|
|
50716
|
+
description: t("command.search.description"),
|
|
50678
50717
|
run(ctx) {
|
|
50679
50718
|
if (!ctx.openSearch) {
|
|
50680
|
-
ctx.say(
|
|
50719
|
+
ctx.say(t("command.search.unavailable"));
|
|
50681
50720
|
return;
|
|
50682
50721
|
}
|
|
50683
50722
|
ctx.openSearch();
|
|
@@ -50685,14 +50724,14 @@ function coreCommands() {
|
|
|
50685
50724
|
},
|
|
50686
50725
|
{
|
|
50687
50726
|
name: "/agents",
|
|
50688
|
-
description:
|
|
50727
|
+
description: t("command.agents.description"),
|
|
50689
50728
|
run(ctx, argText) {
|
|
50690
50729
|
if (!ctx.seam.agents) {
|
|
50691
|
-
ctx.say(
|
|
50730
|
+
ctx.say(t("command.agents.unavailable"));
|
|
50692
50731
|
return;
|
|
50693
50732
|
}
|
|
50694
50733
|
if (!ctx.openAgents) {
|
|
50695
|
-
ctx.say(
|
|
50734
|
+
ctx.say(t("command.agents.panelNotMounted"));
|
|
50696
50735
|
return;
|
|
50697
50736
|
}
|
|
50698
50737
|
const name = argText.trim();
|
|
@@ -50701,10 +50740,10 @@ function coreCommands() {
|
|
|
50701
50740
|
},
|
|
50702
50741
|
{
|
|
50703
50742
|
name: "/settings",
|
|
50704
|
-
description:
|
|
50743
|
+
description: t("command.settings.description"),
|
|
50705
50744
|
run(ctx) {
|
|
50706
50745
|
if (!ctx.openSettings) {
|
|
50707
|
-
ctx.say(
|
|
50746
|
+
ctx.say(t("command.settings.panelNotMounted"));
|
|
50708
50747
|
return;
|
|
50709
50748
|
}
|
|
50710
50749
|
ctx.openSettings();
|
|
@@ -50712,10 +50751,10 @@ function coreCommands() {
|
|
|
50712
50751
|
},
|
|
50713
50752
|
{
|
|
50714
50753
|
name: "/history",
|
|
50715
|
-
description:
|
|
50754
|
+
description: t("command.history.description"),
|
|
50716
50755
|
run(ctx) {
|
|
50717
50756
|
if (!ctx.openHistory) {
|
|
50718
|
-
ctx.say(
|
|
50757
|
+
ctx.say(t("command.history.panelNotMounted"));
|
|
50719
50758
|
return;
|
|
50720
50759
|
}
|
|
50721
50760
|
ctx.openHistory();
|
|
@@ -50723,15 +50762,15 @@ function coreCommands() {
|
|
|
50723
50762
|
},
|
|
50724
50763
|
{
|
|
50725
50764
|
name: "/export",
|
|
50726
|
-
description:
|
|
50765
|
+
description: t("command.export.description"),
|
|
50727
50766
|
async run(ctx, argText) {
|
|
50728
50767
|
const sessionId = ctx.seam.currentSessionId();
|
|
50729
50768
|
if (!sessionId) {
|
|
50730
|
-
ctx.say(
|
|
50769
|
+
ctx.say(t("command.export.noSession"));
|
|
50731
50770
|
return;
|
|
50732
50771
|
}
|
|
50733
50772
|
if (!ctx.seam.sessionJournal) {
|
|
50734
|
-
ctx.say(
|
|
50773
|
+
ctx.say(t("command.export.unavailable"));
|
|
50735
50774
|
return;
|
|
50736
50775
|
}
|
|
50737
50776
|
try {
|
|
@@ -50739,23 +50778,23 @@ function coreCommands() {
|
|
|
50739
50778
|
const target = exportTargetPath(sessionId, argText);
|
|
50740
50779
|
await mkdir2(dirname4(target), { recursive: true });
|
|
50741
50780
|
await writeFile2(target, journalToJSONL(entries));
|
|
50742
|
-
ctx.say(
|
|
50781
|
+
ctx.say(t("command.export.done", { count: entries.length, target }));
|
|
50743
50782
|
} catch (error) {
|
|
50744
|
-
ctx.say(
|
|
50783
|
+
ctx.say(t("command.export.failed", { reason: seamFailureReason(error) }));
|
|
50745
50784
|
}
|
|
50746
50785
|
}
|
|
50747
50786
|
},
|
|
50748
50787
|
{
|
|
50749
50788
|
name: "/subagents",
|
|
50750
|
-
description:
|
|
50789
|
+
description: t("command.subagents.description"),
|
|
50751
50790
|
run(ctx) {
|
|
50752
50791
|
if (!ctx.openSubagents) {
|
|
50753
|
-
ctx.say(
|
|
50792
|
+
ctx.say(t("command.subagents.panelNotMounted"));
|
|
50754
50793
|
return;
|
|
50755
50794
|
}
|
|
50756
50795
|
const views = ctx.seam.subagentViews?.() ?? [];
|
|
50757
50796
|
if (views.length === 0) {
|
|
50758
|
-
ctx.say(
|
|
50797
|
+
ctx.say(t("command.subagents.none"));
|
|
50759
50798
|
return;
|
|
50760
50799
|
}
|
|
50761
50800
|
ctx.openSubagents();
|
|
@@ -50763,16 +50802,16 @@ function coreCommands() {
|
|
|
50763
50802
|
},
|
|
50764
50803
|
{
|
|
50765
50804
|
name: "/think",
|
|
50766
|
-
description:
|
|
50805
|
+
description: t("command.think.description"),
|
|
50767
50806
|
async run(ctx) {
|
|
50768
50807
|
const thinking = ctx.seam.thinking;
|
|
50769
50808
|
if (!thinking) {
|
|
50770
|
-
ctx.say(
|
|
50809
|
+
ctx.say(t("command.think.unavailable"));
|
|
50771
50810
|
return;
|
|
50772
50811
|
}
|
|
50773
50812
|
const efforts = await thinking.efforts();
|
|
50774
50813
|
if (efforts.length === 0) {
|
|
50775
|
-
ctx.say(
|
|
50814
|
+
ctx.say(t("command.think.noEfforts"));
|
|
50776
50815
|
return;
|
|
50777
50816
|
}
|
|
50778
50817
|
const current = await thinking.currentEffort();
|
|
@@ -50787,16 +50826,16 @@ function coreCommands() {
|
|
|
50787
50826
|
try {
|
|
50788
50827
|
await thinking.selectEffort(picked);
|
|
50789
50828
|
} catch (error) {
|
|
50790
|
-
ctx.say(
|
|
50829
|
+
ctx.say(t("command.thinking.switchFailed", { reason: seamFailureReason(error) }));
|
|
50791
50830
|
return;
|
|
50792
50831
|
}
|
|
50793
|
-
ctx.say(
|
|
50832
|
+
ctx.say(t("command.thinking.setNext", { effort: picked }));
|
|
50794
50833
|
ctx.refreshFooter?.();
|
|
50795
50834
|
}
|
|
50796
50835
|
},
|
|
50797
50836
|
{
|
|
50798
50837
|
name: "/hints",
|
|
50799
|
-
description:
|
|
50838
|
+
description: t("command.hints.description"),
|
|
50800
50839
|
run(ctx, argText) {
|
|
50801
50840
|
const words = argText.trim().split(/\s+/).filter(Boolean);
|
|
50802
50841
|
if (words.length === 0) {
|
|
@@ -50810,20 +50849,20 @@ function coreCommands() {
|
|
|
50810
50849
|
const raw = words[1];
|
|
50811
50850
|
const picked = raw ? HINT_LOCALES.find((locale) => locale.toLowerCase() === raw.toLowerCase()) : undefined;
|
|
50812
50851
|
if (!picked) {
|
|
50813
|
-
ctx.say(
|
|
50852
|
+
ctx.say(t("command.hints.usageLang", { locales: HINT_LOCALES.join("|"), current: hintsLocale() }));
|
|
50814
50853
|
return;
|
|
50815
50854
|
}
|
|
50816
50855
|
const degraded = picked !== "en" && picked !== "zh-CN";
|
|
50817
50856
|
const next = degraded ? "en" : picked;
|
|
50818
50857
|
setHintsLocale(next);
|
|
50819
50858
|
persistHints(ctx.seam);
|
|
50820
|
-
|
|
50821
|
-
ctx.say(
|
|
50859
|
+
setLanguage(next);
|
|
50860
|
+
ctx.say(degraded ? t("command.hints.langDegraded", { lang: picked }) : t("command.hints.langSet", { lang: next }));
|
|
50822
50861
|
return;
|
|
50823
50862
|
}
|
|
50824
50863
|
const stateOn = state === undefined ? undefined : state === "on" ? true : state === "off" ? false : null;
|
|
50825
50864
|
if (stateOn === null) {
|
|
50826
|
-
ctx.say(
|
|
50865
|
+
ctx.say(t("command.hints.usageSegment", { segment: head, got: state }));
|
|
50827
50866
|
return;
|
|
50828
50867
|
}
|
|
50829
50868
|
if (head === "all") {
|
|
@@ -50833,11 +50872,11 @@ function coreCommands() {
|
|
|
50833
50872
|
all[seg] = on;
|
|
50834
50873
|
setFooterHints(all);
|
|
50835
50874
|
persistHints(ctx.seam);
|
|
50836
|
-
ctx.say(
|
|
50875
|
+
ctx.say(t("command.hints.allSet", { state: on ? "on" : "off" }));
|
|
50837
50876
|
return;
|
|
50838
50877
|
}
|
|
50839
50878
|
if (!FOOTER_HINT_IDS.includes(head)) {
|
|
50840
|
-
ctx.say(
|
|
50879
|
+
ctx.say(t("command.hints.unknownSegment", { segment: head, segments: FOOTER_HINT_IDS.join(", ") }));
|
|
50841
50880
|
return;
|
|
50842
50881
|
}
|
|
50843
50882
|
const id = head;
|
|
@@ -50845,15 +50884,15 @@ function coreCommands() {
|
|
|
50845
50884
|
setFooterHints((hints) => ({ ...hints, [id]: on }));
|
|
50846
50885
|
persistHints(ctx.seam);
|
|
50847
50886
|
if (on && !hintInState(id, false)) {
|
|
50848
|
-
ctx.say(
|
|
50887
|
+
ctx.say(t("command.hints.segmentBusy", { segment: id }));
|
|
50849
50888
|
} else {
|
|
50850
|
-
ctx.say(
|
|
50889
|
+
ctx.say(t("command.hints.segmentSet", { segment: id, state: on ? "on" : "off" }));
|
|
50851
50890
|
}
|
|
50852
50891
|
}
|
|
50853
50892
|
},
|
|
50854
50893
|
{
|
|
50855
50894
|
name: "/language",
|
|
50856
|
-
description:
|
|
50895
|
+
description: t("command.language.description"),
|
|
50857
50896
|
async run(ctx, argText) {
|
|
50858
50897
|
const arg = argText.trim();
|
|
50859
50898
|
const installed = installedLanguages();
|
|
@@ -50862,17 +50901,17 @@ function coreCommands() {
|
|
|
50862
50901
|
const pick = (id) => {
|
|
50863
50902
|
setHintsLocale(id);
|
|
50864
50903
|
persistLang(ctx.seam, id);
|
|
50865
|
-
|
|
50866
|
-
ctx.say(
|
|
50904
|
+
setLanguage(id);
|
|
50905
|
+
ctx.say(t("command.language.set", { lang: id }));
|
|
50867
50906
|
};
|
|
50868
50907
|
if (arg === "") {
|
|
50869
|
-
const picked = await ctx.pickOne(
|
|
50908
|
+
const picked = await ctx.pickOne(t("command.language.pickTitle"), choices.map((id) => ({
|
|
50870
50909
|
title: id,
|
|
50871
50910
|
value: id,
|
|
50872
|
-
description: id === current ?
|
|
50873
|
-
})), undefined, current);
|
|
50911
|
+
description: id === current ? t("command.language.current") : undefined
|
|
50912
|
+
})), undefined, current, { focusCurrent: true });
|
|
50874
50913
|
if (!picked || picked === current) {
|
|
50875
|
-
ctx.say(
|
|
50914
|
+
ctx.say(t("command.language.unchanged"));
|
|
50876
50915
|
return;
|
|
50877
50916
|
}
|
|
50878
50917
|
pick(picked);
|
|
@@ -50880,11 +50919,11 @@ function coreCommands() {
|
|
|
50880
50919
|
}
|
|
50881
50920
|
const picked = choices.find((id) => id.toLowerCase() === arg.toLowerCase());
|
|
50882
50921
|
if (!picked) {
|
|
50883
|
-
ctx.say(
|
|
50922
|
+
ctx.say(t("command.language.unknown", { lang: arg, languages: choices.join("|") }));
|
|
50884
50923
|
return;
|
|
50885
50924
|
}
|
|
50886
50925
|
if (picked === current) {
|
|
50887
|
-
ctx.say(
|
|
50926
|
+
ctx.say(t("command.language.unchanged"));
|
|
50888
50927
|
return;
|
|
50889
50928
|
}
|
|
50890
50929
|
pick(picked);
|
|
@@ -50892,17 +50931,17 @@ function coreCommands() {
|
|
|
50892
50931
|
},
|
|
50893
50932
|
{
|
|
50894
50933
|
name: "/motion",
|
|
50895
|
-
description:
|
|
50934
|
+
description: t("command.motion.description"),
|
|
50896
50935
|
run(ctx, argText) {
|
|
50897
50936
|
const arg = argText.trim().toLowerCase();
|
|
50898
50937
|
if (!arg) {
|
|
50899
50938
|
const preference = getMotionPreference();
|
|
50900
50939
|
const setting = preference === undefined ? `auto \u2192 ${getMotionTier()}` : preference;
|
|
50901
|
-
ctx.say(
|
|
50940
|
+
ctx.say(t("command.motion.usage", { setting }));
|
|
50902
50941
|
return;
|
|
50903
50942
|
}
|
|
50904
50943
|
if (arg !== "full" && arg !== "reduced" && arg !== "off" && arg !== "auto") {
|
|
50905
|
-
ctx.say(
|
|
50944
|
+
ctx.say(t("command.motion.usageBare"));
|
|
50906
50945
|
return;
|
|
50907
50946
|
}
|
|
50908
50947
|
setMotionTier(arg === "auto" ? undefined : arg);
|
|
@@ -50911,12 +50950,12 @@ function coreCommands() {
|
|
|
50911
50950
|
} catch (error) {
|
|
50912
50951
|
console.error("[commands] motion persist failed:", error);
|
|
50913
50952
|
}
|
|
50914
|
-
ctx.say(
|
|
50953
|
+
ctx.say(t("command.motion.status", { setting: arg === "auto" ? "auto" : getMotionTier() }));
|
|
50915
50954
|
}
|
|
50916
50955
|
},
|
|
50917
50956
|
{
|
|
50918
50957
|
name: "/hotkeys",
|
|
50919
|
-
description:
|
|
50958
|
+
description: t("command.hotkeys.description"),
|
|
50920
50959
|
run(ctx) {
|
|
50921
50960
|
ctx.say(hotkeysHeader());
|
|
50922
50961
|
for (const row of hotkeyRows())
|
|
@@ -50925,10 +50964,10 @@ function coreCommands() {
|
|
|
50925
50964
|
},
|
|
50926
50965
|
{
|
|
50927
50966
|
name: "/theme",
|
|
50928
|
-
description:
|
|
50967
|
+
description: t("command.theme.description"),
|
|
50929
50968
|
async run(ctx) {
|
|
50930
50969
|
if (!ctx.themes) {
|
|
50931
|
-
ctx.say(
|
|
50970
|
+
ctx.say(t("command.theme.unavailable"));
|
|
50932
50971
|
return;
|
|
50933
50972
|
}
|
|
50934
50973
|
const current = ctx.themes.current();
|
|
@@ -50947,29 +50986,29 @@ function coreCommands() {
|
|
|
50947
50986
|
if (picked.startsWith("mode:")) {
|
|
50948
50987
|
const mode = picked.slice("mode:".length);
|
|
50949
50988
|
if (modeFace?.set(mode))
|
|
50950
|
-
ctx.say(
|
|
50989
|
+
ctx.say(t("command.theme.modeSet", { mode }));
|
|
50951
50990
|
else
|
|
50952
|
-
ctx.say(
|
|
50991
|
+
ctx.say(t("command.theme.unknownMode", { mode }));
|
|
50953
50992
|
return;
|
|
50954
50993
|
}
|
|
50955
50994
|
if (ctx.themes.set(picked))
|
|
50956
|
-
ctx.say(
|
|
50995
|
+
ctx.say(t("command.theme.set", { theme: picked }));
|
|
50957
50996
|
else
|
|
50958
|
-
ctx.say(
|
|
50997
|
+
ctx.say(t("command.theme.unknown", { theme: picked }));
|
|
50959
50998
|
}
|
|
50960
50999
|
},
|
|
50961
51000
|
{
|
|
50962
51001
|
name: "/preset",
|
|
50963
|
-
description:
|
|
51002
|
+
description: t("command.preset.description"),
|
|
50964
51003
|
async run(ctx, argText) {
|
|
50965
51004
|
const face = ctx.seam.preset;
|
|
50966
51005
|
if (!face) {
|
|
50967
|
-
ctx.say(
|
|
51006
|
+
ctx.say(t("command.preset.unavailable"));
|
|
50968
51007
|
return;
|
|
50969
51008
|
}
|
|
50970
51009
|
const rows = await face.list();
|
|
50971
51010
|
if (rows.length === 0) {
|
|
50972
|
-
ctx.say(
|
|
51011
|
+
ctx.say(t("command.preset.none"));
|
|
50973
51012
|
return;
|
|
50974
51013
|
}
|
|
50975
51014
|
const currentId = await face.currentId();
|
|
@@ -50987,17 +51026,17 @@ function coreCommands() {
|
|
|
50987
51026
|
} else if (arg === "next") {
|
|
50988
51027
|
target = presetNextRow(rows, currentId);
|
|
50989
51028
|
if (!target) {
|
|
50990
|
-
ctx.say(
|
|
51029
|
+
ctx.say(t("command.preset.noOther"));
|
|
50991
51030
|
return;
|
|
50992
51031
|
}
|
|
50993
51032
|
} else {
|
|
50994
51033
|
target = findPresetRow(rows, arg);
|
|
50995
51034
|
if (!target) {
|
|
50996
|
-
ctx.say(
|
|
51035
|
+
ctx.say(t("command.preset.unknown", { name: arg }));
|
|
50997
51036
|
return;
|
|
50998
51037
|
}
|
|
50999
51038
|
if (target.id === currentId) {
|
|
51000
|
-
ctx.say(
|
|
51039
|
+
ctx.say(t("command.preset.already", { name: target.name }));
|
|
51001
51040
|
return;
|
|
51002
51041
|
}
|
|
51003
51042
|
}
|
|
@@ -51012,10 +51051,10 @@ function coreCommands() {
|
|
|
51012
51051
|
return;
|
|
51013
51052
|
}
|
|
51014
51053
|
if (!await face.select(target.id)) {
|
|
51015
|
-
ctx.say(
|
|
51054
|
+
ctx.say(t("command.preset.switchFailed", { name: target.name }));
|
|
51016
51055
|
return;
|
|
51017
51056
|
}
|
|
51018
|
-
ctx.say(
|
|
51057
|
+
ctx.say(t("command.preset.set", { name: target.name }));
|
|
51019
51058
|
await ctx.reload();
|
|
51020
51059
|
}
|
|
51021
51060
|
}
|
|
@@ -51465,11 +51504,11 @@ function overflowHint(total, offset = 0) {
|
|
|
51465
51504
|
const below = Math.max(0, total - above - MAX_ROWS);
|
|
51466
51505
|
const parts = [];
|
|
51467
51506
|
if (above > 0)
|
|
51468
|
-
parts.push(
|
|
51507
|
+
parts.push(t("overlay.palette.moreAbove", {
|
|
51469
51508
|
count: above
|
|
51470
51509
|
}));
|
|
51471
51510
|
if (below > 0)
|
|
51472
|
-
parts.push(
|
|
51511
|
+
parts.push(t("overlay.palette.more", {
|
|
51473
51512
|
count: below
|
|
51474
51513
|
}));
|
|
51475
51514
|
return parts.length > 0 ? parts.join(" \xB7 ") : undefined;
|
|
@@ -51809,7 +51848,7 @@ function skillSymlinkPaths(publicDir, curatedDir, name) {
|
|
|
51809
51848
|
async function installSkillSymlink(src, dest) {
|
|
51810
51849
|
const srcReal = await realpath(src).catch((error) => {
|
|
51811
51850
|
const code = error.code;
|
|
51812
|
-
throw new Error(code === undefined ?
|
|
51851
|
+
throw new Error(code === undefined ? t("panel.skills.error.vanished", { src }) : t("panel.skills.error.vanishedCode", { src, code: String(code) }));
|
|
51813
51852
|
});
|
|
51814
51853
|
const destStat = await lstat(dest).catch(() => {
|
|
51815
51854
|
return;
|
|
@@ -51819,7 +51858,7 @@ async function installSkillSymlink(src, dest) {
|
|
|
51819
51858
|
return;
|
|
51820
51859
|
}
|
|
51821
51860
|
if (!destStat.isSymbolicLink()) {
|
|
51822
|
-
throw new Error(
|
|
51861
|
+
throw new Error(t("panel.skills.error.overwriteNotSymlink", { dest }));
|
|
51823
51862
|
}
|
|
51824
51863
|
const destReal = await realpath(dest).catch((error) => {
|
|
51825
51864
|
const code = error.code;
|
|
@@ -51834,7 +51873,7 @@ async function installSkillSymlink(src, dest) {
|
|
|
51834
51873
|
}
|
|
51835
51874
|
if (destReal === srcReal)
|
|
51836
51875
|
return;
|
|
51837
|
-
throw new Error(
|
|
51876
|
+
throw new Error(t("panel.skills.error.differentSource", { dest, destReal, srcReal }));
|
|
51838
51877
|
}
|
|
51839
51878
|
async function isOwnedSkillLink(dest, publicDir) {
|
|
51840
51879
|
let destReal;
|
|
@@ -51858,12 +51897,12 @@ async function applyOneSkillChange(name, targetState, publicDir, curatedDir) {
|
|
|
51858
51897
|
if (targetState) {
|
|
51859
51898
|
const paths = skillSymlinkPaths(publicDir, curatedDir, name);
|
|
51860
51899
|
if (paths === undefined)
|
|
51861
|
-
return
|
|
51900
|
+
return t("panel.skills.error.installNotFound", { dir: publicDir });
|
|
51862
51901
|
try {
|
|
51863
51902
|
await installSkillSymlink(paths.src, paths.dest);
|
|
51864
51903
|
return;
|
|
51865
51904
|
} catch (error) {
|
|
51866
|
-
return
|
|
51905
|
+
return t("panel.skills.error.installFailed", { error: error instanceof Error ? error.message : String(error) });
|
|
51867
51906
|
}
|
|
51868
51907
|
}
|
|
51869
51908
|
try {
|
|
@@ -51874,9 +51913,9 @@ async function applyOneSkillChange(name, targetState, publicDir, curatedDir) {
|
|
|
51874
51913
|
});
|
|
51875
51914
|
if (mdStat !== undefined) {
|
|
51876
51915
|
if (!mdStat.isSymbolicLink())
|
|
51877
|
-
throw new Error(
|
|
51916
|
+
throw new Error(t("panel.skills.error.removeNotSymlink", { dest: destMd }));
|
|
51878
51917
|
if (!await isOwnedSkillLink(destMd, publicDir))
|
|
51879
|
-
throw new Error(
|
|
51918
|
+
throw new Error(t("panel.skills.error.externalTarget", { dest: destMd }));
|
|
51880
51919
|
await unlink(destMd);
|
|
51881
51920
|
return;
|
|
51882
51921
|
}
|
|
@@ -51885,26 +51924,26 @@ async function applyOneSkillChange(name, targetState, publicDir, curatedDir) {
|
|
|
51885
51924
|
});
|
|
51886
51925
|
if (bundleStat !== undefined) {
|
|
51887
51926
|
if (!bundleStat.isSymbolicLink())
|
|
51888
|
-
throw new Error(
|
|
51927
|
+
throw new Error(t("panel.skills.error.removeNotSymlink", { dest: destBundle }));
|
|
51889
51928
|
if (!await isOwnedSkillLink(destBundle, publicDir))
|
|
51890
|
-
throw new Error(
|
|
51929
|
+
throw new Error(t("panel.skills.error.externalTarget", { dest: destBundle }));
|
|
51891
51930
|
await unlink(destBundle);
|
|
51892
51931
|
}
|
|
51893
51932
|
return;
|
|
51894
51933
|
} catch (error) {
|
|
51895
|
-
return
|
|
51934
|
+
return t("panel.skills.error.uninstallFailed", { error: error instanceof Error ? error.message : String(error) });
|
|
51896
51935
|
}
|
|
51897
51936
|
}
|
|
51898
51937
|
function skillApplyShortReason(error) {
|
|
51899
51938
|
if (error.includes("not a symlink"))
|
|
51900
|
-
return
|
|
51939
|
+
return t("panel.skills.reason.notSymlink");
|
|
51901
51940
|
if (error.includes("outside the managed source root"))
|
|
51902
|
-
return
|
|
51941
|
+
return t("panel.skills.reason.externalTarget");
|
|
51903
51942
|
if (error.includes("different source"))
|
|
51904
|
-
return
|
|
51943
|
+
return t("panel.skills.reason.differentSource");
|
|
51905
51944
|
if (error.includes("skill not found") || error.includes("source vanished"))
|
|
51906
|
-
return
|
|
51907
|
-
return
|
|
51945
|
+
return t("panel.skills.reason.sourceMissing");
|
|
51946
|
+
return t("panel.skills.reason.failed");
|
|
51908
51947
|
}
|
|
51909
51948
|
function skillApplySummary(results) {
|
|
51910
51949
|
const failures = results.filter((r) => r.error !== undefined);
|
|
@@ -51914,17 +51953,17 @@ function skillApplySummary(results) {
|
|
|
51914
51953
|
const failedNames = failures.slice(0, SKILL_SUMMARY_MAX_ITEMS).map((r) => `${r.name} (${skillApplyShortReason(r.error ?? "")})`);
|
|
51915
51954
|
const failedExtra = failures.length - SKILL_SUMMARY_MAX_ITEMS;
|
|
51916
51955
|
if (failedExtra > 0)
|
|
51917
|
-
failedNames.push(
|
|
51918
|
-
const failedPart =
|
|
51956
|
+
failedNames.push(t("panel.skills.summary.more", { count: String(failedExtra) }));
|
|
51957
|
+
const failedPart = t("panel.skills.summary.failed", { names: failedNames.join(", ") });
|
|
51919
51958
|
const segments = [];
|
|
51920
51959
|
const okShown = okNames.slice(0, SKILL_SUMMARY_MAX_ITEMS);
|
|
51921
51960
|
const okExtra = okNames.length - SKILL_SUMMARY_MAX_ITEMS;
|
|
51922
51961
|
if (okExtra > 0)
|
|
51923
|
-
okShown.push(
|
|
51962
|
+
okShown.push(t("panel.skills.summary.more", { count: String(okExtra) }));
|
|
51924
51963
|
if (okShown.length > 0)
|
|
51925
|
-
segments.push(
|
|
51964
|
+
segments.push(t("panel.skills.summary.ok", { names: okShown.join(", ") }));
|
|
51926
51965
|
segments.push(failedPart);
|
|
51927
|
-
return
|
|
51966
|
+
return t("panel.skills.summary.applied", {
|
|
51928
51967
|
ok: String(okNames.length),
|
|
51929
51968
|
total: String(results.length),
|
|
51930
51969
|
detail: segments.join(" \xB7 ")
|
|
@@ -51980,7 +52019,7 @@ function filterSkillRows(rows, query) {
|
|
|
51980
52019
|
}
|
|
51981
52020
|
function skillStateText(row, pendingState) {
|
|
51982
52021
|
const effective = pendingState ?? row.installed;
|
|
51983
|
-
const base = effective ?
|
|
52022
|
+
const base = effective ? t("panel.skills.state.installed") : t("panel.skills.state.available");
|
|
51984
52023
|
return pendingState === undefined || pendingState === row.installed ? base : `${base}*`;
|
|
51985
52024
|
}
|
|
51986
52025
|
async function ensureCuratedDir(curatedDir) {
|
|
@@ -52039,7 +52078,7 @@ function SkillsPanel(props) {
|
|
|
52039
52078
|
}
|
|
52040
52079
|
async function rescan(notice) {
|
|
52041
52080
|
if (notice === undefined)
|
|
52042
|
-
flash(
|
|
52081
|
+
flash(t("panel.skills.status.scanning"));
|
|
52043
52082
|
const scanned = await scanAvailableSkills(props.source(), props.curated());
|
|
52044
52083
|
setRows(scanned);
|
|
52045
52084
|
if (notice !== undefined) {
|
|
@@ -52058,17 +52097,17 @@ function SkillsPanel(props) {
|
|
|
52058
52097
|
const count = pending().size;
|
|
52059
52098
|
dialog.replace(() => createComponent2(DialogConfirm, {
|
|
52060
52099
|
get title() {
|
|
52061
|
-
return count === 1 ?
|
|
52100
|
+
return count === 1 ? t("panel.skills.dialog.discardTitleOne") : t("panel.skills.dialog.discardTitleMany", {
|
|
52062
52101
|
count: String(count)
|
|
52063
52102
|
});
|
|
52064
52103
|
},
|
|
52065
52104
|
get message() {
|
|
52066
|
-
return
|
|
52105
|
+
return t("panel.skills.dialog.discardMessage");
|
|
52067
52106
|
},
|
|
52068
52107
|
get label() {
|
|
52069
52108
|
return {
|
|
52070
|
-
confirm:
|
|
52071
|
-
cancel:
|
|
52109
|
+
confirm: t("panel.skills.dialog.discardConfirm"),
|
|
52110
|
+
cancel: t("panel.skills.dialog.keepEditing")
|
|
52072
52111
|
};
|
|
52073
52112
|
},
|
|
52074
52113
|
onConfirm: () => {
|
|
@@ -52142,12 +52181,12 @@ function SkillsPanel(props) {
|
|
|
52142
52181
|
priority: 2,
|
|
52143
52182
|
commands: [{
|
|
52144
52183
|
bind: "escape",
|
|
52145
|
-
title:
|
|
52184
|
+
title: t("panel.skills.keymap.close"),
|
|
52146
52185
|
group: "Skills",
|
|
52147
52186
|
run: close
|
|
52148
52187
|
}, {
|
|
52149
52188
|
bind: "/",
|
|
52150
|
-
title:
|
|
52189
|
+
title: t("panel.skills.keymap.filter"),
|
|
52151
52190
|
group: "Skills",
|
|
52152
52191
|
enabled: () => !filterOpen(),
|
|
52153
52192
|
run: () => {
|
|
@@ -52156,7 +52195,7 @@ function SkillsPanel(props) {
|
|
|
52156
52195
|
}
|
|
52157
52196
|
}, {
|
|
52158
52197
|
bind: "space",
|
|
52159
|
-
title:
|
|
52198
|
+
title: t("panel.skills.keymap.mark"),
|
|
52160
52199
|
group: "Skills",
|
|
52161
52200
|
enabled: () => !filterOpen(),
|
|
52162
52201
|
run: () => {
|
|
@@ -52165,7 +52204,7 @@ function SkillsPanel(props) {
|
|
|
52165
52204
|
}
|
|
52166
52205
|
}, {
|
|
52167
52206
|
bind: "return",
|
|
52168
|
-
title:
|
|
52207
|
+
title: t("panel.skills.keymap.commit"),
|
|
52169
52208
|
group: "Skills",
|
|
52170
52209
|
run: () => {
|
|
52171
52210
|
onReturn();
|
|
@@ -52173,13 +52212,13 @@ function SkillsPanel(props) {
|
|
|
52173
52212
|
}
|
|
52174
52213
|
}, {
|
|
52175
52214
|
bind: "up,k",
|
|
52176
|
-
title:
|
|
52215
|
+
title: t("panel.skills.keymap.previous"),
|
|
52177
52216
|
group: "Skills",
|
|
52178
52217
|
enabled: () => !filterOpen(),
|
|
52179
52218
|
run: () => moveCursor(-1)
|
|
52180
52219
|
}, {
|
|
52181
52220
|
bind: "down,j",
|
|
52182
|
-
title:
|
|
52221
|
+
title: t("panel.skills.keymap.next"),
|
|
52183
52222
|
group: "Skills",
|
|
52184
52223
|
enabled: () => !filterOpen(),
|
|
52185
52224
|
run: () => moveCursor(1)
|
|
@@ -52205,9 +52244,9 @@ function SkillsPanel(props) {
|
|
|
52205
52244
|
setProp(_el$2, "flexShrink", 0);
|
|
52206
52245
|
setProp(_el$2, "flexDirection", "row");
|
|
52207
52246
|
setProp(_el$3, "wrapMode", "none");
|
|
52208
|
-
insert(_el$3, () =>
|
|
52247
|
+
insert(_el$3, () => t("panel.skills.header.title"));
|
|
52209
52248
|
setProp(_el$4, "wrapMode", "none");
|
|
52210
|
-
insert(_el$4, () =>
|
|
52249
|
+
insert(_el$4, () => t("panel.skills.header.bar", {
|
|
52211
52250
|
visible: String(visible().length),
|
|
52212
52251
|
total: String(rows().length)
|
|
52213
52252
|
}));
|
|
@@ -52231,7 +52270,7 @@ function SkillsPanel(props) {
|
|
|
52231
52270
|
setProp(_el$10, "flexGrow", 1);
|
|
52232
52271
|
setProp(_el$10, "onInput", (value) => setFilter(value));
|
|
52233
52272
|
effect((_p$) => {
|
|
52234
|
-
var _v$7 =
|
|
52273
|
+
var _v$7 = t("panel.skills.placeholder.filter"), _v$8 = theme?.text.muted ?? "#565f89", _v$9 = filter();
|
|
52235
52274
|
_v$7 !== _p$.e && (_p$.e = setProp(_el$10, "placeholder", _v$7, _p$.e));
|
|
52236
52275
|
_v$8 !== _p$.t && (_p$.t = setProp(_el$10, "placeholderColor", _v$8, _p$.t));
|
|
52237
52276
|
_v$9 !== _p$.a && (_p$.a = setProp(_el$10, "value", _v$9, _p$.a));
|
|
@@ -52250,7 +52289,7 @@ function SkillsPanel(props) {
|
|
|
52250
52289
|
setProp(_el$5, "height", 1);
|
|
52251
52290
|
setProp(_el$5, "flexShrink", 0);
|
|
52252
52291
|
setProp(_el$6, "wrapMode", "none");
|
|
52253
|
-
insert(_el$6, () => `${
|
|
52292
|
+
insert(_el$6, () => `${t("panel.skills.header.skillColumn").padEnd(32)}${t("panel.skills.header.stateColumn")}`);
|
|
52254
52293
|
effect((_$p) => setProp(_el$6, "fg", theme?.text.muted ?? "#565f89", _$p));
|
|
52255
52294
|
return _el$5;
|
|
52256
52295
|
}
|
|
@@ -52268,9 +52307,9 @@ function SkillsPanel(props) {
|
|
|
52268
52307
|
setProp(_el$12, "wrapMode", "none");
|
|
52269
52308
|
insert(_el$12, (() => {
|
|
52270
52309
|
var _c$ = memo2(() => rows().length === 0);
|
|
52271
|
-
return () => _c$() ?
|
|
52310
|
+
return () => _c$() ? t("panel.skills.empty.none", {
|
|
52272
52311
|
dir: props.source()
|
|
52273
|
-
}) :
|
|
52312
|
+
}) : t("panel.skills.empty.noMatch");
|
|
52274
52313
|
})());
|
|
52275
52314
|
effect((_$p) => setProp(_el$12, "fg", theme?.text.muted ?? "#565f89", _$p));
|
|
52276
52315
|
return _el$11;
|
|
@@ -52404,7 +52443,7 @@ function enterAction(hitCount) {
|
|
|
52404
52443
|
return hitCount > 0 ? "resume" : "search";
|
|
52405
52444
|
}
|
|
52406
52445
|
function resumeFailureText(error) {
|
|
52407
|
-
return
|
|
52446
|
+
return t("overlay.sessions.resumeFailed", {
|
|
52408
52447
|
error: String(error instanceof Error ? error.message : error).slice(0, 150)
|
|
52409
52448
|
});
|
|
52410
52449
|
}
|
|
@@ -52495,26 +52534,26 @@ function SessionsSearch(props) {
|
|
|
52495
52534
|
commands: [
|
|
52496
52535
|
{
|
|
52497
52536
|
bind: "escape",
|
|
52498
|
-
title:
|
|
52537
|
+
title: t("overlay.sessions.keymap.close"),
|
|
52499
52538
|
group: "Search",
|
|
52500
52539
|
run: close
|
|
52501
52540
|
},
|
|
52502
52541
|
{
|
|
52503
52542
|
bind: "return",
|
|
52504
|
-
title:
|
|
52543
|
+
title: t("overlay.sessions.keymap.enter"),
|
|
52505
52544
|
group: "Search",
|
|
52506
52545
|
run: () => enterKey()
|
|
52507
52546
|
},
|
|
52508
52547
|
{
|
|
52509
52548
|
bind: "down",
|
|
52510
|
-
title:
|
|
52549
|
+
title: t("overlay.sessions.keymap.next"),
|
|
52511
52550
|
group: "Search",
|
|
52512
52551
|
enabled: () => hits().length > 0,
|
|
52513
52552
|
run: () => moveCursor(1)
|
|
52514
52553
|
},
|
|
52515
52554
|
{
|
|
52516
52555
|
bind: "up",
|
|
52517
|
-
title:
|
|
52556
|
+
title: t("overlay.sessions.keymap.previous"),
|
|
52518
52557
|
group: "Search",
|
|
52519
52558
|
enabled: () => hits().length > 0,
|
|
52520
52559
|
run: () => moveCursor(-1)
|
|
@@ -52526,7 +52565,7 @@ function SessionsSearch(props) {
|
|
|
52526
52565
|
enabled: !open() && dialog.stack.length === 0,
|
|
52527
52566
|
commands: [{
|
|
52528
52567
|
id: "session.searchSessions",
|
|
52529
|
-
title:
|
|
52568
|
+
title: t("overlay.sessions.keymap.open"),
|
|
52530
52569
|
group: "Session",
|
|
52531
52570
|
run: () => setBridgeOpen2(true)
|
|
52532
52571
|
}]
|
|
@@ -52535,11 +52574,11 @@ function SessionsSearch(props) {
|
|
|
52535
52574
|
if (resumeError())
|
|
52536
52575
|
return resumeError();
|
|
52537
52576
|
if (busy())
|
|
52538
|
-
return
|
|
52577
|
+
return t("overlay.sessions.searching");
|
|
52539
52578
|
if (!searched())
|
|
52540
52579
|
return "";
|
|
52541
52580
|
const count = hits().length;
|
|
52542
|
-
return count === 0 ?
|
|
52581
|
+
return count === 0 ? t("overlay.sessions.noMatches") : count === 1 ? t("overlay.sessions.hitOne") : t("overlay.sessions.hitsMany", {
|
|
52543
52582
|
count
|
|
52544
52583
|
});
|
|
52545
52584
|
});
|
|
@@ -52562,7 +52601,7 @@ function SessionsSearch(props) {
|
|
|
52562
52601
|
setProp(_el$2, "flexShrink", 0);
|
|
52563
52602
|
setProp(_el$2, "flexDirection", "row");
|
|
52564
52603
|
setProp(_el$3, "wrapMode", "none");
|
|
52565
|
-
insert(_el$3, () =>
|
|
52604
|
+
insert(_el$3, () => t("overlay.sessions.title"));
|
|
52566
52605
|
insert(_el$2, createComponent2(Show, {
|
|
52567
52606
|
get when() {
|
|
52568
52607
|
return status();
|
|
@@ -52601,7 +52640,7 @@ function SessionsSearch(props) {
|
|
|
52601
52640
|
setProp(_el$8, "wrapMode", "none");
|
|
52602
52641
|
insert(_el$8, (() => {
|
|
52603
52642
|
var _c$ = memo2(() => !!searched());
|
|
52604
|
-
return () => _c$() ?
|
|
52643
|
+
return () => _c$() ? t("overlay.sessions.noMatches") : t("overlay.sessions.typeHint");
|
|
52605
52644
|
})());
|
|
52606
52645
|
effect((_$p) => setProp(_el$8, "fg", theme?.text.muted ?? "#565f89", _$p));
|
|
52607
52646
|
return _el$7;
|
|
@@ -52629,7 +52668,7 @@ function SessionsSearch(props) {
|
|
|
52629
52668
|
}
|
|
52630
52669
|
}), null);
|
|
52631
52670
|
effect((_p$) => {
|
|
52632
|
-
var _v$ = 1 + 1 + (hits().length || 1) + 1, _v$2 = theme?.border.base ?? "#7aa2f7", _v$3 = theme?.background.raised.base ?? "#1a1b26", _v$4 = theme?.text.base ?? "#e6e6e6", _v$5 =
|
|
52671
|
+
var _v$ = 1 + 1 + (hits().length || 1) + 1, _v$2 = theme?.border.base ?? "#7aa2f7", _v$3 = theme?.background.raised.base ?? "#1a1b26", _v$4 = theme?.text.base ?? "#e6e6e6", _v$5 = t("overlay.sessions.placeholder"), _v$6 = theme?.text.muted ?? "#565f89", _v$7 = query();
|
|
52633
52672
|
_v$ !== _p$.e && (_p$.e = setProp(_el$, "height", _v$, _p$.e));
|
|
52634
52673
|
_v$2 !== _p$.t && (_p$.t = setProp(_el$, "borderColor", _v$2, _p$.t));
|
|
52635
52674
|
_v$3 !== _p$.a && (_p$.a = setProp(_el$, "backgroundColor", _v$3, _p$.a));
|
|
@@ -52694,13 +52733,13 @@ function filterPluginRows(rows, query) {
|
|
|
52694
52733
|
return rows.filter((row) => formatPluginLine(row).toLowerCase().includes(needle));
|
|
52695
52734
|
}
|
|
52696
52735
|
function bundleStateText(row) {
|
|
52697
|
-
const base = !row.installed && row.optional ?
|
|
52736
|
+
const base = !row.installed && row.optional ? t("panel.plugins.state.available") : row.enabled ? t("panel.plugins.state.on") : t("panel.plugins.state.off");
|
|
52698
52737
|
if (row.error !== undefined && row.error !== "")
|
|
52699
|
-
return
|
|
52738
|
+
return t("panel.plugins.state.error", {
|
|
52700
52739
|
state: base
|
|
52701
52740
|
});
|
|
52702
52741
|
if (row.readOnlyReason !== undefined && row.readOnlyReason !== "")
|
|
52703
|
-
return
|
|
52742
|
+
return t("panel.plugins.state.readOnly", {
|
|
52704
52743
|
state: base
|
|
52705
52744
|
});
|
|
52706
52745
|
return base;
|
|
@@ -52736,33 +52775,33 @@ function pluginChangeNotice(change) {
|
|
|
52736
52775
|
const target = change.target;
|
|
52737
52776
|
switch (change.application) {
|
|
52738
52777
|
case "applied":
|
|
52739
|
-
return
|
|
52778
|
+
return t("panel.plugins.notice.applied", {
|
|
52740
52779
|
target
|
|
52741
52780
|
});
|
|
52742
52781
|
case "restart-required":
|
|
52743
|
-
return
|
|
52782
|
+
return t("panel.plugins.notice.restartRequired", {
|
|
52744
52783
|
target
|
|
52745
52784
|
});
|
|
52746
52785
|
case "overridden":
|
|
52747
|
-
return
|
|
52786
|
+
return t("panel.plugins.notice.overridden", {
|
|
52748
52787
|
target
|
|
52749
52788
|
});
|
|
52750
52789
|
case "failed":
|
|
52751
|
-
return change.error ?
|
|
52790
|
+
return change.error ? t("panel.plugins.notice.failed", {
|
|
52752
52791
|
target,
|
|
52753
52792
|
error: change.error
|
|
52754
|
-
}) :
|
|
52793
|
+
}) : t("panel.plugins.notice.failedNoError", {
|
|
52755
52794
|
target
|
|
52756
52795
|
});
|
|
52757
52796
|
case "cancelled":
|
|
52758
|
-
return
|
|
52797
|
+
return t("panel.plugins.notice.cancelled", {
|
|
52759
52798
|
target
|
|
52760
52799
|
});
|
|
52761
52800
|
}
|
|
52762
52801
|
}
|
|
52763
52802
|
function installPreviewLine(inspection) {
|
|
52764
52803
|
const spec = `${inspection.name ?? "spec"}${inspection.version !== undefined && inspection.version !== "" ? `@${inspection.version}` : ""}`;
|
|
52765
|
-
return inspection.bundle === false ?
|
|
52804
|
+
return inspection.bundle === false ? t("panel.plugins.preview.notBundle", {
|
|
52766
52805
|
spec
|
|
52767
52806
|
}) : spec;
|
|
52768
52807
|
}
|
|
@@ -52843,25 +52882,25 @@ function PluginsPanel(props) {
|
|
|
52843
52882
|
if (busy())
|
|
52844
52883
|
return;
|
|
52845
52884
|
if (!row.toggleable || typeof props.seam.setPluginBundleEnabled !== "function") {
|
|
52846
|
-
flash(row.readOnlyReason ?
|
|
52885
|
+
flash(row.readOnlyReason ? t("panel.plugins.status.readOnlyReason", {
|
|
52847
52886
|
name: row.name,
|
|
52848
52887
|
reason: row.readOnlyReason
|
|
52849
|
-
}) :
|
|
52888
|
+
}) : t("panel.plugins.status.readOnly", {
|
|
52850
52889
|
name: row.name
|
|
52851
52890
|
}), 4000);
|
|
52852
52891
|
return;
|
|
52853
52892
|
}
|
|
52854
52893
|
setBusy(true);
|
|
52855
|
-
flash(row.enabled ?
|
|
52894
|
+
flash(row.enabled ? t("panel.plugins.status.disabling", {
|
|
52856
52895
|
name: row.name
|
|
52857
|
-
}) :
|
|
52896
|
+
}) : t("panel.plugins.status.enabling", {
|
|
52858
52897
|
name: row.name
|
|
52859
52898
|
}));
|
|
52860
52899
|
try {
|
|
52861
52900
|
const change = await props.seam.setPluginBundleEnabled(row.name, !row.enabled);
|
|
52862
52901
|
flash(pluginChangeNotice(change), 6000);
|
|
52863
52902
|
} catch (error) {
|
|
52864
|
-
flash(
|
|
52903
|
+
flash(t("panel.plugins.status.changeFailed", {
|
|
52865
52904
|
name: row.name,
|
|
52866
52905
|
error: errorMessage2(error)
|
|
52867
52906
|
}), 8000);
|
|
@@ -52873,7 +52912,7 @@ function PluginsPanel(props) {
|
|
|
52873
52912
|
if (row === undefined || busy())
|
|
52874
52913
|
return;
|
|
52875
52914
|
if (!row.removable) {
|
|
52876
|
-
flash(
|
|
52915
|
+
flash(t("panel.plugins.status.notRemovable", {
|
|
52877
52916
|
name: row.name
|
|
52878
52917
|
}), 4000);
|
|
52879
52918
|
return;
|
|
@@ -52881,19 +52920,19 @@ function PluginsPanel(props) {
|
|
|
52881
52920
|
const name = row.name;
|
|
52882
52921
|
dialog.replace(() => createComponent2(DialogConfirm, {
|
|
52883
52922
|
get title() {
|
|
52884
|
-
return
|
|
52923
|
+
return t("panel.plugins.dialog.uninstallTitle", {
|
|
52885
52924
|
name
|
|
52886
52925
|
});
|
|
52887
52926
|
},
|
|
52888
52927
|
get message() {
|
|
52889
|
-
return
|
|
52928
|
+
return t("panel.plugins.dialog.uninstallMessage", {
|
|
52890
52929
|
name
|
|
52891
52930
|
});
|
|
52892
52931
|
},
|
|
52893
52932
|
get label() {
|
|
52894
52933
|
return {
|
|
52895
|
-
confirm:
|
|
52896
|
-
cancel:
|
|
52934
|
+
confirm: t("panel.plugins.dialog.uninstallConfirm"),
|
|
52935
|
+
cancel: t("panel.plugins.dialog.keep")
|
|
52897
52936
|
};
|
|
52898
52937
|
},
|
|
52899
52938
|
onConfirm: () => void remove(name)
|
|
@@ -52907,14 +52946,14 @@ function PluginsPanel(props) {
|
|
|
52907
52946
|
if (typeof props.seam.removePluginBundle !== "function")
|
|
52908
52947
|
return;
|
|
52909
52948
|
setBusy(true);
|
|
52910
|
-
flash(
|
|
52949
|
+
flash(t("panel.plugins.status.uninstalling", {
|
|
52911
52950
|
name
|
|
52912
52951
|
}));
|
|
52913
52952
|
try {
|
|
52914
52953
|
const change = await props.seam.removePluginBundle(name);
|
|
52915
52954
|
flash(pluginChangeNotice(change), 8000);
|
|
52916
52955
|
} catch (error) {
|
|
52917
|
-
flash(
|
|
52956
|
+
flash(t("panel.plugins.status.changeFailed", {
|
|
52918
52957
|
name,
|
|
52919
52958
|
error: errorMessage2(error)
|
|
52920
52959
|
}), 8000);
|
|
@@ -52926,7 +52965,7 @@ function PluginsPanel(props) {
|
|
|
52926
52965
|
if (busy())
|
|
52927
52966
|
return;
|
|
52928
52967
|
if (typeof props.seam.installPluginSpec !== "function") {
|
|
52929
|
-
flash(
|
|
52968
|
+
flash(t("panel.plugins.status.installUnavailable"), 4000);
|
|
52930
52969
|
return;
|
|
52931
52970
|
}
|
|
52932
52971
|
setInstallText("");
|
|
@@ -52935,7 +52974,7 @@ function PluginsPanel(props) {
|
|
|
52935
52974
|
async function commitInstall() {
|
|
52936
52975
|
const spec = installText().trim();
|
|
52937
52976
|
if (spec === "") {
|
|
52938
|
-
flash(
|
|
52977
|
+
flash(t("panel.plugins.status.specRequired"), 4000);
|
|
52939
52978
|
return;
|
|
52940
52979
|
}
|
|
52941
52980
|
setInstallOpen(false);
|
|
@@ -52945,14 +52984,14 @@ function PluginsPanel(props) {
|
|
|
52945
52984
|
if (typeof props.seam.inspectPluginSpec !== "function")
|
|
52946
52985
|
return;
|
|
52947
52986
|
setBusy(true);
|
|
52948
|
-
flash(
|
|
52987
|
+
flash(t("panel.plugins.status.inspecting", {
|
|
52949
52988
|
spec
|
|
52950
52989
|
}));
|
|
52951
52990
|
let inspection;
|
|
52952
52991
|
try {
|
|
52953
52992
|
inspection = await props.seam.inspectPluginSpec(spec);
|
|
52954
52993
|
} catch (error) {
|
|
52955
|
-
flash(
|
|
52994
|
+
flash(t("panel.plugins.status.cannotInstall", {
|
|
52956
52995
|
spec,
|
|
52957
52996
|
error: errorMessage2(error)
|
|
52958
52997
|
}), 8000);
|
|
@@ -52961,7 +53000,7 @@ function PluginsPanel(props) {
|
|
|
52961
53000
|
setBusy(false);
|
|
52962
53001
|
}
|
|
52963
53002
|
if (inspection.status === "refused") {
|
|
52964
|
-
flash(
|
|
53003
|
+
flash(t("panel.plugins.status.cannotInstallRefused", {
|
|
52965
53004
|
spec,
|
|
52966
53005
|
problem: inspection.problem,
|
|
52967
53006
|
reason: inspection.reason
|
|
@@ -52971,20 +53010,20 @@ function PluginsPanel(props) {
|
|
|
52971
53010
|
const accepted = inspection;
|
|
52972
53011
|
dialog.replace(() => createComponent2(DialogConfirm, {
|
|
52973
53012
|
get title() {
|
|
52974
|
-
return
|
|
53013
|
+
return t("panel.plugins.dialog.installTitle");
|
|
52975
53014
|
},
|
|
52976
53015
|
get message() {
|
|
52977
|
-
return memo2(() => !!accepted.description)() ?
|
|
53016
|
+
return memo2(() => !!accepted.description)() ? t("panel.plugins.dialog.installBodyDescription", {
|
|
52978
53017
|
preview: installPreviewLine(accepted),
|
|
52979
53018
|
description: accepted.description
|
|
52980
|
-
}) :
|
|
53019
|
+
}) : t("panel.plugins.dialog.installBody", {
|
|
52981
53020
|
preview: installPreviewLine(accepted)
|
|
52982
53021
|
});
|
|
52983
53022
|
},
|
|
52984
53023
|
get label() {
|
|
52985
53024
|
return {
|
|
52986
|
-
confirm:
|
|
52987
|
-
cancel:
|
|
53025
|
+
confirm: t("panel.plugins.dialog.installConfirm"),
|
|
53026
|
+
cancel: t("panel.plugins.dialog.cancel")
|
|
52988
53027
|
};
|
|
52989
53028
|
},
|
|
52990
53029
|
onConfirm: () => void install(spec)
|
|
@@ -52998,14 +53037,14 @@ function PluginsPanel(props) {
|
|
|
52998
53037
|
if (typeof props.seam.installPluginSpec !== "function")
|
|
52999
53038
|
return;
|
|
53000
53039
|
setBusy(true);
|
|
53001
|
-
flash(
|
|
53040
|
+
flash(t("panel.plugins.status.installing", {
|
|
53002
53041
|
spec
|
|
53003
53042
|
}));
|
|
53004
53043
|
try {
|
|
53005
53044
|
const change = await props.seam.installPluginSpec(spec);
|
|
53006
53045
|
flash(pluginChangeNotice(change), 8000);
|
|
53007
53046
|
} catch (error) {
|
|
53008
|
-
flash(
|
|
53047
|
+
flash(t("panel.plugins.status.changeFailed", {
|
|
53009
53048
|
name: spec,
|
|
53010
53049
|
error: errorMessage2(error)
|
|
53011
53050
|
}), 8000);
|
|
@@ -53019,12 +53058,12 @@ function PluginsPanel(props) {
|
|
|
53019
53058
|
priority: 2,
|
|
53020
53059
|
commands: [{
|
|
53021
53060
|
bind: "escape",
|
|
53022
|
-
title:
|
|
53061
|
+
title: t("panel.plugins.keymap.close"),
|
|
53023
53062
|
group: "Plugins",
|
|
53024
53063
|
run: close
|
|
53025
53064
|
}, {
|
|
53026
53065
|
bind: "/",
|
|
53027
|
-
title:
|
|
53066
|
+
title: t("panel.plugins.keymap.filter"),
|
|
53028
53067
|
group: "Plugins",
|
|
53029
53068
|
enabled: () => !filterOpen() && !installOpen(),
|
|
53030
53069
|
run: () => {
|
|
@@ -53033,7 +53072,7 @@ function PluginsPanel(props) {
|
|
|
53033
53072
|
}
|
|
53034
53073
|
}, {
|
|
53035
53074
|
bind: "return",
|
|
53036
|
-
title:
|
|
53075
|
+
title: t("panel.plugins.keymap.commit"),
|
|
53037
53076
|
group: "Plugins",
|
|
53038
53077
|
run: () => {
|
|
53039
53078
|
if (installOpen()) {
|
|
@@ -53050,7 +53089,7 @@ function PluginsPanel(props) {
|
|
|
53050
53089
|
}
|
|
53051
53090
|
}, {
|
|
53052
53091
|
bind: "space",
|
|
53053
|
-
title:
|
|
53092
|
+
title: t("panel.plugins.keymap.toggle"),
|
|
53054
53093
|
group: "Plugins",
|
|
53055
53094
|
enabled: () => !filterOpen() && !installOpen(),
|
|
53056
53095
|
run: () => {
|
|
@@ -53059,25 +53098,25 @@ function PluginsPanel(props) {
|
|
|
53059
53098
|
}
|
|
53060
53099
|
}, {
|
|
53061
53100
|
bind: "d",
|
|
53062
|
-
title:
|
|
53101
|
+
title: t("panel.plugins.keymap.uninstall"),
|
|
53063
53102
|
group: "Plugins",
|
|
53064
53103
|
enabled: () => !filterOpen() && !installOpen(),
|
|
53065
53104
|
run: () => confirmRemove(current())
|
|
53066
53105
|
}, {
|
|
53067
53106
|
bind: "i",
|
|
53068
|
-
title:
|
|
53107
|
+
title: t("panel.plugins.keymap.install"),
|
|
53069
53108
|
group: "Plugins",
|
|
53070
53109
|
enabled: () => !filterOpen() && !installOpen(),
|
|
53071
53110
|
run: beginInstall
|
|
53072
53111
|
}, {
|
|
53073
53112
|
bind: "up,k",
|
|
53074
|
-
title:
|
|
53113
|
+
title: t("panel.plugins.keymap.previous"),
|
|
53075
53114
|
group: "Plugins",
|
|
53076
53115
|
enabled: () => !filterOpen() && !installOpen(),
|
|
53077
53116
|
run: () => moveCursor(-1)
|
|
53078
53117
|
}, {
|
|
53079
53118
|
bind: "down,j",
|
|
53080
|
-
title:
|
|
53119
|
+
title: t("panel.plugins.keymap.next"),
|
|
53081
53120
|
group: "Plugins",
|
|
53082
53121
|
enabled: () => !filterOpen() && !installOpen(),
|
|
53083
53122
|
run: () => moveCursor(1)
|
|
@@ -53102,9 +53141,9 @@ function PluginsPanel(props) {
|
|
|
53102
53141
|
setProp(_el$2, "flexShrink", 0);
|
|
53103
53142
|
setProp(_el$2, "flexDirection", "row");
|
|
53104
53143
|
setProp(_el$3, "wrapMode", "none");
|
|
53105
|
-
insert(_el$3, () =>
|
|
53144
|
+
insert(_el$3, () => t("panel.plugins.header.title"));
|
|
53106
53145
|
setProp(_el$4, "wrapMode", "none");
|
|
53107
|
-
insert(_el$4, () =>
|
|
53146
|
+
insert(_el$4, () => t("panel.plugins.header.bar", {
|
|
53108
53147
|
visible: String(visible().length),
|
|
53109
53148
|
total: String(bundles().length)
|
|
53110
53149
|
}));
|
|
@@ -53128,7 +53167,7 @@ function PluginsPanel(props) {
|
|
|
53128
53167
|
setProp(_el$0, "flexGrow", 1);
|
|
53129
53168
|
setProp(_el$0, "onInput", (value) => setInstallText(value));
|
|
53130
53169
|
effect((_p$) => {
|
|
53131
|
-
var _v$0 =
|
|
53170
|
+
var _v$0 = t("panel.plugins.placeholder.install"), _v$1 = theme?.text.muted ?? "#565f89", _v$10 = installText();
|
|
53132
53171
|
_v$0 !== _p$.e && (_p$.e = setProp(_el$0, "placeholder", _v$0, _p$.e));
|
|
53133
53172
|
_v$1 !== _p$.t && (_p$.t = setProp(_el$0, "placeholderColor", _v$1, _p$.t));
|
|
53134
53173
|
_v$10 !== _p$.a && (_p$.a = setProp(_el$0, "value", _v$10, _p$.a));
|
|
@@ -53153,7 +53192,7 @@ function PluginsPanel(props) {
|
|
|
53153
53192
|
setProp(_el$1, "height", 1);
|
|
53154
53193
|
setProp(_el$1, "flexShrink", 0);
|
|
53155
53194
|
setProp(_el$10, "wrapMode", "none");
|
|
53156
|
-
insert(_el$10, () => `${
|
|
53195
|
+
insert(_el$10, () => `${t("panel.plugins.header.bundleColumn").padEnd(36)}${t("panel.plugins.header.stateColumn")}`);
|
|
53157
53196
|
effect((_$p) => setProp(_el$10, "fg", theme?.text.muted ?? "#565f89", _$p));
|
|
53158
53197
|
return _el$1;
|
|
53159
53198
|
})();
|
|
@@ -53173,7 +53212,7 @@ function PluginsPanel(props) {
|
|
|
53173
53212
|
setProp(_el$6, "flexGrow", 1);
|
|
53174
53213
|
setProp(_el$6, "onInput", (value) => setFilter(value));
|
|
53175
53214
|
effect((_p$) => {
|
|
53176
|
-
var _v$ =
|
|
53215
|
+
var _v$ = t("panel.plugins.placeholder.filter"), _v$2 = theme?.text.muted ?? "#565f89", _v$3 = filter();
|
|
53177
53216
|
_v$ !== _p$.e && (_p$.e = setProp(_el$6, "placeholder", _v$, _p$.e));
|
|
53178
53217
|
_v$2 !== _p$.t && (_p$.t = setProp(_el$6, "placeholderColor", _v$2, _p$.t));
|
|
53179
53218
|
_v$3 !== _p$.a && (_p$.a = setProp(_el$6, "value", _v$3, _p$.a));
|
|
@@ -53201,7 +53240,7 @@ function PluginsPanel(props) {
|
|
|
53201
53240
|
setProp(_el$12, "wrapMode", "none");
|
|
53202
53241
|
insert(_el$12, (() => {
|
|
53203
53242
|
var _c$ = memo2(() => bundles().length === 0);
|
|
53204
|
-
return () => _c$() ?
|
|
53243
|
+
return () => _c$() ? t("panel.plugins.empty.noPlugins") : t("panel.plugins.empty.noMatch");
|
|
53205
53244
|
})());
|
|
53206
53245
|
effect((_$p) => setProp(_el$12, "fg", theme?.text.muted ?? "#565f89", _$p));
|
|
53207
53246
|
return _el$11;
|
|
@@ -55327,7 +55366,7 @@ function ConfirmDialog(props) {
|
|
|
55327
55366
|
setProp(_el$3, "justifyContent", "flex-end");
|
|
55328
55367
|
setProp(_el$3, "flexShrink", 0);
|
|
55329
55368
|
setProp(_el$4, "wrapMode", "none");
|
|
55330
|
-
insert(_el$4, () =>
|
|
55369
|
+
insert(_el$4, () => t("panel.confirm.hint", {
|
|
55331
55370
|
cancel: props.cancelLabel ?? "Cancel"
|
|
55332
55371
|
}));
|
|
55333
55372
|
effect((_p$) => {
|
|
@@ -55390,7 +55429,7 @@ var init_confirm = __esm(() => {
|
|
|
55390
55429
|
init_index_bun();
|
|
55391
55430
|
init_index_bun();
|
|
55392
55431
|
init_server();
|
|
55393
|
-
|
|
55432
|
+
init_src();
|
|
55394
55433
|
init_theme4();
|
|
55395
55434
|
init_button();
|
|
55396
55435
|
init_theme4();
|
|
@@ -55788,7 +55827,7 @@ function buildLocalItems(input) {
|
|
|
55788
55827
|
id: "theme",
|
|
55789
55828
|
label: "theme",
|
|
55790
55829
|
value: str(merged.theme) ?? unknownValue(),
|
|
55791
|
-
source:
|
|
55830
|
+
source: t("settings.source.mergedTheme"),
|
|
55792
55831
|
kind: "enum",
|
|
55793
55832
|
...input.themeNames !== undefined && input.themeNames.length > 0 ? {
|
|
55794
55833
|
options: input.themeNames
|
|
@@ -55918,7 +55957,7 @@ function buildHostItems(document, writable, catalog) {
|
|
|
55918
55957
|
source: `cordis.patch.yml \xB7 ${spec.ns}.${spec.label}`,
|
|
55919
55958
|
kind: spec.kind,
|
|
55920
55959
|
editable: false,
|
|
55921
|
-
note:
|
|
55960
|
+
note: t("settings.note.notInHostBaseline"),
|
|
55922
55961
|
write: {
|
|
55923
55962
|
via: "settings",
|
|
55924
55963
|
ns: spec.ns,
|
|
@@ -55932,7 +55971,7 @@ function buildHostItems(document, writable, catalog) {
|
|
|
55932
55971
|
} : {}
|
|
55933
55972
|
};
|
|
55934
55973
|
if (document === undefined) {
|
|
55935
|
-
item.note =
|
|
55974
|
+
item.note = t("settings.note.hostUnavailable");
|
|
55936
55975
|
return item;
|
|
55937
55976
|
}
|
|
55938
55977
|
if (row === undefined)
|
|
@@ -55958,16 +55997,16 @@ function buildHostItems(document, writable, catalog) {
|
|
|
55958
55997
|
if (options.length > 0) {
|
|
55959
55998
|
item.options = options;
|
|
55960
55999
|
if (hasCatalog) {
|
|
55961
|
-
item.source =
|
|
56000
|
+
item.source = t("settings.note.catalogSource");
|
|
55962
56001
|
if (item.value !== unknownValue() && item.value !== naValue() && !options.includes(item.value)) {
|
|
55963
|
-
item.note =
|
|
56002
|
+
item.note = t("settings.note.valueNotInCatalog", {
|
|
55964
56003
|
value: item.value
|
|
55965
56004
|
});
|
|
55966
56005
|
}
|
|
55967
56006
|
}
|
|
55968
56007
|
} else {
|
|
55969
56008
|
item.editable = false;
|
|
55970
|
-
item.note = hasCatalog ?
|
|
56009
|
+
item.note = hasCatalog ? t("settings.note.catalogNoOptions") : t("settings.note.noCatalog");
|
|
55971
56010
|
}
|
|
55972
56011
|
}
|
|
55973
56012
|
if (spec.kind === "number") {
|
|
@@ -56081,7 +56120,7 @@ function planLocalWrite(item, raw, hints) {
|
|
|
56081
56120
|
if (item.write?.via !== "config")
|
|
56082
56121
|
return {
|
|
56083
56122
|
ok: false,
|
|
56084
|
-
error:
|
|
56123
|
+
error: t("settings.error.notLocal")
|
|
56085
56124
|
};
|
|
56086
56125
|
const key = item.write.key;
|
|
56087
56126
|
if (item.id.startsWith("footerHints.")) {
|
|
@@ -56089,7 +56128,7 @@ function planLocalWrite(item, raw, hints) {
|
|
|
56089
56128
|
if (!(segment in DEFAULT_FOOTER_HINTS))
|
|
56090
56129
|
return {
|
|
56091
56130
|
ok: false,
|
|
56092
|
-
error:
|
|
56131
|
+
error: t("settings.error.unknownHintSegment", {
|
|
56093
56132
|
segment
|
|
56094
56133
|
})
|
|
56095
56134
|
};
|
|
@@ -56140,7 +56179,7 @@ function planLocalWrite(item, raw, hints) {
|
|
|
56140
56179
|
if (text === "")
|
|
56141
56180
|
return {
|
|
56142
56181
|
ok: false,
|
|
56143
|
-
error:
|
|
56182
|
+
error: t("settings.error.emptyValue")
|
|
56144
56183
|
};
|
|
56145
56184
|
return {
|
|
56146
56185
|
ok: true,
|
|
@@ -56154,7 +56193,7 @@ function planHostWrite(item, raw) {
|
|
|
56154
56193
|
if (item.write?.via !== "settings")
|
|
56155
56194
|
return {
|
|
56156
56195
|
ok: false,
|
|
56157
|
-
error:
|
|
56196
|
+
error: t("settings.error.notHost")
|
|
56158
56197
|
};
|
|
56159
56198
|
const {
|
|
56160
56199
|
ns,
|
|
@@ -56192,7 +56231,7 @@ function planHostWrite(item, raw) {
|
|
|
56192
56231
|
if (text === "")
|
|
56193
56232
|
return {
|
|
56194
56233
|
ok: false,
|
|
56195
|
-
error:
|
|
56234
|
+
error: t("settings.error.emptyValue")
|
|
56196
56235
|
};
|
|
56197
56236
|
return {
|
|
56198
56237
|
ok: true,
|
|
@@ -56210,7 +56249,7 @@ function parseIntegerInput(text, min, max) {
|
|
|
56210
56249
|
if (!/^-?\d+$/.test(trimmed))
|
|
56211
56250
|
return {
|
|
56212
56251
|
ok: false,
|
|
56213
|
-
error:
|
|
56252
|
+
error: t("settings.error.expectedInteger", {
|
|
56214
56253
|
value: trimmed
|
|
56215
56254
|
})
|
|
56216
56255
|
};
|
|
@@ -56218,21 +56257,21 @@ function parseIntegerInput(text, min, max) {
|
|
|
56218
56257
|
if (!Number.isSafeInteger(value))
|
|
56219
56258
|
return {
|
|
56220
56259
|
ok: false,
|
|
56221
|
-
error:
|
|
56260
|
+
error: t("settings.error.integerOutOfRange", {
|
|
56222
56261
|
value: trimmed
|
|
56223
56262
|
})
|
|
56224
56263
|
};
|
|
56225
56264
|
if (min !== undefined && value < min)
|
|
56226
56265
|
return {
|
|
56227
56266
|
ok: false,
|
|
56228
|
-
error:
|
|
56267
|
+
error: t("settings.error.min", {
|
|
56229
56268
|
min
|
|
56230
56269
|
})
|
|
56231
56270
|
};
|
|
56232
56271
|
if (max !== undefined && value > max)
|
|
56233
56272
|
return {
|
|
56234
56273
|
ok: false,
|
|
56235
|
-
error:
|
|
56274
|
+
error: t("settings.error.max", {
|
|
56236
56275
|
max
|
|
56237
56276
|
})
|
|
56238
56277
|
};
|
|
@@ -56295,13 +56334,13 @@ function settingsWritable(document, describeError, hasFace) {
|
|
|
56295
56334
|
return {
|
|
56296
56335
|
local: true,
|
|
56297
56336
|
host: false,
|
|
56298
|
-
reason:
|
|
56337
|
+
reason: t("settings.writable.noFace")
|
|
56299
56338
|
};
|
|
56300
56339
|
if (describeError !== undefined) {
|
|
56301
56340
|
return {
|
|
56302
56341
|
local: true,
|
|
56303
56342
|
host: false,
|
|
56304
|
-
reason:
|
|
56343
|
+
reason: t("settings.writable.describeFailed", {
|
|
56305
56344
|
detail: describeError
|
|
56306
56345
|
})
|
|
56307
56346
|
};
|
|
@@ -56310,7 +56349,7 @@ function settingsWritable(document, describeError, hasFace) {
|
|
|
56310
56349
|
return {
|
|
56311
56350
|
local: false,
|
|
56312
56351
|
host: false,
|
|
56313
|
-
reason:
|
|
56352
|
+
reason: t("settings.writable.readOnlyDoc")
|
|
56314
56353
|
};
|
|
56315
56354
|
}
|
|
56316
56355
|
return {
|
|
@@ -56319,9 +56358,9 @@ function settingsWritable(document, describeError, hasFace) {
|
|
|
56319
56358
|
};
|
|
56320
56359
|
}
|
|
56321
56360
|
function settingsSummary(changed) {
|
|
56322
|
-
return changed.length > 0 ?
|
|
56361
|
+
return changed.length > 0 ? t("settings.summary.updated", {
|
|
56323
56362
|
labels: changed.join(", ")
|
|
56324
|
-
}) :
|
|
56363
|
+
}) : t("settings.summary.unchanged");
|
|
56325
56364
|
}
|
|
56326
56365
|
function openSettingsPanel(itemId) {
|
|
56327
56366
|
setBridgeOpen4(itemId ?? "");
|
|
@@ -56428,7 +56467,7 @@ function applySettingsLive(item, applied, hints, themes) {
|
|
|
56428
56467
|
function setSettingsBridge(value) {
|
|
56429
56468
|
setBridgeOpen4(value);
|
|
56430
56469
|
}
|
|
56431
|
-
var unknownValue = () =>
|
|
56470
|
+
var unknownValue = () => t("settings.value.unset"), naValue = () => t("settings.value.na"), readonlyNote = () => t("settings.zone.readonlyNote"), HOST_SETTINGS_WHITELIST, HIDDEN_NAMESPACES, LOCAL_SETTING_IDS, bridgeOpen4, setBridgeOpen4, panelOpen5, setPanelOpen5, settingsPanelOpen, settingsBridgeOpen;
|
|
56432
56471
|
var init_settings_panel = __esm(() => {
|
|
56433
56472
|
init_server();
|
|
56434
56473
|
init_i18n();
|
|
@@ -56501,42 +56540,42 @@ function agentName(row) {
|
|
|
56501
56540
|
return row.displayName ?? row.name;
|
|
56502
56541
|
}
|
|
56503
56542
|
function brokenLine(count) {
|
|
56504
|
-
return
|
|
56543
|
+
return t("panel.agents.brokenLine", {
|
|
56505
56544
|
count: String(count)
|
|
56506
56545
|
});
|
|
56507
56546
|
}
|
|
56508
56547
|
function agentTableColumns() {
|
|
56509
56548
|
return [{
|
|
56510
56549
|
id: "name",
|
|
56511
|
-
title:
|
|
56550
|
+
title: t("panel.agents.column.name"),
|
|
56512
56551
|
width: 18
|
|
56513
56552
|
}, {
|
|
56514
56553
|
id: "model",
|
|
56515
|
-
title:
|
|
56554
|
+
title: t("panel.agents.column.model"),
|
|
56516
56555
|
width: 30
|
|
56517
56556
|
}, {
|
|
56518
56557
|
id: "thinking",
|
|
56519
|
-
title:
|
|
56558
|
+
title: t("panel.agents.column.think"),
|
|
56520
56559
|
width: 10
|
|
56521
56560
|
}, {
|
|
56522
56561
|
id: "deep",
|
|
56523
|
-
title:
|
|
56562
|
+
title: t("panel.agents.column.deep"),
|
|
56524
56563
|
width: 6,
|
|
56525
56564
|
align: "left"
|
|
56526
56565
|
}, {
|
|
56527
56566
|
id: "limits",
|
|
56528
|
-
title:
|
|
56567
|
+
title: t("panel.agents.column.limits"),
|
|
56529
56568
|
width: 24
|
|
56530
56569
|
}];
|
|
56531
56570
|
}
|
|
56532
56571
|
function agentLimitsCell(row) {
|
|
56533
56572
|
const parts = [];
|
|
56534
56573
|
if (row.maxRounds !== undefined)
|
|
56535
|
-
parts.push(
|
|
56574
|
+
parts.push(t("panel.agents.cell.rounds", {
|
|
56536
56575
|
count: String(row.maxRounds)
|
|
56537
56576
|
}));
|
|
56538
56577
|
if (row.background === true)
|
|
56539
|
-
parts.push(
|
|
56578
|
+
parts.push(t("panel.agents.cell.background"));
|
|
56540
56579
|
return parts.join(" \xB7 ");
|
|
56541
56580
|
}
|
|
56542
56581
|
function agentTableItem(row) {
|
|
@@ -56556,21 +56595,21 @@ function agentTableItems(rows) {
|
|
|
56556
56595
|
return rows.map(agentTableItem);
|
|
56557
56596
|
}
|
|
56558
56597
|
function agentFieldContent(agent) {
|
|
56559
|
-
const lines = (agent.description ??
|
|
56598
|
+
const lines = (agent.description ?? t("panel.agents.field.noDescription")).split(`
|
|
56560
56599
|
`);
|
|
56561
|
-
lines.push(agent.pin !== undefined ?
|
|
56600
|
+
lines.push(agent.pin !== undefined ? t("panel.agents.field.pinProfile", {
|
|
56562
56601
|
name: agent.pin
|
|
56563
|
-
}) :
|
|
56602
|
+
}) : t("panel.agents.field.noPin"));
|
|
56564
56603
|
return lines;
|
|
56565
56604
|
}
|
|
56566
56605
|
function agentFieldColumns() {
|
|
56567
56606
|
return [{
|
|
56568
56607
|
id: "field",
|
|
56569
|
-
title:
|
|
56608
|
+
title: t("panel.agents.column.field"),
|
|
56570
56609
|
width: 20
|
|
56571
56610
|
}, {
|
|
56572
56611
|
id: "value",
|
|
56573
|
-
title:
|
|
56612
|
+
title: t("panel.agents.column.value"),
|
|
56574
56613
|
width: 62
|
|
56575
56614
|
}];
|
|
56576
56615
|
}
|
|
@@ -56602,7 +56641,7 @@ function agentFieldItems(agent) {
|
|
|
56602
56641
|
}];
|
|
56603
56642
|
}
|
|
56604
56643
|
function limitDescription(key) {
|
|
56605
|
-
return
|
|
56644
|
+
return t(`panel.agents.limits.desc.${key}`);
|
|
56606
56645
|
}
|
|
56607
56646
|
function agentLimitsRows(agent, caps) {
|
|
56608
56647
|
const rows = [];
|
|
@@ -56615,18 +56654,18 @@ function agentLimitsRows(agent, caps) {
|
|
|
56615
56654
|
rows.push({
|
|
56616
56655
|
key: "background",
|
|
56617
56656
|
editable: true,
|
|
56618
|
-
value: agent.background === true ?
|
|
56657
|
+
value: agent.background === true ? t("panel.agents.value.on") : t("panel.agents.value.off")
|
|
56619
56658
|
});
|
|
56620
56659
|
}
|
|
56621
56660
|
rows.push({
|
|
56622
56661
|
key: "maxActiveSubagents",
|
|
56623
56662
|
editable: false,
|
|
56624
|
-
value: caps?.maxActiveSubagents === undefined ?
|
|
56663
|
+
value: caps?.maxActiveSubagents === undefined ? t("panel.agents.value.na") : String(caps.maxActiveSubagents)
|
|
56625
56664
|
});
|
|
56626
56665
|
rows.push({
|
|
56627
56666
|
key: "maxDepth",
|
|
56628
56667
|
editable: false,
|
|
56629
|
-
value: caps?.maxDepth === undefined ?
|
|
56668
|
+
value: caps?.maxDepth === undefined ? t("panel.agents.value.na") : String(caps.maxDepth)
|
|
56630
56669
|
});
|
|
56631
56670
|
return rows;
|
|
56632
56671
|
}
|
|
@@ -56654,11 +56693,11 @@ function officialCapSettingsRow(key) {
|
|
|
56654
56693
|
function agentPickerColumns() {
|
|
56655
56694
|
return [{
|
|
56656
56695
|
id: "model",
|
|
56657
|
-
title:
|
|
56696
|
+
title: t("panel.agents.column.model"),
|
|
56658
56697
|
width: 40
|
|
56659
56698
|
}, {
|
|
56660
56699
|
id: "provider",
|
|
56661
|
-
title:
|
|
56700
|
+
title: t("panel.agents.column.provider"),
|
|
56662
56701
|
width: 24
|
|
56663
56702
|
}];
|
|
56664
56703
|
}
|
|
@@ -56675,21 +56714,21 @@ function agentPickerItems(models) {
|
|
|
56675
56714
|
function agentEffortColumns() {
|
|
56676
56715
|
return [{
|
|
56677
56716
|
id: "effort",
|
|
56678
|
-
title:
|
|
56717
|
+
title: t("panel.agents.column.effort"),
|
|
56679
56718
|
width: 24
|
|
56680
56719
|
}, {
|
|
56681
56720
|
id: "description",
|
|
56682
|
-
title:
|
|
56721
|
+
title: t("panel.agents.column.description"),
|
|
56683
56722
|
width: 56
|
|
56684
56723
|
}];
|
|
56685
56724
|
}
|
|
56686
56725
|
function agentEffortItems(efforts) {
|
|
56687
56726
|
return [{
|
|
56688
56727
|
id: "default",
|
|
56689
|
-
label:
|
|
56728
|
+
label: t("panel.agents.effort.default"),
|
|
56690
56729
|
value: null,
|
|
56691
56730
|
cells: {
|
|
56692
|
-
description:
|
|
56731
|
+
description: t("panel.agents.effort.defaultDescription")
|
|
56693
56732
|
}
|
|
56694
56733
|
}, ...efforts.map((effort) => ({
|
|
56695
56734
|
id: effort.id,
|
|
@@ -56723,7 +56762,7 @@ function parseDeepInput(text) {
|
|
|
56723
56762
|
if (!/^\d+$/.test(trimmed))
|
|
56724
56763
|
return {
|
|
56725
56764
|
kind: "error",
|
|
56726
|
-
error:
|
|
56765
|
+
error: t("panel.agents.input.deepError", {
|
|
56727
56766
|
value: trimmed
|
|
56728
56767
|
})
|
|
56729
56768
|
};
|
|
@@ -56742,7 +56781,7 @@ function parseMaxRoundsInput(text) {
|
|
|
56742
56781
|
if (!/^\d+$/.test(trimmed) || !Number.isSafeInteger(value) || value < 1) {
|
|
56743
56782
|
return {
|
|
56744
56783
|
kind: "error",
|
|
56745
|
-
error:
|
|
56784
|
+
error: t("panel.agents.input.roundsError", {
|
|
56746
56785
|
value: trimmed
|
|
56747
56786
|
})
|
|
56748
56787
|
};
|
|
@@ -56813,9 +56852,9 @@ function splitRoute(model) {
|
|
|
56813
56852
|
};
|
|
56814
56853
|
}
|
|
56815
56854
|
function agentsSummary(changed) {
|
|
56816
|
-
return changed.length > 0 ?
|
|
56855
|
+
return changed.length > 0 ? t("panel.agents.summary.updated", {
|
|
56817
56856
|
names: changed.join(", ")
|
|
56818
|
-
}) :
|
|
56857
|
+
}) : t("panel.agents.summary.unchanged");
|
|
56819
56858
|
}
|
|
56820
56859
|
function findFocusable(node) {
|
|
56821
56860
|
if (!node)
|
|
@@ -56951,32 +56990,32 @@ function AgentsPanel(props) {
|
|
|
56951
56990
|
function levelTitle(level) {
|
|
56952
56991
|
switch (level) {
|
|
56953
56992
|
case "table":
|
|
56954
|
-
return
|
|
56993
|
+
return t("panel.agents.title.table");
|
|
56955
56994
|
case "fields": {
|
|
56956
56995
|
const current = agent();
|
|
56957
|
-
return current === undefined ?
|
|
56996
|
+
return current === undefined ? t("panel.agents.title.agent") : agentName(current);
|
|
56958
56997
|
}
|
|
56959
56998
|
case "limits":
|
|
56960
|
-
return
|
|
56999
|
+
return t("panel.agents.title.limits");
|
|
56961
57000
|
case "limitEdit": {
|
|
56962
57001
|
const current = agent();
|
|
56963
|
-
return current === undefined ?
|
|
57002
|
+
return current === undefined ? t("panel.agents.title.maxRounds") : t("panel.agents.title.maxRoundsAgent", {
|
|
56964
57003
|
name: agentName(current)
|
|
56965
57004
|
});
|
|
56966
57005
|
}
|
|
56967
57006
|
case "picker":
|
|
56968
|
-
return
|
|
57007
|
+
return t("panel.agents.title.model");
|
|
56969
57008
|
case "effort":
|
|
56970
|
-
return
|
|
57009
|
+
return t("panel.agents.title.effort");
|
|
56971
57010
|
case "deep": {
|
|
56972
57011
|
const current = agent();
|
|
56973
|
-
return current === undefined ?
|
|
57012
|
+
return current === undefined ? t("panel.agents.title.deep") : t("panel.agents.title.deepAgent", {
|
|
56974
57013
|
name: agentName(current)
|
|
56975
57014
|
});
|
|
56976
57015
|
}
|
|
56977
57016
|
case "viewer": {
|
|
56978
57017
|
const current = agent();
|
|
56979
|
-
return current === undefined ?
|
|
57018
|
+
return current === undefined ? t("panel.agents.title.viewer") : t("panel.agents.title.viewerAgent", {
|
|
56980
57019
|
name: agentName(current)
|
|
56981
57020
|
});
|
|
56982
57021
|
}
|
|
@@ -57016,7 +57055,7 @@ function AgentsPanel(props) {
|
|
|
57016
57055
|
setLimitError(undefined);
|
|
57017
57056
|
setCaps(undefined);
|
|
57018
57057
|
setStatus(undefined);
|
|
57019
|
-
pushLevel("limits", row === undefined ? undefined :
|
|
57058
|
+
pushLevel("limits", row === undefined ? undefined : t("panel.agents.limits.target", {
|
|
57020
57059
|
name: agentName(row)
|
|
57021
57060
|
}));
|
|
57022
57061
|
loadOfficialCaps();
|
|
@@ -57050,12 +57089,12 @@ function AgentsPanel(props) {
|
|
|
57050
57089
|
const next = current.background !== true;
|
|
57051
57090
|
const result = seam.set(current.name, "background", next ? "true" : "false");
|
|
57052
57091
|
if (result.error !== undefined) {
|
|
57053
|
-
setStatus(
|
|
57092
|
+
setStatus(t("panel.agents.status.error", {
|
|
57054
57093
|
error: result.error
|
|
57055
57094
|
}));
|
|
57056
57095
|
return;
|
|
57057
57096
|
}
|
|
57058
|
-
setStatus(next ?
|
|
57097
|
+
setStatus(next ? t("panel.agents.status.backgroundOn") : t("panel.agents.status.backgroundOff"));
|
|
57059
57098
|
markChanged(current.name);
|
|
57060
57099
|
reloadRows();
|
|
57061
57100
|
}
|
|
@@ -57082,7 +57121,7 @@ function AgentsPanel(props) {
|
|
|
57082
57121
|
return;
|
|
57083
57122
|
}
|
|
57084
57123
|
setLimitError(undefined);
|
|
57085
|
-
setStatus(
|
|
57124
|
+
setStatus(t("panel.agents.status.maxRoundsSaved", {
|
|
57086
57125
|
value: String(parsed.value)
|
|
57087
57126
|
}));
|
|
57088
57127
|
markChanged(current.name);
|
|
@@ -57100,7 +57139,7 @@ function AgentsPanel(props) {
|
|
|
57100
57139
|
catalog = [];
|
|
57101
57140
|
}
|
|
57102
57141
|
if (catalog.length === 0) {
|
|
57103
|
-
setStatus(
|
|
57142
|
+
setStatus(t("panel.agents.status.noModels"));
|
|
57104
57143
|
return;
|
|
57105
57144
|
}
|
|
57106
57145
|
setModels(catalog);
|
|
@@ -57136,7 +57175,7 @@ function AgentsPanel(props) {
|
|
|
57136
57175
|
return;
|
|
57137
57176
|
const modelResult = seam.set(current.name, "model", model);
|
|
57138
57177
|
if (modelResult.error !== undefined) {
|
|
57139
|
-
setStatus(
|
|
57178
|
+
setStatus(t("panel.agents.status.error", {
|
|
57140
57179
|
error: modelResult.error
|
|
57141
57180
|
}));
|
|
57142
57181
|
popAbove("fields");
|
|
@@ -57148,28 +57187,28 @@ function AgentsPanel(props) {
|
|
|
57148
57187
|
const profileTarget = modelResult.target.kind === "profile" ? modelResult.target.name : undefined;
|
|
57149
57188
|
const profile = profileTarget ?? "";
|
|
57150
57189
|
if (thinkResult.error !== undefined) {
|
|
57151
|
-
setStatus(
|
|
57190
|
+
setStatus(t("panel.agents.status.thinkNotSaved", {
|
|
57152
57191
|
error: thinkResult.error,
|
|
57153
57192
|
name: current.name,
|
|
57154
57193
|
model
|
|
57155
57194
|
}));
|
|
57156
57195
|
} else if (thinking === null) {
|
|
57157
|
-
setStatus(profileTarget !== undefined ?
|
|
57196
|
+
setStatus(profileTarget !== undefined ? t("panel.agents.status.savedModelProfile", {
|
|
57158
57197
|
name: current.name,
|
|
57159
57198
|
model,
|
|
57160
57199
|
profile
|
|
57161
|
-
}) :
|
|
57200
|
+
}) : t("panel.agents.status.savedModel", {
|
|
57162
57201
|
name: current.name,
|
|
57163
57202
|
model
|
|
57164
57203
|
}));
|
|
57165
57204
|
} else {
|
|
57166
57205
|
const thinkingText = thinking;
|
|
57167
|
-
setStatus(profileTarget !== undefined ?
|
|
57206
|
+
setStatus(profileTarget !== undefined ? t("panel.agents.status.savedModelThinkProfile", {
|
|
57168
57207
|
name: current.name,
|
|
57169
57208
|
model,
|
|
57170
57209
|
thinking: thinkingText,
|
|
57171
57210
|
profile
|
|
57172
|
-
}) :
|
|
57211
|
+
}) : t("panel.agents.status.savedModelThink", {
|
|
57173
57212
|
name: current.name,
|
|
57174
57213
|
model,
|
|
57175
57214
|
thinking: thinkingText
|
|
@@ -57182,12 +57221,12 @@ function AgentsPanel(props) {
|
|
|
57182
57221
|
if (current === undefined)
|
|
57183
57222
|
return;
|
|
57184
57223
|
if (current.model === undefined) {
|
|
57185
|
-
setStatus(
|
|
57224
|
+
setStatus(t("panel.agents.status.noModelSet"));
|
|
57186
57225
|
return;
|
|
57187
57226
|
}
|
|
57188
57227
|
const route = splitRoute(current.model);
|
|
57189
57228
|
if (route === undefined) {
|
|
57190
|
-
setStatus(
|
|
57229
|
+
setStatus(t("panel.agents.status.cannotResolveThink", {
|
|
57191
57230
|
model: current.model
|
|
57192
57231
|
}));
|
|
57193
57232
|
return;
|
|
@@ -57199,7 +57238,7 @@ function AgentsPanel(props) {
|
|
|
57199
57238
|
ladder = [];
|
|
57200
57239
|
}
|
|
57201
57240
|
if (ladder.length === 0) {
|
|
57202
|
-
setStatus(
|
|
57241
|
+
setStatus(t("panel.agents.status.noThinkLevels", {
|
|
57203
57242
|
model: current.model
|
|
57204
57243
|
}));
|
|
57205
57244
|
return;
|
|
@@ -57226,18 +57265,18 @@ function AgentsPanel(props) {
|
|
|
57226
57265
|
const thinking = next.stage === "done" ? next.thinking : null;
|
|
57227
57266
|
const result = seam.set(current.name, "thinking", thinking);
|
|
57228
57267
|
if (result.error !== undefined) {
|
|
57229
|
-
setStatus(
|
|
57268
|
+
setStatus(t("panel.agents.status.error", {
|
|
57230
57269
|
error: result.error
|
|
57231
57270
|
}));
|
|
57232
57271
|
} else {
|
|
57233
57272
|
const profileTarget = result.target.kind === "profile" ? result.target.name : undefined;
|
|
57234
57273
|
const profile = profileTarget ?? "";
|
|
57235
57274
|
const thinkingText = thinking ?? "inherit";
|
|
57236
|
-
setStatus(profileTarget !== undefined ?
|
|
57275
|
+
setStatus(profileTarget !== undefined ? t("panel.agents.status.savedThinkProfile", {
|
|
57237
57276
|
name: current.name,
|
|
57238
57277
|
thinking: thinkingText,
|
|
57239
57278
|
profile
|
|
57240
|
-
}) :
|
|
57279
|
+
}) : t("panel.agents.status.savedThink", {
|
|
57241
57280
|
name: current.name,
|
|
57242
57281
|
thinking: thinkingText
|
|
57243
57282
|
}));
|
|
@@ -57282,7 +57321,7 @@ function AgentsPanel(props) {
|
|
|
57282
57321
|
}
|
|
57283
57322
|
const n = Number(trimmed);
|
|
57284
57323
|
setDeepError(undefined);
|
|
57285
|
-
setDeepNotice(
|
|
57324
|
+
setDeepNotice(t("panel.agents.status.depthSaved", {
|
|
57286
57325
|
value: String(n)
|
|
57287
57326
|
}));
|
|
57288
57327
|
setDeepCommitted(true);
|
|
@@ -57292,7 +57331,7 @@ function AgentsPanel(props) {
|
|
|
57292
57331
|
function leaveDeepEditor() {
|
|
57293
57332
|
const current = agent();
|
|
57294
57333
|
if (deepCommitted() && current !== undefined) {
|
|
57295
|
-
setStatus(
|
|
57334
|
+
setStatus(t("panel.agents.status.savedDepth", {
|
|
57296
57335
|
name: current.name,
|
|
57297
57336
|
value: String(current.deep)
|
|
57298
57337
|
}));
|
|
@@ -57360,21 +57399,21 @@ function AgentsPanel(props) {
|
|
|
57360
57399
|
commands: [
|
|
57361
57400
|
{
|
|
57362
57401
|
bind: "m",
|
|
57363
|
-
title:
|
|
57402
|
+
title: t("panel.agents.keymap.model"),
|
|
57364
57403
|
group: "Agents",
|
|
57365
57404
|
enabled: () => activeLevel() === "fields",
|
|
57366
57405
|
run: () => void openModelPicker()
|
|
57367
57406
|
},
|
|
57368
57407
|
{
|
|
57369
57408
|
bind: "t",
|
|
57370
|
-
title:
|
|
57409
|
+
title: t("panel.agents.keymap.think"),
|
|
57371
57410
|
group: "Agents",
|
|
57372
57411
|
enabled: () => activeLevel() === "fields",
|
|
57373
57412
|
run: () => void openThinkingPicker()
|
|
57374
57413
|
},
|
|
57375
57414
|
{
|
|
57376
57415
|
bind: "d",
|
|
57377
|
-
title:
|
|
57416
|
+
title: t("panel.agents.keymap.deep"),
|
|
57378
57417
|
group: "Agents",
|
|
57379
57418
|
enabled: () => activeLevel() === "fields" || activeLevel() === "limits",
|
|
57380
57419
|
run: () => {
|
|
@@ -57386,45 +57425,45 @@ function AgentsPanel(props) {
|
|
|
57386
57425
|
},
|
|
57387
57426
|
{
|
|
57388
57427
|
bind: "v",
|
|
57389
|
-
title:
|
|
57428
|
+
title: t("panel.agents.keymap.prompt"),
|
|
57390
57429
|
group: "Agents",
|
|
57391
57430
|
enabled: () => activeLevel() === "fields",
|
|
57392
57431
|
run: () => showViewer()
|
|
57393
57432
|
},
|
|
57394
57433
|
{
|
|
57395
57434
|
bind: "l",
|
|
57396
|
-
title:
|
|
57435
|
+
title: t("panel.agents.keymap.limits"),
|
|
57397
57436
|
group: "Agents",
|
|
57398
57437
|
enabled: () => activeLevel() === "table",
|
|
57399
57438
|
run: () => showLimits()
|
|
57400
57439
|
},
|
|
57401
57440
|
{
|
|
57402
57441
|
bind: "pageup",
|
|
57403
|
-
title:
|
|
57442
|
+
title: t("panel.agents.keymap.pageUp"),
|
|
57404
57443
|
group: "Agents",
|
|
57405
57444
|
run: () => pageList("pageup")
|
|
57406
57445
|
},
|
|
57407
57446
|
{
|
|
57408
57447
|
bind: "pagedown",
|
|
57409
|
-
title:
|
|
57448
|
+
title: t("panel.agents.keymap.pageDown"),
|
|
57410
57449
|
group: "Agents",
|
|
57411
57450
|
run: () => pageList("pagedown")
|
|
57412
57451
|
},
|
|
57413
57452
|
{
|
|
57414
57453
|
bind: "home",
|
|
57415
|
-
title:
|
|
57454
|
+
title: t("panel.agents.keymap.firstRow"),
|
|
57416
57455
|
group: "Agents",
|
|
57417
57456
|
run: () => pageList("home")
|
|
57418
57457
|
},
|
|
57419
57458
|
{
|
|
57420
57459
|
bind: "end",
|
|
57421
|
-
title:
|
|
57460
|
+
title: t("panel.agents.keymap.lastRow"),
|
|
57422
57461
|
group: "Agents",
|
|
57423
57462
|
run: () => pageList("end")
|
|
57424
57463
|
},
|
|
57425
57464
|
{
|
|
57426
57465
|
bind: "return",
|
|
57427
|
-
title:
|
|
57466
|
+
title: t("panel.agents.keymap.save"),
|
|
57428
57467
|
group: "Agents",
|
|
57429
57468
|
enabled: () => activeLevel() === "deep" || activeLevel() === "limitEdit",
|
|
57430
57469
|
run: () => {
|
|
@@ -57504,7 +57543,7 @@ function AgentsPanel(props) {
|
|
|
57504
57543
|
query: "",
|
|
57505
57544
|
onQueryChange: () => {},
|
|
57506
57545
|
get emptyLabel() {
|
|
57507
|
-
return
|
|
57546
|
+
return t("panel.agents.empty.noAgents");
|
|
57508
57547
|
},
|
|
57509
57548
|
get activeId() {
|
|
57510
57549
|
return rows()[tableCursor()]?.name;
|
|
@@ -57519,7 +57558,7 @@ function AgentsPanel(props) {
|
|
|
57519
57558
|
}
|
|
57520
57559
|
}), createComponent2(PanelActions, {
|
|
57521
57560
|
get hint() {
|
|
57522
|
-
return
|
|
57561
|
+
return t("panel.agents.hint.table");
|
|
57523
57562
|
}
|
|
57524
57563
|
})];
|
|
57525
57564
|
}
|
|
@@ -57545,7 +57584,7 @@ function AgentsPanel(props) {
|
|
|
57545
57584
|
get fallback() {
|
|
57546
57585
|
return (() => {
|
|
57547
57586
|
var _el$5 = createElement("text");
|
|
57548
|
-
insert(_el$5, () =>
|
|
57587
|
+
insert(_el$5, () => t("panel.agents.fields.notFound"));
|
|
57549
57588
|
effect((_$p) => setProp(_el$5, "fg", theme().text.muted, _$p));
|
|
57550
57589
|
return _el$5;
|
|
57551
57590
|
})();
|
|
@@ -57601,7 +57640,7 @@ function AgentsPanel(props) {
|
|
|
57601
57640
|
}
|
|
57602
57641
|
}), createComponent2(PanelActions, {
|
|
57603
57642
|
get hint() {
|
|
57604
|
-
return
|
|
57643
|
+
return t("panel.agents.hint.fields");
|
|
57605
57644
|
}
|
|
57606
57645
|
})];
|
|
57607
57646
|
}
|
|
@@ -57609,7 +57648,7 @@ function AgentsPanel(props) {
|
|
|
57609
57648
|
}
|
|
57610
57649
|
function renderLimits() {
|
|
57611
57650
|
const current = agent();
|
|
57612
|
-
const emptyCopy = () =>
|
|
57651
|
+
const emptyCopy = () => t("panel.agents.empty.dir", {
|
|
57613
57652
|
dir: props.seam.agents?.dir?.() ?? "$DSH_HOME/agents"
|
|
57614
57653
|
});
|
|
57615
57654
|
return createComponent2(FocusRoot, {
|
|
@@ -57645,7 +57684,7 @@ function AgentsPanel(props) {
|
|
|
57645
57684
|
query: "",
|
|
57646
57685
|
onQueryChange: () => {},
|
|
57647
57686
|
get emptyLabel() {
|
|
57648
|
-
return
|
|
57687
|
+
return t("panel.agents.empty.noLimits");
|
|
57649
57688
|
},
|
|
57650
57689
|
get activeId() {
|
|
57651
57690
|
return limitsRows()[limitsCursor()]?.key;
|
|
@@ -57667,7 +57706,7 @@ function AgentsPanel(props) {
|
|
|
57667
57706
|
}
|
|
57668
57707
|
}), createComponent2(PanelActions, {
|
|
57669
57708
|
get hint() {
|
|
57670
|
-
return
|
|
57709
|
+
return t("panel.agents.hint.limits");
|
|
57671
57710
|
}
|
|
57672
57711
|
})];
|
|
57673
57712
|
}
|
|
@@ -57679,7 +57718,7 @@ function AgentsPanel(props) {
|
|
|
57679
57718
|
return [(() => {
|
|
57680
57719
|
var _el$9 = createElement("text");
|
|
57681
57720
|
setProp(_el$9, "wrapMode", "none");
|
|
57682
|
-
insert(_el$9, () =>
|
|
57721
|
+
insert(_el$9, () => t("panel.agents.limitEdit.hint"));
|
|
57683
57722
|
effect((_$p) => setProp(_el$9, "fg", theme().text.muted, _$p));
|
|
57684
57723
|
return _el$9;
|
|
57685
57724
|
})(), createComponent2(Show, {
|
|
@@ -57689,7 +57728,7 @@ function AgentsPanel(props) {
|
|
|
57689
57728
|
get children() {
|
|
57690
57729
|
var _el$0 = createElement("text");
|
|
57691
57730
|
setProp(_el$0, "wrapMode", "none");
|
|
57692
|
-
insert(_el$0, () => clipText(
|
|
57731
|
+
insert(_el$0, () => clipText(t("panel.agents.status.error", {
|
|
57693
57732
|
error: limitError()
|
|
57694
57733
|
}), bodyWidth()));
|
|
57695
57734
|
effect((_$p) => setProp(_el$0, "fg", theme().text.danger, _$p));
|
|
@@ -57734,7 +57773,7 @@ function AgentsPanel(props) {
|
|
|
57734
57773
|
return _el$10;
|
|
57735
57774
|
})(), createComponent2(PanelActions, {
|
|
57736
57775
|
get hint() {
|
|
57737
|
-
return
|
|
57776
|
+
return t("panel.agents.hint.editor");
|
|
57738
57777
|
}
|
|
57739
57778
|
})];
|
|
57740
57779
|
}
|
|
@@ -57746,7 +57785,7 @@ function AgentsPanel(props) {
|
|
|
57746
57785
|
return [(() => {
|
|
57747
57786
|
var _el$14 = createElement("text");
|
|
57748
57787
|
setProp(_el$14, "wrapMode", "none");
|
|
57749
|
-
insert(_el$14, () =>
|
|
57788
|
+
insert(_el$14, () => t("panel.agents.deep.hint"));
|
|
57750
57789
|
effect((_$p) => setProp(_el$14, "fg", theme().text.muted, _$p));
|
|
57751
57790
|
return _el$14;
|
|
57752
57791
|
})(), createComponent2(Show, {
|
|
@@ -57756,7 +57795,7 @@ function AgentsPanel(props) {
|
|
|
57756
57795
|
get children() {
|
|
57757
57796
|
var _el$15 = createElement("text");
|
|
57758
57797
|
setProp(_el$15, "wrapMode", "none");
|
|
57759
|
-
insert(_el$15, () => clipText(
|
|
57798
|
+
insert(_el$15, () => clipText(t("panel.agents.status.error", {
|
|
57760
57799
|
error: deepError()
|
|
57761
57800
|
}), bodyWidth()));
|
|
57762
57801
|
effect((_$p) => setProp(_el$15, "fg", theme().text.danger, _$p));
|
|
@@ -57817,7 +57856,7 @@ function AgentsPanel(props) {
|
|
|
57817
57856
|
return _el$18;
|
|
57818
57857
|
})(), createComponent2(PanelActions, {
|
|
57819
57858
|
get hint() {
|
|
57820
|
-
return
|
|
57859
|
+
return t("panel.agents.hint.editor");
|
|
57821
57860
|
}
|
|
57822
57861
|
})];
|
|
57823
57862
|
}
|
|
@@ -57842,7 +57881,7 @@ function AgentsPanel(props) {
|
|
|
57842
57881
|
query: "",
|
|
57843
57882
|
onQueryChange: () => {},
|
|
57844
57883
|
get emptyLabel() {
|
|
57845
|
-
return
|
|
57884
|
+
return t("panel.agents.empty.noModels");
|
|
57846
57885
|
},
|
|
57847
57886
|
get activeId() {
|
|
57848
57887
|
return memo2(() => models()[pickerCursor()] === undefined)() ? undefined : `${models()[pickerCursor()].providerID}/${models()[pickerCursor()].modelID}`;
|
|
@@ -57857,7 +57896,7 @@ function AgentsPanel(props) {
|
|
|
57857
57896
|
}
|
|
57858
57897
|
}), createComponent2(PanelActions, {
|
|
57859
57898
|
get hint() {
|
|
57860
|
-
return
|
|
57899
|
+
return t("panel.agents.hint.navigate");
|
|
57861
57900
|
}
|
|
57862
57901
|
})];
|
|
57863
57902
|
}
|
|
@@ -57882,7 +57921,7 @@ function AgentsPanel(props) {
|
|
|
57882
57921
|
query: "",
|
|
57883
57922
|
onQueryChange: () => {},
|
|
57884
57923
|
get emptyLabel() {
|
|
57885
|
-
return
|
|
57924
|
+
return t("panel.agents.empty.noEffort");
|
|
57886
57925
|
},
|
|
57887
57926
|
get activeId() {
|
|
57888
57927
|
return items()[effortCursor()]?.id ?? "default";
|
|
@@ -57897,7 +57936,7 @@ function AgentsPanel(props) {
|
|
|
57897
57936
|
}
|
|
57898
57937
|
}), createComponent2(PanelActions, {
|
|
57899
57938
|
get hint() {
|
|
57900
|
-
return
|
|
57939
|
+
return t("panel.agents.hint.navigate");
|
|
57901
57940
|
}
|
|
57902
57941
|
})];
|
|
57903
57942
|
}
|
|
@@ -57928,7 +57967,7 @@ function AgentsPanel(props) {
|
|
|
57928
57967
|
get children() {
|
|
57929
57968
|
var _el$22 = createElement("text");
|
|
57930
57969
|
setProp(_el$22, "wrapMode", "none");
|
|
57931
|
-
insert(_el$22, () => clipText(
|
|
57970
|
+
insert(_el$22, () => clipText(t("panel.agents.viewer.moreLines", {
|
|
57932
57971
|
count: String(view().hidden)
|
|
57933
57972
|
}), bodyWidth()));
|
|
57934
57973
|
effect((_$p) => setProp(_el$22, "fg", theme().text.faint, _$p));
|
|
@@ -57940,7 +57979,7 @@ function AgentsPanel(props) {
|
|
|
57940
57979
|
}
|
|
57941
57980
|
return null;
|
|
57942
57981
|
}
|
|
57943
|
-
var inheritValue = () =>
|
|
57982
|
+
var inheritValue = () => t("panel.agents.value.inherit"), inheritDefaultValue = () => t("panel.agents.value.inheritDefault"), PAGE_SIZE = 12, PANEL_SIZE = "xlarge", bridgeOpen5, setBridgeOpen5, panelOpen6, setPanelOpen6, agentsPanelOpen;
|
|
57944
57983
|
var init_agents_panel = __esm(() => {
|
|
57945
57984
|
init_index_bun();
|
|
57946
57985
|
init_index_bun();
|
|
@@ -58096,7 +58135,7 @@ function toolCallSummary(names) {
|
|
|
58096
58135
|
for (const name of names)
|
|
58097
58136
|
counts.set(name, (counts.get(name) ?? 0) + 1);
|
|
58098
58137
|
const parts = [...counts.entries()].map(([name, count]) => `${name}\xD7${count}`);
|
|
58099
|
-
const text = names.length === 1 ?
|
|
58138
|
+
const text = names.length === 1 ? t("panel.history.tools.one", { count: String(names.length), parts: parts.join(", ") }) : t("panel.history.tools.many", { count: String(names.length), parts: parts.join(", ") });
|
|
58100
58139
|
return text;
|
|
58101
58140
|
}
|
|
58102
58141
|
var HISTORY_PREVIEW_MAX_CHARS = 140;
|
|
@@ -58135,13 +58174,13 @@ function refillOrNotice(turn) {
|
|
|
58135
58174
|
if (turn === undefined)
|
|
58136
58175
|
return {
|
|
58137
58176
|
kind: "notice",
|
|
58138
|
-
text:
|
|
58177
|
+
text: t("panel.history.notice.noTurn")
|
|
58139
58178
|
};
|
|
58140
58179
|
const text = turnPrimaryUserText(turn);
|
|
58141
58180
|
if (text === undefined)
|
|
58142
58181
|
return {
|
|
58143
58182
|
kind: "notice",
|
|
58144
|
-
text:
|
|
58183
|
+
text: t("panel.history.notice.noPrompt", {
|
|
58145
58184
|
turn: String(turn.turn)
|
|
58146
58185
|
})
|
|
58147
58186
|
};
|
|
@@ -58156,32 +58195,32 @@ function toolCallLine(call) {
|
|
|
58156
58195
|
}
|
|
58157
58196
|
function turnDetailLines(turn) {
|
|
58158
58197
|
const lines = [];
|
|
58159
|
-
const flags = [turn.endReason, ...turn.interrupted ? [
|
|
58160
|
-
lines.push(
|
|
58198
|
+
const flags = [turn.endReason, ...turn.interrupted ? [t("panel.history.detail.interrupted")] : []].join(" \xB7 ");
|
|
58199
|
+
lines.push(t("panel.history.detail.turnLine", {
|
|
58161
58200
|
turn: String(turn.turn),
|
|
58162
58201
|
flags
|
|
58163
58202
|
}));
|
|
58164
58203
|
if (turn.endError !== undefined)
|
|
58165
|
-
lines.push(
|
|
58204
|
+
lines.push(t("panel.history.detail.error", {
|
|
58166
58205
|
error: turn.endError
|
|
58167
58206
|
}));
|
|
58168
58207
|
if (turn.userTexts.length > 0) {
|
|
58169
58208
|
lines.push("");
|
|
58170
|
-
lines.push(
|
|
58209
|
+
lines.push(t("panel.history.detail.prompt"));
|
|
58171
58210
|
for (const text of turn.userTexts)
|
|
58172
58211
|
lines.push(...text.split(`
|
|
58173
58212
|
`));
|
|
58174
58213
|
}
|
|
58175
58214
|
if (turn.assistantTexts.length > 0) {
|
|
58176
58215
|
lines.push("");
|
|
58177
|
-
lines.push(
|
|
58216
|
+
lines.push(t("panel.history.detail.assistant"));
|
|
58178
58217
|
for (const text of turn.assistantTexts)
|
|
58179
58218
|
lines.push(...text.split(`
|
|
58180
58219
|
`));
|
|
58181
58220
|
}
|
|
58182
58221
|
if (turn.toolCalls.length > 0) {
|
|
58183
58222
|
lines.push("");
|
|
58184
|
-
lines.push(
|
|
58223
|
+
lines.push(t("panel.history.detail.tools", {
|
|
58185
58224
|
summary: toolCallSummary(turn.toolCalls.map((call) => call.name))
|
|
58186
58225
|
}));
|
|
58187
58226
|
for (const call of turn.toolCalls)
|
|
@@ -58190,7 +58229,7 @@ function turnDetailLines(turn) {
|
|
|
58190
58229
|
return lines;
|
|
58191
58230
|
}
|
|
58192
58231
|
function historyFailureText(prefix, error) {
|
|
58193
|
-
return
|
|
58232
|
+
return t("panel.history.failure", {
|
|
58194
58233
|
op: prefix,
|
|
58195
58234
|
error: String(error instanceof Error ? error.message : error).slice(0, 150)
|
|
58196
58235
|
});
|
|
@@ -58228,12 +58267,12 @@ function HistoryPanel(props) {
|
|
|
58228
58267
|
const token = ++loadSequence;
|
|
58229
58268
|
if (!sessionId) {
|
|
58230
58269
|
setTurns([]);
|
|
58231
|
-
setStatus(
|
|
58270
|
+
setStatus(t("panel.history.status.noSession"));
|
|
58232
58271
|
return;
|
|
58233
58272
|
}
|
|
58234
58273
|
if (!props.seam.sessionJournal) {
|
|
58235
58274
|
setTurns([]);
|
|
58236
|
-
setStatus(
|
|
58275
|
+
setStatus(t("panel.history.status.noJournal"));
|
|
58237
58276
|
return;
|
|
58238
58277
|
}
|
|
58239
58278
|
setTurns([]);
|
|
@@ -58248,7 +58287,7 @@ function HistoryPanel(props) {
|
|
|
58248
58287
|
setTurns(folded);
|
|
58249
58288
|
setCursor(0);
|
|
58250
58289
|
if (folded.length === 0)
|
|
58251
|
-
setStatus(
|
|
58290
|
+
setStatus(t("panel.history.status.noTurns", {
|
|
58252
58291
|
id: sessionId.slice(0, 8)
|
|
58253
58292
|
}));
|
|
58254
58293
|
} catch (error) {
|
|
@@ -58256,7 +58295,7 @@ function HistoryPanel(props) {
|
|
|
58256
58295
|
return;
|
|
58257
58296
|
setTurns([]);
|
|
58258
58297
|
setCursor(0);
|
|
58259
|
-
setStatus(historyFailureText(
|
|
58298
|
+
setStatus(historyFailureText(t("panel.history.op.load"), error));
|
|
58260
58299
|
} finally {
|
|
58261
58300
|
if (token === loadSequence)
|
|
58262
58301
|
setBusy(false);
|
|
@@ -58289,7 +58328,7 @@ function HistoryPanel(props) {
|
|
|
58289
58328
|
setOpen(true);
|
|
58290
58329
|
handle = panels.open(() => renderBrowser(), {
|
|
58291
58330
|
id: `history-${++sequence}`,
|
|
58292
|
-
title:
|
|
58331
|
+
title: t("panel.history.title.history"),
|
|
58293
58332
|
size: "xlarge",
|
|
58294
58333
|
onClose: () => {
|
|
58295
58334
|
handle = undefined;
|
|
@@ -58320,17 +58359,17 @@ function HistoryPanel(props) {
|
|
|
58320
58359
|
setSessionCursor(0);
|
|
58321
58360
|
setShowSessions(rows.length > 0);
|
|
58322
58361
|
if (rows.length === 0) {
|
|
58323
|
-
setStatus(
|
|
58362
|
+
setStatus(t("panel.history.status.noSessions"));
|
|
58324
58363
|
return;
|
|
58325
58364
|
}
|
|
58326
58365
|
panels.open(() => renderSessions(), {
|
|
58327
58366
|
id: `history-sessions-${++sequence}`,
|
|
58328
|
-
title:
|
|
58367
|
+
title: t("panel.history.title.switch"),
|
|
58329
58368
|
size: "xlarge",
|
|
58330
58369
|
onClose: () => setShowSessions(false)
|
|
58331
58370
|
});
|
|
58332
58371
|
} catch (error) {
|
|
58333
|
-
setStatus(historyFailureText(
|
|
58372
|
+
setStatus(historyFailureText(t("panel.history.op.sessionList"), error));
|
|
58334
58373
|
}
|
|
58335
58374
|
})();
|
|
58336
58375
|
}
|
|
@@ -58349,7 +58388,7 @@ function HistoryPanel(props) {
|
|
|
58349
58388
|
const turn = current();
|
|
58350
58389
|
const id = browsingId();
|
|
58351
58390
|
if (!props.seam.forkSession) {
|
|
58352
|
-
setStatus(
|
|
58391
|
+
setStatus(t("panel.history.status.forkUnavailable"));
|
|
58353
58392
|
return;
|
|
58354
58393
|
}
|
|
58355
58394
|
if (!turn || !id)
|
|
@@ -58359,7 +58398,7 @@ function HistoryPanel(props) {
|
|
|
58359
58398
|
props.onForked?.(forkedId, turn.turn);
|
|
58360
58399
|
close();
|
|
58361
58400
|
}).catch((error) => {
|
|
58362
|
-
setStatus(historyFailureText(
|
|
58401
|
+
setStatus(historyFailureText(t("panel.history.op.fork"), error));
|
|
58363
58402
|
}).finally(() => setBusy(false));
|
|
58364
58403
|
}
|
|
58365
58404
|
Keymap2.createLayer(() => {
|
|
@@ -58370,27 +58409,27 @@ function HistoryPanel(props) {
|
|
|
58370
58409
|
priority: 2,
|
|
58371
58410
|
commands: [{
|
|
58372
58411
|
bind: "up,k",
|
|
58373
|
-
title:
|
|
58412
|
+
title: t("panel.history.keymap.previousTurn"),
|
|
58374
58413
|
group: "History",
|
|
58375
58414
|
run: () => moveCursor(-1)
|
|
58376
58415
|
}, {
|
|
58377
58416
|
bind: "down,j",
|
|
58378
|
-
title:
|
|
58417
|
+
title: t("panel.history.keymap.nextTurn"),
|
|
58379
58418
|
group: "History",
|
|
58380
58419
|
run: () => moveCursor(1)
|
|
58381
58420
|
}, {
|
|
58382
58421
|
bind: "return,c",
|
|
58383
|
-
title: showSessions() ?
|
|
58422
|
+
title: showSessions() ? t("panel.history.keymap.pickSession") : t("panel.history.keymap.refill"),
|
|
58384
58423
|
group: "History",
|
|
58385
58424
|
run: () => showSessions() ? pickSession(sessionCursor()) : refill()
|
|
58386
58425
|
}, {
|
|
58387
58426
|
bind: "s",
|
|
58388
|
-
title:
|
|
58427
|
+
title: t("panel.history.keymap.switchSession"),
|
|
58389
58428
|
group: "History",
|
|
58390
58429
|
run: openSessions
|
|
58391
58430
|
}, {
|
|
58392
58431
|
bind: "f",
|
|
58393
|
-
title:
|
|
58432
|
+
title: t("panel.history.keymap.fork"),
|
|
58394
58433
|
group: "History",
|
|
58395
58434
|
run: fork
|
|
58396
58435
|
}]
|
|
@@ -58402,17 +58441,17 @@ function HistoryPanel(props) {
|
|
|
58402
58441
|
priority: 3,
|
|
58403
58442
|
commands: [{
|
|
58404
58443
|
bind: "up,k",
|
|
58405
|
-
title:
|
|
58444
|
+
title: t("panel.history.keymap.previousSession"),
|
|
58406
58445
|
group: "History",
|
|
58407
58446
|
run: () => setSessionCursor((index) => turnCursorStep(index, -1, sessions().length))
|
|
58408
58447
|
}, {
|
|
58409
58448
|
bind: "down,j",
|
|
58410
|
-
title:
|
|
58449
|
+
title: t("panel.history.keymap.nextSession"),
|
|
58411
58450
|
group: "History",
|
|
58412
58451
|
run: () => setSessionCursor((index) => turnCursorStep(index, 1, sessions().length))
|
|
58413
58452
|
}, {
|
|
58414
58453
|
bind: "return,c",
|
|
58415
|
-
title:
|
|
58454
|
+
title: t("panel.history.keymap.browse"),
|
|
58416
58455
|
group: "History",
|
|
58417
58456
|
run: () => pickSession(sessionCursor())
|
|
58418
58457
|
}]
|
|
@@ -58443,7 +58482,7 @@ function HistoryPanel(props) {
|
|
|
58443
58482
|
setProp(_el$8, "wrapMode", "none");
|
|
58444
58483
|
insert(_el$8, (() => {
|
|
58445
58484
|
var _c$ = memo2(() => !!busy());
|
|
58446
|
-
return () => _c$() ?
|
|
58485
|
+
return () => _c$() ? t("panel.history.busy.loading") : status() ?? t("panel.history.empty.noTurns");
|
|
58447
58486
|
})());
|
|
58448
58487
|
return _el$8;
|
|
58449
58488
|
})();
|
|
@@ -58531,7 +58570,7 @@ function HistoryPanel(props) {
|
|
|
58531
58570
|
}), null);
|
|
58532
58571
|
insert(_el$, createComponent2(PanelActions, {
|
|
58533
58572
|
get hint() {
|
|
58534
|
-
return
|
|
58573
|
+
return t("panel.history.hint.browser");
|
|
58535
58574
|
}
|
|
58536
58575
|
}), null);
|
|
58537
58576
|
return _el$;
|
|
@@ -58566,7 +58605,7 @@ function HistoryPanel(props) {
|
|
|
58566
58605
|
}), null);
|
|
58567
58606
|
insert(_el$11, createComponent2(PanelActions, {
|
|
58568
58607
|
get hint() {
|
|
58569
|
-
return
|
|
58608
|
+
return t("panel.history.hint.sessions");
|
|
58570
58609
|
}
|
|
58571
58610
|
}), null);
|
|
58572
58611
|
return _el$11;
|
|
@@ -58615,7 +58654,7 @@ function viewerRowText(view, roundCap, elapsedText) {
|
|
|
58615
58654
|
const cap = roundCap !== undefined && roundCap > 0 ? `/${roundCap}` : "";
|
|
58616
58655
|
const elapsed = elapsedText !== undefined && elapsedText !== "" ? ` \xB7 ${elapsedText}` : "";
|
|
58617
58656
|
const model = view.model !== undefined ? ` \xB7 ${view.model}` : "";
|
|
58618
|
-
const rounds =
|
|
58657
|
+
const rounds = t("panel.subagents.row.rounds", {
|
|
58619
58658
|
count: String(view.rounds)
|
|
58620
58659
|
});
|
|
58621
58660
|
return `${glyph} ${label} \xB7 ${rounds}${cap}${elapsed}${model}${suffix ? ` ${suffix.trim()}` : ""}`;
|
|
@@ -58650,14 +58689,14 @@ function transcriptWindow(lineCount, offset, visible) {
|
|
|
58650
58689
|
}
|
|
58651
58690
|
function steerEchoText(sent, label) {
|
|
58652
58691
|
const agent = titlecase(label);
|
|
58653
|
-
return sent ?
|
|
58692
|
+
return sent ? t("panel.subagents.echo.steered", {
|
|
58654
58693
|
name: agent.toLowerCase()
|
|
58655
|
-
}) :
|
|
58694
|
+
}) : t("panel.subagents.echo.rejected", {
|
|
58656
58695
|
name: agent
|
|
58657
58696
|
});
|
|
58658
58697
|
}
|
|
58659
58698
|
function stopAllSummary(stopped) {
|
|
58660
|
-
return stopped === 1 ?
|
|
58699
|
+
return stopped === 1 ? t("panel.subagents.stopAll.one") : t("panel.subagents.stopAll.many", {
|
|
58661
58700
|
count: String(stopped)
|
|
58662
58701
|
});
|
|
58663
58702
|
}
|
|
@@ -58715,13 +58754,13 @@ function SubagentsViewer(props) {
|
|
|
58715
58754
|
function stopAll() {
|
|
58716
58755
|
const seam = props.seam;
|
|
58717
58756
|
if (seam.interruptChild === undefined) {
|
|
58718
|
-
flash(
|
|
58757
|
+
flash(t("panel.subagents.status.stopUnavailable"));
|
|
58719
58758
|
return;
|
|
58720
58759
|
}
|
|
58721
58760
|
const targets = views().filter((view) => view.status === "running");
|
|
58722
58761
|
if (targets.length === 0) {
|
|
58723
58762
|
stopAllLatch = false;
|
|
58724
|
-
flash(
|
|
58763
|
+
flash(t("panel.subagents.status.noneRunning"));
|
|
58725
58764
|
return;
|
|
58726
58765
|
}
|
|
58727
58766
|
if (stopAllLatch) {
|
|
@@ -58731,7 +58770,7 @@ function SubagentsViewer(props) {
|
|
|
58731
58770
|
stopAllLatch = true;
|
|
58732
58771
|
for (const target of targets) {
|
|
58733
58772
|
seam.interruptChild(target.id).catch((error) => {
|
|
58734
|
-
flash(
|
|
58773
|
+
flash(t("panel.subagents.status.stopFailed", {
|
|
58735
58774
|
error: String(error instanceof Error ? error.message : error).slice(0, 120)
|
|
58736
58775
|
}));
|
|
58737
58776
|
});
|
|
@@ -58774,7 +58813,7 @@ function SubagentsViewer(props) {
|
|
|
58774
58813
|
setStatus(undefined);
|
|
58775
58814
|
transcriptHandle = panels.open(() => renderTranscript(), {
|
|
58776
58815
|
id: `subagents-transcript-${++sequence}`,
|
|
58777
|
-
title:
|
|
58816
|
+
title: t("panel.subagents.title.transcript"),
|
|
58778
58817
|
size: "xlarge",
|
|
58779
58818
|
onClose: () => {
|
|
58780
58819
|
transcriptHandle = undefined;
|
|
@@ -58789,22 +58828,22 @@ function SubagentsViewer(props) {
|
|
|
58789
58828
|
if (view === undefined || id === undefined)
|
|
58790
58829
|
return;
|
|
58791
58830
|
if (view.status !== "running") {
|
|
58792
|
-
flash(
|
|
58831
|
+
flash(t("panel.subagents.status.steerEnded"));
|
|
58793
58832
|
return;
|
|
58794
58833
|
}
|
|
58795
58834
|
if (props.seam.steerChild === undefined) {
|
|
58796
|
-
flash(
|
|
58835
|
+
flash(t("panel.subagents.status.steerUnavailable"));
|
|
58797
58836
|
return;
|
|
58798
58837
|
}
|
|
58799
58838
|
const agent = titlecase(view.label);
|
|
58800
58839
|
dialog.replace(() => createComponent2(DialogPrompt, {
|
|
58801
58840
|
get title() {
|
|
58802
|
-
return
|
|
58841
|
+
return t("panel.subagents.dialog.steerTitle", {
|
|
58803
58842
|
name: agent
|
|
58804
58843
|
});
|
|
58805
58844
|
},
|
|
58806
58845
|
get placeholder() {
|
|
58807
|
-
return
|
|
58846
|
+
return t("panel.subagents.dialog.steerPlaceholder");
|
|
58808
58847
|
},
|
|
58809
58848
|
onConfirm: (value) => {
|
|
58810
58849
|
const text = value.trim();
|
|
@@ -58825,23 +58864,23 @@ function SubagentsViewer(props) {
|
|
|
58825
58864
|
const now = Date.now();
|
|
58826
58865
|
if (!doublePressArmed(lastXPress, now)) {
|
|
58827
58866
|
lastXPress = now;
|
|
58828
|
-
flash(
|
|
58867
|
+
flash(t("panel.subagents.status.pressX"));
|
|
58829
58868
|
return;
|
|
58830
58869
|
}
|
|
58831
58870
|
lastXPress = 0;
|
|
58832
58871
|
if (view.status !== "running") {
|
|
58833
|
-
flash(
|
|
58872
|
+
flash(t("panel.subagents.status.nothingToStop"));
|
|
58834
58873
|
return;
|
|
58835
58874
|
}
|
|
58836
58875
|
const face = props.seam.interruptChild;
|
|
58837
58876
|
if (face === undefined) {
|
|
58838
|
-
flash(
|
|
58877
|
+
flash(t("panel.subagents.status.stopUnavailable"));
|
|
58839
58878
|
return;
|
|
58840
58879
|
}
|
|
58841
|
-
face(id).then(() => flash(
|
|
58880
|
+
face(id).then(() => flash(t("panel.subagents.status.stopRequested", {
|
|
58842
58881
|
name: titlecase(view.label)
|
|
58843
58882
|
}))).catch((error) => {
|
|
58844
|
-
flash(
|
|
58883
|
+
flash(t("panel.subagents.status.stopFailed", {
|
|
58845
58884
|
error: String(error instanceof Error ? error.message : error).slice(0, 120)
|
|
58846
58885
|
}));
|
|
58847
58886
|
});
|
|
@@ -58867,7 +58906,7 @@ function SubagentsViewer(props) {
|
|
|
58867
58906
|
setOpen(true);
|
|
58868
58907
|
handle = panels.open(() => renderList(), {
|
|
58869
58908
|
id: `subagents-${++sequence}`,
|
|
58870
|
-
title:
|
|
58909
|
+
title: t("panel.subagents.title.list"),
|
|
58871
58910
|
size: "xlarge",
|
|
58872
58911
|
onClose: () => {
|
|
58873
58912
|
handle = undefined;
|
|
@@ -58884,17 +58923,17 @@ function SubagentsViewer(props) {
|
|
|
58884
58923
|
priority: 2,
|
|
58885
58924
|
commands: [{
|
|
58886
58925
|
bind: "up,k",
|
|
58887
|
-
title:
|
|
58926
|
+
title: t("panel.subagents.keymap.previous"),
|
|
58888
58927
|
group: "Subagents",
|
|
58889
58928
|
run: () => moveCursor(-1)
|
|
58890
58929
|
}, {
|
|
58891
58930
|
bind: "down,j",
|
|
58892
|
-
title:
|
|
58931
|
+
title: t("panel.subagents.keymap.next"),
|
|
58893
58932
|
group: "Subagents",
|
|
58894
58933
|
run: () => moveCursor(1)
|
|
58895
58934
|
}, {
|
|
58896
58935
|
bind: "return",
|
|
58897
|
-
title:
|
|
58936
|
+
title: t("panel.subagents.keymap.openTranscript"),
|
|
58898
58937
|
group: "Subagents",
|
|
58899
58938
|
run: () => {
|
|
58900
58939
|
const row = rows()[cursor()];
|
|
@@ -58904,7 +58943,7 @@ function SubagentsViewer(props) {
|
|
|
58904
58943
|
}
|
|
58905
58944
|
}, {
|
|
58906
58945
|
bind: "s",
|
|
58907
|
-
title:
|
|
58946
|
+
title: t("panel.subagents.keymap.sort"),
|
|
58908
58947
|
group: "Subagents",
|
|
58909
58948
|
run: () => {
|
|
58910
58949
|
setSortByRounds((value) => !value);
|
|
@@ -58912,7 +58951,7 @@ function SubagentsViewer(props) {
|
|
|
58912
58951
|
}
|
|
58913
58952
|
}, {
|
|
58914
58953
|
bind: "shift+k",
|
|
58915
|
-
title:
|
|
58954
|
+
title: t("panel.subagents.keymap.stopAll"),
|
|
58916
58955
|
group: "Subagents",
|
|
58917
58956
|
run: stopAll
|
|
58918
58957
|
}]
|
|
@@ -58926,22 +58965,22 @@ function SubagentsViewer(props) {
|
|
|
58926
58965
|
priority: 2,
|
|
58927
58966
|
commands: [{
|
|
58928
58967
|
bind: "up,k",
|
|
58929
|
-
title:
|
|
58968
|
+
title: t("panel.subagents.keymap.scrollUp"),
|
|
58930
58969
|
group: "Subagents",
|
|
58931
58970
|
run: () => scrollBy(-1)
|
|
58932
58971
|
}, {
|
|
58933
58972
|
bind: "down,j",
|
|
58934
|
-
title:
|
|
58973
|
+
title: t("panel.subagents.keymap.scrollDown"),
|
|
58935
58974
|
group: "Subagents",
|
|
58936
58975
|
run: () => scrollBy(1)
|
|
58937
58976
|
}, {
|
|
58938
58977
|
bind: "return",
|
|
58939
|
-
title:
|
|
58978
|
+
title: t("panel.subagents.keymap.steer"),
|
|
58940
58979
|
group: "Subagents",
|
|
58941
58980
|
run: openSteer
|
|
58942
58981
|
}, {
|
|
58943
58982
|
bind: "x",
|
|
58944
|
-
title:
|
|
58983
|
+
title: t("panel.subagents.keymap.stopTwice"),
|
|
58945
58984
|
group: "Subagents",
|
|
58946
58985
|
run: stopChild
|
|
58947
58986
|
}]
|
|
@@ -58955,10 +58994,10 @@ function SubagentsViewer(props) {
|
|
|
58955
58994
|
const bodyWidth = 110;
|
|
58956
58995
|
function headerText(view, now) {
|
|
58957
58996
|
if (view === undefined)
|
|
58958
|
-
return
|
|
58959
|
-
const status = view.status === "running" ?
|
|
58997
|
+
return t("panel.subagents.header.fallback");
|
|
58998
|
+
const status = view.status === "running" ? t("panel.subagents.status.running") : view.status === "completed" ? t("panel.subagents.status.completed") : view.status === "failed" ? t("panel.subagents.status.failed") : t("panel.subagents.status.cancelled");
|
|
58960
58999
|
const elapsed = rowElapsedText(view, now);
|
|
58961
|
-
const rounds =
|
|
59000
|
+
const rounds = t("panel.subagents.row.rounds", {
|
|
58962
59001
|
count: String(view.rounds)
|
|
58963
59002
|
});
|
|
58964
59003
|
const parts = [`${titlecase(view.label)} \xB7 ${status} \xB7 ${rounds}`];
|
|
@@ -58988,7 +59027,7 @@ function SubagentsViewer(props) {
|
|
|
58988
59027
|
var _el$3 = createElement("text");
|
|
58989
59028
|
setProp(_el$3, "fg", muted);
|
|
58990
59029
|
setProp(_el$3, "wrapMode", "none");
|
|
58991
|
-
insert(_el$3, () =>
|
|
59030
|
+
insert(_el$3, () => t("panel.subagents.empty.none"));
|
|
58992
59031
|
return _el$3;
|
|
58993
59032
|
})();
|
|
58994
59033
|
},
|
|
@@ -59028,7 +59067,7 @@ function SubagentsViewer(props) {
|
|
|
59028
59067
|
}), null);
|
|
59029
59068
|
insert(_el$, createComponent2(PanelActions, {
|
|
59030
59069
|
get hint() {
|
|
59031
|
-
return memo2(() => !!sortByRounds())() ?
|
|
59070
|
+
return memo2(() => !!sortByRounds())() ? t("panel.subagents.hint.listSorted") : t("panel.subagents.hint.list");
|
|
59032
59071
|
}
|
|
59033
59072
|
}), null);
|
|
59034
59073
|
return _el$;
|
|
@@ -59060,7 +59099,7 @@ function SubagentsViewer(props) {
|
|
|
59060
59099
|
var _el$1 = createElement("text");
|
|
59061
59100
|
setProp(_el$1, "fg", muted);
|
|
59062
59101
|
setProp(_el$1, "wrapMode", "none");
|
|
59063
|
-
insert(_el$1, () =>
|
|
59102
|
+
insert(_el$1, () => t("panel.subagents.transcript.unavailable"));
|
|
59064
59103
|
return _el$1;
|
|
59065
59104
|
})();
|
|
59066
59105
|
},
|
|
@@ -59074,7 +59113,7 @@ function SubagentsViewer(props) {
|
|
|
59074
59113
|
var _el$10 = createElement("text");
|
|
59075
59114
|
setProp(_el$10, "fg", muted);
|
|
59076
59115
|
setProp(_el$10, "wrapMode", "none");
|
|
59077
|
-
insert(_el$10, () =>
|
|
59116
|
+
insert(_el$10, () => t("panel.subagents.transcript.empty"));
|
|
59078
59117
|
return _el$10;
|
|
59079
59118
|
})();
|
|
59080
59119
|
},
|
|
@@ -59104,7 +59143,7 @@ function SubagentsViewer(props) {
|
|
|
59104
59143
|
setProp(_el$8, "flexShrink", 0);
|
|
59105
59144
|
setProp(_el$9, "fg", muted);
|
|
59106
59145
|
setProp(_el$9, "wrapMode", "none");
|
|
59107
|
-
insert(_el$9, () => `${win.start + 1}-${win.end}/${lines.length}${win.follow ?
|
|
59146
|
+
insert(_el$9, () => `${win.start + 1}-${win.end}/${lines.length}${win.follow ? t("panel.subagents.transcript.following") : t("panel.subagents.transcript.detached")}`);
|
|
59108
59147
|
return _el$8;
|
|
59109
59148
|
}
|
|
59110
59149
|
})];
|
|
@@ -59127,7 +59166,7 @@ function SubagentsViewer(props) {
|
|
|
59127
59166
|
}), null);
|
|
59128
59167
|
insert(_el$6, createComponent2(PanelActions, {
|
|
59129
59168
|
get hint() {
|
|
59130
|
-
return
|
|
59169
|
+
return t("panel.subagents.hint.transcript");
|
|
59131
59170
|
}
|
|
59132
59171
|
}), null);
|
|
59133
59172
|
return _el$6;
|
|
@@ -59167,13 +59206,13 @@ var init_subagents_viewer = __esm(() => {
|
|
|
59167
59206
|
import { TextAttributes as TextAttributes12 } from "@opentui/core";
|
|
59168
59207
|
function resolveVersion() {
|
|
59169
59208
|
try {
|
|
59170
|
-
return "0.
|
|
59209
|
+
return "0.16.0";
|
|
59171
59210
|
} catch {
|
|
59172
59211
|
return "dev";
|
|
59173
59212
|
}
|
|
59174
59213
|
}
|
|
59175
59214
|
function settingsSectionLabel(id) {
|
|
59176
|
-
return
|
|
59215
|
+
return t(`settings.section.${id}`);
|
|
59177
59216
|
}
|
|
59178
59217
|
function fromItem(item) {
|
|
59179
59218
|
const row = {
|
|
@@ -59229,15 +59268,15 @@ function buildGeneralRows(ctx) {
|
|
|
59229
59268
|
const sessionLog = hostRows.find((row) => row.id === "session-log-deepseek.enabled");
|
|
59230
59269
|
const permissionRow = permission === undefined ? {
|
|
59231
59270
|
id: "general.permission",
|
|
59232
|
-
label:
|
|
59271
|
+
label: t("settings.row.permissionPreset"),
|
|
59233
59272
|
value: "n/a",
|
|
59234
59273
|
kind: "readonly",
|
|
59235
59274
|
editable: false,
|
|
59236
|
-
note:
|
|
59275
|
+
note: t("settings.note.notInHostBaseline")
|
|
59237
59276
|
} : {
|
|
59238
59277
|
...fromItem(permission),
|
|
59239
59278
|
id: "general.permission",
|
|
59240
|
-
label:
|
|
59279
|
+
label: t("settings.row.permissionPreset"),
|
|
59241
59280
|
...permission.editable && (permission.options?.length ?? 0) > 0 ? {} : {
|
|
59242
59281
|
kind: "readonly",
|
|
59243
59282
|
editable: false
|
|
@@ -59245,72 +59284,72 @@ function buildGeneralRows(ctx) {
|
|
|
59245
59284
|
};
|
|
59246
59285
|
const sessionLogRow = sessionLog === undefined ? {
|
|
59247
59286
|
id: "general.session-log",
|
|
59248
|
-
label:
|
|
59287
|
+
label: t("settings.row.sessionLogUpload"),
|
|
59249
59288
|
value: "n/a",
|
|
59250
59289
|
kind: "readonly",
|
|
59251
59290
|
editable: false,
|
|
59252
|
-
note:
|
|
59291
|
+
note: t("settings.note.notInHostBaseline")
|
|
59253
59292
|
} : {
|
|
59254
59293
|
...fromItem(sessionLog),
|
|
59255
59294
|
id: "general.session-log",
|
|
59256
|
-
label:
|
|
59295
|
+
label: t("settings.row.sessionLogUpload")
|
|
59257
59296
|
};
|
|
59258
59297
|
return [permissionRow, {
|
|
59259
59298
|
id: "general.language",
|
|
59260
|
-
label:
|
|
59299
|
+
label: t("settings.row.language"),
|
|
59261
59300
|
value: hintsLocaleFromConfig(ctx.merged.lang) ?? hintsLocaleFromConfig(ctx.merged.hintsLocale) ?? "en",
|
|
59262
59301
|
kind: "enum",
|
|
59263
59302
|
options: LANGUAGE_CHOICES,
|
|
59264
59303
|
editable: ctx.local,
|
|
59265
|
-
note:
|
|
59304
|
+
note: t("settings.row.languageNote"),
|
|
59266
59305
|
write: {
|
|
59267
59306
|
via: "config",
|
|
59268
59307
|
key: "lang"
|
|
59269
59308
|
}
|
|
59270
59309
|
}, {
|
|
59271
59310
|
id: "general.appearance",
|
|
59272
|
-
label:
|
|
59311
|
+
label: t("settings.row.appearance"),
|
|
59273
59312
|
value: typeof ctx.profile.themeMode === "string" ? ctx.profile.themeMode : "auto",
|
|
59274
59313
|
kind: "enum",
|
|
59275
59314
|
options: ["auto", "dark", "light"],
|
|
59276
59315
|
editable: ctx.local,
|
|
59277
|
-
note:
|
|
59316
|
+
note: t("settings.row.appearanceNote"),
|
|
59278
59317
|
write: {
|
|
59279
59318
|
via: "config",
|
|
59280
59319
|
key: "themeMode"
|
|
59281
59320
|
}
|
|
59282
|
-
}, readonlyRow("general.font-size",
|
|
59321
|
+
}, readonlyRow("general.font-size", t("settings.row.fontSize"), "N/A", t("settings.row.fontSizeNote")), {
|
|
59283
59322
|
id: "general.transcript-view",
|
|
59284
|
-
label:
|
|
59323
|
+
label: t("settings.row.workingSteps"),
|
|
59285
59324
|
value: "N/A",
|
|
59286
59325
|
kind: "submenu",
|
|
59287
59326
|
editable: false,
|
|
59288
|
-
note:
|
|
59327
|
+
note: t("settings.row.workingStepsNote"),
|
|
59289
59328
|
detail: [{
|
|
59290
59329
|
id: "general.transcript-view.display",
|
|
59291
|
-
label:
|
|
59330
|
+
label: t("settings.row.stepsDisplay"),
|
|
59292
59331
|
value: "N/A",
|
|
59293
59332
|
kind: "note",
|
|
59294
59333
|
editable: false,
|
|
59295
|
-
note:
|
|
59334
|
+
note: t("settings.row.stepsDisplayNote")
|
|
59296
59335
|
}, {
|
|
59297
59336
|
id: "general.transcript-view.collapse",
|
|
59298
|
-
label:
|
|
59337
|
+
label: t("settings.row.stepsCollapse"),
|
|
59299
59338
|
value: "N/A",
|
|
59300
59339
|
kind: "note",
|
|
59301
59340
|
editable: false,
|
|
59302
|
-
note:
|
|
59341
|
+
note: t("settings.row.stepsCollapseNote")
|
|
59303
59342
|
}, {
|
|
59304
59343
|
id: "general.transcript-view.folded",
|
|
59305
|
-
label:
|
|
59344
|
+
label: t("settings.row.stepsFolded"),
|
|
59306
59345
|
value: "N/A",
|
|
59307
59346
|
kind: "note",
|
|
59308
59347
|
editable: false,
|
|
59309
|
-
note:
|
|
59348
|
+
note: t("settings.row.stepsFoldedNote")
|
|
59310
59349
|
}]
|
|
59311
|
-
}, naRow("general.developer-tools",
|
|
59350
|
+
}, naRow("general.developer-tools", t("settings.row.developerTools"), t("settings.row.developerToolsNote")), readonlyRow("general.shortcuts", t("settings.row.shortcuts"), t("settings.value.readOnly"), t("settings.row.shortcutsNote")), naRow("general.link-opening", t("settings.row.linkOpening"), t("settings.row.linkOpeningNote")), readonlyRow("general.composer-enter", t("settings.row.busyEnter"), t("settings.value.busyEnter"), t("settings.row.busyEnterNote")), naRow("general.performance-usage", t("settings.row.performanceUsage"), t("settings.row.performanceUsageNote")), sessionLogRow, {
|
|
59312
59351
|
id: "general.current-version",
|
|
59313
|
-
label:
|
|
59352
|
+
label: t("settings.row.currentVersion"),
|
|
59314
59353
|
value: ctx.version ?? resolveVersion(),
|
|
59315
59354
|
kind: "readonly",
|
|
59316
59355
|
editable: false
|
|
@@ -59341,34 +59380,34 @@ function settingsCommandSpec(id) {
|
|
|
59341
59380
|
case "models":
|
|
59342
59381
|
return {
|
|
59343
59382
|
command: "/model",
|
|
59344
|
-
label:
|
|
59383
|
+
label: t("settings.jump.open", {
|
|
59345
59384
|
command: "/model"
|
|
59346
59385
|
}),
|
|
59347
|
-
note:
|
|
59386
|
+
note: t("settings.jump.modelsNote")
|
|
59348
59387
|
};
|
|
59349
59388
|
case "plugins":
|
|
59350
59389
|
return {
|
|
59351
59390
|
command: "/plugins",
|
|
59352
|
-
label:
|
|
59391
|
+
label: t("settings.jump.open", {
|
|
59353
59392
|
command: "/plugins"
|
|
59354
59393
|
}),
|
|
59355
|
-
note:
|
|
59394
|
+
note: t("settings.jump.pluginsNote")
|
|
59356
59395
|
};
|
|
59357
59396
|
case "presets":
|
|
59358
59397
|
return {
|
|
59359
59398
|
command: "/preset",
|
|
59360
|
-
label:
|
|
59399
|
+
label: t("settings.jump.open", {
|
|
59361
59400
|
command: "/preset"
|
|
59362
59401
|
}),
|
|
59363
|
-
note:
|
|
59402
|
+
note: t("settings.jump.presetsNote")
|
|
59364
59403
|
};
|
|
59365
59404
|
case "account":
|
|
59366
59405
|
return {
|
|
59367
59406
|
command: "/login",
|
|
59368
|
-
label:
|
|
59407
|
+
label: t("settings.jump.open", {
|
|
59369
59408
|
command: "/login"
|
|
59370
59409
|
}),
|
|
59371
|
-
note:
|
|
59410
|
+
note: t("settings.jump.accountNote")
|
|
59372
59411
|
};
|
|
59373
59412
|
default:
|
|
59374
59413
|
return;
|
|
@@ -59410,7 +59449,7 @@ async function writeSetting(row, value, deps) {
|
|
|
59410
59449
|
if (row.detail !== undefined) {
|
|
59411
59450
|
return {
|
|
59412
59451
|
ok: false,
|
|
59413
|
-
error:
|
|
59452
|
+
error: t("settings.error.notEditable", {
|
|
59414
59453
|
label: row.label
|
|
59415
59454
|
})
|
|
59416
59455
|
};
|
|
@@ -59418,7 +59457,7 @@ async function writeSetting(row, value, deps) {
|
|
|
59418
59457
|
if (!row.editable || row.write === undefined) {
|
|
59419
59458
|
return {
|
|
59420
59459
|
ok: false,
|
|
59421
|
-
error:
|
|
59460
|
+
error: t("settings.error.notEditable", {
|
|
59422
59461
|
label: row.label
|
|
59423
59462
|
})
|
|
59424
59463
|
};
|
|
@@ -59427,7 +59466,7 @@ async function writeSetting(row, value, deps) {
|
|
|
59427
59466
|
if (!deps.local)
|
|
59428
59467
|
return {
|
|
59429
59468
|
ok: false,
|
|
59430
|
-
error:
|
|
59469
|
+
error: t("settings.error.localNotWritable")
|
|
59431
59470
|
};
|
|
59432
59471
|
const hints = footerHintsFromConfig(deps.merged.footerHints) ?? DEFAULT_FOOTER_HINTS;
|
|
59433
59472
|
const plan = planLocalWrite(row, value, hints);
|
|
@@ -59441,7 +59480,7 @@ async function writeSetting(row, value, deps) {
|
|
|
59441
59480
|
} catch (error) {
|
|
59442
59481
|
return {
|
|
59443
59482
|
ok: false,
|
|
59444
|
-
error:
|
|
59483
|
+
error: t("settings.error.writeFailed", {
|
|
59445
59484
|
detail: error instanceof Error ? error.message : String(error)
|
|
59446
59485
|
})
|
|
59447
59486
|
};
|
|
@@ -59456,7 +59495,7 @@ async function writeSetting(row, value, deps) {
|
|
|
59456
59495
|
if (!deps.host)
|
|
59457
59496
|
return {
|
|
59458
59497
|
ok: false,
|
|
59459
|
-
error:
|
|
59498
|
+
error: t("settings.error.hostNotWritable")
|
|
59460
59499
|
};
|
|
59461
59500
|
const plan = planHostWrite(row, value);
|
|
59462
59501
|
if (!plan.ok)
|
|
@@ -59468,7 +59507,7 @@ async function writeSetting(row, value, deps) {
|
|
|
59468
59507
|
if (face === undefined)
|
|
59469
59508
|
return {
|
|
59470
59509
|
ok: false,
|
|
59471
|
-
error:
|
|
59510
|
+
error: t("settings.error.hostFaceUnavailable")
|
|
59472
59511
|
};
|
|
59473
59512
|
let document = deps.document;
|
|
59474
59513
|
let refreshFailed = false;
|
|
@@ -59483,7 +59522,7 @@ async function writeSetting(row, value, deps) {
|
|
|
59483
59522
|
if (outcome.document !== undefined)
|
|
59484
59523
|
document = outcome.document;
|
|
59485
59524
|
if (!outcome.result.ok) {
|
|
59486
|
-
const message = outcome.result.conflict ? outcome.attempts === 1 ?
|
|
59525
|
+
const message = outcome.result.conflict ? outcome.attempts === 1 ? t("settings.error.conflictNoRevision") : t("settings.error.conflictStill") : `\u2718 ${outcome.result.error}`;
|
|
59487
59526
|
return {
|
|
59488
59527
|
ok: false,
|
|
59489
59528
|
error: message,
|
|
@@ -59497,7 +59536,7 @@ async function writeSetting(row, value, deps) {
|
|
|
59497
59536
|
} catch (error) {
|
|
59498
59537
|
return {
|
|
59499
59538
|
ok: false,
|
|
59500
|
-
error:
|
|
59539
|
+
error: t("settings.error.writeFailed", {
|
|
59501
59540
|
detail: error instanceof Error ? error.message : String(error)
|
|
59502
59541
|
})
|
|
59503
59542
|
};
|
|
@@ -59600,7 +59639,7 @@ function SettingsModalBody(props) {
|
|
|
59600
59639
|
const savedLabels = [];
|
|
59601
59640
|
let statusTimer;
|
|
59602
59641
|
function flashSaved(label) {
|
|
59603
|
-
setStatus(
|
|
59642
|
+
setStatus(t("settings.status.saved", {
|
|
59604
59643
|
label
|
|
59605
59644
|
}));
|
|
59606
59645
|
if (statusTimer !== undefined)
|
|
@@ -59674,7 +59713,7 @@ function SettingsModalBody(props) {
|
|
|
59674
59713
|
}
|
|
59675
59714
|
if (row.kind === "toggle") {
|
|
59676
59715
|
if (!row.editable) {
|
|
59677
|
-
setStatus(row.note ??
|
|
59716
|
+
setStatus(row.note ?? t("settings.status.rowReadOnly"));
|
|
59678
59717
|
return;
|
|
59679
59718
|
}
|
|
59680
59719
|
applyRowValue(row, row.value !== "on");
|
|
@@ -59687,7 +59726,7 @@ function SettingsModalBody(props) {
|
|
|
59687
59726
|
return;
|
|
59688
59727
|
}
|
|
59689
59728
|
if (!row.editable) {
|
|
59690
|
-
setStatus(row.note ??
|
|
59729
|
+
setStatus(row.note ?? t("settings.status.rowReadOnly"));
|
|
59691
59730
|
return;
|
|
59692
59731
|
}
|
|
59693
59732
|
setEditorRow(row);
|
|
@@ -59721,7 +59760,7 @@ function SettingsModalBody(props) {
|
|
|
59721
59760
|
if (result.document !== undefined)
|
|
59722
59761
|
setDocument(result.document);
|
|
59723
59762
|
if (!result.ok) {
|
|
59724
|
-
setError(result.error ??
|
|
59763
|
+
setError(result.error ?? t("settings.error.writeFailedShort"));
|
|
59725
59764
|
return false;
|
|
59726
59765
|
}
|
|
59727
59766
|
reloadLocal();
|
|
@@ -59732,7 +59771,7 @@ function SettingsModalBody(props) {
|
|
|
59732
59771
|
}));
|
|
59733
59772
|
reloadHost();
|
|
59734
59773
|
if (result.refreshFailed === true) {
|
|
59735
|
-
setError(
|
|
59774
|
+
setError(t("settings.status.refreshFailed"));
|
|
59736
59775
|
return true;
|
|
59737
59776
|
}
|
|
59738
59777
|
savedLabels.push(row.label);
|
|
@@ -59801,10 +59840,10 @@ function SettingsModalBody(props) {
|
|
|
59801
59840
|
confirmingExit = true;
|
|
59802
59841
|
try {
|
|
59803
59842
|
const exit = await panels.confirm({
|
|
59804
|
-
title:
|
|
59805
|
-
message:
|
|
59806
|
-
confirmLabel:
|
|
59807
|
-
cancelLabel:
|
|
59843
|
+
title: t("settings.exit.title"),
|
|
59844
|
+
message: t("settings.exit.message"),
|
|
59845
|
+
confirmLabel: t("settings.exit.confirm"),
|
|
59846
|
+
cancelLabel: t("settings.exit.cancel"),
|
|
59808
59847
|
destructive: true
|
|
59809
59848
|
});
|
|
59810
59849
|
if (exit)
|
|
@@ -60088,7 +60127,7 @@ function SettingsModalBody(props) {
|
|
|
60088
60127
|
}
|
|
60089
60128
|
}), (() => {
|
|
60090
60129
|
var _el$9 = createElement("text");
|
|
60091
|
-
insert(_el$9, () => `${pane() === "nav" ?
|
|
60130
|
+
insert(_el$9, () => `${pane() === "nav" ? t("settings.hint.navSections") : t("settings.hint.rows")}${pageIndicator()}`);
|
|
60092
60131
|
effect((_$p) => setProp(_el$9, "fg", role(theme().text.muted), _$p));
|
|
60093
60132
|
return _el$9;
|
|
60094
60133
|
})()];
|
|
@@ -60150,9 +60189,9 @@ function SettingsModalBody(props) {
|
|
|
60150
60189
|
setProp(_el$1, "border", ["left", "right"]);
|
|
60151
60190
|
setProp(_el$1, "borderStyle", "single");
|
|
60152
60191
|
setProp(_el$10, "wrapMode", "none");
|
|
60153
|
-
insert(_el$10, () =>
|
|
60192
|
+
insert(_el$10, () => t("settings.hint.escBack"));
|
|
60154
60193
|
setProp(_el$11, "wrapMode", "none");
|
|
60155
|
-
insert(_el$11, () => error() ?? status() ??
|
|
60194
|
+
insert(_el$11, () => error() ?? status() ?? t("settings.status.instantSave"));
|
|
60156
60195
|
effect((_p$) => {
|
|
60157
60196
|
var _v$7 = chrome().divider, _v$8 = theme().text.muted, _v$9 = theme().attributes.keyHint, _v$0 = role(error() !== undefined ? theme().text.danger : theme().text.system), _v$1 = theme().attributes.keyHint;
|
|
60158
60197
|
_v$7 !== _p$.e && (_p$.e = setProp(_el$1, "borderColor", _v$7, _p$.e));
|
|
@@ -60200,9 +60239,9 @@ function EditorView(props) {
|
|
|
60200
60239
|
insertNode(_el$12, _el$21);
|
|
60201
60240
|
setProp(_el$12, "flexDirection", "column");
|
|
60202
60241
|
setProp(_el$12, "flexGrow", 1);
|
|
60203
|
-
insert(_el$13, () =>
|
|
60242
|
+
insert(_el$13, () => t("settings.editor.title", {
|
|
60204
60243
|
label: props.row.label,
|
|
60205
|
-
action: props.row.kind === "number" ?
|
|
60244
|
+
action: props.row.kind === "number" ? t("settings.input.enterInteger") : props.row.kind === "enum" ? t("settings.editor.pick") : t("settings.editor.view")
|
|
60206
60245
|
}));
|
|
60207
60246
|
insert(_el$12, createComponent2(Show, {
|
|
60208
60247
|
get when() {
|
|
@@ -60274,7 +60313,7 @@ function EditorView(props) {
|
|
|
60274
60313
|
},
|
|
60275
60314
|
get children() {
|
|
60276
60315
|
var _el$28 = createElement("text");
|
|
60277
|
-
insert(_el$28, () =>
|
|
60316
|
+
insert(_el$28, () => t("settings.options.current"));
|
|
60278
60317
|
effect((_$p) => setProp(_el$28, "fg", role(theme().text.system), _$p));
|
|
60279
60318
|
return _el$28;
|
|
60280
60319
|
}
|
|
@@ -60317,7 +60356,7 @@ function EditorView(props) {
|
|
|
60317
60356
|
setProp(_el$17, "flexDirection", "row");
|
|
60318
60357
|
insert(_el$18, (() => {
|
|
60319
60358
|
var _c$ = memo2(() => props.row.kind === "number");
|
|
60320
|
-
return () => _c$() ?
|
|
60359
|
+
return () => _c$() ? t("settings.editor.numberValue") : t("settings.editor.textValue");
|
|
60321
60360
|
})());
|
|
60322
60361
|
insert(_el$19, () => props.value);
|
|
60323
60362
|
use((renderable) => {
|
|
@@ -60346,7 +60385,7 @@ function EditorView(props) {
|
|
|
60346
60385
|
}), _el$21);
|
|
60347
60386
|
insert(_el$21, (() => {
|
|
60348
60387
|
var _c$2 = memo2(() => props.row.kind === "enum");
|
|
60349
|
-
return () => _c$2() ?
|
|
60388
|
+
return () => _c$2() ? t("settings.editor.footerEnum") : t("settings.editor.footerInput");
|
|
60350
60389
|
})());
|
|
60351
60390
|
effect((_p$) => {
|
|
60352
60391
|
var _v$13 = role(theme().text.heading), _v$14 = role(theme().text.faint);
|
|
@@ -60396,7 +60435,7 @@ function SettingsModalHost(props) {
|
|
|
60396
60435
|
})), {
|
|
60397
60436
|
id: "settings-modal",
|
|
60398
60437
|
title: "Settings",
|
|
60399
|
-
subtitle:
|
|
60438
|
+
subtitle: t("settings.modal.subtitle"),
|
|
60400
60439
|
size: "xlarge",
|
|
60401
60440
|
rows: settingsPanelRows(dimensions().height),
|
|
60402
60441
|
layered: true,
|
|
@@ -60558,7 +60597,7 @@ function BtwPanel(props) {
|
|
|
60558
60597
|
setProp(_el$, "flexDirection", "column");
|
|
60559
60598
|
setProp(_el$, "gap", 1);
|
|
60560
60599
|
setProp(_el$, "paddingBottom", 1);
|
|
60561
|
-
insert(_el$2, () =>
|
|
60600
|
+
insert(_el$2, () => t("overlay.btw.heading"));
|
|
60562
60601
|
insert(_el$, createComponent2(Show, {
|
|
60563
60602
|
get when() {
|
|
60564
60603
|
return shown();
|
|
@@ -60566,7 +60605,7 @@ function BtwPanel(props) {
|
|
|
60566
60605
|
get fallback() {
|
|
60567
60606
|
return (() => {
|
|
60568
60607
|
var _el$4 = createElement("text");
|
|
60569
|
-
insert(_el$4, () =>
|
|
60608
|
+
insert(_el$4, () => t("overlay.btw.empty"));
|
|
60570
60609
|
effect((_$p) => setProp(_el$4, "fg", muted(), _$p));
|
|
60571
60610
|
return _el$4;
|
|
60572
60611
|
})();
|
|
@@ -60591,7 +60630,7 @@ function BtwPanel(props) {
|
|
|
60591
60630
|
},
|
|
60592
60631
|
get children() {
|
|
60593
60632
|
var _el$6 = createElement("text");
|
|
60594
|
-
insert(_el$6, () =>
|
|
60633
|
+
insert(_el$6, () => t("overlay.btw.thinking"));
|
|
60595
60634
|
effect((_$p) => setProp(_el$6, "fg", muted(), _$p));
|
|
60596
60635
|
return _el$6;
|
|
60597
60636
|
}
|
|
@@ -60600,13 +60639,13 @@ function BtwPanel(props) {
|
|
|
60600
60639
|
insert(_el$3, () => {
|
|
60601
60640
|
const queued = props.controller.queueDepth();
|
|
60602
60641
|
if (shown()?.status === "streaming") {
|
|
60603
|
-
return queued > 0 ?
|
|
60642
|
+
return queued > 0 ? t("overlay.btw.hint.streamingQueued", {
|
|
60604
60643
|
count: String(queued)
|
|
60605
|
-
}) :
|
|
60644
|
+
}) : t("overlay.btw.hint.streaming");
|
|
60606
60645
|
}
|
|
60607
|
-
return queued > 0 ?
|
|
60646
|
+
return queued > 0 ? t("overlay.btw.hint.settledQueued", {
|
|
60608
60647
|
count: String(queued)
|
|
60609
|
-
}) :
|
|
60648
|
+
}) : t("overlay.btw.hint.settled");
|
|
60610
60649
|
});
|
|
60611
60650
|
effect((_p$) => {
|
|
60612
60651
|
var _v$ = accent(), _v$2 = muted();
|
|
@@ -60647,7 +60686,7 @@ function createBtwOpener(deps) {
|
|
|
60647
60686
|
deps.dialog.replace(() => createComponent2(DialogPrompt, {
|
|
60648
60687
|
title: "/btw",
|
|
60649
60688
|
get placeholder() {
|
|
60650
|
-
return
|
|
60689
|
+
return t("overlay.btw.promptPlaceholder");
|
|
60651
60690
|
},
|
|
60652
60691
|
onConfirm: (text) => {
|
|
60653
60692
|
const outcome = deps.controller.submit(text);
|
|
@@ -61101,6 +61140,41 @@ var init_status_bar = __esm(() => {
|
|
|
61101
61140
|
});
|
|
61102
61141
|
});
|
|
61103
61142
|
|
|
61143
|
+
// ../../node_modules/.pnpm/@opentui+solid@0.8.1_solid-js@1.9.17_typescript@5.9.3_web-tree-sitter@0.25.10/node_modules/@opentui/solid/jsx-runtime.js
|
|
61144
|
+
function normalizeProps(props) {
|
|
61145
|
+
if (!props) {
|
|
61146
|
+
return {};
|
|
61147
|
+
}
|
|
61148
|
+
if (!("key" in props)) {
|
|
61149
|
+
return props;
|
|
61150
|
+
}
|
|
61151
|
+
const { key: _key, ...rest } = props;
|
|
61152
|
+
return rest;
|
|
61153
|
+
}
|
|
61154
|
+
function createIntrinsicElement(type, props) {
|
|
61155
|
+
const element = createElement(type);
|
|
61156
|
+
spread(element, props);
|
|
61157
|
+
return element;
|
|
61158
|
+
}
|
|
61159
|
+
function jsx(type, props = {}) {
|
|
61160
|
+
const normalizedProps = normalizeProps(props);
|
|
61161
|
+
if (typeof type === "function") {
|
|
61162
|
+
return createComponent2(type, normalizedProps);
|
|
61163
|
+
}
|
|
61164
|
+
return createIntrinsicElement(type, normalizedProps);
|
|
61165
|
+
}
|
|
61166
|
+
function jsxDEV(type, props = {}) {
|
|
61167
|
+
return jsx(type, props);
|
|
61168
|
+
}
|
|
61169
|
+
var init_jsx_runtime = __esm(() => {
|
|
61170
|
+
init_index_bun();
|
|
61171
|
+
});
|
|
61172
|
+
|
|
61173
|
+
// ../../node_modules/.pnpm/@opentui+solid@0.8.1_solid-js@1.9.17_typescript@5.9.3_web-tree-sitter@0.25.10/node_modules/@opentui/solid/jsx-dev-runtime.js
|
|
61174
|
+
var init_jsx_dev_runtime = __esm(() => {
|
|
61175
|
+
init_jsx_runtime();
|
|
61176
|
+
});
|
|
61177
|
+
|
|
61104
61178
|
// src/client/session-seam-adapter.ts
|
|
61105
61179
|
var exports_session_seam_adapter = {};
|
|
61106
61180
|
__export(exports_session_seam_adapter, {
|
|
@@ -61692,6 +61766,27 @@ function V2SessionPage(props) {
|
|
|
61692
61766
|
done.finally(() => setTurnBusy(false));
|
|
61693
61767
|
return done;
|
|
61694
61768
|
};
|
|
61769
|
+
const confirmStopAll = () => {
|
|
61770
|
+
const runningChildren = (seam.subagentViews?.() ?? []).filter((view) => view.status === "running").length;
|
|
61771
|
+
const parts = [
|
|
61772
|
+
...turnBusy() || composerBusy() ? [t("turn.stop.confirmMain")] : [],
|
|
61773
|
+
...runningChildren === 1 ? [t("turn.stop.confirmChildrenOne")] : runningChildren > 0 ? [t("turn.stop.confirmChildrenMany", { count: String(runningChildren) })] : []
|
|
61774
|
+
];
|
|
61775
|
+
dialog.replace(() => /* @__PURE__ */ jsxDEV(DialogConfirm, {
|
|
61776
|
+
title: t("turn.stop.confirmTitle"),
|
|
61777
|
+
message: t("turn.stop.confirmMessage", { parts: parts.join(", ") }),
|
|
61778
|
+
label: { confirm: t("turn.stop.confirmLabel"), cancel: t("turn.stop.cancelLabel") },
|
|
61779
|
+
onConfirm: () => {
|
|
61780
|
+
turnAborted = true;
|
|
61781
|
+
seam.interrupt();
|
|
61782
|
+
for (const view of seam.subagentViews?.() ?? []) {
|
|
61783
|
+
if (view.status !== "running")
|
|
61784
|
+
continue;
|
|
61785
|
+
seam.interruptChild?.(view.id).catch(() => {});
|
|
61786
|
+
}
|
|
61787
|
+
}
|
|
61788
|
+
}, undefined, false, undefined, this), undefined, { tone: "warning" });
|
|
61789
|
+
};
|
|
61695
61790
|
const cacheRate = () => {
|
|
61696
61791
|
turnBusy();
|
|
61697
61792
|
const mode = readCacheHitMode(seam.configLoad?.());
|
|
@@ -61821,7 +61916,7 @@ function V2SessionPage(props) {
|
|
|
61821
61916
|
...actions && actions.length > 0 ? { actions } : {},
|
|
61822
61917
|
...extras ? { preserveSelection: true } : {},
|
|
61823
61918
|
current: currentValue,
|
|
61824
|
-
focusCurrent:
|
|
61919
|
+
focusCurrent: extras?.focusCurrent === true,
|
|
61825
61920
|
onSelect: (option) => done(option.value),
|
|
61826
61921
|
onCancel: () => done(undefined)
|
|
61827
61922
|
}), () => done(undefined));
|
|
@@ -62146,6 +62241,9 @@ function V2SessionPage(props) {
|
|
|
62146
62241
|
turnAborted = true;
|
|
62147
62242
|
seam.interrupt();
|
|
62148
62243
|
},
|
|
62244
|
+
confirmStop: () => {
|
|
62245
|
+
confirmStopAll();
|
|
62246
|
+
},
|
|
62149
62247
|
quit: props.quit,
|
|
62150
62248
|
enabled: () => dialog.stack.length === 0,
|
|
62151
62249
|
escapeYields: () => slash.controller.open
|
|
@@ -62376,7 +62474,8 @@ var init_v2_entry = __esm(() => {
|
|
|
62376
62474
|
init_lastrequest_dock();
|
|
62377
62475
|
init_notices_dock();
|
|
62378
62476
|
init_hints_line();
|
|
62379
|
-
|
|
62477
|
+
init_src();
|
|
62478
|
+
init_i18n();
|
|
62380
62479
|
init_search_overlay();
|
|
62381
62480
|
init_transcript_scroll();
|
|
62382
62481
|
init_pane_focus();
|
|
@@ -62398,6 +62497,7 @@ var init_v2_entry = __esm(() => {
|
|
|
62398
62497
|
init_btw_overlay();
|
|
62399
62498
|
init_dialog_select();
|
|
62400
62499
|
init_dialog_prompt();
|
|
62500
|
+
init_dialog_confirm();
|
|
62401
62501
|
init_dialog();
|
|
62402
62502
|
init_toast();
|
|
62403
62503
|
init_clipboard();
|
|
@@ -62411,6 +62511,7 @@ var init_v2_entry = __esm(() => {
|
|
|
62411
62511
|
init_motion();
|
|
62412
62512
|
init_powerline();
|
|
62413
62513
|
init_status_bar();
|
|
62514
|
+
init_jsx_dev_runtime();
|
|
62414
62515
|
SHELL = "../../" + "shell/src/client/";
|
|
62415
62516
|
overlays = new TurnOverlayController;
|
|
62416
62517
|
if (false) {}
|