pantheon-opencode 2.0.0-rc.1 → 2.0.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/AGENTS.global.md +2 -2
- package/AGENTS.md +8 -8
- package/CHANGELOG.md +54 -0
- package/README.md +2 -0
- package/README.pt-BR.md +2 -0
- package/bin/pantheon-init.mjs +13 -0
- package/commands/pantheon-audit.md +1 -1
- package/commands/pantheon-deepwork.md +1 -1
- package/commands/pantheon-optimize.md +41 -63
- package/package.json +4 -3
- package/plugin.json +1 -1
- package/prompts/optimize-database.prompt.md +5 -5
- package/prompts/plan-architecture.prompt.md +6 -6
- package/pyproject.toml +1 -1
- package/scripts/build-agents-md.mjs +10 -10
- package/scripts/build-plugin.mjs +26 -0
- package/scripts/install/opencode-version.mjs +17 -5
- package/scripts/install/opencode.mjs +8 -1
- package/scripts/optimize.mjs +322 -0
- package/scripts/prune.mjs +105 -14
- package/scripts/update.mjs +20 -15
- package/skills-lock.json +11 -11
- package/src/agents/aphrodite.md +15 -14
- package/src/agents/apollo.md +2 -1
- package/src/agents/athena.md +5 -5
- package/src/agents/demeter.md +2 -0
- package/src/agents/hephaestus.md +1 -0
- package/src/agents/hermes.md +19 -95
- package/src/agents/iris.md +3 -0
- package/src/agents/nyx.md +1 -0
- package/src/agents/prometheus.md +2 -0
- package/src/agents/talos.md +3 -0
- package/src/agents/themis.md +91 -87
- package/src/agents/zeus.md +41 -266
- package/src/instructions/agent-return-format.instructions.md +1 -1
- package/src/instructions/memory-protocol.instructions.md +1 -1
- package/src/instructions/zeus-anti-stall.instructions.md +3 -3
- package/src/instructions/zeus-communication-rules.instructions.md +1 -1
- package/src/instructions/zeus-council-synthesis.instructions.md +2 -2
- package/src/instructions/zeus-timeout-retry.instructions.md +10 -10
- package/src/pantheon/model-command.ts +12 -12
- package/src/pantheon/tools.ts +4 -0
- package/src/pantheon/tui-version-check.ts +1 -1
- package/src/pantheon/update-notifier.ts +13 -8
- package/src/pantheon/vision.ts +20 -20
- package/src/plugin/index.js +14594 -0
- package/src/plugins/tui/dist/tui.d.ts +3 -3
- package/src/plugins/tui/dist/tui.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui.js +923 -340
- package/src/plugins/tui/dist/tui.js.map +1 -1
- package/src/plugins/tui/package-lock.json +2 -2
- package/src/plugins/tui/package.json +1 -1
- package/src/plugins/tui/src/autonomy-state.ts +27 -15
- package/src/plugins/tui/src/index.tsx +44 -23
- package/src/plugins/tui/src/pantheon-settings.tsx +461 -105
- package/src/plugins/tui/src/tui-prefs.ts +106 -4
- package/src/plugins/tui/src/update-notice.ts +9 -6
- package/src/plugins/tui/src/whats-new-open.ts +4 -4
- package/src/plugins/tui/src/whats-new.tsx +119 -17
- package/src/skills/agent-coordination/SKILL.md +6 -6
- package/src/skills/artifact-management/SKILL.md +43 -39
- package/src/skills/artifact-management/references/artifact-templates.md +103 -48
- package/src/skills/auto-continue/references/auto-continue-details.md +13 -13
- package/src/skills/code-review-checklist/SKILL.md +6 -6
- package/src/skills/incremental-implementation/SKILL.md +13 -13
- package/src/skills/memory-bank/references/anti-patterns.md +3 -3
- package/src/skills/spec-driven-development/SKILL.md +12 -14
- package/src/skills/tdd-with-agents/SKILL.md +6 -5
- package/src/skills/visual-review-pipeline/SKILL.md +1 -1
- package/src/skills/visual-review-pipeline/references/workflow-steps.md +1 -1
|
@@ -119,6 +119,19 @@ const DEFAULT_GOAL_LOOP_PREFS = {
|
|
|
119
119
|
maxContinuations: 25
|
|
120
120
|
};
|
|
121
121
|
const GOAL_LOOP_ENABLED_CYCLE = Object.freeze(["enabled", "disabled"]);
|
|
122
|
+
const MAX_CONTINUATIONS_CYCLE = Object.freeze([
|
|
123
|
+
"10",
|
|
124
|
+
"25",
|
|
125
|
+
"50",
|
|
126
|
+
"100",
|
|
127
|
+
"200"
|
|
128
|
+
]);
|
|
129
|
+
const COOLDOWN_MS_CYCLE = Object.freeze([
|
|
130
|
+
"1000",
|
|
131
|
+
"2000",
|
|
132
|
+
"5000",
|
|
133
|
+
"10000"
|
|
134
|
+
]);
|
|
122
135
|
const DEFAULT_DECISION_BUDGETS = {
|
|
123
136
|
monthlyUsd: 5,
|
|
124
137
|
perDecisionUsd: .1
|
|
@@ -157,65 +170,67 @@ function buildAutonomyTab(input) {
|
|
|
157
170
|
title: "Autonomy",
|
|
158
171
|
groups: [
|
|
159
172
|
{
|
|
160
|
-
title: "Goal loop (
|
|
173
|
+
title: "Goal loop (multi-turn session auto-continuation)",
|
|
161
174
|
rows: [
|
|
162
175
|
{
|
|
163
176
|
id: "autonomy.goal_loop.enabled",
|
|
164
177
|
name: "Goal loop",
|
|
165
178
|
value: input.goalLoop.enabled ? "enabled" : "disabled",
|
|
166
179
|
cycle: GOAL_LOOP_ENABLED_CYCLE,
|
|
167
|
-
note: "
|
|
180
|
+
note: "auto-continues multi-turn tasks when session goes idle" + (input.goalLoopRestartPending ? " · [!] restart required to apply" : " · applies after OpenCode restart")
|
|
168
181
|
},
|
|
169
182
|
{
|
|
170
183
|
id: "autonomy.goal_loop.maxContinuations",
|
|
171
184
|
name: "Max continuations",
|
|
172
185
|
value: String(input.goalLoop.maxContinuations),
|
|
173
|
-
|
|
186
|
+
cycle: MAX_CONTINUATIONS_CYCLE,
|
|
187
|
+
note: "1..200 — safety ceiling to prevent runaway tasks"
|
|
174
188
|
},
|
|
175
189
|
{
|
|
176
190
|
id: "autonomy.goal_loop.cooldownMs",
|
|
177
191
|
name: "Cooldown (ms)",
|
|
178
192
|
value: String(input.goalLoop.cooldownMs),
|
|
179
|
-
|
|
193
|
+
cycle: COOLDOWN_MS_CYCLE,
|
|
194
|
+
note: "delay between autonomous turns (min 1000ms)"
|
|
180
195
|
}
|
|
181
196
|
]
|
|
182
197
|
},
|
|
183
198
|
{
|
|
184
|
-
title: "Decision budgets (applies live)",
|
|
199
|
+
title: "Decision budgets (applies live per gated call)",
|
|
185
200
|
rows: [{
|
|
186
201
|
id: "autonomy.budget.monthly",
|
|
187
202
|
name: "Monthly cap",
|
|
188
203
|
value: formatUsd(input.budgets.monthlyUsd),
|
|
189
204
|
cycle: MONTHLY_USD_CYCLE,
|
|
190
|
-
note: "
|
|
205
|
+
note: "monthly USD ceiling for gated arbitrator decisions"
|
|
191
206
|
}, {
|
|
192
207
|
id: "autonomy.budget.perDecision",
|
|
193
208
|
name: "Per-decision cap",
|
|
194
209
|
value: formatUsd(input.budgets.perDecisionUsd),
|
|
195
210
|
cycle: PER_DECISION_USD_CYCLE,
|
|
196
|
-
note: "
|
|
211
|
+
note: "price cap — gated decisions above this are refused"
|
|
197
212
|
}]
|
|
198
213
|
},
|
|
199
214
|
{
|
|
200
|
-
title: "Decision gradient (
|
|
215
|
+
title: "Decision gradient (reference policy · J1 owns the risk axis)",
|
|
201
216
|
rows: [
|
|
202
217
|
{
|
|
203
218
|
id: "autonomy.gradient.solo",
|
|
204
219
|
name: "Decide solo",
|
|
205
|
-
value: "
|
|
206
|
-
note: "edits, routine fixes
|
|
220
|
+
value: "autonomous",
|
|
221
|
+
note: "reversible & low-risk edits, routine fixes (no gate)"
|
|
207
222
|
},
|
|
208
223
|
{
|
|
209
224
|
id: "autonomy.gradient.jev",
|
|
210
225
|
name: "Jev decides",
|
|
211
|
-
value: "
|
|
212
|
-
note: "
|
|
226
|
+
value: "arbitrated",
|
|
227
|
+
note: "typed ambiguity & candidate ranking (budget-capped)"
|
|
213
228
|
},
|
|
214
229
|
{
|
|
215
230
|
id: "autonomy.gradient.human",
|
|
216
231
|
name: "Human decides",
|
|
217
|
-
value: "
|
|
218
|
-
note: "
|
|
232
|
+
value: "human review",
|
|
233
|
+
note: "high-risk & destructive operations (J1 gate)"
|
|
219
234
|
}
|
|
220
235
|
]
|
|
221
236
|
}
|
|
@@ -657,6 +672,9 @@ const EMPTY_TAB = {
|
|
|
657
672
|
function tabRows(tab) {
|
|
658
673
|
return tab.groups.flatMap((group) => group.rows);
|
|
659
674
|
}
|
|
675
|
+
function findRow(tab, id) {
|
|
676
|
+
return tabRows(tab).find((row) => row.id === id);
|
|
677
|
+
}
|
|
660
678
|
/** Step through the cycle with wrap-around; non-cyclable rows return the input. */
|
|
661
679
|
function cycleValue(value, cycle, direction) {
|
|
662
680
|
if (cycle.length === 0) return value;
|
|
@@ -839,19 +857,21 @@ function buildChangelogTab(version, items = []) {
|
|
|
839
857
|
}]
|
|
840
858
|
};
|
|
841
859
|
}
|
|
842
|
-
/** Semver-ish compare for X.Y.Z[-beta.N];
|
|
860
|
+
/** Semver-ish compare for X.Y.Z[-(beta|rc).N]; prereleases sort before their release. */
|
|
843
861
|
function comparePantheonVersions(left, right) {
|
|
844
862
|
const parse = (version) => {
|
|
845
|
-
const match = String(version).trim().match(/^(\d+)\.(\d+)\.(\d+)(?:-beta\.(\d+))?$/);
|
|
863
|
+
const match = String(version).trim().match(/^(\d+)\.(\d+)\.(\d+)(?:-(beta|rc)\.(\d+))?$/);
|
|
846
864
|
if (!match) return null;
|
|
847
|
-
const [, major = "", minor = "", patch = "",
|
|
865
|
+
const [, major = "", minor = "", patch = "", stage = "", stageNum = ""] = match;
|
|
866
|
+
const stageRank = stage === "beta" ? 1 : stage === "rc" ? 2 : 3;
|
|
848
867
|
return {
|
|
849
868
|
core: [
|
|
850
869
|
+major,
|
|
851
870
|
+minor,
|
|
852
871
|
+patch
|
|
853
872
|
],
|
|
854
|
-
|
|
873
|
+
stageRank,
|
|
874
|
+
stageNum: stage !== "" ? +stageNum : Number.POSITIVE_INFINITY
|
|
855
875
|
};
|
|
856
876
|
};
|
|
857
877
|
const a = parse(left);
|
|
@@ -862,14 +882,15 @@ function comparePantheonVersions(left, right) {
|
|
|
862
882
|
if (aMajor !== bMajor) return aMajor - bMajor;
|
|
863
883
|
if (aMinor !== bMinor) return aMinor - bMinor;
|
|
864
884
|
if (aPatch !== bPatch) return aPatch - bPatch;
|
|
865
|
-
return a.
|
|
885
|
+
if (a.stageRank !== b.stageRank) return a.stageRank - b.stageRank;
|
|
886
|
+
return a.stageNum - b.stageNum;
|
|
866
887
|
}
|
|
867
888
|
function pickUpdateNotice(input) {
|
|
868
889
|
const { currentVersion, latestVersion, state = {}, nowMs = Date.now() } = input;
|
|
869
890
|
const ttlMs = input.ttlMs ?? 216e5;
|
|
870
891
|
if (nowMs - (state.lastCheckMs ?? 0) < ttlMs) return null;
|
|
871
892
|
if (state.lastNotifiedVersion === latestVersion) return null;
|
|
872
|
-
const stable = (version) => !/-beta\.\d+$/.test(version);
|
|
893
|
+
const stable = (version) => !/-(?:beta|rc)\.\d+$/.test(version);
|
|
873
894
|
if (stable(currentVersion) && !stable(latestVersion)) return null;
|
|
874
895
|
if (comparePantheonVersions(latestVersion, currentVersion) <= 0) return null;
|
|
875
896
|
return {
|
|
@@ -1193,9 +1214,30 @@ function buildPresetTab(input) {
|
|
|
1193
1214
|
//#endregion
|
|
1194
1215
|
//#region src/tui-prefs.ts
|
|
1195
1216
|
const PREFS_SYMBOL = Symbol.for("pantheon.tui.prefs.v1");
|
|
1217
|
+
const DRAFT_PREVIEW_SYMBOL = Symbol.for("pantheon.tui.draft_preview.v1");
|
|
1196
1218
|
function stash() {
|
|
1197
1219
|
return globalThis[PREFS_SYMBOL];
|
|
1198
1220
|
}
|
|
1221
|
+
function getDraftPreviewSignal() {
|
|
1222
|
+
const g = globalThis;
|
|
1223
|
+
if (!g[DRAFT_PREVIEW_SYMBOL]) g[DRAFT_PREVIEW_SYMBOL] = createSignal(void 0);
|
|
1224
|
+
return g[DRAFT_PREVIEW_SYMBOL];
|
|
1225
|
+
}
|
|
1226
|
+
/** Set the active draft preview overlay (used by settings window to provide live preview). */
|
|
1227
|
+
function setTuiDraftPreview(draft) {
|
|
1228
|
+
const [, setDraft] = getDraftPreviewSignal();
|
|
1229
|
+
setDraft(draft && Object.keys(draft).length > 0 ? { ...draft } : void 0);
|
|
1230
|
+
}
|
|
1231
|
+
/** Clear the active draft preview overlay. */
|
|
1232
|
+
function clearTuiDraftPreview() {
|
|
1233
|
+
const [, setDraft] = getDraftPreviewSignal();
|
|
1234
|
+
setDraft(void 0);
|
|
1235
|
+
}
|
|
1236
|
+
/** The active draft preview accessor. */
|
|
1237
|
+
function tuiDraftPreview() {
|
|
1238
|
+
const [draft] = getDraftPreviewSignal();
|
|
1239
|
+
return draft();
|
|
1240
|
+
}
|
|
1199
1241
|
/** Create (or reuse) the durable prefs store. Fail-open: without host
|
|
1200
1242
|
* storage the consumers fall back to DEFAULT_TUI_PREFS (read-only). */
|
|
1201
1243
|
function initTuiPrefs(context) {
|
|
@@ -1210,8 +1252,31 @@ function initTuiPrefs(context) {
|
|
|
1210
1252
|
}
|
|
1211
1253
|
} catch {}
|
|
1212
1254
|
}
|
|
1213
|
-
/**
|
|
1214
|
-
function
|
|
1255
|
+
/** Deep clone and overlay staged settings draft onto base TuiPrefs. */
|
|
1256
|
+
function previewTuiPrefs(base, draft) {
|
|
1257
|
+
if (!draft || Object.keys(draft).length === 0) return base;
|
|
1258
|
+
let hasTui = false;
|
|
1259
|
+
for (const k of Object.keys(draft)) if (k.startsWith("tui.")) {
|
|
1260
|
+
hasTui = true;
|
|
1261
|
+
break;
|
|
1262
|
+
}
|
|
1263
|
+
if (!hasTui) return base;
|
|
1264
|
+
const normalized = normalizeTuiPrefs(base);
|
|
1265
|
+
const effective = {
|
|
1266
|
+
version: 1,
|
|
1267
|
+
layout: { ...normalized.layout },
|
|
1268
|
+
sidebar: {
|
|
1269
|
+
header: { ...normalized.sidebar.header },
|
|
1270
|
+
blocks: { ...normalized.sidebar.blocks },
|
|
1271
|
+
context: { ...normalized.sidebar.context }
|
|
1272
|
+
},
|
|
1273
|
+
footer: { ...normalized.footer }
|
|
1274
|
+
};
|
|
1275
|
+
for (const [id, value] of Object.entries(draft)) if (id.startsWith("tui.")) applyTuiRow(effective, id, value);
|
|
1276
|
+
return effective;
|
|
1277
|
+
}
|
|
1278
|
+
/** The raw persisted prefs from host storage (no draft overlay). */
|
|
1279
|
+
function savedTuiPrefs() {
|
|
1215
1280
|
const s = stash()?.[0];
|
|
1216
1281
|
if (!s) return DEFAULT_TUI_PREFS;
|
|
1217
1282
|
if (!s.layout) return {
|
|
@@ -1220,6 +1285,15 @@ function tuiPrefs() {
|
|
|
1220
1285
|
};
|
|
1221
1286
|
return s;
|
|
1222
1287
|
}
|
|
1288
|
+
/** The live reactive prefs (read properties inside memos/JSX — tracked).
|
|
1289
|
+
* When a settings window has an active draft, preview overlays on top
|
|
1290
|
+
* of durable storage in real time. */
|
|
1291
|
+
function tuiPrefs() {
|
|
1292
|
+
const base = savedTuiPrefs();
|
|
1293
|
+
const preview = tuiDraftPreview();
|
|
1294
|
+
if (!preview) return base;
|
|
1295
|
+
return previewTuiPrefs(base, preview);
|
|
1296
|
+
}
|
|
1223
1297
|
/** Stage a mutation against the durable store; resolves when persisted. */
|
|
1224
1298
|
function mutateTuiPrefs(mutation) {
|
|
1225
1299
|
const handle = stash();
|
|
@@ -1254,11 +1328,17 @@ const SEPARATOR_STYLES_CYCLE = Object.freeze([
|
|
|
1254
1328
|
"dots",
|
|
1255
1329
|
"slashes"
|
|
1256
1330
|
]);
|
|
1331
|
+
const SETTINGS_VIEW_MODES = Object.freeze([
|
|
1332
|
+
"docked",
|
|
1333
|
+
"fullscreen",
|
|
1334
|
+
"dialog"
|
|
1335
|
+
]);
|
|
1257
1336
|
const DEFAULT_TUI_PREFS = {
|
|
1258
1337
|
version: 1,
|
|
1259
1338
|
layout: {
|
|
1260
1339
|
preset: "comfortable",
|
|
1261
|
-
separator: "spaces"
|
|
1340
|
+
separator: "spaces",
|
|
1341
|
+
settingsView: "fullscreen"
|
|
1262
1342
|
},
|
|
1263
1343
|
sidebar: {
|
|
1264
1344
|
header: {
|
|
@@ -1289,6 +1369,62 @@ const DEFAULT_TUI_PREFS = {
|
|
|
1289
1369
|
home: true
|
|
1290
1370
|
}
|
|
1291
1371
|
};
|
|
1372
|
+
function asBool(value, fallback) {
|
|
1373
|
+
return typeof value === "boolean" ? value : fallback;
|
|
1374
|
+
}
|
|
1375
|
+
/** Deep-merge stored JSON over the defaults; unknown keys and junk are ignored. */
|
|
1376
|
+
function normalizeTuiPrefs(raw) {
|
|
1377
|
+
const stored = typeof raw === "object" && raw !== null ? raw : {};
|
|
1378
|
+
const layout = typeof stored.layout === "object" && stored.layout !== null ? stored.layout : {};
|
|
1379
|
+
const sidebar = typeof stored.sidebar === "object" && stored.sidebar !== null ? stored.sidebar : {};
|
|
1380
|
+
const header = typeof sidebar.header === "object" && sidebar.header !== null ? sidebar.header : {};
|
|
1381
|
+
const blocks = typeof sidebar.blocks === "object" && sidebar.blocks !== null ? sidebar.blocks : {};
|
|
1382
|
+
const context = typeof sidebar.context === "object" && sidebar.context !== null ? sidebar.context : {};
|
|
1383
|
+
const footer = typeof stored.footer === "object" && stored.footer !== null ? stored.footer : {};
|
|
1384
|
+
const preset = LAYOUT_PRESETS_CYCLE.includes(layout.preset) ? layout.preset : DEFAULT_TUI_PREFS.layout.preset;
|
|
1385
|
+
const separator = SEPARATOR_STYLES_CYCLE.includes(layout.separator) ? layout.separator : DEFAULT_TUI_PREFS.layout.separator;
|
|
1386
|
+
const settingsView = SETTINGS_VIEW_MODES.includes(layout.settingsView) ? layout.settingsView : DEFAULT_TUI_PREFS.layout.settingsView;
|
|
1387
|
+
const gauge = GAUGE_STYLES.includes(context.gauge) ? context.gauge : DEFAULT_TUI_PREFS.sidebar.context.gauge;
|
|
1388
|
+
const barShape = BAR_SHAPES_CYCLE.includes(context.barShape) ? context.barShape : DEFAULT_TUI_PREFS.sidebar.context.barShape;
|
|
1389
|
+
const barWidth = BAR_WIDTHS_CYCLE.includes(context.barWidth) ? context.barWidth : DEFAULT_TUI_PREFS.sidebar.context.barWidth;
|
|
1390
|
+
const evenMark = asBool(context.evenMark, DEFAULT_TUI_PREFS.sidebar.context.evenMark);
|
|
1391
|
+
return {
|
|
1392
|
+
version: 1,
|
|
1393
|
+
layout: {
|
|
1394
|
+
preset,
|
|
1395
|
+
separator,
|
|
1396
|
+
settingsView
|
|
1397
|
+
},
|
|
1398
|
+
sidebar: {
|
|
1399
|
+
header: {
|
|
1400
|
+
version: asBool(header.version, true),
|
|
1401
|
+
preset: asBool(header.preset, true),
|
|
1402
|
+
session: asBool(header.session, true)
|
|
1403
|
+
},
|
|
1404
|
+
blocks: {
|
|
1405
|
+
context: asBool(blocks.context, true),
|
|
1406
|
+
git: asBool(blocks.git, true),
|
|
1407
|
+
todo: asBool(blocks.todo, true),
|
|
1408
|
+
dispatch: asBool(blocks.dispatch, true)
|
|
1409
|
+
},
|
|
1410
|
+
context: {
|
|
1411
|
+
gauge,
|
|
1412
|
+
barShape,
|
|
1413
|
+
barWidth,
|
|
1414
|
+
evenMark,
|
|
1415
|
+
tokens: asBool(context.tokens, true),
|
|
1416
|
+
spent: asBool(context.spent, true),
|
|
1417
|
+
modelUsage: asBool(context.modelUsage, true),
|
|
1418
|
+
performance: asBool(context.performance, true),
|
|
1419
|
+
localSpend: asBool(context.localSpend, true)
|
|
1420
|
+
}
|
|
1421
|
+
},
|
|
1422
|
+
footer: {
|
|
1423
|
+
prompt: asBool(footer.prompt, true),
|
|
1424
|
+
home: asBool(footer.home, true)
|
|
1425
|
+
}
|
|
1426
|
+
};
|
|
1427
|
+
}
|
|
1292
1428
|
const onOff = ENABLED_CYCLE;
|
|
1293
1429
|
const row = (id, name, value, note) => ({
|
|
1294
1430
|
id,
|
|
@@ -1304,19 +1440,29 @@ function buildTuiTab(prefs) {
|
|
|
1304
1440
|
groups: [
|
|
1305
1441
|
{
|
|
1306
1442
|
title: "Preset & Layout",
|
|
1307
|
-
rows: [
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1443
|
+
rows: [
|
|
1444
|
+
{
|
|
1445
|
+
id: "tui.layout.preset",
|
|
1446
|
+
name: "Layout preset",
|
|
1447
|
+
value: prefs.layout?.preset ?? DEFAULT_TUI_PREFS.layout.preset,
|
|
1448
|
+
cycle: LAYOUT_PRESETS_CYCLE,
|
|
1449
|
+
note: "comfortable | compact — sets spacing & borders"
|
|
1450
|
+
},
|
|
1451
|
+
{
|
|
1452
|
+
id: "tui.layout.separator",
|
|
1453
|
+
name: "Separator",
|
|
1454
|
+
value: prefs.layout?.separator ?? DEFAULT_TUI_PREFS.layout.separator,
|
|
1455
|
+
cycle: SEPARATOR_STYLES_CYCLE,
|
|
1456
|
+
note: "spaces | pipes | dots | slashes — status line glyphs"
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
id: "tui.layout.settingsView",
|
|
1460
|
+
name: "Settings surface",
|
|
1461
|
+
value: tuiRowValue(prefs, "tui.layout.settingsView") ?? "docked",
|
|
1462
|
+
cycle: SETTINGS_VIEW_MODES,
|
|
1463
|
+
note: "docked (above prompt) | fullscreen router page | dialog overlay"
|
|
1464
|
+
}
|
|
1465
|
+
]
|
|
1320
1466
|
},
|
|
1321
1467
|
{
|
|
1322
1468
|
title: "Bars & Gauges",
|
|
@@ -1366,7 +1512,7 @@ function buildTuiTab(prefs) {
|
|
|
1366
1512
|
title: "Context block detail",
|
|
1367
1513
|
rows: [
|
|
1368
1514
|
row("tui.sidebar.context.tokens", "Tokens row", prefs.sidebar.context.tokens, "the raw token count line"),
|
|
1369
|
-
row("tui.sidebar.context.spent", "Spent row", prefs.sidebar.context.spent, "the `$…
|
|
1515
|
+
row("tui.sidebar.context.spent", "Spent row", prefs.sidebar.context.spent, "the `$… spent in session` line"),
|
|
1370
1516
|
row("tui.sidebar.context.modelUsage", "Model usage table", prefs.sidebar.context.modelUsage, "per-model tokens/USD"),
|
|
1371
1517
|
row("tui.sidebar.context.performance", "Performance line", prefs.sidebar.context.performance, "cache % + tok/s"),
|
|
1372
1518
|
row("tui.sidebar.context.localSpend", "Local spend", prefs.sidebar.context.localSpend, "hoje / 30d totals")
|
|
@@ -1398,6 +1544,12 @@ function applyTuiRow(draft, id, value) {
|
|
|
1398
1544
|
draft.layout.separator = value;
|
|
1399
1545
|
}
|
|
1400
1546
|
return;
|
|
1547
|
+
case "tui.layout.settingsView":
|
|
1548
|
+
if (SETTINGS_VIEW_MODES.includes(value)) {
|
|
1549
|
+
if (!draft.layout) draft.layout = { ...DEFAULT_TUI_PREFS.layout };
|
|
1550
|
+
draft.layout.settingsView = value;
|
|
1551
|
+
}
|
|
1552
|
+
return;
|
|
1401
1553
|
case "tui.sidebar.context.barShape":
|
|
1402
1554
|
if (BAR_SHAPES_CYCLE.includes(value)) draft.sidebar.context.barShape = value;
|
|
1403
1555
|
return;
|
|
@@ -1455,6 +1607,36 @@ function applyTuiRow(draft, id, value) {
|
|
|
1455
1607
|
default: return;
|
|
1456
1608
|
}
|
|
1457
1609
|
}
|
|
1610
|
+
/** Read the current pref value for a row id ('enabled'/'disabled'/gauge/custom). */
|
|
1611
|
+
function tuiRowValue(prefs, id) {
|
|
1612
|
+
if (id === "tui.layout.preset") return prefs.layout?.preset ?? DEFAULT_TUI_PREFS.layout.preset;
|
|
1613
|
+
if (id === "tui.layout.separator") return prefs.layout?.separator ?? DEFAULT_TUI_PREFS.layout.separator;
|
|
1614
|
+
if (id === "tui.layout.settingsView") return prefs.layout?.settingsView ?? DEFAULT_TUI_PREFS.layout.settingsView ?? "docked";
|
|
1615
|
+
if (id === "tui.sidebar.context.barShape") return prefs.sidebar.context.barShape;
|
|
1616
|
+
if (id === "tui.sidebar.context.barWidth") return prefs.sidebar.context.barWidth;
|
|
1617
|
+
if (id === "tui.sidebar.context.gauge") return prefs.sidebar.context.gauge;
|
|
1618
|
+
if (id === "tui.sidebar.context.evenMark") return prefs.sidebar.context.evenMark ? "enabled" : "disabled";
|
|
1619
|
+
const enabled = (() => {
|
|
1620
|
+
switch (id) {
|
|
1621
|
+
case "tui.sidebar.header.version": return prefs.sidebar.header.version;
|
|
1622
|
+
case "tui.sidebar.header.preset": return prefs.sidebar.header.preset;
|
|
1623
|
+
case "tui.sidebar.header.session": return prefs.sidebar.header.session;
|
|
1624
|
+
case "tui.sidebar.block.context": return prefs.sidebar.blocks.context;
|
|
1625
|
+
case "tui.sidebar.block.git": return prefs.sidebar.blocks.git;
|
|
1626
|
+
case "tui.sidebar.block.todo": return prefs.sidebar.blocks.todo;
|
|
1627
|
+
case "tui.sidebar.block.dispatch": return prefs.sidebar.blocks.dispatch;
|
|
1628
|
+
case "tui.sidebar.context.tokens": return prefs.sidebar.context.tokens;
|
|
1629
|
+
case "tui.sidebar.context.spent": return prefs.sidebar.context.spent;
|
|
1630
|
+
case "tui.sidebar.context.modelUsage": return prefs.sidebar.context.modelUsage;
|
|
1631
|
+
case "tui.sidebar.context.performance": return prefs.sidebar.context.performance;
|
|
1632
|
+
case "tui.sidebar.context.localSpend": return prefs.sidebar.context.localSpend;
|
|
1633
|
+
case "tui.footer.prompt": return prefs.footer.prompt;
|
|
1634
|
+
case "tui.footer.home": return prefs.footer.home;
|
|
1635
|
+
default: return;
|
|
1636
|
+
}
|
|
1637
|
+
})();
|
|
1638
|
+
return enabled === void 0 ? void 0 : enabled ? "enabled" : "disabled";
|
|
1639
|
+
}
|
|
1458
1640
|
//#endregion
|
|
1459
1641
|
//#region src/update-status.ts
|
|
1460
1642
|
/** The running version's channel: a `-beta.N` suffix rides the beta dist-tag. */
|
|
@@ -1711,7 +1893,7 @@ async function readChangelogForBundle(bundleUrl) {
|
|
|
1711
1893
|
}
|
|
1712
1894
|
/** The ambient build-time version, or null outside a tsdown build. */
|
|
1713
1895
|
function embeddedVersion() {
|
|
1714
|
-
return "2.0.0
|
|
1896
|
+
return "2.0.0";
|
|
1715
1897
|
}
|
|
1716
1898
|
/**
|
|
1717
1899
|
* Resolve the running Pantheon version for the what's-new window: the plugin
|
|
@@ -1936,113 +2118,118 @@ function persistUpdateCheckState(previous, latest) {
|
|
|
1936
2118
|
} catch {}
|
|
1937
2119
|
}
|
|
1938
2120
|
function resolveRunningVersion() {
|
|
1939
|
-
return "2.0.0
|
|
2121
|
+
return "2.0.0";
|
|
1940
2122
|
}
|
|
1941
|
-
const VALUE_WIDTH =
|
|
2123
|
+
const VALUE_WIDTH = 24;
|
|
1942
2124
|
function SettingsWindow(props) {
|
|
1943
2125
|
const tab = () => props.tabs()[props.page()] ?? props.tabs()[0] ?? EMPTY_TAB;
|
|
1944
2126
|
return (() => {
|
|
1945
|
-
var _el$ = createElement("box"), _el$2 = createElement("box"), _el$3 = createElement("text"), _el$4 = createElement("
|
|
2127
|
+
var _el$ = createElement("box"), _el$2 = createElement("box"), _el$3 = createElement("text"), _el$4 = createElement("b"), _el$6 = createElement("span"), _el$7 = createElement("box"), _el$8 = createElement("box"), _el$9 = createElement("box"), _el$0 = createElement("text"), _el$10 = createElement("box"), _el$11 = createElement("scrollbox");
|
|
1946
2128
|
insertNode(_el$, _el$2);
|
|
1947
|
-
insertNode(_el$, _el$8);
|
|
1948
2129
|
insertNode(_el$, _el$10);
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
2130
|
+
spread(_el$, mergeProps(() => props.boxRef !== void 0 ? { ref: props.boxRef } : {}, {
|
|
2131
|
+
"focusable": true,
|
|
2132
|
+
"flexDirection": "column"
|
|
2133
|
+
}, () => props.height !== void 0 ? { height: props.height } : {
|
|
2134
|
+
flexGrow: 1,
|
|
2135
|
+
flexBasis: 0
|
|
2136
|
+
}, {
|
|
2137
|
+
"minHeight": 0,
|
|
2138
|
+
get border() {
|
|
2139
|
+
return !props.isDialog;
|
|
2140
|
+
}
|
|
2141
|
+
}, () => props.isDialog ? {} : { borderStyle: "rounded" }, {
|
|
2142
|
+
get borderColor() {
|
|
2143
|
+
return memo(() => !!props.isDialog)() ? void 0 : memo(() => !!props.hasKeyboard?.())() ? props.warn ?? "#fba970" : props.muted ?? "#52525b";
|
|
2144
|
+
},
|
|
2145
|
+
"paddingLeft": 1,
|
|
2146
|
+
"paddingRight": 1,
|
|
2147
|
+
"paddingTop": 0,
|
|
2148
|
+
"paddingBottom": 0
|
|
2149
|
+
}, () => props.onMouseDown !== void 0 ? { onMouseDown: props.onMouseDown } : {}), true);
|
|
1953
2150
|
insertNode(_el$2, _el$3);
|
|
1954
|
-
insertNode(_el$2, _el$
|
|
1955
|
-
insertNode(_el$2, _el$
|
|
1956
|
-
insertNode(_el$2, _el$
|
|
2151
|
+
insertNode(_el$2, _el$7);
|
|
2152
|
+
insertNode(_el$2, _el$8);
|
|
2153
|
+
insertNode(_el$2, _el$9);
|
|
1957
2154
|
setProp(_el$2, "flexDirection", "row");
|
|
2155
|
+
setProp(_el$2, "flexWrap", "wrap");
|
|
1958
2156
|
setProp(_el$2, "alignItems", "center");
|
|
2157
|
+
setProp(_el$2, "flexShrink", 0);
|
|
2158
|
+
setProp(_el$2, "marginBottom", 1);
|
|
2159
|
+
setProp(_el$2, "rowGap", 1);
|
|
2160
|
+
insertNode(_el$3, _el$4);
|
|
2161
|
+
insertNode(_el$3, _el$6);
|
|
1959
2162
|
setProp(_el$3, "attributes", 1);
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
setProp(_el$
|
|
1964
|
-
setProp(_el$
|
|
1965
|
-
|
|
2163
|
+
setProp(_el$3, "wrapMode", "none");
|
|
2164
|
+
insertNode(_el$4, createTextNode(`Pantheon`));
|
|
2165
|
+
insert(_el$6, () => ` v${props.version}`);
|
|
2166
|
+
setProp(_el$7, "width", 2);
|
|
2167
|
+
setProp(_el$8, "flexDirection", "row");
|
|
2168
|
+
setProp(_el$8, "flexWrap", "wrap");
|
|
2169
|
+
setProp(_el$8, "flexGrow", 1);
|
|
2170
|
+
setProp(_el$8, "flexShrink", 0);
|
|
2171
|
+
setProp(_el$8, "columnGap", 1);
|
|
2172
|
+
setProp(_el$8, "rowGap", 1);
|
|
2173
|
+
insert(_el$8, createComponent(For, {
|
|
1966
2174
|
get each() {
|
|
1967
2175
|
return props.tabs();
|
|
1968
2176
|
},
|
|
1969
2177
|
children: (t, index) => {
|
|
1970
2178
|
const isActive = () => index() === props.page();
|
|
1971
2179
|
return (() => {
|
|
1972
|
-
var _el$
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
2180
|
+
var _el$32 = createElement("box"), _el$33 = createElement("text");
|
|
2181
|
+
insertNode(_el$32, _el$33);
|
|
2182
|
+
setProp(_el$32, "onMouseDown", () => props.onJumpTab?.(index()));
|
|
2183
|
+
setProp(_el$32, "paddingLeft", 1);
|
|
2184
|
+
setProp(_el$32, "paddingRight", 1);
|
|
2185
|
+
setProp(_el$32, "flexShrink", 0);
|
|
2186
|
+
spread(_el$32, mergeProps(() => isActive() ? { backgroundColor: "#262626" } : {}), true);
|
|
2187
|
+
setProp(_el$33, "wrapMode", "none");
|
|
2188
|
+
spread(_el$33, mergeProps({ get fg() {
|
|
2189
|
+
return memo(() => !!isActive())() ? props.warn ?? "#fba970" : props.muted;
|
|
1976
2190
|
} }, () => isActive() ? { attributes: 1 } : {}), true);
|
|
1977
|
-
insert(_el$
|
|
1978
|
-
return _el$
|
|
2191
|
+
insert(_el$33, () => `${t.title}${tabDirty(props.draft(), t) ? " ●" : ""}`);
|
|
2192
|
+
return _el$32;
|
|
1979
2193
|
})();
|
|
1980
2194
|
}
|
|
1981
2195
|
}));
|
|
1982
|
-
insertNode(_el$6, createTextNode(`esc`));
|
|
1983
|
-
insertNode(_el$8, _el$9);
|
|
1984
|
-
setProp(_el$8, "flexDirection", "row");
|
|
1985
|
-
setProp(_el$8, "height", 1);
|
|
1986
2196
|
insertNode(_el$9, _el$0);
|
|
1987
|
-
setProp(_el$9, "
|
|
1988
|
-
|
|
2197
|
+
setProp(_el$9, "onMouseDown", () => props.onClose?.());
|
|
2198
|
+
setProp(_el$9, "paddingLeft", 1);
|
|
2199
|
+
setProp(_el$9, "flexShrink", 0);
|
|
2200
|
+
insertNode(_el$0, createTextNode(`esc`));
|
|
2201
|
+
setProp(_el$0, "wrapMode", "none");
|
|
1989
2202
|
insertNode(_el$10, _el$11);
|
|
1990
|
-
|
|
1991
|
-
setProp(_el$10, "
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
setProp(_el$11, "
|
|
1996
|
-
setProp(_el$11, "
|
|
2203
|
+
setProp(_el$10, "flexDirection", "column");
|
|
2204
|
+
setProp(_el$10, "flexGrow", 1);
|
|
2205
|
+
setProp(_el$10, "flexBasis", 0);
|
|
2206
|
+
setProp(_el$10, "minHeight", 0);
|
|
2207
|
+
setProp(_el$10, "overflow", "hidden");
|
|
2208
|
+
setProp(_el$11, "flexGrow", 1);
|
|
2209
|
+
setProp(_el$11, "flexBasis", 0);
|
|
2210
|
+
setProp(_el$11, "minHeight", 0);
|
|
2211
|
+
spread(_el$11, mergeProps(() => props.maxHeight !== void 0 ? { maxHeight: props.maxHeight } : {}), true);
|
|
1997
2212
|
insert(_el$11, createComponent(For, {
|
|
1998
|
-
get each() {
|
|
1999
|
-
return props.tabs();
|
|
2000
|
-
},
|
|
2001
|
-
children: (t, index) => {
|
|
2002
|
-
const isActive = () => index() === props.page();
|
|
2003
|
-
return (() => {
|
|
2004
|
-
var _el$42 = createElement("text");
|
|
2005
|
-
spread(_el$42, mergeProps({ get fg() {
|
|
2006
|
-
return memo(() => !!isActive())() ? props.warn ?? props.fg : props.muted;
|
|
2007
|
-
} }, () => isActive() ? { attributes: 1 } : {}), true);
|
|
2008
|
-
insert(_el$42, () => `${isActive() ? "▸ " : " "}${t.title}${tabDirty(props.draft(), t) ? " ●" : ""}`);
|
|
2009
|
-
return _el$42;
|
|
2010
|
-
})();
|
|
2011
|
-
}
|
|
2012
|
-
}), _el$12);
|
|
2013
|
-
setProp(_el$12, "height", 1);
|
|
2014
|
-
insertNode(_el$13, createTextNode(`1-9: tab`));
|
|
2015
|
-
insertNode(_el$15, createTextNode(`tab: next`));
|
|
2016
|
-
insertNode(_el$17, _el$18);
|
|
2017
|
-
insertNode(_el$17, _el$19);
|
|
2018
|
-
setProp(_el$17, "flexGrow", 1);
|
|
2019
|
-
setProp(_el$17, "flexShrink", 1);
|
|
2020
|
-
setProp(_el$17, "flexDirection", "column");
|
|
2021
|
-
setProp(_el$17, "paddingLeft", 1);
|
|
2022
|
-
setProp(_el$18, "attributes", 1);
|
|
2023
|
-
insert(_el$18, () => tab().title);
|
|
2024
|
-
insertNode(_el$19, createTextNode(`────────────────────────────────────────`));
|
|
2025
|
-
insert(_el$17, createComponent(For, {
|
|
2026
2213
|
get each() {
|
|
2027
2214
|
return tab().groups;
|
|
2028
2215
|
},
|
|
2029
2216
|
children: (group) => (() => {
|
|
2030
|
-
var _el$
|
|
2031
|
-
|
|
2032
|
-
setProp(_el$
|
|
2033
|
-
insert(_el$
|
|
2217
|
+
var _el$34 = createElement("box");
|
|
2218
|
+
setProp(_el$34, "flexDirection", "column");
|
|
2219
|
+
setProp(_el$34, "marginBottom", 1);
|
|
2220
|
+
insert(_el$34, createComponent(Show, {
|
|
2034
2221
|
get when() {
|
|
2035
2222
|
return group.title !== void 0;
|
|
2036
2223
|
},
|
|
2037
2224
|
get children() {
|
|
2038
|
-
var _el$
|
|
2039
|
-
setProp(_el$
|
|
2040
|
-
insert(_el$
|
|
2041
|
-
effect((_$p) => setProp(_el$
|
|
2042
|
-
return _el$
|
|
2225
|
+
var _el$35 = createElement("text");
|
|
2226
|
+
setProp(_el$35, "attributes", 1);
|
|
2227
|
+
insert(_el$35, () => group.title);
|
|
2228
|
+
effect((_$p) => setProp(_el$35, "fg", props.warn ?? props.fg, _$p));
|
|
2229
|
+
return _el$35;
|
|
2043
2230
|
}
|
|
2044
|
-
}),
|
|
2045
|
-
insert(_el$
|
|
2231
|
+
}), null);
|
|
2232
|
+
insert(_el$34, createComponent(For, {
|
|
2046
2233
|
get each() {
|
|
2047
2234
|
return group.rows;
|
|
2048
2235
|
},
|
|
@@ -2050,60 +2237,70 @@ function SettingsWindow(props) {
|
|
|
2050
2237
|
const isSelected = () => row.id === props.selectedId();
|
|
2051
2238
|
const display = () => props.draft()[row.id] ?? row.value;
|
|
2052
2239
|
const staged = () => props.draft()[row.id] !== void 0;
|
|
2053
|
-
const gutter = () => isSelected() ? "
|
|
2054
|
-
const valueCell = () =>
|
|
2240
|
+
const gutter = () => isSelected() ? "▸ " : " ";
|
|
2241
|
+
const valueCell = () => {
|
|
2242
|
+
if (row.cycle !== void 0) return `< ${display()} >`;
|
|
2243
|
+
if (row.action !== void 0) return `[ ${display()} ]`;
|
|
2244
|
+
if (row.id.startsWith("autonomy.gradient.")) return `[ref] ${display()}`;
|
|
2245
|
+
return display();
|
|
2246
|
+
};
|
|
2055
2247
|
return (() => {
|
|
2056
|
-
var _el$
|
|
2057
|
-
insertNode(_el$
|
|
2058
|
-
insertNode(_el$
|
|
2059
|
-
setProp(_el$
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2248
|
+
var _el$36 = createElement("box"), _el$37 = createElement("box"), _el$38 = createElement("text"), _el$39 = createElement("box"), _el$40 = createElement("text");
|
|
2249
|
+
insertNode(_el$36, _el$37);
|
|
2250
|
+
insertNode(_el$36, _el$39);
|
|
2251
|
+
setProp(_el$36, "flexDirection", "row");
|
|
2252
|
+
spread(_el$36, mergeProps(() => isSelected() ? { backgroundColor: "#262626" } : {}, { "onMouseDown": () => {
|
|
2253
|
+
props.onSelectRow?.(row.id);
|
|
2254
|
+
} }), true);
|
|
2255
|
+
insertNode(_el$37, _el$38);
|
|
2256
|
+
setProp(_el$37, "width", 28);
|
|
2257
|
+
spread(_el$38, mergeProps({ get fg() {
|
|
2258
|
+
return memo(() => !!isSelected())() ? props.warn ?? "#fba970" : props.fg;
|
|
2064
2259
|
} }, () => isSelected() ? { attributes: 1 } : {}), true);
|
|
2065
|
-
insert(_el$
|
|
2066
|
-
insertNode(_el$
|
|
2067
|
-
setProp(_el$
|
|
2068
|
-
|
|
2069
|
-
|
|
2260
|
+
insert(_el$38, () => `${gutter()}${row.name}`.padEnd(28));
|
|
2261
|
+
insertNode(_el$39, _el$40);
|
|
2262
|
+
setProp(_el$39, "width", 24);
|
|
2263
|
+
setProp(_el$39, "onMouseDown", () => {
|
|
2264
|
+
props.onSelectRow?.(row.id);
|
|
2265
|
+
props.onCycleValue?.(row.id, 1);
|
|
2266
|
+
});
|
|
2267
|
+
spread(_el$40, mergeProps({ get fg() {
|
|
2268
|
+
return memo(() => !!isSelected())() ? "#ffffff" : memo(() => !!staged())() ? props.warn ?? props.fg : props.muted;
|
|
2070
2269
|
} }, () => isSelected() || staged() ? { attributes: 1 } : {}), true);
|
|
2071
|
-
insert(_el$
|
|
2072
|
-
insert(_el$
|
|
2270
|
+
insert(_el$40, () => `${valueCell()}${staged() ? " ●" : ""}`.padEnd(VALUE_WIDTH));
|
|
2271
|
+
insert(_el$36, createComponent(Show, {
|
|
2073
2272
|
get when() {
|
|
2074
2273
|
return row.note !== void 0;
|
|
2075
2274
|
},
|
|
2076
2275
|
get children() {
|
|
2077
|
-
var _el$
|
|
2078
|
-
insertNode(_el$
|
|
2079
|
-
setProp(_el$
|
|
2080
|
-
setProp(_el$
|
|
2081
|
-
insert(_el$
|
|
2082
|
-
effect((_$p) => setProp(_el$
|
|
2083
|
-
return _el$
|
|
2276
|
+
var _el$41 = createElement("box"), _el$42 = createElement("text");
|
|
2277
|
+
insertNode(_el$41, _el$42);
|
|
2278
|
+
setProp(_el$41, "flexGrow", 1);
|
|
2279
|
+
setProp(_el$41, "flexShrink", 1);
|
|
2280
|
+
insert(_el$42, () => row.note);
|
|
2281
|
+
effect((_$p) => setProp(_el$42, "fg", isSelected() ? "#e5e7eb" : props.muted, _$p));
|
|
2282
|
+
return _el$41;
|
|
2084
2283
|
}
|
|
2085
2284
|
}), null);
|
|
2086
|
-
|
|
2087
|
-
return _el$46;
|
|
2285
|
+
return _el$36;
|
|
2088
2286
|
})();
|
|
2089
2287
|
}
|
|
2090
|
-
}),
|
|
2091
|
-
|
|
2092
|
-
return _el$43;
|
|
2288
|
+
}), null);
|
|
2289
|
+
return _el$34;
|
|
2093
2290
|
})()
|
|
2094
|
-
})
|
|
2291
|
+
}));
|
|
2095
2292
|
insert(_el$, createComponent(Show, {
|
|
2096
2293
|
get when() {
|
|
2097
2294
|
return props.notice() !== void 0;
|
|
2098
2295
|
},
|
|
2099
2296
|
get children() {
|
|
2100
|
-
var _el$
|
|
2101
|
-
insert(_el$
|
|
2102
|
-
var _c$ = memo(() => !!(props.notice()?.startsWith("
|
|
2103
|
-
return () => _c$() ? props.notice() :
|
|
2297
|
+
var _el$12 = createElement("text");
|
|
2298
|
+
insert(_el$12, (() => {
|
|
2299
|
+
var _c$ = memo(() => !!(props.notice()?.startsWith("[OK]") || props.notice()?.startsWith("saved")));
|
|
2300
|
+
return () => _c$() ? props.notice() : `[WARN] ${props.notice()}`;
|
|
2104
2301
|
})());
|
|
2105
|
-
effect((_$p) => setProp(_el$
|
|
2106
|
-
return _el$
|
|
2302
|
+
effect((_$p) => setProp(_el$12, "fg", props.notice()?.startsWith("[OK]") || props.notice()?.startsWith("saved") ? props.fg : props.warn ?? props.muted, _$p));
|
|
2303
|
+
return _el$12;
|
|
2107
2304
|
}
|
|
2108
2305
|
}), null);
|
|
2109
2306
|
insert(_el$, createComponent(Show, {
|
|
@@ -2112,134 +2309,170 @@ function SettingsWindow(props) {
|
|
|
2112
2309
|
},
|
|
2113
2310
|
get fallback() {
|
|
2114
2311
|
return (() => {
|
|
2115
|
-
var _el$
|
|
2116
|
-
insertNode(_el$
|
|
2117
|
-
setProp(_el$
|
|
2118
|
-
insert(_el$
|
|
2312
|
+
var _el$43 = createElement("box"), _el$61 = createElement("text");
|
|
2313
|
+
insertNode(_el$43, _el$61);
|
|
2314
|
+
setProp(_el$43, "flexDirection", "column");
|
|
2315
|
+
insert(_el$43, createComponent(Show, {
|
|
2119
2316
|
get when() {
|
|
2120
2317
|
return draftDirty(props.draft());
|
|
2121
2318
|
},
|
|
2122
2319
|
get fallback() {
|
|
2123
2320
|
return (() => {
|
|
2124
|
-
var _el$
|
|
2321
|
+
var _el$62 = createElement("box"), _el$63 = createElement("box"), _el$64 = createElement("text"), _el$66 = createElement("text"), _el$68 = createElement("box"), _el$69 = createElement("text"), _el$71 = createElement("text"), _el$73 = createElement("box"), _el$74 = createElement("text"), _el$76 = createElement("box"), _el$77 = createElement("text");
|
|
2322
|
+
insertNode(_el$62, _el$63);
|
|
2323
|
+
insertNode(_el$62, _el$66);
|
|
2324
|
+
insertNode(_el$62, _el$68);
|
|
2325
|
+
insertNode(_el$62, _el$71);
|
|
2326
|
+
insertNode(_el$62, _el$73);
|
|
2327
|
+
insertNode(_el$62, _el$76);
|
|
2328
|
+
insertNode(_el$62, _el$77);
|
|
2329
|
+
setProp(_el$62, "flexDirection", "row");
|
|
2330
|
+
setProp(_el$62, "flexWrap", "wrap");
|
|
2331
|
+
setProp(_el$62, "alignItems", "center");
|
|
2332
|
+
setProp(_el$62, "flexShrink", 0);
|
|
2333
|
+
setProp(_el$62, "rowGap", 1);
|
|
2334
|
+
insertNode(_el$63, _el$64);
|
|
2335
|
+
setProp(_el$63, "backgroundColor", "#262626");
|
|
2336
|
+
setProp(_el$63, "flexShrink", 0);
|
|
2337
|
+
setProp(_el$63, "onMouseDown", () => props.onClose?.());
|
|
2338
|
+
insertNode(_el$64, createTextNode(` Close `));
|
|
2339
|
+
setProp(_el$64, "fg", "#ffffff");
|
|
2340
|
+
insertNode(_el$66, createTextNode(` `));
|
|
2341
|
+
setProp(_el$66, "flexShrink", 0);
|
|
2342
|
+
insertNode(_el$68, _el$69);
|
|
2343
|
+
setProp(_el$68, "backgroundColor", "#262626");
|
|
2344
|
+
setProp(_el$68, "flexShrink", 0);
|
|
2345
|
+
setProp(_el$68, "onMouseDown", () => props.onResetPage?.());
|
|
2346
|
+
insertNode(_el$69, createTextNode(` Reset page `));
|
|
2347
|
+
setProp(_el$69, "fg", "#ffffff");
|
|
2348
|
+
insertNode(_el$71, createTextNode(` `));
|
|
2349
|
+
setProp(_el$71, "flexShrink", 0);
|
|
2125
2350
|
insertNode(_el$73, _el$74);
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
insertNode(_el$
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
setProp(_el$
|
|
2133
|
-
insertNode(_el$
|
|
2134
|
-
setProp(_el$
|
|
2135
|
-
insertNode(_el$75, createTextNode(` Close `));
|
|
2136
|
-
setProp(_el$75, "fg", "#ffffff");
|
|
2137
|
-
insertNode(_el$77, createTextNode(` `));
|
|
2138
|
-
insertNode(_el$79, _el$80);
|
|
2139
|
-
setProp(_el$79, "backgroundColor", "#262626");
|
|
2140
|
-
insertNode(_el$80, createTextNode(` Reset page `));
|
|
2141
|
-
setProp(_el$80, "fg", "#ffffff");
|
|
2142
|
-
insertNode(_el$82, createTextNode(` `));
|
|
2143
|
-
insertNode(_el$84, _el$85);
|
|
2144
|
-
setProp(_el$84, "backgroundColor", "#262626");
|
|
2145
|
-
insertNode(_el$85, createTextNode(` Defaults `));
|
|
2146
|
-
setProp(_el$85, "fg", "#ffffff");
|
|
2147
|
-
setProp(_el$87, "flexGrow", 1);
|
|
2148
|
-
insertNode(_el$88, createTextNode(`no staged changes`));
|
|
2351
|
+
setProp(_el$73, "backgroundColor", "#262626");
|
|
2352
|
+
setProp(_el$73, "flexShrink", 0);
|
|
2353
|
+
setProp(_el$73, "onMouseDown", () => props.onStageDefaults?.());
|
|
2354
|
+
insertNode(_el$74, createTextNode(` Defaults `));
|
|
2355
|
+
setProp(_el$74, "fg", "#ffffff");
|
|
2356
|
+
setProp(_el$76, "flexGrow", 1);
|
|
2357
|
+
setProp(_el$76, "minWidth", 1);
|
|
2358
|
+
insertNode(_el$77, createTextNode(`no staged changes`));
|
|
2359
|
+
setProp(_el$77, "flexShrink", 0);
|
|
2149
2360
|
effect((_p$) => {
|
|
2150
|
-
var _v$
|
|
2151
|
-
_v$
|
|
2152
|
-
_v$
|
|
2153
|
-
_v$
|
|
2361
|
+
var _v$1 = props.muted, _v$10 = props.muted, _v$11 = props.muted;
|
|
2362
|
+
_v$1 !== _p$.e && (_p$.e = setProp(_el$66, "fg", _v$1, _p$.e));
|
|
2363
|
+
_v$10 !== _p$.t && (_p$.t = setProp(_el$71, "fg", _v$10, _p$.t));
|
|
2364
|
+
_v$11 !== _p$.a && (_p$.a = setProp(_el$77, "fg", _v$11, _p$.a));
|
|
2154
2365
|
return _p$;
|
|
2155
2366
|
}, {
|
|
2156
2367
|
e: void 0,
|
|
2157
2368
|
t: void 0,
|
|
2158
2369
|
a: void 0
|
|
2159
2370
|
});
|
|
2160
|
-
return _el$
|
|
2371
|
+
return _el$62;
|
|
2161
2372
|
})();
|
|
2162
2373
|
},
|
|
2163
2374
|
get children() {
|
|
2164
|
-
var _el$
|
|
2165
|
-
insertNode(_el$
|
|
2166
|
-
insertNode(_el$
|
|
2167
|
-
insertNode(_el$
|
|
2168
|
-
insertNode(_el$
|
|
2169
|
-
insertNode(_el$
|
|
2170
|
-
insertNode(_el$
|
|
2171
|
-
insertNode(_el$
|
|
2172
|
-
setProp(_el$
|
|
2375
|
+
var _el$44 = createElement("box"), _el$45 = createElement("box"), _el$46 = createElement("text"), _el$48 = createElement("text"), _el$50 = createElement("box"), _el$51 = createElement("text"), _el$53 = createElement("text"), _el$55 = createElement("box"), _el$56 = createElement("text"), _el$58 = createElement("box"), _el$59 = createElement("text");
|
|
2376
|
+
insertNode(_el$44, _el$45);
|
|
2377
|
+
insertNode(_el$44, _el$48);
|
|
2378
|
+
insertNode(_el$44, _el$50);
|
|
2379
|
+
insertNode(_el$44, _el$53);
|
|
2380
|
+
insertNode(_el$44, _el$55);
|
|
2381
|
+
insertNode(_el$44, _el$58);
|
|
2382
|
+
insertNode(_el$44, _el$59);
|
|
2383
|
+
setProp(_el$44, "flexDirection", "row");
|
|
2384
|
+
setProp(_el$44, "flexWrap", "wrap");
|
|
2385
|
+
setProp(_el$44, "alignItems", "center");
|
|
2386
|
+
setProp(_el$44, "flexShrink", 0);
|
|
2387
|
+
setProp(_el$44, "rowGap", 1);
|
|
2388
|
+
insertNode(_el$45, _el$46);
|
|
2389
|
+
setProp(_el$45, "backgroundColor", "#fba970");
|
|
2390
|
+
setProp(_el$45, "flexShrink", 0);
|
|
2391
|
+
setProp(_el$45, "onMouseDown", () => props.onSave?.());
|
|
2392
|
+
insertNode(_el$46, createTextNode(` Save `));
|
|
2393
|
+
setProp(_el$46, "fg", "#000000");
|
|
2394
|
+
insertNode(_el$48, createTextNode(` `));
|
|
2395
|
+
setProp(_el$48, "flexShrink", 0);
|
|
2396
|
+
insertNode(_el$50, _el$51);
|
|
2397
|
+
setProp(_el$50, "backgroundColor", "#262626");
|
|
2398
|
+
setProp(_el$50, "flexShrink", 0);
|
|
2399
|
+
setProp(_el$50, "onMouseDown", () => props.onDiscard?.());
|
|
2400
|
+
insertNode(_el$51, createTextNode(` Discard `));
|
|
2401
|
+
setProp(_el$51, "fg", "#ffffff");
|
|
2402
|
+
insertNode(_el$53, createTextNode(` `));
|
|
2403
|
+
setProp(_el$53, "flexShrink", 0);
|
|
2173
2404
|
insertNode(_el$55, _el$56);
|
|
2174
|
-
setProp(_el$55, "backgroundColor", "#
|
|
2175
|
-
|
|
2176
|
-
setProp(_el$
|
|
2177
|
-
insertNode(_el$
|
|
2178
|
-
|
|
2179
|
-
setProp(_el$
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
insertNode(_el$65, _el$66);
|
|
2184
|
-
setProp(_el$65, "backgroundColor", "#262626");
|
|
2185
|
-
insertNode(_el$66, createTextNode(` Reset page `));
|
|
2186
|
-
setProp(_el$66, "fg", "#ffffff");
|
|
2187
|
-
setProp(_el$68, "flexGrow", 1);
|
|
2188
|
-
insertNode(_el$69, createTextNode(`unsaved changes`));
|
|
2405
|
+
setProp(_el$55, "backgroundColor", "#262626");
|
|
2406
|
+
setProp(_el$55, "flexShrink", 0);
|
|
2407
|
+
setProp(_el$55, "onMouseDown", () => props.onResetPage?.());
|
|
2408
|
+
insertNode(_el$56, createTextNode(` Reset page `));
|
|
2409
|
+
setProp(_el$56, "fg", "#ffffff");
|
|
2410
|
+
setProp(_el$58, "flexGrow", 1);
|
|
2411
|
+
setProp(_el$58, "minWidth", 1);
|
|
2412
|
+
insertNode(_el$59, createTextNode(`unsaved changes`));
|
|
2413
|
+
setProp(_el$59, "flexShrink", 0);
|
|
2189
2414
|
effect((_p$) => {
|
|
2190
|
-
var _v$
|
|
2191
|
-
_v$
|
|
2192
|
-
_v$
|
|
2193
|
-
_v$
|
|
2415
|
+
var _v$8 = props.muted, _v$9 = props.muted, _v$0 = props.warn ?? "#f59e0b";
|
|
2416
|
+
_v$8 !== _p$.e && (_p$.e = setProp(_el$48, "fg", _v$8, _p$.e));
|
|
2417
|
+
_v$9 !== _p$.t && (_p$.t = setProp(_el$53, "fg", _v$9, _p$.t));
|
|
2418
|
+
_v$0 !== _p$.a && (_p$.a = setProp(_el$59, "fg", _v$0, _p$.a));
|
|
2194
2419
|
return _p$;
|
|
2195
2420
|
}, {
|
|
2196
2421
|
e: void 0,
|
|
2197
2422
|
t: void 0,
|
|
2198
2423
|
a: void 0
|
|
2199
2424
|
});
|
|
2200
|
-
return _el$
|
|
2425
|
+
return _el$44;
|
|
2201
2426
|
}
|
|
2202
|
-
}), _el$
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2427
|
+
}), _el$61);
|
|
2428
|
+
insert(_el$61, () => {
|
|
2429
|
+
const currentRow = findRow(tab(), props.selectedId() ?? "");
|
|
2430
|
+
if (currentRow?.cycle !== void 0) return "click or ›/←/→ change · ↑↓ select · tab next tab · ctrl+s save · ctrl+r reset page · esc close";
|
|
2431
|
+
if (currentRow?.action !== void 0) return "enter or space run action · ↑↓ select · tab next tab · ctrl+s save · ctrl+r reset page · esc close";
|
|
2432
|
+
return "[ref] documented reference (read-only) · ↑↓ select · tab next tab · esc close";
|
|
2433
|
+
});
|
|
2434
|
+
effect((_$p) => setProp(_el$61, "fg", props.muted, _$p));
|
|
2435
|
+
return _el$43;
|
|
2206
2436
|
})();
|
|
2207
2437
|
},
|
|
2208
2438
|
get children() {
|
|
2209
|
-
var _el$
|
|
2439
|
+
var _el$13 = createElement("box"), _el$14 = createElement("box"), _el$15 = createElement("text"), _el$17 = createElement("box"), _el$18 = createElement("text"), _el$20 = createElement("text"), _el$22 = createElement("box"), _el$23 = createElement("text"), _el$25 = createElement("text"), _el$27 = createElement("box"), _el$28 = createElement("text"), _el$30 = createElement("text");
|
|
2440
|
+
insertNode(_el$13, _el$14);
|
|
2441
|
+
insertNode(_el$13, _el$30);
|
|
2442
|
+
setProp(_el$13, "flexDirection", "column");
|
|
2443
|
+
insertNode(_el$14, _el$15);
|
|
2444
|
+
insertNode(_el$14, _el$17);
|
|
2445
|
+
insertNode(_el$14, _el$20);
|
|
2446
|
+
insertNode(_el$14, _el$22);
|
|
2447
|
+
insertNode(_el$14, _el$25);
|
|
2448
|
+
insertNode(_el$14, _el$27);
|
|
2449
|
+
setProp(_el$14, "flexDirection", "row");
|
|
2450
|
+
insertNode(_el$15, createTextNode(`Keep your changes? `));
|
|
2451
|
+
setProp(_el$15, "attributes", 1);
|
|
2452
|
+
insertNode(_el$17, _el$18);
|
|
2453
|
+
setProp(_el$17, "backgroundColor", "#fba970");
|
|
2454
|
+
setProp(_el$17, "onMouseDown", () => props.onSave?.());
|
|
2455
|
+
insertNode(_el$18, createTextNode(` Save `));
|
|
2456
|
+
setProp(_el$18, "fg", "#000000");
|
|
2457
|
+
insertNode(_el$20, createTextNode(` `));
|
|
2210
2458
|
insertNode(_el$22, _el$23);
|
|
2211
|
-
|
|
2212
|
-
setProp(_el$22, "
|
|
2213
|
-
insertNode(_el$23,
|
|
2214
|
-
|
|
2215
|
-
insertNode(_el$
|
|
2216
|
-
insertNode(_el$
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
insertNode(_el$26, _el$27);
|
|
2223
|
-
setProp(_el$26, "backgroundColor", "#fba970");
|
|
2224
|
-
insertNode(_el$27, createTextNode(` Save `));
|
|
2225
|
-
setProp(_el$27, "fg", "#000000");
|
|
2226
|
-
insertNode(_el$29, createTextNode(` `));
|
|
2227
|
-
insertNode(_el$31, _el$32);
|
|
2228
|
-
setProp(_el$31, "backgroundColor", "#262626");
|
|
2229
|
-
insertNode(_el$32, createTextNode(` Discard `));
|
|
2230
|
-
setProp(_el$32, "fg", "#ffffff");
|
|
2231
|
-
insertNode(_el$34, createTextNode(` `));
|
|
2232
|
-
insertNode(_el$36, _el$37);
|
|
2233
|
-
setProp(_el$36, "backgroundColor", "#262626");
|
|
2234
|
-
insertNode(_el$37, createTextNode(` Keep editing `));
|
|
2235
|
-
setProp(_el$37, "fg", "#ffffff");
|
|
2236
|
-
insertNode(_el$39, createTextNode(`ctrl+s save · d discard the changes · esc keep editing`));
|
|
2459
|
+
setProp(_el$22, "backgroundColor", "#262626");
|
|
2460
|
+
setProp(_el$22, "onMouseDown", () => props.onDiscard?.());
|
|
2461
|
+
insertNode(_el$23, createTextNode(` Discard `));
|
|
2462
|
+
setProp(_el$23, "fg", "#ffffff");
|
|
2463
|
+
insertNode(_el$25, createTextNode(` `));
|
|
2464
|
+
insertNode(_el$27, _el$28);
|
|
2465
|
+
setProp(_el$27, "backgroundColor", "#262626");
|
|
2466
|
+
setProp(_el$27, "onMouseDown", () => props.onCancelExit?.());
|
|
2467
|
+
insertNode(_el$28, createTextNode(` Keep editing `));
|
|
2468
|
+
setProp(_el$28, "fg", "#ffffff");
|
|
2469
|
+
insertNode(_el$30, createTextNode(`ctrl+s save · d discard the changes · esc keep editing`));
|
|
2237
2470
|
effect((_p$) => {
|
|
2238
2471
|
var _v$ = props.warn ?? "#f59e0b", _v$2 = props.muted, _v$3 = props.muted, _v$4 = props.muted;
|
|
2239
|
-
_v$ !== _p$.e && (_p$.e = setProp(_el$
|
|
2240
|
-
_v$2 !== _p$.t && (_p$.t = setProp(_el$
|
|
2241
|
-
_v$3 !== _p$.a && (_p$.a = setProp(_el$
|
|
2242
|
-
_v$4 !== _p$.o && (_p$.o = setProp(_el$
|
|
2472
|
+
_v$ !== _p$.e && (_p$.e = setProp(_el$15, "fg", _v$, _p$.e));
|
|
2473
|
+
_v$2 !== _p$.t && (_p$.t = setProp(_el$20, "fg", _v$2, _p$.t));
|
|
2474
|
+
_v$3 !== _p$.a && (_p$.a = setProp(_el$25, "fg", _v$3, _p$.a));
|
|
2475
|
+
_v$4 !== _p$.o && (_p$.o = setProp(_el$30, "fg", _v$4, _p$.o));
|
|
2243
2476
|
return _p$;
|
|
2244
2477
|
}, {
|
|
2245
2478
|
e: void 0,
|
|
@@ -2247,27 +2480,19 @@ function SettingsWindow(props) {
|
|
|
2247
2480
|
a: void 0,
|
|
2248
2481
|
o: void 0
|
|
2249
2482
|
});
|
|
2250
|
-
return _el$
|
|
2483
|
+
return _el$13;
|
|
2251
2484
|
}
|
|
2252
2485
|
}), null);
|
|
2253
2486
|
effect((_p$) => {
|
|
2254
|
-
var _v$5 = props.fg, _v$6 =
|
|
2487
|
+
var _v$5 = props.fg, _v$6 = { fg: props.muted }, _v$7 = props.muted;
|
|
2255
2488
|
_v$5 !== _p$.e && (_p$.e = setProp(_el$3, "fg", _v$5, _p$.e));
|
|
2256
|
-
_v$6 !== _p$.t && (_p$.t = setProp(_el$6, "
|
|
2489
|
+
_v$6 !== _p$.t && (_p$.t = setProp(_el$6, "style", _v$6, _p$.t));
|
|
2257
2490
|
_v$7 !== _p$.a && (_p$.a = setProp(_el$0, "fg", _v$7, _p$.a));
|
|
2258
|
-
_v$8 !== _p$.o && (_p$.o = setProp(_el$13, "fg", _v$8, _p$.o));
|
|
2259
|
-
_v$9 !== _p$.i && (_p$.i = setProp(_el$15, "fg", _v$9, _p$.i));
|
|
2260
|
-
_v$0 !== _p$.n && (_p$.n = setProp(_el$18, "fg", _v$0, _p$.n));
|
|
2261
|
-
_v$1 !== _p$.s && (_p$.s = setProp(_el$19, "fg", _v$1, _p$.s));
|
|
2262
2491
|
return _p$;
|
|
2263
2492
|
}, {
|
|
2264
2493
|
e: void 0,
|
|
2265
2494
|
t: void 0,
|
|
2266
|
-
a: void 0
|
|
2267
|
-
o: void 0,
|
|
2268
|
-
i: void 0,
|
|
2269
|
-
n: void 0,
|
|
2270
|
-
s: void 0
|
|
2495
|
+
a: void 0
|
|
2271
2496
|
});
|
|
2272
2497
|
return _el$;
|
|
2273
2498
|
})();
|
|
@@ -2291,6 +2516,9 @@ function createWindowController(context, exit) {
|
|
|
2291
2516
|
const [draft, setDraft] = createSignal({});
|
|
2292
2517
|
const [notice, setNotice] = createSignal(void 0);
|
|
2293
2518
|
const [confirmExit, setConfirmExit] = createSignal(false);
|
|
2519
|
+
createEffect(() => {
|
|
2520
|
+
setTuiDraftPreview(draft());
|
|
2521
|
+
});
|
|
2294
2522
|
readChangelogForBundle(import.meta.url).then((text) => {
|
|
2295
2523
|
if (!text) return;
|
|
2296
2524
|
const hl = extractHighlights(text, currentVersion);
|
|
@@ -2332,7 +2560,7 @@ function createWindowController(context, exit) {
|
|
|
2332
2560
|
buildGatesTab(load()),
|
|
2333
2561
|
buildDecisionTab(decision(), process.env, readAuthProviders(), readConfigProviders()),
|
|
2334
2562
|
buildPresetTab(presetInput()),
|
|
2335
|
-
buildTuiTab(
|
|
2563
|
+
buildTuiTab(savedTuiPrefs()),
|
|
2336
2564
|
buildAutonomyTab({
|
|
2337
2565
|
goalLoop: goalLoop(),
|
|
2338
2566
|
budgets: budgets(),
|
|
@@ -2392,7 +2620,7 @@ function createWindowController(context, exit) {
|
|
|
2392
2620
|
});
|
|
2393
2621
|
} catch {}
|
|
2394
2622
|
} else {
|
|
2395
|
-
setNotice("
|
|
2623
|
+
setNotice("[OK] update complete — restart OpenCode or run `npx pantheon-opencode init`");
|
|
2396
2624
|
try {
|
|
2397
2625
|
context.ui.toast?.show?.({
|
|
2398
2626
|
variant: "info",
|
|
@@ -2609,6 +2837,7 @@ function createWindowController(context, exit) {
|
|
|
2609
2837
|
return;
|
|
2610
2838
|
}
|
|
2611
2839
|
if (staged > 0) {
|
|
2840
|
+
clearTuiDraftPreview();
|
|
2612
2841
|
setDraft({});
|
|
2613
2842
|
try {
|
|
2614
2843
|
context.ui.toast?.show?.({
|
|
@@ -2621,6 +2850,7 @@ function createWindowController(context, exit) {
|
|
|
2621
2850
|
};
|
|
2622
2851
|
const discard = () => {
|
|
2623
2852
|
const staged = draftCount(draft());
|
|
2853
|
+
clearTuiDraftPreview();
|
|
2624
2854
|
setDraft({});
|
|
2625
2855
|
setConfirmExit(false);
|
|
2626
2856
|
if (staged > 0) try {
|
|
@@ -2635,6 +2865,26 @@ function createWindowController(context, exit) {
|
|
|
2635
2865
|
setConfirmExit(false);
|
|
2636
2866
|
};
|
|
2637
2867
|
const selectedId = () => rows()[selected()]?.id;
|
|
2868
|
+
const selectById = (id) => {
|
|
2869
|
+
if (confirmExit()) setConfirmExit(false);
|
|
2870
|
+
const index = rows().findIndex((r) => r.id === id);
|
|
2871
|
+
if (index !== -1) setSelected(index);
|
|
2872
|
+
};
|
|
2873
|
+
const cycleRowById = (id, direction) => {
|
|
2874
|
+
if (confirmExit()) setConfirmExit(false);
|
|
2875
|
+
const list = rows();
|
|
2876
|
+
const index = list.findIndex((r) => r.id === id);
|
|
2877
|
+
if (index !== -1) {
|
|
2878
|
+
setSelected(index);
|
|
2879
|
+
const row = list[index];
|
|
2880
|
+
if (row?.action === "update-check") checkUpdatesNow();
|
|
2881
|
+
else if (row?.action === "update-run") runUpdateNow();
|
|
2882
|
+
else if (row) {
|
|
2883
|
+
setNotice(void 0);
|
|
2884
|
+
setDraft(stageValue(draft(), row, direction));
|
|
2885
|
+
}
|
|
2886
|
+
}
|
|
2887
|
+
};
|
|
2638
2888
|
return {
|
|
2639
2889
|
tabs,
|
|
2640
2890
|
page,
|
|
@@ -2645,6 +2895,8 @@ function createWindowController(context, exit) {
|
|
|
2645
2895
|
api: {
|
|
2646
2896
|
move,
|
|
2647
2897
|
step,
|
|
2898
|
+
selectById,
|
|
2899
|
+
cycleRowById,
|
|
2648
2900
|
actuate: () => {
|
|
2649
2901
|
if (confirmExit()) setConfirmExit(false);
|
|
2650
2902
|
const row = rows()[selected()];
|
|
@@ -2653,6 +2905,14 @@ function createWindowController(context, exit) {
|
|
|
2653
2905
|
else step(1);
|
|
2654
2906
|
},
|
|
2655
2907
|
nextTab,
|
|
2908
|
+
prevTab: () => {
|
|
2909
|
+
if (confirmExit()) setConfirmExit(false);
|
|
2910
|
+
const count = tabs().length;
|
|
2911
|
+
if (count > 0) {
|
|
2912
|
+
setPage((current) => (current - 1 + count) % count);
|
|
2913
|
+
setSelected(0);
|
|
2914
|
+
}
|
|
2915
|
+
},
|
|
2656
2916
|
jumpTab: (index) => {
|
|
2657
2917
|
if (confirmExit()) setConfirmExit(false);
|
|
2658
2918
|
if (index >= 0 && index < tabs().length) {
|
|
@@ -2669,6 +2929,7 @@ function createWindowController(context, exit) {
|
|
|
2669
2929
|
confirmExit: () => confirmExit()
|
|
2670
2930
|
},
|
|
2671
2931
|
cleanup: () => {
|
|
2932
|
+
clearTuiDraftPreview();
|
|
2672
2933
|
pageApi = void 0;
|
|
2673
2934
|
setBlocking(false);
|
|
2674
2935
|
}
|
|
@@ -2715,7 +2976,16 @@ function SettingsPage(props) {
|
|
|
2715
2976
|
get muted() {
|
|
2716
2977
|
return theme.muted;
|
|
2717
2978
|
},
|
|
2718
|
-
warn
|
|
2979
|
+
warn,
|
|
2980
|
+
onJumpTab: (idx) => controller.api.jumpTab(idx),
|
|
2981
|
+
onSelectRow: (id) => controller.api.selectById?.(id),
|
|
2982
|
+
onCycleValue: (id, dir) => controller.api.cycleRowById?.(id, dir),
|
|
2983
|
+
onSave: () => controller.api.save(),
|
|
2984
|
+
onResetPage: () => controller.api.resetPage(),
|
|
2985
|
+
onStageDefaults: () => controller.api.stageDefaults(),
|
|
2986
|
+
onClose: () => controller.api.close(),
|
|
2987
|
+
onDiscard: () => controller.api.discard?.(),
|
|
2988
|
+
onCancelExit: () => controller.api.cancelExit?.()
|
|
2719
2989
|
});
|
|
2720
2990
|
}
|
|
2721
2991
|
function navigateBack(context, data) {
|
|
@@ -2746,6 +3016,8 @@ function openSettingsDialog(context) {
|
|
|
2746
3016
|
setBlocking(true);
|
|
2747
3017
|
setDialogOpen(true);
|
|
2748
3018
|
pageApi = controller.api;
|
|
3019
|
+
const rendererHeight = () => context.renderer?.height ?? 30;
|
|
3020
|
+
const maxHeight = () => Math.min(16, Math.max(8, Math.floor(rendererHeight() * .55)));
|
|
2749
3021
|
try {
|
|
2750
3022
|
context.ui.dialog.show(() => createComponent(SettingsWindow, {
|
|
2751
3023
|
get version() {
|
|
@@ -2775,10 +3047,171 @@ function openSettingsDialog(context) {
|
|
|
2775
3047
|
get muted() {
|
|
2776
3048
|
return theme.muted;
|
|
2777
3049
|
},
|
|
2778
|
-
warn
|
|
3050
|
+
warn,
|
|
3051
|
+
isDialog: true,
|
|
3052
|
+
get maxHeight() {
|
|
3053
|
+
return maxHeight();
|
|
3054
|
+
},
|
|
3055
|
+
onJumpTab: (idx) => controller.api.jumpTab(idx),
|
|
3056
|
+
onSelectRow: (id) => controller.api.selectById?.(id),
|
|
3057
|
+
onCycleValue: (id, dir) => controller.api.cycleRowById?.(id, dir),
|
|
3058
|
+
onSave: () => controller.api.save(),
|
|
3059
|
+
onResetPage: () => controller.api.resetPage(),
|
|
3060
|
+
onStageDefaults: () => controller.api.stageDefaults(),
|
|
3061
|
+
onClose: () => controller.api.close(),
|
|
3062
|
+
onDiscard: () => controller.api.discard?.(),
|
|
3063
|
+
onCancelExit: () => controller.api.cancelExit?.()
|
|
2779
3064
|
}), close);
|
|
3065
|
+
context.ui.dialog.set({ size: "large" });
|
|
2780
3066
|
} catch {}
|
|
2781
3067
|
}
|
|
3068
|
+
const [settingsOpen, setSettingsOpen] = createSignal(false);
|
|
3069
|
+
const [activeSessionId, setActiveSessionId] = createSignal();
|
|
3070
|
+
function routeSessionID(context) {
|
|
3071
|
+
try {
|
|
3072
|
+
const route = context?.ui?.router?.current?.();
|
|
3073
|
+
return route?.type === "session" ? route?.sessionID : void 0;
|
|
3074
|
+
} catch {
|
|
3075
|
+
return;
|
|
3076
|
+
}
|
|
3077
|
+
}
|
|
3078
|
+
function closePantheonSettings() {
|
|
3079
|
+
if (pageApi) {
|
|
3080
|
+
pageApi.close();
|
|
3081
|
+
if (pageApi.confirmExit?.()) return;
|
|
3082
|
+
}
|
|
3083
|
+
setSettingsOpen(false);
|
|
3084
|
+
setBlocking(false);
|
|
3085
|
+
}
|
|
3086
|
+
function PantheonSettingsSlot(props) {
|
|
3087
|
+
onMount(() => {
|
|
3088
|
+
setActiveSessionId(props.sessionID);
|
|
3089
|
+
});
|
|
3090
|
+
onCleanup(() => {
|
|
3091
|
+
if (activeSessionId() === props.sessionID) setActiveSessionId(void 0);
|
|
3092
|
+
});
|
|
3093
|
+
return createComponent(Show, {
|
|
3094
|
+
get when() {
|
|
3095
|
+
return memo(() => !!settingsOpen())() && (activeSessionId() === props.sessionID || !activeSessionId());
|
|
3096
|
+
},
|
|
3097
|
+
get children() {
|
|
3098
|
+
return createComponent(InSessionSettingsWindow, {
|
|
3099
|
+
get context() {
|
|
3100
|
+
return props.context;
|
|
3101
|
+
},
|
|
3102
|
+
get sessionID() {
|
|
3103
|
+
return props.sessionID;
|
|
3104
|
+
}
|
|
3105
|
+
});
|
|
3106
|
+
}
|
|
3107
|
+
});
|
|
3108
|
+
}
|
|
3109
|
+
function InSessionSettingsWindow(props) {
|
|
3110
|
+
let windowBox;
|
|
3111
|
+
const context = props.context;
|
|
3112
|
+
const initialRoom = () => Math.max(14, (context.renderer?.height ?? 30) - 10);
|
|
3113
|
+
const [roomHeight, setRoomHeight] = createSignal(initialRoom());
|
|
3114
|
+
const [hasKeyboard, setHasKeyboard] = createSignal(false);
|
|
3115
|
+
function measureRoom() {
|
|
3116
|
+
const box = windowBox;
|
|
3117
|
+
if (!box || box.isDestroyed) return;
|
|
3118
|
+
let child = box;
|
|
3119
|
+
for (let parent = box.parent; parent; child = parent, parent = parent.parent) {
|
|
3120
|
+
const siblings = parent.getChildren?.() ?? [];
|
|
3121
|
+
const messages = siblings[0];
|
|
3122
|
+
if (messages === child || !messages?.getChildren?.().some((item) => "scrollChildIntoView" in item)) continue;
|
|
3123
|
+
const otherRows = siblings.filter((item) => item !== child && item !== messages).reduce((total, item) => total + (item.height ?? 0), 0);
|
|
3124
|
+
const room = Math.max(12, (parent.height ?? 24) - 1 - otherRows - ((child.height ?? 0) - (box.height ?? 0)));
|
|
3125
|
+
if (room !== roomHeight()) queueMicrotask(() => setRoomHeight(room));
|
|
3126
|
+
return;
|
|
3127
|
+
}
|
|
3128
|
+
}
|
|
3129
|
+
onMount(() => {
|
|
3130
|
+
try {
|
|
3131
|
+
context.renderer?.root?.on?.("layout-changed", measureRoom);
|
|
3132
|
+
context.renderer?.on?.("resize", measureRoom);
|
|
3133
|
+
onCleanup(() => {
|
|
3134
|
+
try {
|
|
3135
|
+
context.renderer?.root?.off?.("layout-changed", measureRoom);
|
|
3136
|
+
context.renderer?.off?.("resize", measureRoom);
|
|
3137
|
+
} catch {}
|
|
3138
|
+
});
|
|
3139
|
+
} catch {}
|
|
3140
|
+
measureRoom();
|
|
3141
|
+
setTimeout(() => {
|
|
3142
|
+
try {
|
|
3143
|
+
windowBox?.focus?.();
|
|
3144
|
+
} catch {}
|
|
3145
|
+
}, 50);
|
|
3146
|
+
});
|
|
3147
|
+
try {
|
|
3148
|
+
const popMode = context.keymap?.mode?.push?.(ROUTE_MODE);
|
|
3149
|
+
if (popMode !== void 0) onCleanup(() => popMode());
|
|
3150
|
+
} catch {}
|
|
3151
|
+
const controller = createWindowController(context, () => {
|
|
3152
|
+
setSettingsOpen(false);
|
|
3153
|
+
setBlocking(false);
|
|
3154
|
+
});
|
|
3155
|
+
onCleanup(controller.cleanup);
|
|
3156
|
+
pageApi = controller.api;
|
|
3157
|
+
const theme = context.theme?.text ?? {};
|
|
3158
|
+
const warn = theme?.feedback?.warning?.base ?? "#fba970";
|
|
3159
|
+
return createComponent(SettingsWindow, {
|
|
3160
|
+
boxRef: (el) => {
|
|
3161
|
+
windowBox = el;
|
|
3162
|
+
if (el) {
|
|
3163
|
+
el.on?.("focused", () => setHasKeyboard(true));
|
|
3164
|
+
el.on?.("blurred", () => setHasKeyboard(false));
|
|
3165
|
+
}
|
|
3166
|
+
},
|
|
3167
|
+
get height() {
|
|
3168
|
+
return roomHeight();
|
|
3169
|
+
},
|
|
3170
|
+
get version() {
|
|
3171
|
+
return resolveRunningVersion();
|
|
3172
|
+
},
|
|
3173
|
+
get tabs() {
|
|
3174
|
+
return controller.tabs;
|
|
3175
|
+
},
|
|
3176
|
+
get page() {
|
|
3177
|
+
return controller.page;
|
|
3178
|
+
},
|
|
3179
|
+
get selectedId() {
|
|
3180
|
+
return controller.selectedId;
|
|
3181
|
+
},
|
|
3182
|
+
get draft() {
|
|
3183
|
+
return controller.draft;
|
|
3184
|
+
},
|
|
3185
|
+
get notice() {
|
|
3186
|
+
return controller.notice;
|
|
3187
|
+
},
|
|
3188
|
+
get confirmExit() {
|
|
3189
|
+
return controller.confirmExit;
|
|
3190
|
+
},
|
|
3191
|
+
get fg() {
|
|
3192
|
+
return theme.base;
|
|
3193
|
+
},
|
|
3194
|
+
get muted() {
|
|
3195
|
+
return theme.muted;
|
|
3196
|
+
},
|
|
3197
|
+
warn,
|
|
3198
|
+
hasKeyboard,
|
|
3199
|
+
onJumpTab: (idx) => controller.api.jumpTab(idx),
|
|
3200
|
+
onSelectRow: (id) => controller.api.selectById?.(id),
|
|
3201
|
+
onCycleValue: (id, dir) => controller.api.cycleRowById?.(id, dir),
|
|
3202
|
+
onSave: () => controller.api.save(),
|
|
3203
|
+
onResetPage: () => controller.api.resetPage(),
|
|
3204
|
+
onStageDefaults: () => controller.api.stageDefaults(),
|
|
3205
|
+
onClose: () => closePantheonSettings(),
|
|
3206
|
+
onDiscard: () => controller.api.discard?.(),
|
|
3207
|
+
onCancelExit: () => controller.api.cancelExit?.(),
|
|
3208
|
+
onMouseDown: () => {
|
|
3209
|
+
try {
|
|
3210
|
+
windowBox?.focus?.();
|
|
3211
|
+
} catch {}
|
|
3212
|
+
}
|
|
3213
|
+
});
|
|
3214
|
+
}
|
|
2782
3215
|
function setupPantheonSettings(context) {
|
|
2783
3216
|
try {
|
|
2784
3217
|
context.ui.router?.register?.({
|
|
@@ -2806,26 +3239,15 @@ function setupPantheonSettings(context) {
|
|
|
2806
3239
|
title: "Close settings",
|
|
2807
3240
|
bind: "escape,q",
|
|
2808
3241
|
run: () => {
|
|
2809
|
-
try {
|
|
2810
|
-
context.ui.toast?.show?.({
|
|
2811
|
-
variant: "info",
|
|
2812
|
-
message: "settings: close command fired"
|
|
2813
|
-
});
|
|
2814
|
-
} catch {}
|
|
2815
3242
|
if (pageApi === void 0) {
|
|
2816
|
-
|
|
2817
|
-
context.ui.toast?.show?.({
|
|
2818
|
-
variant: "warning",
|
|
2819
|
-
message: "settings: no window controller bound"
|
|
2820
|
-
});
|
|
2821
|
-
} catch {}
|
|
3243
|
+
closePantheonSettings();
|
|
2822
3244
|
return;
|
|
2823
3245
|
}
|
|
2824
3246
|
if (pageApi.confirmExit?.()) {
|
|
2825
3247
|
pageApi.cancelExit?.();
|
|
2826
3248
|
return;
|
|
2827
3249
|
}
|
|
2828
|
-
|
|
3250
|
+
closePantheonSettings();
|
|
2829
3251
|
}
|
|
2830
3252
|
},
|
|
2831
3253
|
{
|
|
@@ -2887,6 +3309,14 @@ function setupPantheonSettings(context) {
|
|
|
2887
3309
|
pageApi?.nextTab();
|
|
2888
3310
|
}
|
|
2889
3311
|
},
|
|
3312
|
+
{
|
|
3313
|
+
id: "pantheon.settings.prev.tab",
|
|
3314
|
+
title: "Previous settings tab",
|
|
3315
|
+
bind: "shift+tab",
|
|
3316
|
+
run: () => {
|
|
3317
|
+
pageApi?.prevTab?.();
|
|
3318
|
+
}
|
|
3319
|
+
},
|
|
2890
3320
|
{
|
|
2891
3321
|
id: "pantheon.settings.save",
|
|
2892
3322
|
title: "Save staged changes",
|
|
@@ -2924,7 +3354,7 @@ function setupPantheonSettings(context) {
|
|
|
2924
3354
|
context.keymap.layer(() => ({
|
|
2925
3355
|
mode: ROUTE_MODE,
|
|
2926
3356
|
priority: 1,
|
|
2927
|
-
enabled: () => routeGated(),
|
|
3357
|
+
enabled: () => routeGated() || settingsOpen(),
|
|
2928
3358
|
commands
|
|
2929
3359
|
}));
|
|
2930
3360
|
} catch {}
|
|
@@ -2932,14 +3362,15 @@ function setupPantheonSettings(context) {
|
|
|
2932
3362
|
context.keymap.layer(() => ({
|
|
2933
3363
|
mode: "global",
|
|
2934
3364
|
priority: 1,
|
|
2935
|
-
enabled: () => dialogOpen(),
|
|
3365
|
+
enabled: () => dialogOpen() || settingsOpen(),
|
|
2936
3366
|
commands
|
|
2937
3367
|
}));
|
|
2938
3368
|
} catch {}
|
|
2939
3369
|
}
|
|
2940
3370
|
async function openPantheonSettings(context) {
|
|
2941
3371
|
try {
|
|
2942
|
-
|
|
3372
|
+
const viewMode = tuiPrefs().layout?.settingsView ?? "docked";
|
|
3373
|
+
if (viewMode === "fullscreen" && routerAvailable && context.ui?.router?.navigate) {
|
|
2943
3374
|
let returnRoute;
|
|
2944
3375
|
try {
|
|
2945
3376
|
const current = context.ui.router.current();
|
|
@@ -2954,8 +3385,27 @@ async function openPantheonSettings(context) {
|
|
|
2954
3385
|
});
|
|
2955
3386
|
return;
|
|
2956
3387
|
}
|
|
3388
|
+
if (viewMode === "dialog") {
|
|
3389
|
+
openSettingsDialog(context);
|
|
3390
|
+
return;
|
|
3391
|
+
}
|
|
2957
3392
|
} catch {}
|
|
2958
|
-
|
|
3393
|
+
if (!(context?.sessionID ?? routeSessionID(context) ?? activeSessionId())) {
|
|
3394
|
+
try {
|
|
3395
|
+
context.ui?.toast?.show?.({
|
|
3396
|
+
variant: "info",
|
|
3397
|
+
title: "Pantheon",
|
|
3398
|
+
message: "Open a session first: Pantheon settings opens above the prompt box."
|
|
3399
|
+
});
|
|
3400
|
+
} catch {}
|
|
3401
|
+
return;
|
|
3402
|
+
}
|
|
3403
|
+
if (settingsOpen()) {
|
|
3404
|
+
closePantheonSettings();
|
|
3405
|
+
return;
|
|
3406
|
+
}
|
|
3407
|
+
setSettingsOpen(true);
|
|
3408
|
+
setBlocking(true);
|
|
2959
3409
|
}
|
|
2960
3410
|
//#endregion
|
|
2961
3411
|
//#region src/sidebar-width.ts
|
|
@@ -3205,10 +3655,10 @@ async function defaultWhatsNewStatePath(env = process.env, home = homedir()) {
|
|
|
3205
3655
|
* - never throws on its own inputs; I/O failures inside the state module
|
|
3206
3656
|
* are fail-open there.
|
|
3207
3657
|
*/
|
|
3208
|
-
/** Muted footer hint teaching the dismiss bind
|
|
3209
|
-
const WHATS_NEW_CLOSE_HINT = "esc/q
|
|
3658
|
+
/** Muted footer hint teaching the dismiss bind. */
|
|
3659
|
+
const WHATS_NEW_CLOSE_HINT = "esc/q close";
|
|
3210
3660
|
/** Hint variant when the highlights span more than one page. */
|
|
3211
|
-
const WHATS_NEW_PAGES_HINT = "esc/q
|
|
3661
|
+
const WHATS_NEW_PAGES_HINT = "esc/q close · n next · p back";
|
|
3212
3662
|
/** Hard-wrap one display line into rows of at most `width` columns (>= 10). */
|
|
3213
3663
|
function wrapWhatsNewLine(line, width) {
|
|
3214
3664
|
const bounded = Number.isInteger(width) && width > 10 ? width : 76;
|
|
@@ -3287,54 +3737,154 @@ async function openWhatsNew(input) {
|
|
|
3287
3737
|
* CHANGELOG.md, unreadable state, a host API that throws — the window simply
|
|
3288
3738
|
* does not show (fail-open, like the rest of the plugin).
|
|
3289
3739
|
*/
|
|
3290
|
-
/** Window body: title, rule, the current page (wrapped), footer
|
|
3740
|
+
/** Window body: title, rule, the current page (wrapped), footer action bar with OK button. */
|
|
3291
3741
|
function WhatsNewContent(props) {
|
|
3292
3742
|
const rows = () => {
|
|
3293
3743
|
const current = props.data.pages[Math.min(props.page(), props.pageCount() - 1)] ?? [];
|
|
3294
3744
|
const wrapped = [];
|
|
3295
|
-
for (const line of current) wrapped.push(...wrapWhatsNewLine(line,
|
|
3745
|
+
for (const line of current) wrapped.push(...wrapWhatsNewLine(line, 72));
|
|
3296
3746
|
return wrapped;
|
|
3297
3747
|
};
|
|
3298
3748
|
return (() => {
|
|
3299
|
-
var _el$ = createElement("box"), _el$2 = createElement("
|
|
3749
|
+
var _el$ = createElement("box"), _el$2 = createElement("box"), _el$3 = createElement("box"), _el$4 = createElement("box"), _el$5 = createElement("text"), _el$7 = createElement("text"), _el$8 = createElement("box"), _el$9 = createElement("text"), _el$1 = createElement("box"), _el$10 = createElement("text"), _el$12 = createElement("box"), _el$13 = createElement("box"), _el$14 = createElement("text"), _el$16 = createElement("box"), _el$17 = createElement("box"), _el$25 = createElement("text"), _el$27 = createElement("box"), _el$28 = createElement("text");
|
|
3300
3750
|
insertNode(_el$, _el$2);
|
|
3301
|
-
insertNode(_el$, _el$
|
|
3302
|
-
insertNode(_el$, _el$
|
|
3303
|
-
insertNode(_el$, _el$
|
|
3751
|
+
insertNode(_el$, _el$1);
|
|
3752
|
+
insertNode(_el$, _el$12);
|
|
3753
|
+
insertNode(_el$, _el$13);
|
|
3754
|
+
insertNode(_el$, _el$16);
|
|
3304
3755
|
setProp(_el$, "flexDirection", "column");
|
|
3305
|
-
setProp(_el$, "
|
|
3306
|
-
setProp(_el$, "
|
|
3756
|
+
setProp(_el$, "borderStyle", "rounded");
|
|
3757
|
+
setProp(_el$, "paddingLeft", 2);
|
|
3758
|
+
setProp(_el$, "paddingRight", 2);
|
|
3307
3759
|
setProp(_el$, "paddingTop", 1);
|
|
3308
|
-
setProp(_el
|
|
3309
|
-
|
|
3310
|
-
insertNode(_el$
|
|
3311
|
-
|
|
3760
|
+
setProp(_el$, "paddingBottom", 1);
|
|
3761
|
+
insertNode(_el$2, _el$3);
|
|
3762
|
+
insertNode(_el$2, _el$8);
|
|
3763
|
+
setProp(_el$2, "flexDirection", "row");
|
|
3764
|
+
setProp(_el$2, "alignItems", "center");
|
|
3765
|
+
setProp(_el$2, "justifyContent", "space-between");
|
|
3766
|
+
insertNode(_el$3, _el$4);
|
|
3767
|
+
insertNode(_el$3, _el$7);
|
|
3768
|
+
setProp(_el$3, "flexDirection", "row");
|
|
3769
|
+
setProp(_el$3, "alignItems", "center");
|
|
3770
|
+
insertNode(_el$4, _el$5);
|
|
3771
|
+
setProp(_el$4, "paddingLeft", 1);
|
|
3772
|
+
setProp(_el$4, "paddingRight", 1);
|
|
3773
|
+
setProp(_el$4, "marginRight", 1);
|
|
3774
|
+
insertNode(_el$5, createTextNode(`NOVIDADES`));
|
|
3775
|
+
setProp(_el$5, "fg", "#000000");
|
|
3776
|
+
setProp(_el$5, "attributes", 1);
|
|
3777
|
+
setProp(_el$7, "attributes", 1);
|
|
3778
|
+
insert(_el$7, () => props.data.title);
|
|
3779
|
+
insertNode(_el$8, _el$9);
|
|
3780
|
+
setProp(_el$8, "onMouseDown", () => props.onClose?.());
|
|
3781
|
+
insertNode(_el$9, createTextNode(`[ Esc / Q ]`));
|
|
3782
|
+
insertNode(_el$1, _el$10);
|
|
3783
|
+
setProp(_el$1, "flexDirection", "row");
|
|
3784
|
+
setProp(_el$1, "height", 1);
|
|
3785
|
+
setProp(_el$1, "marginTop", 1);
|
|
3786
|
+
setProp(_el$1, "marginBottom", 1);
|
|
3787
|
+
insertNode(_el$10, createTextNode(`────────────────────────────────────────────────────────────────────────`));
|
|
3788
|
+
setProp(_el$12, "flexDirection", "column");
|
|
3789
|
+
setProp(_el$12, "minHeight", 8);
|
|
3790
|
+
insert(_el$12, createComponent(For, {
|
|
3312
3791
|
get each() {
|
|
3313
3792
|
return rows();
|
|
3314
3793
|
},
|
|
3315
|
-
children: (line) =>
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
})
|
|
3327
|
-
|
|
3794
|
+
children: (line) => {
|
|
3795
|
+
const isBullet = line.startsWith("• ");
|
|
3796
|
+
return (() => {
|
|
3797
|
+
var _el$30 = createElement("text");
|
|
3798
|
+
spread(_el$30, mergeProps({ get fg() {
|
|
3799
|
+
return isBullet ? props.fg : props.muted;
|
|
3800
|
+
} }, isBullet ? { attributes: 1 } : {}), true);
|
|
3801
|
+
insert(_el$30, line);
|
|
3802
|
+
return _el$30;
|
|
3803
|
+
})();
|
|
3804
|
+
}
|
|
3805
|
+
}));
|
|
3806
|
+
insertNode(_el$13, _el$14);
|
|
3807
|
+
setProp(_el$13, "flexDirection", "row");
|
|
3808
|
+
setProp(_el$13, "height", 1);
|
|
3809
|
+
setProp(_el$13, "marginTop", 1);
|
|
3810
|
+
insertNode(_el$14, createTextNode(`────────────────────────────────────────────────────────────────────────`));
|
|
3811
|
+
insertNode(_el$16, _el$17);
|
|
3812
|
+
insertNode(_el$16, _el$27);
|
|
3813
|
+
setProp(_el$16, "flexDirection", "row");
|
|
3814
|
+
setProp(_el$16, "alignItems", "center");
|
|
3815
|
+
setProp(_el$16, "justifyContent", "space-between");
|
|
3816
|
+
setProp(_el$16, "marginTop", 1);
|
|
3817
|
+
insertNode(_el$17, _el$25);
|
|
3818
|
+
setProp(_el$17, "flexDirection", "row");
|
|
3819
|
+
setProp(_el$17, "alignItems", "center");
|
|
3820
|
+
insert(_el$17, createComponent(Show, {
|
|
3821
|
+
get when() {
|
|
3822
|
+
return props.pageCount() > 1;
|
|
3823
|
+
},
|
|
3824
|
+
get children() {
|
|
3825
|
+
return [
|
|
3826
|
+
(() => {
|
|
3827
|
+
var _el$18 = createElement("box"), _el$19 = createElement("text");
|
|
3828
|
+
insertNode(_el$18, _el$19);
|
|
3829
|
+
setProp(_el$18, "backgroundColor", "#262626");
|
|
3830
|
+
setProp(_el$18, "paddingLeft", 1);
|
|
3831
|
+
setProp(_el$18, "paddingRight", 1);
|
|
3832
|
+
setProp(_el$18, "marginRight", 1);
|
|
3833
|
+
setProp(_el$18, "onMouseDown", () => props.onPrev?.());
|
|
3834
|
+
insertNode(_el$19, createTextNode(`‹ Prev`));
|
|
3835
|
+
setProp(_el$19, "fg", "#ffffff");
|
|
3836
|
+
return _el$18;
|
|
3837
|
+
})(),
|
|
3838
|
+
(() => {
|
|
3839
|
+
var _el$21 = createElement("text");
|
|
3840
|
+
setProp(_el$21, "marginRight", 1);
|
|
3841
|
+
insert(_el$21, () => `${props.page() + 1} / ${props.pageCount()}`);
|
|
3842
|
+
effect((_$p) => setProp(_el$21, "fg", props.muted, _$p));
|
|
3843
|
+
return _el$21;
|
|
3844
|
+
})(),
|
|
3845
|
+
(() => {
|
|
3846
|
+
var _el$22 = createElement("box"), _el$23 = createElement("text");
|
|
3847
|
+
insertNode(_el$22, _el$23);
|
|
3848
|
+
setProp(_el$22, "backgroundColor", "#262626");
|
|
3849
|
+
setProp(_el$22, "paddingLeft", 1);
|
|
3850
|
+
setProp(_el$22, "paddingRight", 1);
|
|
3851
|
+
setProp(_el$22, "marginRight", 1);
|
|
3852
|
+
setProp(_el$22, "onMouseDown", () => props.onNext?.());
|
|
3853
|
+
insertNode(_el$23, createTextNode(`Next ›`));
|
|
3854
|
+
setProp(_el$23, "fg", "#ffffff");
|
|
3855
|
+
return _el$22;
|
|
3856
|
+
})()
|
|
3857
|
+
];
|
|
3858
|
+
}
|
|
3859
|
+
}), _el$25);
|
|
3860
|
+
insertNode(_el$25, createTextNode(`Enter / Esc / Q close`));
|
|
3861
|
+
insertNode(_el$27, _el$28);
|
|
3862
|
+
setProp(_el$27, "paddingLeft", 2);
|
|
3863
|
+
setProp(_el$27, "paddingRight", 2);
|
|
3864
|
+
setProp(_el$27, "onMouseDown", () => props.onClose?.());
|
|
3865
|
+
insertNode(_el$28, createTextNode(`OK, Got it`));
|
|
3866
|
+
setProp(_el$28, "fg", "#000000");
|
|
3867
|
+
setProp(_el$28, "attributes", 1);
|
|
3328
3868
|
effect((_p$) => {
|
|
3329
|
-
var _v$ = props.
|
|
3330
|
-
_v$ !== _p$.e && (_p$.e = setProp(_el
|
|
3331
|
-
_v$2 !== _p$.t && (_p$.t = setProp(_el$
|
|
3332
|
-
_v$3 !== _p$.a && (_p$.a = setProp(_el$
|
|
3869
|
+
var _v$ = props.warn ?? "#fba970", _v$2 = props.warn ?? "#fba970", _v$3 = props.fg, _v$4 = props.muted, _v$5 = props.muted, _v$6 = props.muted, _v$7 = props.muted, _v$8 = props.warn ?? "#fba970";
|
|
3870
|
+
_v$ !== _p$.e && (_p$.e = setProp(_el$, "borderColor", _v$, _p$.e));
|
|
3871
|
+
_v$2 !== _p$.t && (_p$.t = setProp(_el$4, "backgroundColor", _v$2, _p$.t));
|
|
3872
|
+
_v$3 !== _p$.a && (_p$.a = setProp(_el$7, "fg", _v$3, _p$.a));
|
|
3873
|
+
_v$4 !== _p$.o && (_p$.o = setProp(_el$9, "fg", _v$4, _p$.o));
|
|
3874
|
+
_v$5 !== _p$.i && (_p$.i = setProp(_el$10, "fg", _v$5, _p$.i));
|
|
3875
|
+
_v$6 !== _p$.n && (_p$.n = setProp(_el$14, "fg", _v$6, _p$.n));
|
|
3876
|
+
_v$7 !== _p$.s && (_p$.s = setProp(_el$25, "fg", _v$7, _p$.s));
|
|
3877
|
+
_v$8 !== _p$.h && (_p$.h = setProp(_el$27, "backgroundColor", _v$8, _p$.h));
|
|
3333
3878
|
return _p$;
|
|
3334
3879
|
}, {
|
|
3335
3880
|
e: void 0,
|
|
3336
3881
|
t: void 0,
|
|
3337
|
-
a: void 0
|
|
3882
|
+
a: void 0,
|
|
3883
|
+
o: void 0,
|
|
3884
|
+
i: void 0,
|
|
3885
|
+
n: void 0,
|
|
3886
|
+
s: void 0,
|
|
3887
|
+
h: void 0
|
|
3338
3888
|
});
|
|
3339
3889
|
return _el$;
|
|
3340
3890
|
})();
|
|
@@ -3359,9 +3909,18 @@ async function maybeShowWhatsNewV2(context) {
|
|
|
3359
3909
|
mode: "global",
|
|
3360
3910
|
enabled: () => open(),
|
|
3361
3911
|
commands: [
|
|
3912
|
+
{
|
|
3913
|
+
id: "pantheon.whats-new.confirm",
|
|
3914
|
+
title: "Confirm and close what is new",
|
|
3915
|
+
bind: "enter,space",
|
|
3916
|
+
run: () => {
|
|
3917
|
+
if (!open()) return false;
|
|
3918
|
+
dismiss();
|
|
3919
|
+
}
|
|
3920
|
+
},
|
|
3362
3921
|
{
|
|
3363
3922
|
id: "pantheon.whats-new.close",
|
|
3364
|
-
title: "
|
|
3923
|
+
title: "Close what is new",
|
|
3365
3924
|
bind: "escape,q",
|
|
3366
3925
|
run: () => {
|
|
3367
3926
|
if (!open()) return false;
|
|
@@ -3409,6 +3968,7 @@ async function maybeShowWhatsNewV2(context) {
|
|
|
3409
3968
|
setOpen(true);
|
|
3410
3969
|
try {
|
|
3411
3970
|
const theme = context.theme?.text ?? {};
|
|
3971
|
+
const warn = theme?.feedback?.warning?.base ?? "#fba970";
|
|
3412
3972
|
context.ui.dialog.show(() => createComponent(WhatsNewContent, {
|
|
3413
3973
|
data: viewData,
|
|
3414
3974
|
page,
|
|
@@ -3418,7 +3978,11 @@ async function maybeShowWhatsNewV2(context) {
|
|
|
3418
3978
|
},
|
|
3419
3979
|
get muted() {
|
|
3420
3980
|
return theme.muted;
|
|
3421
|
-
}
|
|
3981
|
+
},
|
|
3982
|
+
warn,
|
|
3983
|
+
onClose: dismiss,
|
|
3984
|
+
onNext: () => setPage((current) => Math.min(current + 1, pageCount() - 1)),
|
|
3985
|
+
onPrev: () => setPage((current) => Math.max(current - 1, 0))
|
|
3422
3986
|
}), close);
|
|
3423
3987
|
} catch {}
|
|
3424
3988
|
}
|
|
@@ -3437,7 +4001,7 @@ const SPINNER_INTERVAL_MS = 80;
|
|
|
3437
4001
|
/** Bounded warm-up: sync at most this many sessions at plugin load. */
|
|
3438
4002
|
const WARMUP_SESSION_LIMIT = 24;
|
|
3439
4003
|
/** Sidebar body shown while the host has not published a session yet. */
|
|
3440
|
-
const SIDEBAR_WAITING_LABEL = "
|
|
4004
|
+
const SIDEBAR_WAITING_LABEL = "Waiting for session…";
|
|
3441
4005
|
/** Delegate-completion toast title. */
|
|
3442
4006
|
const TOAST_TITLE = "Pantheon";
|
|
3443
4007
|
/** Marker before the preset label (fixed header, home status, prompt footer).
|
|
@@ -3913,7 +4477,7 @@ function contextBlockRows(usage, cost, gaugeStyle = "both", barOptions) {
|
|
|
3913
4477
|
lead: null,
|
|
3914
4478
|
value: spentValue,
|
|
3915
4479
|
tail: null,
|
|
3916
|
-
suffix: "
|
|
4480
|
+
suffix: " spent in session",
|
|
3917
4481
|
tone: null
|
|
3918
4482
|
};
|
|
3919
4483
|
if (usage === null) return spent === null ? null : {
|
|
@@ -5137,7 +5701,7 @@ function buildDispatchBlock(views, now = Date.now(), frame = 0, max = 34) {
|
|
|
5137
5701
|
const DISPATCH_PANEL_NAME = "pantheon.dispatch";
|
|
5138
5702
|
/** Toast shown when `ui.panel.open` refuses (no session route is active). The
|
|
5139
5703
|
* panel only exists inside a session, so there is no alternative route. */
|
|
5140
|
-
const DISPATCH_PANEL_TOAST = "
|
|
5704
|
+
const DISPATCH_PANEL_TOAST = "Open a session to view Dispatch";
|
|
5141
5705
|
/** Panel title marker — the same glyph the sidebar block header uses. */
|
|
5142
5706
|
const DISPATCH_PANEL_HEADER_MARKER = "◈";
|
|
5143
5707
|
/** Selected-row gutter marker (`▸`, one cell). */
|
|
@@ -5149,7 +5713,7 @@ const DISPATCH_PANEL_RULE_CHAR = "─";
|
|
|
5149
5713
|
/** Em dash for any datum the host did not publish. */
|
|
5150
5714
|
const DISPATCH_PANEL_DASH = "—";
|
|
5151
5715
|
/** Body of an empty panel (the claim still renders, the list is just empty). */
|
|
5152
|
-
const DISPATCH_PANEL_EMPTY_TEXT = "
|
|
5716
|
+
const DISPATCH_PANEL_EMPTY_TEXT = "No delegated sessions";
|
|
5153
5717
|
/** Width at or above which the list and the detail sit side by side. */
|
|
5154
5718
|
const DISPATCH_PANEL_WIDE_MIN_WIDTH = 72;
|
|
5155
5719
|
/** Rows the viewport holds; pageup/pagedown move by exactly this many rows. */
|
|
@@ -5361,55 +5925,55 @@ const DISPATCH_PANEL_COMMANDS = [
|
|
|
5361
5925
|
{
|
|
5362
5926
|
action: "up",
|
|
5363
5927
|
id: "pantheon.dispatch.up",
|
|
5364
|
-
title: "Dispatch:
|
|
5928
|
+
title: "Dispatch: select previous",
|
|
5365
5929
|
bind: "k,up"
|
|
5366
5930
|
},
|
|
5367
5931
|
{
|
|
5368
5932
|
action: "down",
|
|
5369
5933
|
id: "pantheon.dispatch.down",
|
|
5370
|
-
title: "Dispatch:
|
|
5934
|
+
title: "Dispatch: select next",
|
|
5371
5935
|
bind: "j,down"
|
|
5372
5936
|
},
|
|
5373
5937
|
{
|
|
5374
5938
|
action: "home",
|
|
5375
5939
|
id: "pantheon.dispatch.home",
|
|
5376
|
-
title: "Dispatch:
|
|
5940
|
+
title: "Dispatch: first",
|
|
5377
5941
|
bind: "home"
|
|
5378
5942
|
},
|
|
5379
5943
|
{
|
|
5380
5944
|
action: "end",
|
|
5381
5945
|
id: "pantheon.dispatch.end",
|
|
5382
|
-
title: "Dispatch:
|
|
5946
|
+
title: "Dispatch: last",
|
|
5383
5947
|
bind: "end"
|
|
5384
5948
|
},
|
|
5385
5949
|
{
|
|
5386
5950
|
action: "pageup",
|
|
5387
5951
|
id: "pantheon.dispatch.pageup",
|
|
5388
|
-
title: "Dispatch:
|
|
5952
|
+
title: "Dispatch: page up",
|
|
5389
5953
|
bind: "pageup"
|
|
5390
5954
|
},
|
|
5391
5955
|
{
|
|
5392
5956
|
action: "pagedown",
|
|
5393
5957
|
id: "pantheon.dispatch.pagedown",
|
|
5394
|
-
title: "Dispatch:
|
|
5958
|
+
title: "Dispatch: page down",
|
|
5395
5959
|
bind: "pagedown"
|
|
5396
5960
|
},
|
|
5397
5961
|
{
|
|
5398
5962
|
action: "toggle",
|
|
5399
5963
|
id: "pantheon.dispatch.toggle",
|
|
5400
|
-
title: "Dispatch:
|
|
5964
|
+
title: "Dispatch: expand detail",
|
|
5401
5965
|
bind: "enter"
|
|
5402
5966
|
},
|
|
5403
5967
|
{
|
|
5404
5968
|
action: "fullscreen",
|
|
5405
5969
|
id: "pantheon.dispatch.fullscreen",
|
|
5406
|
-
title: "Dispatch:
|
|
5970
|
+
title: "Dispatch: fullscreen",
|
|
5407
5971
|
bind: "f"
|
|
5408
5972
|
},
|
|
5409
5973
|
{
|
|
5410
5974
|
action: "close",
|
|
5411
5975
|
id: "pantheon.dispatch.close",
|
|
5412
|
-
title: "Dispatch:
|
|
5976
|
+
title: "Dispatch: close",
|
|
5413
5977
|
bind: "escape,q"
|
|
5414
5978
|
}
|
|
5415
5979
|
];
|
|
@@ -5464,10 +6028,10 @@ function dispatchPanelFooter(shortcutsOf) {
|
|
|
5464
6028
|
return text === "" ? "—" : text;
|
|
5465
6029
|
};
|
|
5466
6030
|
return [
|
|
5467
|
-
`${keys("pantheon.dispatch.up")} ${keys("pantheon.dispatch.down")}
|
|
5468
|
-
`${keys("pantheon.dispatch.toggle")}
|
|
6031
|
+
`${keys("pantheon.dispatch.up")} ${keys("pantheon.dispatch.down")} move`,
|
|
6032
|
+
`${keys("pantheon.dispatch.toggle")} detail`,
|
|
5469
6033
|
`${keys("pantheon.dispatch.fullscreen")} fullscreen`,
|
|
5470
|
-
`${keys("pantheon.dispatch.close")}
|
|
6034
|
+
`${keys("pantheon.dispatch.close")} close`
|
|
5471
6035
|
].join(SPEND_LINE_SEPARATOR);
|
|
5472
6036
|
}
|
|
5473
6037
|
/** The subset of `PanelInput` the model reads, so tests can drive it with a
|
|
@@ -5716,7 +6280,7 @@ async function checkForPantheonUpdate(context) {
|
|
|
5716
6280
|
const latest = String((await response.json())?.version ?? "");
|
|
5717
6281
|
if (!latest) return;
|
|
5718
6282
|
const notice = pickUpdateNotice({
|
|
5719
|
-
currentVersion: "2.0.0
|
|
6283
|
+
currentVersion: "2.0.0",
|
|
5720
6284
|
latestVersion: latest,
|
|
5721
6285
|
state: readState(),
|
|
5722
6286
|
nowMs: Date.now()
|
|
@@ -5780,8 +6344,19 @@ function useActivePreset(context) {
|
|
|
5780
6344
|
clearInterval(timer);
|
|
5781
6345
|
});
|
|
5782
6346
|
});
|
|
6347
|
+
const effectivePreset = () => {
|
|
6348
|
+
const preview = tuiDraftPreview();
|
|
6349
|
+
if (preview && "preset" in preview) {
|
|
6350
|
+
const stagedName = preview.preset;
|
|
6351
|
+
return {
|
|
6352
|
+
...preset(),
|
|
6353
|
+
name: stagedName === "none" ? null : stagedName
|
|
6354
|
+
};
|
|
6355
|
+
}
|
|
6356
|
+
return preset();
|
|
6357
|
+
};
|
|
5783
6358
|
return {
|
|
5784
|
-
preset,
|
|
6359
|
+
preset: effectivePreset,
|
|
5785
6360
|
overrides
|
|
5786
6361
|
};
|
|
5787
6362
|
}
|
|
@@ -6339,7 +6914,7 @@ function ContextRowView(props) {
|
|
|
6339
6914
|
const fullWidth = () => cellWidth(`${props.row.lead ?? ""}${props.row.tail ?? ""}${props.row.value}${props.row.suffix ?? ""}`);
|
|
6340
6915
|
return createComponent(Show, {
|
|
6341
6916
|
get when() {
|
|
6342
|
-
return props.row.suffix !== "
|
|
6917
|
+
return props.row.suffix !== " spent in session";
|
|
6343
6918
|
},
|
|
6344
6919
|
get fallback() {
|
|
6345
6920
|
return (() => {
|
|
@@ -6347,7 +6922,7 @@ function ContextRowView(props) {
|
|
|
6347
6922
|
setProp(_el$3, "flexDirection", "column");
|
|
6348
6923
|
insert(_el$3, createComponent(For, {
|
|
6349
6924
|
get each() {
|
|
6350
|
-
return sidebarMoneyLines("
|
|
6925
|
+
return sidebarMoneyLines("spent in session", props.row.value);
|
|
6351
6926
|
},
|
|
6352
6927
|
children: (line) => (() => {
|
|
6353
6928
|
var _el$4 = createElement("text");
|
|
@@ -6517,7 +7092,7 @@ function Sidebar(props) {
|
|
|
6517
7092
|
get children() {
|
|
6518
7093
|
var _el$13 = createElement("text");
|
|
6519
7094
|
setProp(_el$13, "attributes", 1);
|
|
6520
|
-
insert(_el$13, `Pantheon v2.0.0
|
|
7095
|
+
insert(_el$13, `Pantheon v2.0.0`);
|
|
6521
7096
|
effect((_$p) => setProp(_el$13, "fg", text(), _$p));
|
|
6522
7097
|
return _el$13;
|
|
6523
7098
|
}
|
|
@@ -6559,7 +7134,7 @@ function Sidebar(props) {
|
|
|
6559
7134
|
},
|
|
6560
7135
|
children: (current) => (() => {
|
|
6561
7136
|
var _el$27 = createElement("text");
|
|
6562
|
-
insert(_el$27, () => `
|
|
7137
|
+
insert(_el$27, () => `Session: ${truncateLabel(current().title || current().id)}`);
|
|
6563
7138
|
effect((_$p) => setProp(_el$27, "fg", text(), _$p));
|
|
6564
7139
|
return _el$27;
|
|
6565
7140
|
})()
|
|
@@ -6665,12 +7240,12 @@ function Sidebar(props) {
|
|
|
6665
7240
|
get children() {
|
|
6666
7241
|
return [(() => {
|
|
6667
7242
|
var _el$29 = createElement("text");
|
|
6668
|
-
insertNode(_el$29, createTextNode(`
|
|
7243
|
+
insertNode(_el$29, createTextNode(`Session · reported cost`));
|
|
6669
7244
|
effect((_$p) => setProp(_el$29, "fg", muted(), _$p));
|
|
6670
7245
|
return _el$29;
|
|
6671
7246
|
})(), (() => {
|
|
6672
7247
|
var _el$31 = createElement("text");
|
|
6673
|
-
insertNode(_el$31, createTextNode(`
|
|
7248
|
+
insertNode(_el$31, createTextNode(`Model Tokens USD`));
|
|
6674
7249
|
effect((_$p) => setProp(_el$31, "fg", muted(), _$p));
|
|
6675
7250
|
return _el$31;
|
|
6676
7251
|
})()];
|
|
@@ -7112,7 +7687,7 @@ function DispatchPanel(props) {
|
|
|
7112
7687
|
});
|
|
7113
7688
|
const empty = () => (() => {
|
|
7114
7689
|
var _el$58 = createElement("text");
|
|
7115
|
-
insertNode(_el$58, createTextNode(`
|
|
7690
|
+
insertNode(_el$58, createTextNode(`No delegated sessions`));
|
|
7116
7691
|
effect((_$p) => setProp(_el$58, "fg", muted(), _$p));
|
|
7117
7692
|
return _el$58;
|
|
7118
7693
|
})();
|
|
@@ -7289,7 +7864,7 @@ function HomeStatus(props) {
|
|
|
7289
7864
|
},
|
|
7290
7865
|
get children() {
|
|
7291
7866
|
var _el$73 = createElement("text");
|
|
7292
|
-
insert(_el$73, () => `Pantheon v2.0.0
|
|
7867
|
+
insert(_el$73, () => `Pantheon v2.0.0${preset().name ? ` ▸ ${preset().name}` : ""}`);
|
|
7293
7868
|
effect((_$p) => setProp(_el$73, "fg", muted(), _$p));
|
|
7294
7869
|
return _el$73;
|
|
7295
7870
|
}
|
|
@@ -7408,6 +7983,13 @@ const plugin = Plugin.define({
|
|
|
7408
7983
|
try {
|
|
7409
7984
|
setupPantheonSettings(context);
|
|
7410
7985
|
} catch {}
|
|
7986
|
+
const unregisterSettingsSlot = context.ui.slot({
|
|
7987
|
+
append: "session.composer.top",
|
|
7988
|
+
render: ({ sessionID }) => createComponent(PantheonSettingsSlot, {
|
|
7989
|
+
context,
|
|
7990
|
+
sessionID
|
|
7991
|
+
})
|
|
7992
|
+
});
|
|
7411
7993
|
maybeShowWhatsNewV2(context);
|
|
7412
7994
|
return () => {
|
|
7413
7995
|
clearTimeout(updateNoticeTimer);
|
|
@@ -7415,6 +7997,7 @@ const plugin = Plugin.define({
|
|
|
7415
7997
|
if (typeof unregisterHome === "function") unregisterHome();
|
|
7416
7998
|
if (typeof unregisterPromptFooter === "function") unregisterPromptFooter();
|
|
7417
7999
|
if (typeof unregisterPanel === "function") unregisterPanel();
|
|
8000
|
+
if (typeof unregisterSettingsSlot === "function") unregisterSettingsSlot();
|
|
7418
8001
|
if (typeof unregisterCommands === "function") unregisterCommands();
|
|
7419
8002
|
if (typeof unregisterSettingsCommands === "function") unregisterSettingsCommands();
|
|
7420
8003
|
delete globalState[SINGLETON];
|