pantheon-opencode 2.0.0-beta.4 → 2.0.0-beta.5
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 +17 -68
- package/README.md +18 -5
- package/bin/pantheon-init.mjs +1 -2
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/pyproject.toml +1 -1
- package/scripts/changelog-format.mjs +345 -0
- package/scripts/changelog-merge.mjs +5 -10
- package/scripts/docs-check-changelog.mjs +36 -137
- package/scripts/install/interactive.mjs +5 -254
- package/scripts/install/opencode.mjs +6 -75
- package/scripts/release-gates.mjs +33 -13
- package/scripts/release-notes.mjs +51 -36
- package/scripts/release-retrofit.mjs +158 -0
- package/scripts/versioning.mjs +1 -1
- package/src/plugins/tui/dist/tui.d.ts +3 -2
- package/src/plugins/tui/dist/tui.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui.js +470 -233
- 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/index.tsx +86 -29
- package/src/plugins/tui/src/pantheon-settings.tsx +18 -0
- package/src/plugins/tui/src/tui-prefs.ts +378 -0
|
@@ -819,6 +819,175 @@ function buildPresetTab(input) {
|
|
|
819
819
|
};
|
|
820
820
|
}
|
|
821
821
|
//#endregion
|
|
822
|
+
//#region src/tui-prefs.ts
|
|
823
|
+
const PREFS_SYMBOL = Symbol.for("pantheon.tui.prefs.v1");
|
|
824
|
+
function stash() {
|
|
825
|
+
return globalThis[PREFS_SYMBOL];
|
|
826
|
+
}
|
|
827
|
+
/** Create (or reuse) the durable prefs store. Fail-open: without host
|
|
828
|
+
* storage the consumers fall back to DEFAULT_TUI_PREFS (read-only). */
|
|
829
|
+
function initTuiPrefs(context) {
|
|
830
|
+
if (stash() !== void 0) return;
|
|
831
|
+
try {
|
|
832
|
+
const handle = context.storage?.store?.("tui-prefs", { initial: DEFAULT_TUI_PREFS });
|
|
833
|
+
if (handle !== void 0) globalThis[PREFS_SYMBOL] = handle;
|
|
834
|
+
} catch {}
|
|
835
|
+
}
|
|
836
|
+
/** The live reactive prefs (read properties inside memos/JSX — tracked). */
|
|
837
|
+
function tuiPrefs() {
|
|
838
|
+
return stash()?.[0] ?? DEFAULT_TUI_PREFS;
|
|
839
|
+
}
|
|
840
|
+
/** Stage a mutation against the durable store; resolves when persisted. */
|
|
841
|
+
function mutateTuiPrefs(mutation) {
|
|
842
|
+
const handle = stash();
|
|
843
|
+
if (handle === void 0) return Promise.resolve();
|
|
844
|
+
return handle[1](mutation);
|
|
845
|
+
}
|
|
846
|
+
const GAUGE_STYLES = Object.freeze([
|
|
847
|
+
"both",
|
|
848
|
+
"bar",
|
|
849
|
+
"percent",
|
|
850
|
+
"off"
|
|
851
|
+
]);
|
|
852
|
+
const ENABLED_CYCLE = Object.freeze(["enabled", "disabled"]);
|
|
853
|
+
const DEFAULT_TUI_PREFS = {
|
|
854
|
+
version: 1,
|
|
855
|
+
sidebar: {
|
|
856
|
+
header: {
|
|
857
|
+
version: true,
|
|
858
|
+
preset: true,
|
|
859
|
+
session: true
|
|
860
|
+
},
|
|
861
|
+
blocks: {
|
|
862
|
+
context: true,
|
|
863
|
+
git: true,
|
|
864
|
+
todo: true,
|
|
865
|
+
dispatch: true
|
|
866
|
+
},
|
|
867
|
+
context: {
|
|
868
|
+
gauge: "both",
|
|
869
|
+
tokens: true,
|
|
870
|
+
spent: true,
|
|
871
|
+
modelUsage: true,
|
|
872
|
+
performance: true,
|
|
873
|
+
localSpend: true
|
|
874
|
+
}
|
|
875
|
+
},
|
|
876
|
+
footer: {
|
|
877
|
+
prompt: true,
|
|
878
|
+
home: true
|
|
879
|
+
}
|
|
880
|
+
};
|
|
881
|
+
const onOff = ENABLED_CYCLE;
|
|
882
|
+
const row = (id, name, value, note) => ({
|
|
883
|
+
id,
|
|
884
|
+
name,
|
|
885
|
+
value: value ? "enabled" : "disabled",
|
|
886
|
+
cycle: onOff,
|
|
887
|
+
note
|
|
888
|
+
});
|
|
889
|
+
function buildTuiTab(prefs) {
|
|
890
|
+
return {
|
|
891
|
+
id: "tui",
|
|
892
|
+
title: "TUI",
|
|
893
|
+
groups: [
|
|
894
|
+
{
|
|
895
|
+
title: "Sidebar header",
|
|
896
|
+
rows: [
|
|
897
|
+
row("tui.sidebar.header.version", "Version line", prefs.sidebar.header.version, "the `Pantheon v…` line"),
|
|
898
|
+
row("tui.sidebar.header.preset", "Preset line", prefs.sidebar.header.preset, "the `▸ preset · provider` line"),
|
|
899
|
+
row("tui.sidebar.header.session", "Session line", prefs.sidebar.header.session, "the active session title")
|
|
900
|
+
]
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
title: "Sidebar blocks",
|
|
904
|
+
rows: [
|
|
905
|
+
row("tui.sidebar.block.context", "Context block", prefs.sidebar.blocks.context, "tokens, gauge, spend, model usage"),
|
|
906
|
+
row("tui.sidebar.block.git", "Git block", prefs.sidebar.blocks.git, "branch + working-tree counts"),
|
|
907
|
+
row("tui.sidebar.block.todo", "Todo block", prefs.sidebar.blocks.todo, "the newest todowrite"),
|
|
908
|
+
row("tui.sidebar.block.dispatch", "Dispatch block", prefs.sidebar.blocks.dispatch, "live delegations + rollup")
|
|
909
|
+
]
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
title: "Context block detail",
|
|
913
|
+
rows: [
|
|
914
|
+
{
|
|
915
|
+
id: "tui.sidebar.context.gauge",
|
|
916
|
+
name: "Gauge style",
|
|
917
|
+
value: prefs.sidebar.context.gauge,
|
|
918
|
+
cycle: GAUGE_STYLES,
|
|
919
|
+
note: "both | bar | percent | off — `▰▱ 42% of 200k`"
|
|
920
|
+
},
|
|
921
|
+
row("tui.sidebar.context.tokens", "Tokens row", prefs.sidebar.context.tokens, "the raw token count line"),
|
|
922
|
+
row("tui.sidebar.context.spent", "Spent row", prefs.sidebar.context.spent, "the `$… gasto na sessão` line"),
|
|
923
|
+
row("tui.sidebar.context.modelUsage", "Model usage table", prefs.sidebar.context.modelUsage, "per-model tokens/USD"),
|
|
924
|
+
row("tui.sidebar.context.performance", "Performance line", prefs.sidebar.context.performance, "cache % + tok/s"),
|
|
925
|
+
row("tui.sidebar.context.localSpend", "Local spend", prefs.sidebar.context.localSpend, "hoje / 30d totals")
|
|
926
|
+
]
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
title: "Footers",
|
|
930
|
+
rows: [row("tui.footer.prompt", "Prompt footer", prefs.footer.prompt, "the `▸preset · ✦n ativos` line while delegations run"), row("tui.footer.home", "Home status", prefs.footer.home, "the `Pantheon v…` line under the home prompt")]
|
|
931
|
+
}
|
|
932
|
+
]
|
|
933
|
+
};
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* Apply one staged row INTO a prefs draft (in place — the storage mutate
|
|
937
|
+
* callback hands an immer-style draft). Unknown ids or junk values are no-ops.
|
|
938
|
+
*/
|
|
939
|
+
function applyTuiRow(draft, id, value) {
|
|
940
|
+
const enabled = value === "enabled";
|
|
941
|
+
switch (id) {
|
|
942
|
+
case "tui.sidebar.header.version":
|
|
943
|
+
draft.sidebar.header.version = enabled;
|
|
944
|
+
return;
|
|
945
|
+
case "tui.sidebar.header.preset":
|
|
946
|
+
draft.sidebar.header.preset = enabled;
|
|
947
|
+
return;
|
|
948
|
+
case "tui.sidebar.header.session":
|
|
949
|
+
draft.sidebar.header.session = enabled;
|
|
950
|
+
return;
|
|
951
|
+
case "tui.sidebar.block.context":
|
|
952
|
+
draft.sidebar.blocks.context = enabled;
|
|
953
|
+
return;
|
|
954
|
+
case "tui.sidebar.block.git":
|
|
955
|
+
draft.sidebar.blocks.git = enabled;
|
|
956
|
+
return;
|
|
957
|
+
case "tui.sidebar.block.todo":
|
|
958
|
+
draft.sidebar.blocks.todo = enabled;
|
|
959
|
+
return;
|
|
960
|
+
case "tui.sidebar.block.dispatch":
|
|
961
|
+
draft.sidebar.blocks.dispatch = enabled;
|
|
962
|
+
return;
|
|
963
|
+
case "tui.sidebar.context.gauge":
|
|
964
|
+
if (GAUGE_STYLES.includes(value)) draft.sidebar.context.gauge = value;
|
|
965
|
+
return;
|
|
966
|
+
case "tui.sidebar.context.tokens":
|
|
967
|
+
draft.sidebar.context.tokens = enabled;
|
|
968
|
+
return;
|
|
969
|
+
case "tui.sidebar.context.spent":
|
|
970
|
+
draft.sidebar.context.spent = enabled;
|
|
971
|
+
return;
|
|
972
|
+
case "tui.sidebar.context.modelUsage":
|
|
973
|
+
draft.sidebar.context.modelUsage = enabled;
|
|
974
|
+
return;
|
|
975
|
+
case "tui.sidebar.context.performance":
|
|
976
|
+
draft.sidebar.context.performance = enabled;
|
|
977
|
+
return;
|
|
978
|
+
case "tui.sidebar.context.localSpend":
|
|
979
|
+
draft.sidebar.context.localSpend = enabled;
|
|
980
|
+
return;
|
|
981
|
+
case "tui.footer.prompt":
|
|
982
|
+
draft.footer.prompt = enabled;
|
|
983
|
+
return;
|
|
984
|
+
case "tui.footer.home":
|
|
985
|
+
draft.footer.home = enabled;
|
|
986
|
+
return;
|
|
987
|
+
default: return;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
//#endregion
|
|
822
991
|
//#region src/update-status.ts
|
|
823
992
|
/** The running version's channel: a `-beta.N` suffix rides the beta dist-tag. */
|
|
824
993
|
function updateChannelFor(version) {
|
|
@@ -1149,6 +1318,7 @@ function createWindowController(context, exit) {
|
|
|
1149
1318
|
buildGatesTab(load()),
|
|
1150
1319
|
buildDecisionTab(decision()),
|
|
1151
1320
|
buildPresetTab(presetInput()),
|
|
1321
|
+
buildTuiTab(tuiPrefs()),
|
|
1152
1322
|
buildJ1Tab(process.env, false),
|
|
1153
1323
|
buildUpdatesTab(updatesInput()),
|
|
1154
1324
|
buildDoctorTab({
|
|
@@ -1241,6 +1411,15 @@ function createWindowController(context, exit) {
|
|
|
1241
1411
|
reason: error instanceof Error ? error.message : "preset marker write failed"
|
|
1242
1412
|
};
|
|
1243
1413
|
}
|
|
1414
|
+
if (id.startsWith("tui.")) try {
|
|
1415
|
+
mutateTuiPrefs((prefsDraft) => applyTuiRow(prefsDraft, id, value)).then(() => setNotice(void 0)).catch(() => setNotice("tui prefs: persist failed — the change is active for this session only"));
|
|
1416
|
+
return { ok: true };
|
|
1417
|
+
} catch {
|
|
1418
|
+
return {
|
|
1419
|
+
ok: false,
|
|
1420
|
+
reason: "tui prefs storage unavailable"
|
|
1421
|
+
};
|
|
1422
|
+
}
|
|
1244
1423
|
return {
|
|
1245
1424
|
ok: false,
|
|
1246
1425
|
reason: "unknown staged row"
|
|
@@ -1860,7 +2039,7 @@ async function readChangelogForBundle(bundleUrl) {
|
|
|
1860
2039
|
}
|
|
1861
2040
|
/** The ambient build-time version, or null outside a tsdown build. */
|
|
1862
2041
|
function embeddedVersion() {
|
|
1863
|
-
return "2.0.0-beta.
|
|
2042
|
+
return "2.0.0-beta.5";
|
|
1864
2043
|
}
|
|
1865
2044
|
/**
|
|
1866
2045
|
* Resolve the running Pantheon version for the what's-new window: the plugin
|
|
@@ -2707,8 +2886,9 @@ function turnTokensPerSecond(messages, position) {
|
|
|
2707
2886
|
* `$<spent> spent`. The percentage row carries the only semantic tone, the
|
|
2708
2887
|
* gauge bar (12 cells) and is omitted entirely when the percentage is
|
|
2709
2888
|
* unavailable (never `undefined%`). A block with neither tokens nor cost
|
|
2710
|
-
* yields null.
|
|
2711
|
-
|
|
2889
|
+
* yields null. `gaugeStyle` (the TUI tab's pref) picks the percent-row
|
|
2890
|
+
* shape: `both` (default), `bar`, `percent`, or `off` (row omitted). Pure. */
|
|
2891
|
+
function contextBlockRows(usage, cost, gaugeStyle = "both") {
|
|
2712
2892
|
const spentValue = formatSpent(cost);
|
|
2713
2893
|
const spent = spentValue === null ? null : {
|
|
2714
2894
|
lead: null,
|
|
@@ -2733,13 +2913,32 @@ function contextBlockRows(usage, cost) {
|
|
|
2733
2913
|
const percentValue = numberOrNull(usage.percent);
|
|
2734
2914
|
const window = formatContextWindow(usage.limit);
|
|
2735
2915
|
const bar = contextBar(percentValue);
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2916
|
+
let percent = null;
|
|
2917
|
+
if (gaugeStyle !== "off" && bar !== null && percentValue !== null) {
|
|
2918
|
+
const suffix = window === null ? null : ` of ${window}`;
|
|
2919
|
+
const tone = contextUsageTone(percentValue);
|
|
2920
|
+
if (gaugeStyle === "bar") percent = {
|
|
2921
|
+
lead: bar.filled,
|
|
2922
|
+
value: "",
|
|
2923
|
+
tail: bar.empty,
|
|
2924
|
+
suffix,
|
|
2925
|
+
tone
|
|
2926
|
+
};
|
|
2927
|
+
else if (gaugeStyle === "percent") percent = {
|
|
2928
|
+
lead: null,
|
|
2929
|
+
value: ` ${Math.round(percentValue)}%`,
|
|
2930
|
+
tail: null,
|
|
2931
|
+
suffix: null,
|
|
2932
|
+
tone
|
|
2933
|
+
};
|
|
2934
|
+
else percent = {
|
|
2935
|
+
lead: bar.filled,
|
|
2936
|
+
value: ` ${Math.round(percentValue)}%`,
|
|
2937
|
+
tail: bar.empty,
|
|
2938
|
+
suffix,
|
|
2939
|
+
tone
|
|
2940
|
+
};
|
|
2941
|
+
}
|
|
2743
2942
|
if (tokens === null && percent === null && spent === null) return null;
|
|
2744
2943
|
return {
|
|
2745
2944
|
tokens,
|
|
@@ -4498,7 +4697,7 @@ async function checkForPantheonUpdate(context) {
|
|
|
4498
4697
|
const latest = String((await response.json())?.version ?? "");
|
|
4499
4698
|
if (!latest) return;
|
|
4500
4699
|
const notice = pickUpdateNotice({
|
|
4501
|
-
currentVersion: "2.0.0-beta.
|
|
4700
|
+
currentVersion: "2.0.0-beta.5",
|
|
4502
4701
|
latestVersion: latest,
|
|
4503
4702
|
state: readState(),
|
|
4504
4703
|
nowMs: Date.now()
|
|
@@ -5027,11 +5226,12 @@ function createSidebarModel(context, sessionID, gitExec = defaultGitExec) {
|
|
|
5027
5226
|
return buildDispatchBlock(allDelegations(), Date.now(), frame());
|
|
5028
5227
|
});
|
|
5029
5228
|
const blocks = createMemo(() => {
|
|
5229
|
+
const prefs = tuiPrefs();
|
|
5030
5230
|
const present = [];
|
|
5031
|
-
if (contextBlockRows(contextUsage(), cost()) !== null || contextSpendLine(spend()) !== null) present.push("context");
|
|
5032
|
-
if (branch() !== null || gitLine() !== null) present.push("git");
|
|
5033
|
-
if (todo().visible.length > 0) present.push("todo");
|
|
5034
|
-
if (dispatch() !== null) present.push("dispatch");
|
|
5231
|
+
if (prefs.sidebar.blocks.context && (contextBlockRows(contextUsage(), cost(), prefs.sidebar.context.gauge) !== null || prefs.sidebar.context.localSpend && contextSpendLine(spend()) !== null)) present.push("context");
|
|
5232
|
+
if (prefs.sidebar.blocks.git && (branch() !== null || gitLine() !== null)) present.push("git");
|
|
5233
|
+
if (prefs.sidebar.blocks.todo && todo().visible.length > 0) present.push("todo");
|
|
5234
|
+
if (prefs.sidebar.blocks.dispatch && dispatch() !== null) present.push("dispatch");
|
|
5035
5235
|
return withBlockSpacers(present);
|
|
5036
5236
|
});
|
|
5037
5237
|
onMount(() => {
|
|
@@ -5258,11 +5458,20 @@ function Sidebar(props) {
|
|
|
5258
5458
|
const open = (sessionID) => () => navigateToSession(context.ui?.router, sessionID);
|
|
5259
5459
|
const block = (key) => model.blocks().find((entry) => entry.key === key);
|
|
5260
5460
|
const spacer = (key) => block(key)?.spacer === true;
|
|
5261
|
-
const usageRows = () => modelUsageRows(model.modelUsage().visible);
|
|
5262
5461
|
const usageHidden = () => hiddenModelUsageText(model.modelUsage().hidden, model.modelUsage().hiddenCost);
|
|
5263
|
-
const contextRows = () =>
|
|
5264
|
-
|
|
5265
|
-
|
|
5462
|
+
const contextRows = () => {
|
|
5463
|
+
const prefs = tuiPrefs();
|
|
5464
|
+
const rows = contextBlockRows(model.contextUsage(), model.cost(), prefs.sidebar.context.gauge);
|
|
5465
|
+
if (rows === null) return null;
|
|
5466
|
+
return {
|
|
5467
|
+
tokens: prefs.sidebar.context.tokens ? rows.tokens : null,
|
|
5468
|
+
percent: rows.percent,
|
|
5469
|
+
spent: prefs.sidebar.context.spent ? rows.spent : null
|
|
5470
|
+
};
|
|
5471
|
+
};
|
|
5472
|
+
const spendLine = () => tuiPrefs().sidebar.context.localSpend ? contextSpendLine(model.spend()) : null;
|
|
5473
|
+
const performanceLine = () => tuiPrefs().sidebar.context.performance ? contextPerformanceLine(model.performance()) : null;
|
|
5474
|
+
const usageRows = () => tuiPrefs().sidebar.context.modelUsage ? modelUsageRows(model.modelUsage().visible) : [];
|
|
5266
5475
|
const gaugeFg = (row) => contextProgressColor(row.tone ?? "warning", context.theme);
|
|
5267
5476
|
const dispatchView = () => model.dispatch();
|
|
5268
5477
|
const dispatchSummary = () => {
|
|
@@ -5270,33 +5479,64 @@ function Sidebar(props) {
|
|
|
5270
5479
|
return view === null ? null : dispatchHeaderSummary(view.runningCount, view.totalCost);
|
|
5271
5480
|
};
|
|
5272
5481
|
const failedSuffix = () => failedSuffixText(dispatchView()?.failures);
|
|
5482
|
+
const header = () => tuiPrefs().sidebar.header;
|
|
5273
5483
|
return (() => {
|
|
5274
|
-
var _el$12 = createElement("box")
|
|
5275
|
-
insertNode(_el$12, _el$13);
|
|
5276
|
-
insertNode(_el$12, _el$14);
|
|
5484
|
+
var _el$12 = createElement("box");
|
|
5277
5485
|
setProp(_el$12, "flexDirection", "column");
|
|
5278
5486
|
setProp(_el$12, "width", "100%");
|
|
5279
5487
|
setProp(_el$12, "padding", 1);
|
|
5280
|
-
setProp(_el$13, "attributes", 1);
|
|
5281
|
-
insert(_el$13, `Pantheon v2.0.0-beta.4`);
|
|
5282
|
-
insert(_el$14, () => presetHeaderLine(model.preset().name ?? "", model.provider()));
|
|
5283
5488
|
insert(_el$12, createComponent(Show, {
|
|
5284
5489
|
get when() {
|
|
5285
|
-
return
|
|
5490
|
+
return header().version;
|
|
5491
|
+
},
|
|
5492
|
+
get children() {
|
|
5493
|
+
var _el$13 = createElement("text");
|
|
5494
|
+
setProp(_el$13, "attributes", 1);
|
|
5495
|
+
insert(_el$13, `Pantheon v2.0.0-beta.5`);
|
|
5496
|
+
effect((_$p) => setProp(_el$13, "fg", text(), _$p));
|
|
5497
|
+
return _el$13;
|
|
5498
|
+
}
|
|
5499
|
+
}), null);
|
|
5500
|
+
insert(_el$12, createComponent(Show, {
|
|
5501
|
+
get when() {
|
|
5502
|
+
return header().preset;
|
|
5503
|
+
},
|
|
5504
|
+
get children() {
|
|
5505
|
+
var _el$14 = createElement("text");
|
|
5506
|
+
insert(_el$14, () => presetHeaderLine(model.preset().name ?? "", model.provider()));
|
|
5507
|
+
effect((_$p) => setProp(_el$14, "fg", muted(), _$p));
|
|
5508
|
+
return _el$14;
|
|
5509
|
+
}
|
|
5510
|
+
}), null);
|
|
5511
|
+
insert(_el$12, createComponent(Show, {
|
|
5512
|
+
get when() {
|
|
5513
|
+
return memo(() => !!(header().session && model.activeSessionID() !== ""))() && model.session();
|
|
5286
5514
|
},
|
|
5287
5515
|
get fallback() {
|
|
5288
|
-
return (
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5516
|
+
return createComponent(Show, {
|
|
5517
|
+
get when() {
|
|
5518
|
+
return header().session;
|
|
5519
|
+
},
|
|
5520
|
+
get fallback() {
|
|
5521
|
+
return (() => {
|
|
5522
|
+
var _el$26 = createElement("box");
|
|
5523
|
+
setProp(_el$26, "height", 0);
|
|
5524
|
+
return _el$26;
|
|
5525
|
+
})();
|
|
5526
|
+
},
|
|
5527
|
+
get children() {
|
|
5528
|
+
var _el$25 = createElement("text");
|
|
5529
|
+
insert(_el$25, () => sidebarPlaceholder(props.sessionID));
|
|
5530
|
+
effect((_$p) => setProp(_el$25, "fg", muted(), _$p));
|
|
5531
|
+
return _el$25;
|
|
5532
|
+
}
|
|
5533
|
+
});
|
|
5294
5534
|
},
|
|
5295
5535
|
children: (current) => (() => {
|
|
5296
|
-
var _el$
|
|
5297
|
-
insert(_el$
|
|
5298
|
-
effect((_$p) => setProp(_el$
|
|
5299
|
-
return _el$
|
|
5536
|
+
var _el$27 = createElement("text");
|
|
5537
|
+
insert(_el$27, () => `Sessão: ${truncateLabel(current().title || current().id)}`);
|
|
5538
|
+
effect((_$p) => setProp(_el$27, "fg", text(), _$p));
|
|
5539
|
+
return _el$27;
|
|
5300
5540
|
})()
|
|
5301
5541
|
}), null);
|
|
5302
5542
|
insert(_el$12, createComponent(Show, {
|
|
@@ -5343,9 +5583,9 @@ function Sidebar(props) {
|
|
|
5343
5583
|
return contextRows();
|
|
5344
5584
|
},
|
|
5345
5585
|
children: (rows) => (() => {
|
|
5346
|
-
var _el$
|
|
5347
|
-
setProp(_el$
|
|
5348
|
-
insert(_el$
|
|
5586
|
+
var _el$28 = createElement("box");
|
|
5587
|
+
setProp(_el$28, "flexDirection", "column");
|
|
5588
|
+
insert(_el$28, createComponent(Show, {
|
|
5349
5589
|
get when() {
|
|
5350
5590
|
return rows().tokens;
|
|
5351
5591
|
},
|
|
@@ -5361,7 +5601,7 @@ function Sidebar(props) {
|
|
|
5361
5601
|
}
|
|
5362
5602
|
})
|
|
5363
5603
|
}), null);
|
|
5364
|
-
insert(_el$
|
|
5604
|
+
insert(_el$28, createComponent(Show, {
|
|
5365
5605
|
get when() {
|
|
5366
5606
|
return rows().percent;
|
|
5367
5607
|
},
|
|
@@ -5377,7 +5617,7 @@ function Sidebar(props) {
|
|
|
5377
5617
|
}
|
|
5378
5618
|
})
|
|
5379
5619
|
}), null);
|
|
5380
|
-
insert(_el$
|
|
5620
|
+
insert(_el$28, createComponent(Show, {
|
|
5381
5621
|
get when() {
|
|
5382
5622
|
return rows().spent;
|
|
5383
5623
|
},
|
|
@@ -5393,46 +5633,46 @@ function Sidebar(props) {
|
|
|
5393
5633
|
}
|
|
5394
5634
|
})
|
|
5395
5635
|
}), null);
|
|
5396
|
-
insert(_el$
|
|
5636
|
+
insert(_el$28, createComponent(Show, {
|
|
5397
5637
|
get when() {
|
|
5398
|
-
return usageRows().length > 0;
|
|
5638
|
+
return memo(() => !!tuiPrefs().sidebar.context.modelUsage)() && usageRows().length > 0;
|
|
5399
5639
|
},
|
|
5400
5640
|
get children() {
|
|
5401
5641
|
return [(() => {
|
|
5402
|
-
var _el$
|
|
5403
|
-
insertNode(_el$
|
|
5404
|
-
effect((_$p) => setProp(_el$
|
|
5405
|
-
return _el$
|
|
5642
|
+
var _el$29 = createElement("text");
|
|
5643
|
+
insertNode(_el$29, createTextNode(`Sessão · custo reportado`));
|
|
5644
|
+
effect((_$p) => setProp(_el$29, "fg", muted(), _$p));
|
|
5645
|
+
return _el$29;
|
|
5406
5646
|
})(), (() => {
|
|
5407
|
-
var _el$
|
|
5408
|
-
insertNode(_el$
|
|
5409
|
-
effect((_$p) => setProp(_el$
|
|
5410
|
-
return _el$
|
|
5647
|
+
var _el$31 = createElement("text");
|
|
5648
|
+
insertNode(_el$31, createTextNode(`Modelo Tokens USD`));
|
|
5649
|
+
effect((_$p) => setProp(_el$31, "fg", muted(), _$p));
|
|
5650
|
+
return _el$31;
|
|
5411
5651
|
})()];
|
|
5412
5652
|
}
|
|
5413
5653
|
}), null);
|
|
5414
|
-
insert(_el$
|
|
5654
|
+
insert(_el$28, createComponent(For, {
|
|
5415
5655
|
get each() {
|
|
5416
5656
|
return usageRows();
|
|
5417
5657
|
},
|
|
5418
5658
|
children: (row) => (() => {
|
|
5419
|
-
var _el$
|
|
5420
|
-
setProp(_el$
|
|
5421
|
-
insert(_el$
|
|
5659
|
+
var _el$33 = createElement("box");
|
|
5660
|
+
setProp(_el$33, "flexDirection", "column");
|
|
5661
|
+
insert(_el$33, createComponent(For, {
|
|
5422
5662
|
get each() {
|
|
5423
5663
|
return modelUsageRowLines(row);
|
|
5424
5664
|
},
|
|
5425
5665
|
children: (line) => (() => {
|
|
5426
|
-
var _el$
|
|
5427
|
-
insert(_el$
|
|
5428
|
-
effect((_$p) => setProp(_el$
|
|
5429
|
-
return _el$
|
|
5666
|
+
var _el$34 = createElement("text");
|
|
5667
|
+
insert(_el$34, line);
|
|
5668
|
+
effect((_$p) => setProp(_el$34, "fg", text(), _$p));
|
|
5669
|
+
return _el$34;
|
|
5430
5670
|
})()
|
|
5431
5671
|
}));
|
|
5432
|
-
return _el$
|
|
5672
|
+
return _el$33;
|
|
5433
5673
|
})()
|
|
5434
5674
|
}), null);
|
|
5435
|
-
insert(_el$
|
|
5675
|
+
insert(_el$28, createComponent(Show, {
|
|
5436
5676
|
get when() {
|
|
5437
5677
|
return usageHidden();
|
|
5438
5678
|
},
|
|
@@ -5441,14 +5681,14 @@ function Sidebar(props) {
|
|
|
5441
5681
|
return sidebarTextLines(line());
|
|
5442
5682
|
},
|
|
5443
5683
|
children: (part) => (() => {
|
|
5444
|
-
var _el$
|
|
5445
|
-
insert(_el$
|
|
5446
|
-
effect((_$p) => setProp(_el$
|
|
5447
|
-
return _el$
|
|
5684
|
+
var _el$35 = createElement("text");
|
|
5685
|
+
insert(_el$35, part);
|
|
5686
|
+
effect((_$p) => setProp(_el$35, "fg", muted(), _$p));
|
|
5687
|
+
return _el$35;
|
|
5448
5688
|
})()
|
|
5449
5689
|
})
|
|
5450
5690
|
}), null);
|
|
5451
|
-
return _el$
|
|
5691
|
+
return _el$28;
|
|
5452
5692
|
})()
|
|
5453
5693
|
}), null);
|
|
5454
5694
|
insert(_el$16, createComponent(Show, {
|
|
@@ -5456,10 +5696,10 @@ function Sidebar(props) {
|
|
|
5456
5696
|
return performanceLine();
|
|
5457
5697
|
},
|
|
5458
5698
|
children: (line) => (() => {
|
|
5459
|
-
var _el$
|
|
5460
|
-
insert(_el$
|
|
5461
|
-
effect((_$p) => setProp(_el$
|
|
5462
|
-
return _el$
|
|
5699
|
+
var _el$36 = createElement("text");
|
|
5700
|
+
insert(_el$36, line);
|
|
5701
|
+
effect((_$p) => setProp(_el$36, "fg", muted(), _$p));
|
|
5702
|
+
return _el$36;
|
|
5463
5703
|
})()
|
|
5464
5704
|
}), null);
|
|
5465
5705
|
insert(_el$16, createComponent(Show, {
|
|
@@ -5471,10 +5711,10 @@ function Sidebar(props) {
|
|
|
5471
5711
|
return contextSpendLines(line());
|
|
5472
5712
|
},
|
|
5473
5713
|
children: (part) => (() => {
|
|
5474
|
-
var _el$
|
|
5475
|
-
insert(_el$
|
|
5476
|
-
effect((_$p) => setProp(_el$
|
|
5477
|
-
return _el$
|
|
5714
|
+
var _el$37 = createElement("text");
|
|
5715
|
+
insert(_el$37, part);
|
|
5716
|
+
effect((_$p) => setProp(_el$37, "fg", muted(), _$p));
|
|
5717
|
+
return _el$37;
|
|
5478
5718
|
})()
|
|
5479
5719
|
})
|
|
5480
5720
|
}), null);
|
|
@@ -5515,22 +5755,22 @@ function Sidebar(props) {
|
|
|
5515
5755
|
return model.branch();
|
|
5516
5756
|
},
|
|
5517
5757
|
children: (value) => (() => {
|
|
5518
|
-
var _el$
|
|
5519
|
-
insertNode(_el$
|
|
5520
|
-
insertNode(_el$
|
|
5521
|
-
setProp(_el$
|
|
5522
|
-
insertNode(_el$
|
|
5523
|
-
insert(_el$
|
|
5758
|
+
var _el$38 = createElement("box"), _el$39 = createElement("text"), _el$41 = createElement("text");
|
|
5759
|
+
insertNode(_el$38, _el$39);
|
|
5760
|
+
insertNode(_el$38, _el$41);
|
|
5761
|
+
setProp(_el$38, "flexDirection", "row");
|
|
5762
|
+
insertNode(_el$39, createTextNode(`⎇ `));
|
|
5763
|
+
insert(_el$41, () => truncateLabel(value(), 32));
|
|
5524
5764
|
effect((_p$) => {
|
|
5525
|
-
var _v$
|
|
5526
|
-
_v$
|
|
5527
|
-
_v$
|
|
5765
|
+
var _v$3 = muted(), _v$4 = text();
|
|
5766
|
+
_v$3 !== _p$.e && (_p$.e = setProp(_el$39, "fg", _v$3, _p$.e));
|
|
5767
|
+
_v$4 !== _p$.t && (_p$.t = setProp(_el$41, "fg", _v$4, _p$.t));
|
|
5528
5768
|
return _p$;
|
|
5529
5769
|
}, {
|
|
5530
5770
|
e: void 0,
|
|
5531
5771
|
t: void 0
|
|
5532
5772
|
});
|
|
5533
|
-
return _el$
|
|
5773
|
+
return _el$38;
|
|
5534
5774
|
})()
|
|
5535
5775
|
}), null);
|
|
5536
5776
|
insert(_el$18, createComponent(Show, {
|
|
@@ -5538,10 +5778,10 @@ function Sidebar(props) {
|
|
|
5538
5778
|
return model.gitLine();
|
|
5539
5779
|
},
|
|
5540
5780
|
children: (line) => (() => {
|
|
5541
|
-
var _el$
|
|
5542
|
-
insert(_el$
|
|
5543
|
-
effect((_$p) => setProp(_el$
|
|
5544
|
-
return _el$
|
|
5781
|
+
var _el$42 = createElement("text");
|
|
5782
|
+
insert(_el$42, line);
|
|
5783
|
+
effect((_$p) => setProp(_el$42, "fg", text(), _$p));
|
|
5784
|
+
return _el$42;
|
|
5545
5785
|
})()
|
|
5546
5786
|
}), null);
|
|
5547
5787
|
return _el$18;
|
|
@@ -5588,10 +5828,10 @@ function Sidebar(props) {
|
|
|
5588
5828
|
return model.todo().visible;
|
|
5589
5829
|
},
|
|
5590
5830
|
children: (item) => (() => {
|
|
5591
|
-
var _el$
|
|
5592
|
-
insert(_el$
|
|
5593
|
-
effect((_$p) => setProp(_el$
|
|
5594
|
-
return _el$
|
|
5831
|
+
var _el$43 = createElement("text");
|
|
5832
|
+
insert(_el$43, () => todoRowText(item));
|
|
5833
|
+
effect((_$p) => setProp(_el$43, "fg", todoFg(item.status), _$p));
|
|
5834
|
+
return _el$43;
|
|
5595
5835
|
})()
|
|
5596
5836
|
}), null);
|
|
5597
5837
|
insert(_el$22, createComponent(Show, {
|
|
@@ -5599,10 +5839,10 @@ function Sidebar(props) {
|
|
|
5599
5839
|
return hiddenTodoText(model.todo().hidden);
|
|
5600
5840
|
},
|
|
5601
5841
|
children: (line) => (() => {
|
|
5602
|
-
var _el$
|
|
5603
|
-
insert(_el$
|
|
5604
|
-
effect((_$p) => setProp(_el$
|
|
5605
|
-
return _el$
|
|
5842
|
+
var _el$44 = createElement("text");
|
|
5843
|
+
insert(_el$44, line);
|
|
5844
|
+
effect((_$p) => setProp(_el$44, "fg", muted(), _$p));
|
|
5845
|
+
return _el$44;
|
|
5606
5846
|
})()
|
|
5607
5847
|
}), null);
|
|
5608
5848
|
return _el$22;
|
|
@@ -5633,9 +5873,9 @@ function Sidebar(props) {
|
|
|
5633
5873
|
return dispatchView();
|
|
5634
5874
|
},
|
|
5635
5875
|
children: (view) => (() => {
|
|
5636
|
-
var _el$
|
|
5637
|
-
setProp(_el$
|
|
5638
|
-
insert(_el$
|
|
5876
|
+
var _el$45 = createElement("box");
|
|
5877
|
+
setProp(_el$45, "flexDirection", "column");
|
|
5878
|
+
insert(_el$45, createComponent(BlockHeader, {
|
|
5639
5879
|
get icon() {
|
|
5640
5880
|
return BLOCK_ICONS.dispatch;
|
|
5641
5881
|
},
|
|
@@ -5650,100 +5890,91 @@ function Sidebar(props) {
|
|
|
5650
5890
|
return dispatchSummary();
|
|
5651
5891
|
}
|
|
5652
5892
|
}), null);
|
|
5653
|
-
insert(_el$
|
|
5893
|
+
insert(_el$45, createComponent(For, {
|
|
5654
5894
|
get each() {
|
|
5655
5895
|
return view().running;
|
|
5656
5896
|
},
|
|
5657
5897
|
children: (row) => (() => {
|
|
5658
|
-
var _el$
|
|
5659
|
-
insertNode(_el$
|
|
5660
|
-
setProp(_el$
|
|
5661
|
-
insert(_el$
|
|
5898
|
+
var _el$47 = createElement("box"), _el$48 = createElement("text");
|
|
5899
|
+
insertNode(_el$47, _el$48);
|
|
5900
|
+
setProp(_el$47, "flexShrink", 0);
|
|
5901
|
+
insert(_el$48, () => row.text);
|
|
5662
5902
|
effect((_p$) => {
|
|
5663
|
-
var _v$
|
|
5664
|
-
_v$
|
|
5665
|
-
_v$
|
|
5903
|
+
var _v$5 = open(row.id), _v$6 = tone("success");
|
|
5904
|
+
_v$5 !== _p$.e && (_p$.e = setProp(_el$47, "onMouseDown", _v$5, _p$.e));
|
|
5905
|
+
_v$6 !== _p$.t && (_p$.t = setProp(_el$48, "fg", _v$6, _p$.t));
|
|
5666
5906
|
return _p$;
|
|
5667
5907
|
}, {
|
|
5668
5908
|
e: void 0,
|
|
5669
5909
|
t: void 0
|
|
5670
5910
|
});
|
|
5671
|
-
return _el$
|
|
5911
|
+
return _el$47;
|
|
5672
5912
|
})()
|
|
5673
5913
|
}), null);
|
|
5674
|
-
insert(_el$
|
|
5914
|
+
insert(_el$45, createComponent(Show, {
|
|
5675
5915
|
get when() {
|
|
5676
5916
|
return view().runningHidden > 0;
|
|
5677
5917
|
},
|
|
5678
5918
|
get children() {
|
|
5679
|
-
var _el$
|
|
5680
|
-
insert(_el$
|
|
5681
|
-
effect((_$p) => setProp(_el$
|
|
5682
|
-
return _el$
|
|
5919
|
+
var _el$46 = createElement("text");
|
|
5920
|
+
insert(_el$46, () => `\u2026 +${view().runningHidden} rodando`);
|
|
5921
|
+
effect((_$p) => setProp(_el$46, "fg", muted(), _$p));
|
|
5922
|
+
return _el$46;
|
|
5683
5923
|
}
|
|
5684
5924
|
}), null);
|
|
5685
|
-
insert(_el$
|
|
5925
|
+
insert(_el$45, createComponent(Show, {
|
|
5686
5926
|
get when() {
|
|
5687
5927
|
return view().summary;
|
|
5688
5928
|
},
|
|
5689
5929
|
children: (line) => (() => {
|
|
5690
|
-
var _el$
|
|
5691
|
-
insertNode(_el$
|
|
5692
|
-
setProp(_el$
|
|
5693
|
-
setProp(_el$
|
|
5694
|
-
insert(_el$
|
|
5695
|
-
insert(_el$
|
|
5930
|
+
var _el$49 = createElement("box"), _el$50 = createElement("text");
|
|
5931
|
+
insertNode(_el$49, _el$50);
|
|
5932
|
+
setProp(_el$49, "flexDirection", "row");
|
|
5933
|
+
setProp(_el$49, "flexShrink", 0);
|
|
5934
|
+
insert(_el$50, line);
|
|
5935
|
+
insert(_el$49, createComponent(Show, {
|
|
5696
5936
|
get when() {
|
|
5697
5937
|
return failedSuffix();
|
|
5698
5938
|
},
|
|
5699
5939
|
children: (suffix) => (() => {
|
|
5700
|
-
var _el$
|
|
5701
|
-
insert(_el$
|
|
5702
|
-
effect((_$p) => setProp(_el$
|
|
5703
|
-
return _el$
|
|
5940
|
+
var _el$51 = createElement("text");
|
|
5941
|
+
insert(_el$51, () => `${SPEND_LINE_SEPARATOR}${suffix()}`);
|
|
5942
|
+
effect((_$p) => setProp(_el$51, "fg", tone("error"), _$p));
|
|
5943
|
+
return _el$51;
|
|
5704
5944
|
})()
|
|
5705
5945
|
}), null);
|
|
5706
|
-
effect((_$p) => setProp(_el$
|
|
5707
|
-
return _el$
|
|
5946
|
+
effect((_$p) => setProp(_el$50, "fg", muted(), _$p));
|
|
5947
|
+
return _el$49;
|
|
5708
5948
|
})()
|
|
5709
5949
|
}), null);
|
|
5710
|
-
insert(_el$
|
|
5950
|
+
insert(_el$45, createComponent(For, {
|
|
5711
5951
|
get each() {
|
|
5712
5952
|
return view().agents;
|
|
5713
5953
|
},
|
|
5714
5954
|
children: (row) => (() => {
|
|
5715
|
-
var _el$
|
|
5716
|
-
insert(_el$
|
|
5717
|
-
effect((_$p) => setProp(_el$
|
|
5718
|
-
return _el$
|
|
5955
|
+
var _el$52 = createElement("text");
|
|
5956
|
+
insert(_el$52, () => childAgentRowText(row));
|
|
5957
|
+
effect((_$p) => setProp(_el$52, "fg", muted(), _$p));
|
|
5958
|
+
return _el$52;
|
|
5719
5959
|
})()
|
|
5720
5960
|
}), null);
|
|
5721
|
-
insert(_el$
|
|
5961
|
+
insert(_el$45, createComponent(Show, {
|
|
5722
5962
|
get when() {
|
|
5723
5963
|
return hiddenChildAgentsText(view().agentsHidden, view().agentsHiddenCost);
|
|
5724
5964
|
},
|
|
5725
5965
|
children: (line) => (() => {
|
|
5726
|
-
var _el$
|
|
5727
|
-
insert(_el$
|
|
5728
|
-
effect((_$p) => setProp(_el$
|
|
5729
|
-
return _el$
|
|
5966
|
+
var _el$53 = createElement("text");
|
|
5967
|
+
insert(_el$53, line);
|
|
5968
|
+
effect((_$p) => setProp(_el$53, "fg", muted(), _$p));
|
|
5969
|
+
return _el$53;
|
|
5730
5970
|
})()
|
|
5731
5971
|
}), null);
|
|
5732
|
-
return _el$
|
|
5972
|
+
return _el$45;
|
|
5733
5973
|
})()
|
|
5734
5974
|
}), null);
|
|
5735
5975
|
return _el$23;
|
|
5736
5976
|
}
|
|
5737
5977
|
}), null);
|
|
5738
|
-
effect((_p$) => {
|
|
5739
|
-
var _v$3 = text(), _v$4 = muted();
|
|
5740
|
-
_v$3 !== _p$.e && (_p$.e = setProp(_el$13, "fg", _v$3, _p$.e));
|
|
5741
|
-
_v$4 !== _p$.t && (_p$.t = setProp(_el$14, "fg", _v$4, _p$.t));
|
|
5742
|
-
return _p$;
|
|
5743
|
-
}, {
|
|
5744
|
-
e: void 0,
|
|
5745
|
-
t: void 0
|
|
5746
|
-
});
|
|
5747
5978
|
return _el$12;
|
|
5748
5979
|
})();
|
|
5749
5980
|
}
|
|
@@ -5813,25 +6044,25 @@ function DispatchPanel(props) {
|
|
|
5813
6044
|
return model.visible().rows;
|
|
5814
6045
|
},
|
|
5815
6046
|
children: (row) => (() => {
|
|
5816
|
-
var _el$
|
|
5817
|
-
insertNode(_el$
|
|
5818
|
-
insertNode(_el$
|
|
5819
|
-
setProp(_el$
|
|
5820
|
-
setProp(_el$
|
|
5821
|
-
insert(_el$
|
|
5822
|
-
insert(_el$
|
|
6047
|
+
var _el$54 = createElement("box"), _el$55 = createElement("text"), _el$56 = createElement("text");
|
|
6048
|
+
insertNode(_el$54, _el$55);
|
|
6049
|
+
insertNode(_el$54, _el$56);
|
|
6050
|
+
setProp(_el$54, "flexDirection", "row");
|
|
6051
|
+
setProp(_el$54, "flexShrink", 0);
|
|
6052
|
+
insert(_el$55, () => selected(row.id) ? `▸ ` : " ");
|
|
6053
|
+
insert(_el$56, () => row.text);
|
|
5823
6054
|
effect((_p$) => {
|
|
5824
|
-
var _v$
|
|
5825
|
-
_v$
|
|
5826
|
-
_v$
|
|
5827
|
-
_v$
|
|
6055
|
+
var _v$7 = selected(row.id) ? text() : muted(), _v$8 = rowFg(row.state), _v$9 = selected(row.id) ? 1 : 0;
|
|
6056
|
+
_v$7 !== _p$.e && (_p$.e = setProp(_el$55, "fg", _v$7, _p$.e));
|
|
6057
|
+
_v$8 !== _p$.t && (_p$.t = setProp(_el$56, "fg", _v$8, _p$.t));
|
|
6058
|
+
_v$9 !== _p$.a && (_p$.a = setProp(_el$56, "attributes", _v$9, _p$.a));
|
|
5828
6059
|
return _p$;
|
|
5829
6060
|
}, {
|
|
5830
6061
|
e: void 0,
|
|
5831
6062
|
t: void 0,
|
|
5832
6063
|
a: void 0
|
|
5833
6064
|
});
|
|
5834
|
-
return _el$
|
|
6065
|
+
return _el$54;
|
|
5835
6066
|
})()
|
|
5836
6067
|
});
|
|
5837
6068
|
const detail = () => createComponent(For, {
|
|
@@ -5839,28 +6070,28 @@ function DispatchPanel(props) {
|
|
|
5839
6070
|
return model.detail();
|
|
5840
6071
|
},
|
|
5841
6072
|
children: (line, index) => (() => {
|
|
5842
|
-
var _el$
|
|
5843
|
-
insert(_el$
|
|
5844
|
-
effect((_$p) => setProp(_el$
|
|
5845
|
-
return _el$
|
|
6073
|
+
var _el$57 = createElement("text");
|
|
6074
|
+
insert(_el$57, line);
|
|
6075
|
+
effect((_$p) => setProp(_el$57, "fg", index() === 0 ? text() : muted(), _$p));
|
|
6076
|
+
return _el$57;
|
|
5846
6077
|
})()
|
|
5847
6078
|
});
|
|
5848
6079
|
const empty = () => (() => {
|
|
5849
|
-
var _el$
|
|
5850
|
-
insertNode(_el$
|
|
5851
|
-
effect((_$p) => setProp(_el$
|
|
5852
|
-
return _el$
|
|
6080
|
+
var _el$58 = createElement("text");
|
|
6081
|
+
insertNode(_el$58, createTextNode(`Nenhuma sessão delegada`));
|
|
6082
|
+
effect((_$p) => setProp(_el$58, "fg", muted(), _$p));
|
|
6083
|
+
return _el$58;
|
|
5853
6084
|
})();
|
|
5854
6085
|
return (() => {
|
|
5855
|
-
var _el$
|
|
5856
|
-
insertNode(_el$
|
|
5857
|
-
insertNode(_el$
|
|
5858
|
-
insertNode(_el$
|
|
5859
|
-
insertNode(_el$
|
|
5860
|
-
setProp(_el$
|
|
5861
|
-
setProp(_el$
|
|
5862
|
-
setProp(_el$
|
|
5863
|
-
insert(_el$
|
|
6086
|
+
var _el$60 = createElement("box"), _el$61 = createElement("text"), _el$62 = createElement("text"), _el$66 = createElement("box"), _el$67 = createElement("text");
|
|
6087
|
+
insertNode(_el$60, _el$61);
|
|
6088
|
+
insertNode(_el$60, _el$62);
|
|
6089
|
+
insertNode(_el$60, _el$66);
|
|
6090
|
+
insertNode(_el$60, _el$67);
|
|
6091
|
+
setProp(_el$60, "flexDirection", "column");
|
|
6092
|
+
setProp(_el$60, "width", "100%");
|
|
6093
|
+
setProp(_el$60, "padding", 1);
|
|
6094
|
+
insert(_el$60, createComponent(DispatchPanelKeymap, {
|
|
5864
6095
|
get context() {
|
|
5865
6096
|
return props.context;
|
|
5866
6097
|
},
|
|
@@ -5868,30 +6099,30 @@ function DispatchPanel(props) {
|
|
|
5868
6099
|
return props.panel;
|
|
5869
6100
|
},
|
|
5870
6101
|
model
|
|
5871
|
-
}), _el$
|
|
5872
|
-
setProp(_el$
|
|
5873
|
-
insert(_el$
|
|
5874
|
-
insert(_el$
|
|
6102
|
+
}), _el$61);
|
|
6103
|
+
setProp(_el$61, "attributes", 1);
|
|
6104
|
+
insert(_el$61, () => model.title());
|
|
6105
|
+
insert(_el$60, createComponent(Show, {
|
|
5875
6106
|
get when() {
|
|
5876
6107
|
return model.header();
|
|
5877
6108
|
},
|
|
5878
6109
|
children: (line) => (() => {
|
|
5879
|
-
var _el$
|
|
5880
|
-
insert(_el$
|
|
5881
|
-
effect((_$p) => setProp(_el$
|
|
5882
|
-
return _el$
|
|
6110
|
+
var _el$68 = createElement("text");
|
|
6111
|
+
insert(_el$68, line);
|
|
6112
|
+
effect((_$p) => setProp(_el$68, "fg", muted(), _$p));
|
|
6113
|
+
return _el$68;
|
|
5883
6114
|
})()
|
|
5884
|
-
}), _el$
|
|
5885
|
-
insert(_el$
|
|
5886
|
-
insert(_el$
|
|
6115
|
+
}), _el$62);
|
|
6116
|
+
insert(_el$62, () => dispatchPanelRule(props.panel.width - 2));
|
|
6117
|
+
insert(_el$60, createComponent(Show, {
|
|
5887
6118
|
get when() {
|
|
5888
6119
|
return model.layout().mode === "wide";
|
|
5889
6120
|
},
|
|
5890
6121
|
get fallback() {
|
|
5891
6122
|
return (() => {
|
|
5892
|
-
var _el$
|
|
5893
|
-
setProp(_el$
|
|
5894
|
-
insert(_el$
|
|
6123
|
+
var _el$69 = createElement("box");
|
|
6124
|
+
setProp(_el$69, "flexDirection", "column");
|
|
6125
|
+
insert(_el$69, createComponent(Show, {
|
|
5895
6126
|
get when() {
|
|
5896
6127
|
return model.rows().length > 0;
|
|
5897
6128
|
},
|
|
@@ -5899,34 +6130,34 @@ function DispatchPanel(props) {
|
|
|
5899
6130
|
return empty();
|
|
5900
6131
|
},
|
|
5901
6132
|
get children() {
|
|
5902
|
-
var _el$
|
|
5903
|
-
setProp(_el$
|
|
5904
|
-
insert(_el$
|
|
5905
|
-
return _el$
|
|
6133
|
+
var _el$70 = createElement("box");
|
|
6134
|
+
setProp(_el$70, "flexDirection", "column");
|
|
6135
|
+
insert(_el$70, rows);
|
|
6136
|
+
return _el$70;
|
|
5906
6137
|
}
|
|
5907
6138
|
}), null);
|
|
5908
|
-
insert(_el$
|
|
6139
|
+
insert(_el$69, createComponent(Show, {
|
|
5909
6140
|
get when() {
|
|
5910
6141
|
return model.selectedID();
|
|
5911
6142
|
},
|
|
5912
6143
|
get children() {
|
|
5913
|
-
var _el$
|
|
5914
|
-
insertNode(_el$
|
|
5915
|
-
setProp(_el$
|
|
5916
|
-
setProp(_el$
|
|
5917
|
-
insert(_el$
|
|
5918
|
-
return _el$
|
|
6144
|
+
var _el$71 = createElement("box"), _el$72 = createElement("box");
|
|
6145
|
+
insertNode(_el$71, _el$72);
|
|
6146
|
+
setProp(_el$71, "flexDirection", "column");
|
|
6147
|
+
setProp(_el$72, "height", 1);
|
|
6148
|
+
insert(_el$71, detail, null);
|
|
6149
|
+
return _el$71;
|
|
5919
6150
|
}
|
|
5920
6151
|
}), null);
|
|
5921
|
-
return _el$
|
|
6152
|
+
return _el$69;
|
|
5922
6153
|
})();
|
|
5923
6154
|
},
|
|
5924
6155
|
get children() {
|
|
5925
|
-
var _el$
|
|
5926
|
-
insertNode(_el$
|
|
5927
|
-
setProp(_el$
|
|
5928
|
-
setProp(_el$
|
|
5929
|
-
insert(_el$
|
|
6156
|
+
var _el$63 = createElement("box"), _el$64 = createElement("box");
|
|
6157
|
+
insertNode(_el$63, _el$64);
|
|
6158
|
+
setProp(_el$63, "flexDirection", "row");
|
|
6159
|
+
setProp(_el$64, "flexDirection", "column");
|
|
6160
|
+
insert(_el$64, createComponent(Show, {
|
|
5930
6161
|
get when() {
|
|
5931
6162
|
return model.rows().length > 0;
|
|
5932
6163
|
},
|
|
@@ -5937,36 +6168,36 @@ function DispatchPanel(props) {
|
|
|
5937
6168
|
return rows();
|
|
5938
6169
|
}
|
|
5939
6170
|
}));
|
|
5940
|
-
insert(_el$
|
|
6171
|
+
insert(_el$63, createComponent(Show, {
|
|
5941
6172
|
get when() {
|
|
5942
6173
|
return model.selectedID();
|
|
5943
6174
|
},
|
|
5944
6175
|
get children() {
|
|
5945
|
-
var _el$
|
|
5946
|
-
setProp(_el$
|
|
5947
|
-
insert(_el$
|
|
5948
|
-
effect((_$p) => setProp(_el$
|
|
5949
|
-
return _el$
|
|
6176
|
+
var _el$65 = createElement("box");
|
|
6177
|
+
setProp(_el$65, "flexDirection", "column");
|
|
6178
|
+
insert(_el$65, detail);
|
|
6179
|
+
effect((_$p) => setProp(_el$65, "width", model.layout().detailWidth, _$p));
|
|
6180
|
+
return _el$65;
|
|
5950
6181
|
}
|
|
5951
6182
|
}), null);
|
|
5952
|
-
effect((_$p) => setProp(_el$
|
|
5953
|
-
return _el$
|
|
6183
|
+
effect((_$p) => setProp(_el$64, "width", model.layout().listWidth, _$p));
|
|
6184
|
+
return _el$63;
|
|
5954
6185
|
}
|
|
5955
|
-
}), _el$
|
|
5956
|
-
setProp(_el$
|
|
5957
|
-
insert(_el$
|
|
6186
|
+
}), _el$66);
|
|
6187
|
+
setProp(_el$66, "height", 1);
|
|
6188
|
+
insert(_el$67, () => model.footer());
|
|
5958
6189
|
effect((_p$) => {
|
|
5959
|
-
var _v$
|
|
5960
|
-
_v$
|
|
5961
|
-
_v$
|
|
5962
|
-
_v$
|
|
6190
|
+
var _v$0 = text(), _v$1 = muted(), _v$10 = muted();
|
|
6191
|
+
_v$0 !== _p$.e && (_p$.e = setProp(_el$61, "fg", _v$0, _p$.e));
|
|
6192
|
+
_v$1 !== _p$.t && (_p$.t = setProp(_el$62, "fg", _v$1, _p$.t));
|
|
6193
|
+
_v$10 !== _p$.a && (_p$.a = setProp(_el$67, "fg", _v$10, _p$.a));
|
|
5963
6194
|
return _p$;
|
|
5964
6195
|
}, {
|
|
5965
6196
|
e: void 0,
|
|
5966
6197
|
t: void 0,
|
|
5967
6198
|
a: void 0
|
|
5968
6199
|
});
|
|
5969
|
-
return _el$
|
|
6200
|
+
return _el$60;
|
|
5970
6201
|
})();
|
|
5971
6202
|
}
|
|
5972
6203
|
/** App-level command claim: the only way into the panel. It registers the
|
|
@@ -6018,12 +6249,17 @@ function PantheonSettingsCommandLayer(props) {
|
|
|
6018
6249
|
function HomeStatus(props) {
|
|
6019
6250
|
const preset = useActivePreset(props.context).preset;
|
|
6020
6251
|
const muted = () => props.context.theme?.text?.muted ?? props.context.theme?.text?.base;
|
|
6021
|
-
return (
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6252
|
+
return createComponent(Show, {
|
|
6253
|
+
get when() {
|
|
6254
|
+
return tuiPrefs().footer.home;
|
|
6255
|
+
},
|
|
6256
|
+
get children() {
|
|
6257
|
+
var _el$73 = createElement("text");
|
|
6258
|
+
insert(_el$73, () => `Pantheon v2.0.0-beta.5${preset().name ? ` ▸ ${preset().name}` : ""}`);
|
|
6259
|
+
effect((_$p) => setProp(_el$73, "fg", muted(), _$p));
|
|
6260
|
+
return _el$73;
|
|
6261
|
+
}
|
|
6262
|
+
});
|
|
6027
6263
|
}
|
|
6028
6264
|
/** Lean footer model: only the preset label and the live delegation count. It
|
|
6029
6265
|
* deliberately does not reuse `createSidebarModel` — that model owns the
|
|
@@ -6074,13 +6310,13 @@ function PromptFooter(props) {
|
|
|
6074
6310
|
const muted = () => props.context.theme?.text?.muted ?? props.context.theme?.text?.base;
|
|
6075
6311
|
return createComponent(Show, {
|
|
6076
6312
|
get when() {
|
|
6077
|
-
return model.running() > 0;
|
|
6313
|
+
return memo(() => !!tuiPrefs().footer.prompt)() && model.running() > 0;
|
|
6078
6314
|
},
|
|
6079
6315
|
get children() {
|
|
6080
|
-
var _el$
|
|
6081
|
-
insert(_el$
|
|
6082
|
-
effect((_$p) => setProp(_el$
|
|
6083
|
-
return _el$
|
|
6316
|
+
var _el$74 = createElement("text");
|
|
6317
|
+
insert(_el$74, () => `▸${model.preset().name ?? "default"} · ✦${model.running()} ativos`);
|
|
6318
|
+
effect((_$p) => setProp(_el$74, "fg", muted(), _$p));
|
|
6319
|
+
return _el$74;
|
|
6084
6320
|
}
|
|
6085
6321
|
});
|
|
6086
6322
|
}
|
|
@@ -6090,6 +6326,7 @@ const plugin = Plugin.define({
|
|
|
6090
6326
|
const globalState = globalThis;
|
|
6091
6327
|
if (globalState[SINGLETON]) return;
|
|
6092
6328
|
globalState[SINGLETON] = true;
|
|
6329
|
+
initTuiPrefs(context);
|
|
6093
6330
|
warmUpSidebarData(context, resolveLocation(context));
|
|
6094
6331
|
const unregisterSidebar = context.ui.slot({
|
|
6095
6332
|
append: "sidebar.content",
|