@aiwayds/dsh-opentui 0.23.2 → 0.23.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/dist/client/index.js +477 -88
- package/dist/client/index.js.map +14 -7
- package/dist/locales/en.json +4 -1
- package/dist/locales/zh-CN.json +4 -1
- package/package.json +1 -1
package/dist/client/index.js
CHANGED
|
@@ -16032,7 +16032,9 @@ var Interrupt, causeInterrupt = (fiberId) => new CauseImpl([new Interrupt(fiberI
|
|
|
16032
16032
|
return fail3(catcher(err));
|
|
16033
16033
|
}
|
|
16034
16034
|
});
|
|
16035
|
-
},
|
|
16035
|
+
}, promise = (evaluate) => callbackOptions(function(resume, signal) {
|
|
16036
|
+
evaluate(signal).then((a) => resume(succeed3(a)), (e) => resume(die(e)));
|
|
16037
|
+
}, evaluate.length !== 0), tryPromise = (options) => {
|
|
16036
16038
|
const f = typeof options === "function" ? options : options.try;
|
|
16037
16039
|
const catcher = typeof options === "function" ? (cause) => new UnknownError(cause, "An error occurred in Effect.tryPromise") : options.catch;
|
|
16038
16040
|
return callbackOptions(function(resume, signal) {
|
|
@@ -16049,7 +16051,14 @@ var Interrupt, causeInterrupt = (fiberId) => new CauseImpl([new Interrupt(fiberI
|
|
|
16049
16051
|
resume(failWithCatch(err));
|
|
16050
16052
|
}
|
|
16051
16053
|
}, f.length !== 0);
|
|
16052
|
-
}, callbackOptions, asyncFinalizer, callback = (register) => callbackOptions(register, register.length >= 2),
|
|
16054
|
+
}, callbackOptions, asyncFinalizer, callback = (register) => callbackOptions(register, register.length >= 2), gen = (...args) => {
|
|
16055
|
+
if (args.length === 1) {
|
|
16056
|
+
const body = args[0];
|
|
16057
|
+
return suspend(() => fromIteratorUnsafe(body()));
|
|
16058
|
+
}
|
|
16059
|
+
const [options, body] = args;
|
|
16060
|
+
return suspend(() => fromIteratorUnsafe(body.call(options.self)));
|
|
16061
|
+
}, fnBody = (bodyOrOptions, pipeables) => typeof bodyOrOptions === "function" ? bodyOrOptions : pipeables.shift().bind(bodyOrOptions.self), fnUntraced = (bodyOrOptions, ...pipeables) => {
|
|
16053
16062
|
const body = fnBody(bodyOrOptions, pipeables);
|
|
16054
16063
|
const fn = pipeables.length === 0 ? function() {
|
|
16055
16064
|
return suspend(() => fromIteratorUnsafe(body.apply(this, arguments)));
|
|
@@ -16128,14 +16137,19 @@ var Interrupt, causeInterrupt = (fiberId) => new CauseImpl([new Interrupt(fiberI
|
|
|
16128
16137
|
}
|
|
16129
16138
|
}
|
|
16130
16139
|
return failures.length === 0 ? exitVoid : exitFailCause(causeFromReasons(failures));
|
|
16131
|
-
}, updateContext, contextWith = (f) => withFiber((fiber) => f(fiber.context)), provideContext,
|
|
16140
|
+
}, updateContext, contextWith = (f) => withFiber((fiber) => f(fiber.context)), provideContext, provideService = function() {
|
|
16141
|
+
if (arguments.length === 1) {
|
|
16142
|
+
return dual(2, (self, impl) => provideServiceImpl(self, arguments[0], impl));
|
|
16143
|
+
}
|
|
16144
|
+
return dual(3, (self, service, impl) => provideServiceImpl(self, service, impl)).apply(this, arguments);
|
|
16145
|
+
}, provideServiceImpl = (self, service, implementation) => updateContext(self, add(service, implementation)), catchCause, OnFailureProto, OnFailureImpl = function(self, f) {
|
|
16132
16146
|
this[args] = self;
|
|
16133
16147
|
this[contE] = f;
|
|
16134
16148
|
}, mapError, mapBoth, matchCauseEffect, OnSuccessAndFailureProto, OnSuccessAndFailureImpl = function(self, onSuccess, onFailure) {
|
|
16135
16149
|
this[args] = self;
|
|
16136
16150
|
this[contA] = onSuccess;
|
|
16137
16151
|
this[contE] = onFailure;
|
|
16138
|
-
}, exit = (self) => effectIsExit(self) ? exitSucceed(self) : exitPrimitive(self), exitPrimitive, ScopeTypeId = "~effect/Scope", ScopeCloseableTypeId = "~effect/Scope/Closeable", scopeClose = (self, exit_) => withFiber((fiber) => {
|
|
16152
|
+
}, exit = (self) => effectIsExit(self) ? exitSucceed(self) : exitPrimitive(self), exitPrimitive, ScopeTypeId = "~effect/Scope", ScopeCloseableTypeId = "~effect/Scope/Closeable", scopeTag, scopeClose = (self, exit_) => withFiber((fiber) => {
|
|
16139
16153
|
fiberEnterUninterruptibleUnsafe(fiber);
|
|
16140
16154
|
return scopeCloseUnsafe(self, exit_) ?? void_;
|
|
16141
16155
|
}), scopeCloseUnsafe = (self, exit_) => {
|
|
@@ -16210,7 +16224,7 @@ var Interrupt, causeInterrupt = (fiberId) => new CauseImpl([new Interrupt(fiberI
|
|
|
16210
16224
|
strategy: finalizerStrategy,
|
|
16211
16225
|
parent,
|
|
16212
16226
|
state: constScopeEmpty
|
|
16213
|
-
}), constScopeEmpty, OnExitImpl, onExitPrimitive = (effect, onExit, interruptible) => new OnExitImpl(effect, onExit, interruptible), onExitUnsafe = (fiber, f) => {
|
|
16227
|
+
}), constScopeEmpty, provideScope, OnExitImpl, onExitPrimitive = (effect, onExit, interruptible) => new OnExitImpl(effect, onExit, interruptible), onExitUnsafe = (fiber, f) => {
|
|
16214
16228
|
fiber._stack.push(new OnExitImpl(undefined, f, undefined));
|
|
16215
16229
|
}, onExit, uninterruptible = (self) => withFiber((fiber) => {
|
|
16216
16230
|
if (!fiber.interruptible)
|
|
@@ -16921,6 +16935,7 @@ var init_effect = __esm(() => {
|
|
|
16921
16935
|
return fiber.succeedWith(exit ?? exitFailCause(cause));
|
|
16922
16936
|
}
|
|
16923
16937
|
});
|
|
16938
|
+
scopeTag = /* @__PURE__ */ Service2("effect/Scope");
|
|
16924
16939
|
scopeCloseFinalizers = /* @__PURE__ */ fnUntraced(function* (self, finalizers, exit_) {
|
|
16925
16940
|
let exits = [];
|
|
16926
16941
|
const fibers = [];
|
|
@@ -16942,6 +16957,7 @@ var init_effect = __esm(() => {
|
|
|
16942
16957
|
constScopeEmpty = {
|
|
16943
16958
|
_tag: "Empty"
|
|
16944
16959
|
};
|
|
16960
|
+
provideScope = /* @__PURE__ */ provideService(scopeTag);
|
|
16945
16961
|
OnExitImpl = /* @__PURE__ */ function() {
|
|
16946
16962
|
const Proto = /* @__PURE__ */ makePrimitiveProto({
|
|
16947
16963
|
op: "OnExit",
|
|
@@ -17152,9 +17168,10 @@ var init_Deferred = __esm(() => {
|
|
|
17152
17168
|
var init_References = () => {};
|
|
17153
17169
|
|
|
17154
17170
|
// ../../node_modules/.pnpm/effect@4.1.0/node_modules/effect/dist/Scope.js
|
|
17155
|
-
var forkUnsafe2, close;
|
|
17171
|
+
var provide, forkUnsafe2, close;
|
|
17156
17172
|
var init_Scope = __esm(() => {
|
|
17157
17173
|
init_effect();
|
|
17174
|
+
provide = provideScope;
|
|
17158
17175
|
forkUnsafe2 = scopeForkUnsafe;
|
|
17159
17176
|
close = scopeClose;
|
|
17160
17177
|
});
|
|
@@ -17170,7 +17187,12 @@ var TypeId6 = "~effect/Layer", isLayer = (u) => hasProperty(u, TypeId6), LayerPr
|
|
|
17170
17187
|
}), fromBuildMemo = (build) => {
|
|
17171
17188
|
const self = fromBuild((memoMap, scope) => memoMap.getOrElseMemoize(self, scope, build));
|
|
17172
17189
|
return self;
|
|
17173
|
-
}, succeedContext = (context) => fromBuildUnsafe(constant(succeed3(context))),
|
|
17190
|
+
}, succeedContext = (context) => fromBuildUnsafe(constant(succeed3(context))), effect2 = function() {
|
|
17191
|
+
if (arguments.length === 1) {
|
|
17192
|
+
return (effect) => effectImpl(arguments[0], effect);
|
|
17193
|
+
}
|
|
17194
|
+
return effectImpl(arguments[0], arguments[1]);
|
|
17195
|
+
}, effectImpl = (service, effect) => effectContext(map3(effect, (value) => make3(service, value))), effectContext = (effect) => fromBuildMemo((_, scope) => provide(effect, scope)), mergeAllEffect = (layers, memoMap, scope) => {
|
|
17174
17196
|
const parentScope = forkUnsafe2(scope, "parallel");
|
|
17175
17197
|
return forEach(layers, (layer) => layer.build(memoMap, forkUnsafe2(parentScope, "sequential")), {
|
|
17176
17198
|
concurrency: layers.length
|
|
@@ -17558,12 +17580,14 @@ var init_Request = __esm(() => {
|
|
|
17558
17580
|
var init_Metric = () => {};
|
|
17559
17581
|
|
|
17560
17582
|
// ../../node_modules/.pnpm/effect@4.1.0/node_modules/effect/dist/Effect.js
|
|
17561
|
-
var tryPromise2, succeed5, suspend2, fail5, failCauseSync2, die3, try_2, fromResult2, flatMap2, exit2, catchCause2, runSyncExit2, mapEager2, mapErrorEager2, mapBothEager2, flatMapEager2, fnUntracedEager2;
|
|
17583
|
+
var promise2, tryPromise2, succeed5, suspend2, gen2, fail5, failCauseSync2, die3, try_2, fromResult2, flatMap2, exit2, catchCause2, runSyncExit2, mapEager2, mapErrorEager2, mapBothEager2, flatMapEager2, fnUntracedEager2;
|
|
17562
17584
|
var init_Effect = __esm(() => {
|
|
17563
17585
|
init_effect();
|
|
17586
|
+
promise2 = promise;
|
|
17564
17587
|
tryPromise2 = tryPromise;
|
|
17565
17588
|
succeed5 = succeed3;
|
|
17566
17589
|
suspend2 = suspend;
|
|
17590
|
+
gen2 = gen;
|
|
17567
17591
|
fail5 = fail3;
|
|
17568
17592
|
failCauseSync2 = failCauseSync;
|
|
17569
17593
|
die3 = die;
|
|
@@ -21885,7 +21909,17 @@ var init_Boolean = __esm(() => {
|
|
|
21885
21909
|
});
|
|
21886
21910
|
|
|
21887
21911
|
// ../../node_modules/.pnpm/effect@4.1.0/node_modules/effect/dist/Brand.js
|
|
21888
|
-
|
|
21912
|
+
function nominal() {
|
|
21913
|
+
return Object.assign((input) => input, {
|
|
21914
|
+
option: (input) => some2(input),
|
|
21915
|
+
result: (input) => succeed2(input),
|
|
21916
|
+
is: (_) => true
|
|
21917
|
+
});
|
|
21918
|
+
}
|
|
21919
|
+
var init_Brand = __esm(() => {
|
|
21920
|
+
init_Option();
|
|
21921
|
+
init_Result();
|
|
21922
|
+
});
|
|
21889
21923
|
|
|
21890
21924
|
// ../../node_modules/.pnpm/effect@4.1.0/node_modules/effect/dist/Cache.js
|
|
21891
21925
|
var TypeId24 = "~effect/Cache", Proto5;
|
|
@@ -32583,6 +32617,9 @@ var init_dsh_blue = __esm(() => {
|
|
|
32583
32617
|
$hovered: "$background.raised.high"
|
|
32584
32618
|
}
|
|
32585
32619
|
}
|
|
32620
|
+
},
|
|
32621
|
+
text: {
|
|
32622
|
+
muted: "$hue.neutral.300"
|
|
32586
32623
|
}
|
|
32587
32624
|
}
|
|
32588
32625
|
},
|
|
@@ -49281,8 +49318,7 @@ function buildMergedDock(data, options) {
|
|
|
49281
49318
|
lowerRaw = [];
|
|
49282
49319
|
} else {
|
|
49283
49320
|
upperLines = tools.slice(-MERGED_DOCK_TOOL_ONLY_MAX).map((tool) => toolOnlyLine(tool, now, spin));
|
|
49284
|
-
|
|
49285
|
-
lowerRaw = summary === "" ? [] : [{ kind: "todo", segments: [{ text: summary, tone: "running" }] }];
|
|
49321
|
+
lowerRaw = todoTreeLines(data.todos);
|
|
49286
49322
|
}
|
|
49287
49323
|
const assembled = assembleZones(upperLines, lowerRaw, options.totalLines ?? MERGED_DOCK_TOTAL_LINES, options.cursor);
|
|
49288
49324
|
return { lines: fitAll(assembled.lines, options.innerWidth), info: assembled.info };
|
|
@@ -49531,17 +49567,24 @@ function skinDockLineFg(ctx, target, line) {
|
|
|
49531
49567
|
function resetMergedDockCursor() {
|
|
49532
49568
|
setMergedDockCursor(0);
|
|
49533
49569
|
}
|
|
49534
|
-
function todoArray(
|
|
49535
|
-
if (
|
|
49570
|
+
function todoArray(value) {
|
|
49571
|
+
if (value === undefined || value === null)
|
|
49536
49572
|
return;
|
|
49537
|
-
|
|
49538
|
-
|
|
49539
|
-
if (
|
|
49540
|
-
return
|
|
49541
|
-
|
|
49542
|
-
|
|
49573
|
+
let parsed = value;
|
|
49574
|
+
if (typeof value === "string") {
|
|
49575
|
+
if (value.trim() === "")
|
|
49576
|
+
return;
|
|
49577
|
+
try {
|
|
49578
|
+
parsed = JSON.parse(value);
|
|
49579
|
+
} catch {
|
|
49580
|
+
return;
|
|
49543
49581
|
}
|
|
49544
|
-
}
|
|
49582
|
+
}
|
|
49583
|
+
if (Array.isArray(parsed))
|
|
49584
|
+
return parsed;
|
|
49585
|
+
if (parsed !== null && typeof parsed === "object" && Array.isArray(parsed.todos)) {
|
|
49586
|
+
return parsed.todos;
|
|
49587
|
+
}
|
|
49545
49588
|
return;
|
|
49546
49589
|
}
|
|
49547
49590
|
function latestTodos(rows) {
|
|
@@ -49567,6 +49610,35 @@ function todosSummaryFromTodos(todos) {
|
|
|
49567
49610
|
});
|
|
49568
49611
|
return active ? `${head} \xB7 ${active.content}` : head;
|
|
49569
49612
|
}
|
|
49613
|
+
function todoTreeLines(todos) {
|
|
49614
|
+
if (todos.length === 0)
|
|
49615
|
+
return [];
|
|
49616
|
+
const done = todos.filter((todo) => todo.status === "completed").length;
|
|
49617
|
+
if (done === todos.length)
|
|
49618
|
+
return [];
|
|
49619
|
+
const lines = [{
|
|
49620
|
+
kind: "todo",
|
|
49621
|
+
segments: [{
|
|
49622
|
+
text: t("overlay.widgets.todosHeader", {
|
|
49623
|
+
done,
|
|
49624
|
+
total: todos.length
|
|
49625
|
+
}),
|
|
49626
|
+
tone: "running"
|
|
49627
|
+
}]
|
|
49628
|
+
}];
|
|
49629
|
+
todos.forEach((todo, i) => {
|
|
49630
|
+
const branch = i === todos.length - 1 ? "\u2514\u2500 " : "\u251C\u2500 ";
|
|
49631
|
+
const glyph = TODO_STATUS_GLYPHS[todo.status] ?? TODO_STATUS_GLYPHS.pending;
|
|
49632
|
+
lines.push({
|
|
49633
|
+
kind: "todo",
|
|
49634
|
+
segments: [{
|
|
49635
|
+
text: `${branch}${glyph} ${todo.content}`,
|
|
49636
|
+
tone: "running"
|
|
49637
|
+
}]
|
|
49638
|
+
});
|
|
49639
|
+
});
|
|
49640
|
+
return lines;
|
|
49641
|
+
}
|
|
49570
49642
|
function todoSetStartedAt(todos, now = Date.now()) {
|
|
49571
49643
|
const sig = todoSetSignature(todos);
|
|
49572
49644
|
const first = todoSetFirstSeen.get(sig);
|
|
@@ -49581,7 +49653,11 @@ function todoBriefLine(todos, now = Date.now(), startedAt) {
|
|
|
49581
49653
|
const done = todos.filter((todo) => todo.status === "completed").length;
|
|
49582
49654
|
const anchor = startedAt ?? todoSetStartedAt(todos, now);
|
|
49583
49655
|
const secs = Math.max(0, Math.floor((now - anchor) / 1000));
|
|
49584
|
-
return
|
|
49656
|
+
return t("overlay.widgets.todosBrief", {
|
|
49657
|
+
done,
|
|
49658
|
+
total: todos.length,
|
|
49659
|
+
secs
|
|
49660
|
+
});
|
|
49585
49661
|
}
|
|
49586
49662
|
function resetTodoBriefClock() {
|
|
49587
49663
|
todoSetFirstSeen.clear();
|
|
@@ -49933,6 +50009,22 @@ function mergedLowerHasContent(rows) {
|
|
|
49933
50009
|
function mergedCompactSummary(rows) {
|
|
49934
50010
|
return todosSummaryLine(rows);
|
|
49935
50011
|
}
|
|
50012
|
+
function mergedCompactLowerLines(rows) {
|
|
50013
|
+
const tree = todoTreeLines(latestTodos(rows));
|
|
50014
|
+
if (tree.length === 0)
|
|
50015
|
+
return [];
|
|
50016
|
+
if (tree.length > COMPACT_TREE_MAX_LINES) {
|
|
50017
|
+
const summary = mergedCompactSummary(rows);
|
|
50018
|
+
return summary === "" ? [] : [{
|
|
50019
|
+
kind: "todo",
|
|
50020
|
+
segments: [{
|
|
50021
|
+
text: summary,
|
|
50022
|
+
tone: "muted"
|
|
50023
|
+
}]
|
|
50024
|
+
}];
|
|
50025
|
+
}
|
|
50026
|
+
return tree;
|
|
50027
|
+
}
|
|
49936
50028
|
function WidgetsDock(props) {
|
|
49937
50029
|
const dimensions = useTerminalSize();
|
|
49938
50030
|
const theme = useThemeOptional();
|
|
@@ -49954,7 +50046,7 @@ function WidgetsDock(props) {
|
|
|
49954
50046
|
});
|
|
49955
50047
|
const width = () => Math.max(16, dimensions().width - 4);
|
|
49956
50048
|
const turnActive = () => props.turnActive?.() ?? dockTurnActive(props.rows);
|
|
49957
|
-
createEffect(() => activityFrameLatch.push(turnActive() || mergedLowerHasContent(props.rows)));
|
|
50049
|
+
createEffect(() => activityFrameLatch.push(turnActive() || mergedLowerHasContent(props.rows) || mergedThinkRows(props.rows, Date.now(), motionDecorationsEnabled()).length > 0 || mergedToolRows(props.rows, Date.now(), motionDecorationsEnabled()).length > 0));
|
|
49958
50050
|
onCleanup(activityFrameLatch.dispose);
|
|
49959
50051
|
const frame = () => activityFrameMode(dimensions().height);
|
|
49960
50052
|
const capSpec = () => activityPanelCapSpec(activityPanelGear(), dimensions().height);
|
|
@@ -49984,7 +50076,11 @@ function WidgetsDock(props) {
|
|
|
49984
50076
|
info: mergedWindowInfo(data, options)
|
|
49985
50077
|
};
|
|
49986
50078
|
};
|
|
49987
|
-
createEffect(() =>
|
|
50079
|
+
createEffect(() => {
|
|
50080
|
+
if (!activityFrameLatch.shown())
|
|
50081
|
+
return;
|
|
50082
|
+
setDockHeightTarget(mergedFrame().lines.length);
|
|
50083
|
+
});
|
|
49988
50084
|
onCleanup(() => {
|
|
49989
50085
|
resetDockHeight();
|
|
49990
50086
|
resetTodoBriefClock();
|
|
@@ -50052,8 +50148,8 @@ function WidgetsDock(props) {
|
|
|
50052
50148
|
return lines.slice(0, count);
|
|
50053
50149
|
};
|
|
50054
50150
|
const frameHeight = () => 2 + frameLines().length;
|
|
50055
|
-
const
|
|
50056
|
-
const compactHeight = () => 2 + (
|
|
50151
|
+
const compactLower = () => mergedCompactLowerLines(props.rows);
|
|
50152
|
+
const compactHeight = () => 2 + compactLower().length;
|
|
50057
50153
|
const accentFg = (accent) => dockAccentColor(theme, accent);
|
|
50058
50154
|
const lineView = (line) => dockLineNode(line, width(), skinCtx(), fgFor, accentFg);
|
|
50059
50155
|
const mergedLineView = (line) => {
|
|
@@ -50134,17 +50230,11 @@ function WidgetsDock(props) {
|
|
|
50134
50230
|
},
|
|
50135
50231
|
children: lineView
|
|
50136
50232
|
}), null);
|
|
50137
|
-
insert(_el$5, createComponent2(
|
|
50138
|
-
get
|
|
50139
|
-
return
|
|
50233
|
+
insert(_el$5, createComponent2(For, {
|
|
50234
|
+
get each() {
|
|
50235
|
+
return compactLower();
|
|
50140
50236
|
},
|
|
50141
|
-
|
|
50142
|
-
var _el$6 = createElement("text");
|
|
50143
|
-
setProp(_el$6, "wrapMode", "none");
|
|
50144
|
-
insert(_el$6, () => takeWidth(compactSummary(), width()));
|
|
50145
|
-
effect((_$p) => setProp(_el$6, "fg", fgFor("muted"), _$p));
|
|
50146
|
-
return _el$6;
|
|
50147
|
-
}
|
|
50237
|
+
children: mergedLineView
|
|
50148
50238
|
}), null);
|
|
50149
50239
|
effect((_$p) => setProp(_el$5, "height", compactHeight(), _$p));
|
|
50150
50240
|
return _el$5;
|
|
@@ -50189,20 +50279,30 @@ function FlatDock(props) {
|
|
|
50189
50279
|
maxLines: props.maxLines,
|
|
50190
50280
|
thinkMaxLines: props.thinkMaxLines
|
|
50191
50281
|
});
|
|
50282
|
+
const allLines = () => dockLines(props.rows, dockOptions());
|
|
50283
|
+
createEffect(() => setDockHeightTarget(allLines().length));
|
|
50284
|
+
const flatLines = () => {
|
|
50285
|
+
const lines = allLines();
|
|
50286
|
+
const target = lines.length;
|
|
50287
|
+
const tweened = Math.max(0, dockHeightContentLines(target, dockFrameNow));
|
|
50288
|
+
const animating = untrack(dockHeightAnimating);
|
|
50289
|
+
const count = !animating || tweened >= target ? target : Math.min(target, tweened);
|
|
50290
|
+
return lines.slice(0, count);
|
|
50291
|
+
};
|
|
50192
50292
|
return (() => {
|
|
50193
|
-
var _el$
|
|
50194
|
-
setProp(_el$
|
|
50195
|
-
setProp(_el$
|
|
50196
|
-
setProp(_el$
|
|
50197
|
-
setProp(_el$
|
|
50198
|
-
insert(_el$
|
|
50293
|
+
var _el$6 = createElement("box");
|
|
50294
|
+
setProp(_el$6, "flexShrink", 0);
|
|
50295
|
+
setProp(_el$6, "flexDirection", "column");
|
|
50296
|
+
setProp(_el$6, "width", "100%");
|
|
50297
|
+
setProp(_el$6, "paddingLeft", 3);
|
|
50298
|
+
insert(_el$6, createComponent2(For, {
|
|
50199
50299
|
get each() {
|
|
50200
|
-
return
|
|
50300
|
+
return flatLines();
|
|
50201
50301
|
},
|
|
50202
50302
|
children: (line) => dockLineNode(line, props.width, props.skinCtx, props.fgFor, props.accentFg)
|
|
50203
50303
|
}));
|
|
50204
|
-
effect((_$p) => setProp(_el$
|
|
50205
|
-
return _el$
|
|
50304
|
+
effect((_$p) => setProp(_el$6, "height", flatLines().length, _$p));
|
|
50305
|
+
return _el$6;
|
|
50206
50306
|
})();
|
|
50207
50307
|
}
|
|
50208
50308
|
function dockLineNode(line, width, ctx, fgFor, accentFg) {
|
|
@@ -50213,12 +50313,12 @@ function dockLineNode(line, width, ctx, fgFor, accentFg) {
|
|
|
50213
50313
|
const markerAt = line.markerAt ?? 0;
|
|
50214
50314
|
if (marker === undefined || line.text.slice(markerAt, markerAt + marker.length) !== marker) {
|
|
50215
50315
|
return (() => {
|
|
50216
|
-
var _el$
|
|
50217
|
-
setProp(_el$
|
|
50218
|
-
setProp(_el$
|
|
50219
|
-
setProp(_el$
|
|
50220
|
-
insert(_el$
|
|
50221
|
-
return _el$
|
|
50316
|
+
var _el$7 = createElement("text");
|
|
50317
|
+
setProp(_el$7, "fg", bodyFg);
|
|
50318
|
+
setProp(_el$7, "attributes", attributes);
|
|
50319
|
+
setProp(_el$7, "wrapMode", "none");
|
|
50320
|
+
insert(_el$7, () => clipToWidth(line.text, width));
|
|
50321
|
+
return _el$7;
|
|
50222
50322
|
})();
|
|
50223
50323
|
}
|
|
50224
50324
|
const before = clipToWidth(line.text.slice(0, markerAt), width);
|
|
@@ -50227,21 +50327,21 @@ function dockLineNode(line, width, ctx, fgFor, accentFg) {
|
|
|
50227
50327
|
const after = clipToWidth(line.text.slice(markerAt + marker.length), Math.max(0, markerBudget - stringWidth(clippedMarker)));
|
|
50228
50328
|
const markerFg = skinDockLineFg(ctx, toneFg, line);
|
|
50229
50329
|
return (() => {
|
|
50230
|
-
var _el$
|
|
50231
|
-
insertNode(_el$
|
|
50232
|
-
setProp(_el$
|
|
50233
|
-
setProp(_el$
|
|
50234
|
-
setProp(_el$
|
|
50235
|
-
insert(_el$
|
|
50236
|
-
setProp(_el$
|
|
50330
|
+
var _el$8 = createElement("text"), _el$9 = createElement("span");
|
|
50331
|
+
insertNode(_el$8, _el$9);
|
|
50332
|
+
setProp(_el$8, "fg", bodyFg);
|
|
50333
|
+
setProp(_el$8, "attributes", attributes);
|
|
50334
|
+
setProp(_el$8, "wrapMode", "none");
|
|
50335
|
+
insert(_el$8, before, _el$9);
|
|
50336
|
+
setProp(_el$9, "style", {
|
|
50237
50337
|
fg: markerFg
|
|
50238
50338
|
});
|
|
50239
|
-
insert(_el$
|
|
50240
|
-
insert(_el$
|
|
50241
|
-
return _el$
|
|
50339
|
+
insert(_el$9, clippedMarker);
|
|
50340
|
+
insert(_el$8, after, null);
|
|
50341
|
+
return _el$8;
|
|
50242
50342
|
})();
|
|
50243
50343
|
}
|
|
50244
|
-
var SKIN_FADE_IN_MS = 400, SKIN_NOTICE_FADE_MS = 500, SKIN_PULSE_MS = 1200, SKIN_PULSE_CYCLES = 3, SKIN_PULSE_DIM = 0.45, SKIN_FAINT_MIX = 0.78, ACTIVITY_PANEL_GEARS, ACTIVITY_PANEL_ALL_LINES = 10, activityPanelGear, setActivityPanelGear, DOCK_HEIGHT_ANIM_MS = 200, dockHeightTween, setDockHeightTween, dockHeightSettled = undefined, dockFrameNow = 0, LINE_FIRST_SEEN_MAX = 512, lineFirstSeen, dockSpin, setDockSpin, mergedDockCursor, setMergedDockCursor, todoSetSignature = (todos) => todos.map((todo) => todo.content).sort().join("\x01"), todoSetFirstSeen, TODO_TOOL_NAMES, ACTIVITY_FRAME_BORDER_FALLBACK = "#7aa2f7", ACTIVITY_FRAME_MIN_CONTRAST = 6, ACTIVITY_BLUE_STEPS, BLUE_HUE_MIN = 190, BLUE_HUE_MAX = 250, BLUE_MIN_SATURATION = 0.25, AUTO_POLE_LIGHT = "#ffffff", AUTO_POLE_DARK = "#000000", DOCK_ACCENT_STEPS, DOCK_ACCENT_HUES, DOCK_ACCENT_FALLBACK, ACTIVITY_FRAME_DEFER_MS = 60, activityFrameLatch;
|
|
50344
|
+
var SKIN_FADE_IN_MS = 400, SKIN_NOTICE_FADE_MS = 500, SKIN_PULSE_MS = 1200, SKIN_PULSE_CYCLES = 3, SKIN_PULSE_DIM = 0.45, SKIN_FAINT_MIX = 0.78, ACTIVITY_PANEL_GEARS, ACTIVITY_PANEL_ALL_LINES = 10, activityPanelGear, setActivityPanelGear, DOCK_HEIGHT_ANIM_MS = 200, dockHeightTween, setDockHeightTween, dockHeightSettled = undefined, dockFrameNow = 0, LINE_FIRST_SEEN_MAX = 512, lineFirstSeen, dockSpin, setDockSpin, mergedDockCursor, setMergedDockCursor, todoSetSignature = (todos) => todos.map((todo) => todo.content).sort().join("\x01"), todoSetFirstSeen, TODO_TOOL_NAMES, ACTIVITY_FRAME_BORDER_FALLBACK = "#7aa2f7", ACTIVITY_FRAME_MIN_CONTRAST = 6, ACTIVITY_BLUE_STEPS, BLUE_HUE_MIN = 190, BLUE_HUE_MAX = 250, BLUE_MIN_SATURATION = 0.25, AUTO_POLE_LIGHT = "#ffffff", AUTO_POLE_DARK = "#000000", DOCK_ACCENT_STEPS, DOCK_ACCENT_HUES, DOCK_ACCENT_FALLBACK, ACTIVITY_FRAME_DEFER_MS = 60, activityFrameLatch, COMPACT_TREE_MAX_LINES = 8;
|
|
50245
50345
|
var init_widgets_dock = __esm(() => {
|
|
50246
50346
|
init_index_bun();
|
|
50247
50347
|
init_index_bun();
|
|
@@ -50254,7 +50354,6 @@ var init_widgets_dock = __esm(() => {
|
|
|
50254
50354
|
init_terminal_size();
|
|
50255
50355
|
init_tool_summarize();
|
|
50256
50356
|
init_todo();
|
|
50257
|
-
init_locale();
|
|
50258
50357
|
init_string_width();
|
|
50259
50358
|
init_theme3();
|
|
50260
50359
|
init_i18n();
|
|
@@ -51616,6 +51715,232 @@ var init_hints_line = __esm(() => {
|
|
|
51616
51715
|
[hintsLocale, setHintsLocale] = createSignal("en");
|
|
51617
51716
|
});
|
|
51618
51717
|
|
|
51718
|
+
// ../tui-base/src/vendor/util/src/global-roots.ts
|
|
51719
|
+
import os2 from "os";
|
|
51720
|
+
import path4 from "path";
|
|
51721
|
+
function roots(app) {
|
|
51722
|
+
return {
|
|
51723
|
+
data: path4.join(data, app),
|
|
51724
|
+
cache: path4.join(cache2, app),
|
|
51725
|
+
config: path4.join(config, app),
|
|
51726
|
+
state: path4.join(state2, app),
|
|
51727
|
+
tmp: path4.join(os2.tmpdir(), app)
|
|
51728
|
+
};
|
|
51729
|
+
}
|
|
51730
|
+
var home2, data, cache2, config, state2;
|
|
51731
|
+
var init_global_roots = __esm(() => {
|
|
51732
|
+
home2 = os2.homedir();
|
|
51733
|
+
data = process.env.XDG_DATA_HOME || (home2 ? path4.join(home2, ".local", "share") : undefined);
|
|
51734
|
+
cache2 = process.env.XDG_CACHE_HOME || (home2 ? path4.join(home2, ".cache") : undefined);
|
|
51735
|
+
config = process.env.XDG_CONFIG_HOME || (home2 ? path4.join(home2, ".config") : undefined);
|
|
51736
|
+
state2 = process.env.XDG_STATE_HOME || (home2 ? path4.join(home2, ".local", "state") : undefined);
|
|
51737
|
+
});
|
|
51738
|
+
|
|
51739
|
+
// ../tui-base/src/vendor/util/src/teardown.ts
|
|
51740
|
+
var entries;
|
|
51741
|
+
var init_teardown = __esm(() => {
|
|
51742
|
+
init_teardown();
|
|
51743
|
+
entries = new Set;
|
|
51744
|
+
});
|
|
51745
|
+
|
|
51746
|
+
// ../tui-base/src/vendor/util/src/effect/layer-node.ts
|
|
51747
|
+
function tags(config) {
|
|
51748
|
+
const names = Object.keys(config);
|
|
51749
|
+
const values = Object.fromEntries(names.map((name) => [name, makeTag(name)]));
|
|
51750
|
+
return {
|
|
51751
|
+
values,
|
|
51752
|
+
make: (name) => (input) => makeProvider2(input, values[name])
|
|
51753
|
+
};
|
|
51754
|
+
}
|
|
51755
|
+
function makeProvider2(input, tag) {
|
|
51756
|
+
if (!isLayer(input.layer))
|
|
51757
|
+
throw new Error("A layer node requires an Effect Layer");
|
|
51758
|
+
return new ProviderNode({
|
|
51759
|
+
kind: "layer",
|
|
51760
|
+
name: input.service !== undefined ? input.service.key : input.name,
|
|
51761
|
+
implementation: input.layer,
|
|
51762
|
+
dependencies: [...input.deps]
|
|
51763
|
+
}, tag);
|
|
51764
|
+
}
|
|
51765
|
+
var GraphTypeId, VarianceTypeId, NodeTypeId, ReplacementTypeId, makeTag, GraphValue, NodeValue, ProviderNode, ReplacementValue, BuildResult;
|
|
51766
|
+
var init_layer_node = __esm(() => {
|
|
51767
|
+
init_dist();
|
|
51768
|
+
init_teardown();
|
|
51769
|
+
init_layer_node();
|
|
51770
|
+
GraphTypeId = Symbol("LayerNode.Graph");
|
|
51771
|
+
VarianceTypeId = Symbol("LayerNode.Variance");
|
|
51772
|
+
NodeTypeId = Symbol("LayerNode.Node");
|
|
51773
|
+
ReplacementTypeId = Symbol("LayerNode.Replacement");
|
|
51774
|
+
makeTag = nominal();
|
|
51775
|
+
GraphValue = class GraphValue {
|
|
51776
|
+
[GraphTypeId];
|
|
51777
|
+
constructor(definition) {
|
|
51778
|
+
this[GraphTypeId] = definition;
|
|
51779
|
+
}
|
|
51780
|
+
get name() {
|
|
51781
|
+
return this[GraphTypeId].name;
|
|
51782
|
+
}
|
|
51783
|
+
};
|
|
51784
|
+
NodeValue = class NodeValue extends GraphValue {
|
|
51785
|
+
tag;
|
|
51786
|
+
constructor(definition, tag) {
|
|
51787
|
+
super(definition);
|
|
51788
|
+
this.tag = tag;
|
|
51789
|
+
}
|
|
51790
|
+
replace(replacement) {
|
|
51791
|
+
if (replacement instanceof NodeValue) {
|
|
51792
|
+
if (replacement.tag !== this.tag)
|
|
51793
|
+
throw new Error(`Cannot replace ${this.name} across tags`);
|
|
51794
|
+
return new ReplacementValue(this, replacement);
|
|
51795
|
+
}
|
|
51796
|
+
if (!isLayer(replacement))
|
|
51797
|
+
throw new Error("A replacement must be a node or an Effect Layer");
|
|
51798
|
+
return new ReplacementValue(this, makeProvider2({ name: this.name, layer: replacement, deps: [] }, this.tag));
|
|
51799
|
+
}
|
|
51800
|
+
};
|
|
51801
|
+
ProviderNode = class ProviderNode extends NodeValue {
|
|
51802
|
+
mapLayer(f) {
|
|
51803
|
+
const definition = this[GraphTypeId];
|
|
51804
|
+
if (definition.kind !== "layer")
|
|
51805
|
+
throw new Error(`Cannot map unbound layer node: ${this.name}`);
|
|
51806
|
+
return new ProviderNode({ ...definition, implementation: f(definition.implementation) }, this.tag);
|
|
51807
|
+
}
|
|
51808
|
+
};
|
|
51809
|
+
ReplacementValue = class ReplacementValue {
|
|
51810
|
+
[ReplacementTypeId];
|
|
51811
|
+
constructor(source, target) {
|
|
51812
|
+
this[ReplacementTypeId] = { source, target };
|
|
51813
|
+
}
|
|
51814
|
+
};
|
|
51815
|
+
BuildResult = class BuildResult extends Service2()("@opencode/LayerNode/BuildResult") {
|
|
51816
|
+
};
|
|
51817
|
+
});
|
|
51818
|
+
|
|
51819
|
+
// ../tui-base/src/vendor/util/src/effect/app-node.ts
|
|
51820
|
+
var tags2, makeGlobalNode, makeLocationNode;
|
|
51821
|
+
var init_app_node = __esm(() => {
|
|
51822
|
+
init_layer_node();
|
|
51823
|
+
init_app_node();
|
|
51824
|
+
tags2 = tags({
|
|
51825
|
+
location: ["global"],
|
|
51826
|
+
global: []
|
|
51827
|
+
});
|
|
51828
|
+
makeGlobalNode = tags2.make("global");
|
|
51829
|
+
makeLocationNode = tags2.make("location");
|
|
51830
|
+
});
|
|
51831
|
+
|
|
51832
|
+
// ../tui-base/src/vendor/util/src/global.ts
|
|
51833
|
+
import path5 from "path";
|
|
51834
|
+
import fs from "fs";
|
|
51835
|
+
import os3 from "os";
|
|
51836
|
+
function make12(input = {}) {
|
|
51837
|
+
return {
|
|
51838
|
+
home: Path.home,
|
|
51839
|
+
data: Path.data,
|
|
51840
|
+
cache: Path.cache,
|
|
51841
|
+
config: Path.config,
|
|
51842
|
+
state: Path.state,
|
|
51843
|
+
tmp: input.tmp ?? Path.tmp,
|
|
51844
|
+
bin: Path.bin,
|
|
51845
|
+
log: Path.log,
|
|
51846
|
+
repos: Path.repos,
|
|
51847
|
+
...input
|
|
51848
|
+
};
|
|
51849
|
+
}
|
|
51850
|
+
var app = "opencode", data2, cache3, config2, state3, tmp, paths, Path, Service3, acquire = (input) => gen2(function* () {
|
|
51851
|
+
const service = Service3.of(make12(input));
|
|
51852
|
+
yield* promise2(() => Promise.all([service.data, service.config, service.state, service.log, service.bin, service.repos, service.tmp].map((directory) => fs.promises.mkdir(directory, { recursive: true }))));
|
|
51853
|
+
const canonicalTmp = yield* promise2(() => fs.promises.realpath(service.tmp));
|
|
51854
|
+
return Service3.of({ ...service, tmp: input.tmp ?? canonicalTmp });
|
|
51855
|
+
}), layer, node;
|
|
51856
|
+
var init_global = __esm(() => {
|
|
51857
|
+
init_dist();
|
|
51858
|
+
init_global_roots();
|
|
51859
|
+
init_flock();
|
|
51860
|
+
init_app_node();
|
|
51861
|
+
init_global();
|
|
51862
|
+
({ data: data2, cache: cache3, config: config2, state: state3, tmp } = roots(app));
|
|
51863
|
+
paths = {
|
|
51864
|
+
get home() {
|
|
51865
|
+
return process.env.OPENCODE_TEST_HOME ?? os3.homedir();
|
|
51866
|
+
},
|
|
51867
|
+
data: data2,
|
|
51868
|
+
bin: path5.join(cache3, "bin"),
|
|
51869
|
+
log: path5.join(data2, "log"),
|
|
51870
|
+
repos: path5.join(data2, "repos"),
|
|
51871
|
+
cache: cache3,
|
|
51872
|
+
config: config2,
|
|
51873
|
+
state: state3,
|
|
51874
|
+
tmp
|
|
51875
|
+
};
|
|
51876
|
+
Path = paths;
|
|
51877
|
+
Flock.setGlobal({ state: state3 });
|
|
51878
|
+
Service3 = class Service3 extends Service2()("@opencode/Global") {
|
|
51879
|
+
};
|
|
51880
|
+
layer = effect2(Service3, suspend2(() => acquire({ config: process.env.OPENCODE_CONFIG_DIR ?? Path.config })));
|
|
51881
|
+
node = makeGlobalNode({ service: Service3, layer, deps: [] });
|
|
51882
|
+
});
|
|
51883
|
+
|
|
51884
|
+
// ../tui-base/src/util/ui-state.ts
|
|
51885
|
+
import path6 from "path";
|
|
51886
|
+
import { readFileSync as readFileSync11 } from "fs";
|
|
51887
|
+
import { mkdir as mkdir2, readFile as readFile3, rename, rm as rm2, writeFile as writeFile2 } from "fs/promises";
|
|
51888
|
+
function defaultUiStatePath() {
|
|
51889
|
+
return path6.join(Path.state, UI_STATE_FILE);
|
|
51890
|
+
}
|
|
51891
|
+
function decodeUiState(value) {
|
|
51892
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
51893
|
+
return {};
|
|
51894
|
+
const root = value;
|
|
51895
|
+
const session = root.session;
|
|
51896
|
+
if (typeof session !== "object" || session === null || Array.isArray(session))
|
|
51897
|
+
return {};
|
|
51898
|
+
const stored = session.activity_panel_height;
|
|
51899
|
+
if (activityPanelHeightFromConfig(stored) === undefined)
|
|
51900
|
+
return {};
|
|
51901
|
+
return { session: { activity_panel_height: stored } };
|
|
51902
|
+
}
|
|
51903
|
+
function localActivityPanelGear(state) {
|
|
51904
|
+
return activityPanelHeightFromConfig(state.session?.activity_panel_height);
|
|
51905
|
+
}
|
|
51906
|
+
function resolveBootGear(config, local) {
|
|
51907
|
+
const localGear = localActivityPanelGear(local);
|
|
51908
|
+
if (localGear !== undefined)
|
|
51909
|
+
return localGear;
|
|
51910
|
+
const session = config?.session;
|
|
51911
|
+
const stored = typeof session === "object" && session !== null ? session.activity_panel_height : undefined;
|
|
51912
|
+
return activityPanelHeightFromConfig(stored);
|
|
51913
|
+
}
|
|
51914
|
+
function readUiStateSync(filePath) {
|
|
51915
|
+
try {
|
|
51916
|
+
return decodeUiState(JSON.parse(readFileSync11(filePath, "utf8")));
|
|
51917
|
+
} catch {
|
|
51918
|
+
return EMPTY_UI_STATE;
|
|
51919
|
+
}
|
|
51920
|
+
}
|
|
51921
|
+
async function writeUiState(filePath, state) {
|
|
51922
|
+
await mkdir2(path6.dirname(filePath), { recursive: true });
|
|
51923
|
+
const temporary = `${filePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
51924
|
+
await writeFile2(temporary, JSON.stringify(decodeUiState(state))).catch(async (error) => {
|
|
51925
|
+
await rm2(temporary, { force: true }).catch(() => {
|
|
51926
|
+
return;
|
|
51927
|
+
});
|
|
51928
|
+
throw error;
|
|
51929
|
+
});
|
|
51930
|
+
await rename(temporary, filePath).catch(async (error) => {
|
|
51931
|
+
await rm2(temporary, { force: true }).catch(() => {
|
|
51932
|
+
return;
|
|
51933
|
+
});
|
|
51934
|
+
throw error;
|
|
51935
|
+
});
|
|
51936
|
+
}
|
|
51937
|
+
var UI_STATE_FILE = "ui-state.json", EMPTY_UI_STATE;
|
|
51938
|
+
var init_ui_state = __esm(() => {
|
|
51939
|
+
init_global();
|
|
51940
|
+
init_widgets_dock();
|
|
51941
|
+
EMPTY_UI_STATE = {};
|
|
51942
|
+
});
|
|
51943
|
+
|
|
51619
51944
|
// ../tui-base/src/routes/session/search-overlay.tsx
|
|
51620
51945
|
function rowSearchText(row) {
|
|
51621
51946
|
switch (row.kind) {
|
|
@@ -54585,7 +54910,7 @@ function journalToJSONL(entries) {
|
|
|
54585
54910
|
var init_export = () => {};
|
|
54586
54911
|
|
|
54587
54912
|
// ../tui-base/src/routes/session/commands.ts
|
|
54588
|
-
import { mkdir as
|
|
54913
|
+
import { mkdir as mkdir3, writeFile as writeFile3 } from "fs/promises";
|
|
54589
54914
|
import { dirname as dirname5 } from "path";
|
|
54590
54915
|
function persistHints(seam) {
|
|
54591
54916
|
try {
|
|
@@ -55191,8 +55516,8 @@ function coreCommands() {
|
|
|
55191
55516
|
try {
|
|
55192
55517
|
const entries = await ctx.seam.sessionJournal(sessionId);
|
|
55193
55518
|
const target = exportTargetPath(sessionId, argText);
|
|
55194
|
-
await
|
|
55195
|
-
await
|
|
55519
|
+
await mkdir3(dirname5(target), { recursive: true });
|
|
55520
|
+
await writeFile3(target, journalToJSONL(entries));
|
|
55196
55521
|
ctx.say(t("command.export.done", { count: entries.length, target }));
|
|
55197
55522
|
} catch (error) {
|
|
55198
55523
|
ctx.say(t("command.export.failed", { reason: seamFailureReason(error) }));
|
|
@@ -55725,7 +56050,7 @@ var init_slash_usage = __esm(() => {
|
|
|
55725
56050
|
});
|
|
55726
56051
|
|
|
55727
56052
|
// ../tui-base/src/routes/session/skills-source.ts
|
|
55728
|
-
import { existsSync as existsSync10, readdirSync as readdirSync3, readFileSync as
|
|
56053
|
+
import { existsSync as existsSync10, readdirSync as readdirSync3, readFileSync as readFileSync12, statSync as statSync4 } from "fs";
|
|
55729
56054
|
import { homedir as homedir8 } from "os";
|
|
55730
56055
|
import { dirname as dirname6, join as join13, resolve as resolve7 } from "path";
|
|
55731
56056
|
import { TextAttributes as TextAttributes8 } from "@opentui/core";
|
|
@@ -55841,7 +56166,7 @@ function oneLine(value) {
|
|
|
55841
56166
|
function readSkillFile(path) {
|
|
55842
56167
|
let raw;
|
|
55843
56168
|
try {
|
|
55844
|
-
raw =
|
|
56169
|
+
raw = readFileSync12(path, "utf8");
|
|
55845
56170
|
} catch {
|
|
55846
56171
|
return;
|
|
55847
56172
|
}
|
|
@@ -56267,7 +56592,7 @@ var init_slash_palette = __esm(() => {
|
|
|
56267
56592
|
|
|
56268
56593
|
// ../tui-base/src/routes/session/skills-manage.ts
|
|
56269
56594
|
import { existsSync as existsSync11 } from "fs";
|
|
56270
|
-
import { lstat, mkdir as
|
|
56595
|
+
import { lstat, mkdir as mkdir4, readFile as readFile4, readdir, realpath, symlink, unlink } from "fs/promises";
|
|
56271
56596
|
import { join as join14, sep } from "path";
|
|
56272
56597
|
function skillSymlinkPaths(publicDir, curatedDir, name) {
|
|
56273
56598
|
const srcMd = join14(publicDir, `${name}.md`);
|
|
@@ -56410,7 +56735,7 @@ function oneLine2(value) {
|
|
|
56410
56735
|
}
|
|
56411
56736
|
async function readSkillDescription(path) {
|
|
56412
56737
|
try {
|
|
56413
|
-
const text = await
|
|
56738
|
+
const text = await readFile4(path, "utf8");
|
|
56414
56739
|
const front = parseFrontmatter(text);
|
|
56415
56740
|
if (front === undefined)
|
|
56416
56741
|
return "";
|
|
@@ -56457,7 +56782,7 @@ function skillStateText(row, pendingState) {
|
|
|
56457
56782
|
}
|
|
56458
56783
|
async function ensureCuratedDir(curatedDir) {
|
|
56459
56784
|
try {
|
|
56460
|
-
await
|
|
56785
|
+
await mkdir4(curatedDir, { recursive: true });
|
|
56461
56786
|
} catch {}
|
|
56462
56787
|
}
|
|
56463
56788
|
var SKILL_SUMMARY_MAX_ITEMS = 3, DESCRIPTION_MAX2 = 90;
|
|
@@ -63704,7 +64029,7 @@ var init_subagents_viewer = __esm(() => {
|
|
|
63704
64029
|
import { TextAttributes as TextAttributes12 } from "@opentui/core";
|
|
63705
64030
|
function resolveVersion() {
|
|
63706
64031
|
try {
|
|
63707
|
-
return "0.23.
|
|
64032
|
+
return "0.23.3";
|
|
63708
64033
|
} catch {
|
|
63709
64034
|
return "dev";
|
|
63710
64035
|
}
|
|
@@ -63760,6 +64085,19 @@ function naRow(id, label, note) {
|
|
|
63760
64085
|
note
|
|
63761
64086
|
};
|
|
63762
64087
|
}
|
|
64088
|
+
function hostSettingsAvailable(ctx) {
|
|
64089
|
+
return ctx.host;
|
|
64090
|
+
}
|
|
64091
|
+
function settingsRowsForMode(rows, ctx) {
|
|
64092
|
+
if (hostSettingsAvailable(ctx))
|
|
64093
|
+
return [...rows];
|
|
64094
|
+
return rows.filter((row) => row.kind === "jump" || row.editable && row.write !== undefined);
|
|
64095
|
+
}
|
|
64096
|
+
function visibleSettingsSections(ctx) {
|
|
64097
|
+
if (hostSettingsAvailable(ctx))
|
|
64098
|
+
return SETTINGS_SECTIONS;
|
|
64099
|
+
return SETTINGS_SECTIONS.filter((section) => section.id !== "host");
|
|
64100
|
+
}
|
|
63763
64101
|
function buildGeneralRows(ctx) {
|
|
63764
64102
|
const hostRows = buildHostItems(ctx.document, ctx.host, ctx.catalog);
|
|
63765
64103
|
const permission = hostRows.find((row) => row.id === "permission.defaultPreset");
|
|
@@ -63792,7 +64130,7 @@ function buildGeneralRows(ctx) {
|
|
|
63792
64130
|
id: "general.session-log",
|
|
63793
64131
|
label: t("settings.row.sessionLogUpload")
|
|
63794
64132
|
};
|
|
63795
|
-
|
|
64133
|
+
const rows = [permissionRow, {
|
|
63796
64134
|
id: "general.language",
|
|
63797
64135
|
label: t("settings.row.language"),
|
|
63798
64136
|
value: hintsLocaleFromConfig(ctx.merged.lang) ?? hintsLocaleFromConfig(ctx.merged.hintsLocale) ?? "en",
|
|
@@ -63852,9 +64190,10 @@ function buildGeneralRows(ctx) {
|
|
|
63852
64190
|
kind: "readonly",
|
|
63853
64191
|
editable: false
|
|
63854
64192
|
}];
|
|
64193
|
+
return settingsRowsForMode(rows, ctx);
|
|
63855
64194
|
}
|
|
63856
64195
|
function buildOpentuiRows(ctx) {
|
|
63857
|
-
|
|
64196
|
+
const rows = buildLocalItems({
|
|
63858
64197
|
merged: ctx.merged,
|
|
63859
64198
|
profile: ctx.profile,
|
|
63860
64199
|
workspace: ctx.workspace,
|
|
@@ -63862,16 +64201,20 @@ function buildOpentuiRows(ctx) {
|
|
|
63862
64201
|
themeNames: ctx.themeNames
|
|
63863
64202
|
} : {},
|
|
63864
64203
|
writable: ctx.local
|
|
63865
|
-
}).filter((item) => item.id !== "lang").map(
|
|
64204
|
+
}).filter((item) => item.id !== "lang").map((row) => row.id === "activityPanelHeight" ? {
|
|
64205
|
+
...row,
|
|
64206
|
+
note: t("settings.row.activityPanelHeightNote")
|
|
64207
|
+
} : row).map(fromItem);
|
|
64208
|
+
return settingsRowsForMode(rows, ctx);
|
|
63866
64209
|
}
|
|
63867
64210
|
function buildHostRows(ctx) {
|
|
63868
|
-
return buildHostItems(ctx.document, ctx.host, ctx.catalog).map(fromItem);
|
|
64211
|
+
return settingsRowsForMode(buildHostItems(ctx.document, ctx.host, ctx.catalog).map(fromItem), ctx);
|
|
63869
64212
|
}
|
|
63870
64213
|
function buildOtherRows(ctx) {
|
|
63871
|
-
return buildOtherItems(ctx.document).map((item) => ({
|
|
64214
|
+
return settingsRowsForMode(buildOtherItems(ctx.document).map((item) => ({
|
|
63872
64215
|
...fromItem(item),
|
|
63873
64216
|
kind: "readonly"
|
|
63874
|
-
}));
|
|
64217
|
+
})), ctx);
|
|
63875
64218
|
}
|
|
63876
64219
|
function settingsCommandSpec(id) {
|
|
63877
64220
|
switch (id) {
|
|
@@ -63978,16 +64321,43 @@ async function writeSetting(row, value, deps) {
|
|
|
63978
64321
|
ok: false,
|
|
63979
64322
|
error: `\u2718 ${plan.error}`
|
|
63980
64323
|
};
|
|
63981
|
-
|
|
63982
|
-
|
|
63983
|
-
|
|
64324
|
+
const isLocalGear = row.write.key === "session.activity_panel_height";
|
|
64325
|
+
const locallyPersisted = isLocalGear && deps.uiStatePath !== undefined;
|
|
64326
|
+
if (locallyPersisted) {
|
|
64327
|
+
try {
|
|
64328
|
+
await writeUiState(deps.uiStatePath, {
|
|
64329
|
+
session: {
|
|
64330
|
+
activity_panel_height: plan.applied === undefined ? undefined : String(plan.applied)
|
|
64331
|
+
}
|
|
64332
|
+
});
|
|
64333
|
+
} catch (error) {
|
|
64334
|
+
return {
|
|
64335
|
+
ok: false,
|
|
64336
|
+
error: t("settings.error.writeFailed", {
|
|
64337
|
+
detail: error instanceof Error ? error.message : String(error)
|
|
64338
|
+
})
|
|
64339
|
+
};
|
|
64340
|
+
}
|
|
64341
|
+
}
|
|
64342
|
+
if (deps.seam.configSave === undefined && !locallyPersisted) {
|
|
64343
|
+
applySettingsLive(row, plan.applied, hints, deps.themes);
|
|
63984
64344
|
return {
|
|
63985
64345
|
ok: false,
|
|
63986
|
-
error: t("settings.error.
|
|
63987
|
-
detail: error instanceof Error ? error.message : String(error)
|
|
63988
|
-
})
|
|
64346
|
+
error: t("settings.error.configNotPersistable")
|
|
63989
64347
|
};
|
|
63990
64348
|
}
|
|
64349
|
+
if (deps.seam.configSave !== undefined) {
|
|
64350
|
+
try {
|
|
64351
|
+
deps.seam.configSave(plan.patch);
|
|
64352
|
+
} catch (error) {
|
|
64353
|
+
return {
|
|
64354
|
+
ok: false,
|
|
64355
|
+
error: t("settings.error.writeFailed", {
|
|
64356
|
+
detail: error instanceof Error ? error.message : String(error)
|
|
64357
|
+
})
|
|
64358
|
+
};
|
|
64359
|
+
}
|
|
64360
|
+
}
|
|
63991
64361
|
applySettingsLive(row, plan.applied, hints, deps.themes);
|
|
63992
64362
|
return {
|
|
63993
64363
|
ok: true,
|
|
@@ -64101,6 +64471,7 @@ function SettingsModalBody(props) {
|
|
|
64101
64471
|
const [editorRow, setEditorRow] = createSignal(undefined);
|
|
64102
64472
|
const [editorValue, setEditorValue] = createSignal("");
|
|
64103
64473
|
const [optionCursor, setOptionCursor] = createSignal(0);
|
|
64474
|
+
const localUiStatePath = defaultUiStatePath();
|
|
64104
64475
|
const [merged, setMerged] = createSignal({});
|
|
64105
64476
|
const [profile, setProfile] = createSignal({});
|
|
64106
64477
|
const [workspace, setWorkspace] = createSignal({});
|
|
@@ -64131,7 +64502,7 @@ function SettingsModalBody(props) {
|
|
|
64131
64502
|
}));
|
|
64132
64503
|
const sections = createMemo(() => {
|
|
64133
64504
|
const ctx = rowContext();
|
|
64134
|
-
return
|
|
64505
|
+
return visibleSettingsSections(ctx).map((section) => ({
|
|
64135
64506
|
...section,
|
|
64136
64507
|
rows: buildSectionRows(section.id, ctx)
|
|
64137
64508
|
}));
|
|
@@ -64178,7 +64549,19 @@ function SettingsModalBody(props) {
|
|
|
64178
64549
|
}
|
|
64179
64550
|
function reloadLocal() {
|
|
64180
64551
|
const snapshot = readLocalSnapshot(props.seam);
|
|
64181
|
-
|
|
64552
|
+
const local = readUiStateSync(localUiStatePath);
|
|
64553
|
+
const localGear = local.session?.activity_panel_height;
|
|
64554
|
+
const merged = {
|
|
64555
|
+
...snapshot.merged
|
|
64556
|
+
};
|
|
64557
|
+
if (localGear !== undefined) {
|
|
64558
|
+
const session = typeof merged.session === "object" && merged.session !== null ? merged.session : {};
|
|
64559
|
+
merged.session = {
|
|
64560
|
+
...session,
|
|
64561
|
+
activity_panel_height: localGear
|
|
64562
|
+
};
|
|
64563
|
+
}
|
|
64564
|
+
setMerged(merged);
|
|
64182
64565
|
setProfile(snapshot.profile);
|
|
64183
64566
|
setWorkspace(snapshot.workspace);
|
|
64184
64567
|
}
|
|
@@ -64261,7 +64644,8 @@ function SettingsModalBody(props) {
|
|
|
64261
64644
|
document: document()
|
|
64262
64645
|
} : {},
|
|
64263
64646
|
local: writable().local,
|
|
64264
|
-
host: writable().host
|
|
64647
|
+
host: writable().host,
|
|
64648
|
+
uiStatePath: localUiStatePath
|
|
64265
64649
|
});
|
|
64266
64650
|
if (result.document !== undefined)
|
|
64267
64651
|
setDocument(result.document);
|
|
@@ -64980,6 +65364,7 @@ var init_settings_modal = __esm(() => {
|
|
|
64980
65364
|
init_i18n();
|
|
64981
65365
|
init_hints_line();
|
|
64982
65366
|
init_settings_panel();
|
|
65367
|
+
init_ui_state();
|
|
64983
65368
|
SETTINGS_SECTIONS = [
|
|
64984
65369
|
{
|
|
64985
65370
|
id: "general"
|
|
@@ -69038,7 +69423,10 @@ async function bootClientV2(options = {}) {
|
|
|
69038
69423
|
const themeModeLock = shared.themeModeFromConfig(session);
|
|
69039
69424
|
setMotionTier(resolveMotionPreference(process.env[shared.ENV_MOTION], shared.motionFromConfig(session)));
|
|
69040
69425
|
applyHintsConfig(seam.configLoad?.());
|
|
69041
|
-
|
|
69426
|
+
const bootLocalUi = readUiStateSync(defaultUiStatePath());
|
|
69427
|
+
const bootGear = resolveBootGear(seam.configLoad?.(), bootLocalUi);
|
|
69428
|
+
if (bootGear !== undefined)
|
|
69429
|
+
applyActivityPanelConfig({ session: { activity_panel_height: bootGear } });
|
|
69042
69430
|
applyI18nConfig(seam.configLoad?.());
|
|
69043
69431
|
let shutdownPromise = null;
|
|
69044
69432
|
const shutdown = () => {
|
|
@@ -69174,6 +69562,7 @@ var init_v2_entry = __esm(() => {
|
|
|
69174
69562
|
init_recovery_banner();
|
|
69175
69563
|
init_hints_line();
|
|
69176
69564
|
init_widgets_dock();
|
|
69565
|
+
init_ui_state();
|
|
69177
69566
|
init_src();
|
|
69178
69567
|
init_i18n();
|
|
69179
69568
|
init_search_overlay();
|
|
@@ -69691,5 +70080,5 @@ export {
|
|
|
69691
70080
|
themeNameFromConfig
|
|
69692
70081
|
};
|
|
69693
70082
|
|
|
69694
|
-
//# debugId=
|
|
70083
|
+
//# debugId=4EE49A8A419D300F64756E2164756E21
|
|
69695
70084
|
//# sourceMappingURL=index.js.map
|