@aiwayds/dsh-opentui 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/client/index.js +215 -238
- package/dist/client/index.js.map +11 -11
- package/dist/locales/en.json +4 -0
- package/dist/locales/zh-CN.json +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.21.0] - 2026-11-17
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- The footer now shows turn and round counters as `💬 N turns · ↻ M rounds`.
|
|
12
|
+
Turns count durable `user` transcript rows; rounds count durable
|
|
13
|
+
`assistant/message` journal events (one assembled message = one round).
|
|
14
|
+
When the journal is unavailable the counters degrade honestly: the rounds
|
|
15
|
+
half is omitted rather than shown as a fake 0.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- The busy status line is gone: no verb, elapsed time or detail text renders.
|
|
19
|
+
The animated comet now rides the key-hint row, to the left of the hints and
|
|
20
|
+
only while busy; its renderer moved to a shared `comet-track.tsx` module.
|
|
21
|
+
|
|
22
|
+
### Known limitations
|
|
23
|
+
- Round counts refresh only at turn boundaries, so a multi-round turn jumps
|
|
24
|
+
once at its end instead of ticking per round. Steer messages may inflate the
|
|
25
|
+
turn count; whether the host journals steer text as a user message cannot be
|
|
26
|
+
verified from this repo.
|
|
27
|
+
|
|
8
28
|
## [0.20.0] - 2026-11-17
|
|
9
29
|
|
|
10
30
|
### Added
|
package/dist/client/index.js
CHANGED
|
@@ -9370,6 +9370,7 @@ class RemoteHostSession {
|
|
|
9370
9370
|
#model;
|
|
9371
9371
|
#settings;
|
|
9372
9372
|
#journal = [];
|
|
9373
|
+
#rounds = 0;
|
|
9373
9374
|
#journalListeners = [];
|
|
9374
9375
|
#lastDurableSeq = -1;
|
|
9375
9376
|
#turnArmSeq = -1;
|
|
@@ -9645,6 +9646,7 @@ class RemoteHostSession {
|
|
|
9645
9646
|
sessionId: this.currentSessionId(),
|
|
9646
9647
|
model: this.label === "dsh-host" ? undefined : this.label,
|
|
9647
9648
|
turnCount: this.#turns,
|
|
9649
|
+
roundCount: this.#rounds,
|
|
9648
9650
|
tokensIn: this.usage.prompt,
|
|
9649
9651
|
tokensOut: this.usage.completion,
|
|
9650
9652
|
cacheRead: this.usage.cacheRead,
|
|
@@ -10439,6 +10441,7 @@ class RemoteHostSession {
|
|
|
10439
10441
|
#resetLedger() {
|
|
10440
10442
|
this.#journal = [];
|
|
10441
10443
|
this.#lastDurableSeq = -1;
|
|
10444
|
+
this.#rounds = 0;
|
|
10442
10445
|
this.#contextMeter.reset();
|
|
10443
10446
|
this.#contextPressure = undefined;
|
|
10444
10447
|
this.#contextProjections = undefined;
|
|
@@ -10525,6 +10528,8 @@ class RemoteHostSession {
|
|
|
10525
10528
|
onRecord: (entry) => {
|
|
10526
10529
|
if (entry.seq > this.#lastDurableSeq)
|
|
10527
10530
|
this.#lastDurableSeq = entry.seq;
|
|
10531
|
+
if (entry.type === "assistant/message")
|
|
10532
|
+
this.#rounds++;
|
|
10528
10533
|
this.#journal.push(entry);
|
|
10529
10534
|
if (this.#journal.length > 4000)
|
|
10530
10535
|
this.#journal.shift();
|
|
@@ -46279,14 +46284,9 @@ function clipToWidth(text, limit) {
|
|
|
46279
46284
|
const flat = text.replace(/\s+/u, " ").trim();
|
|
46280
46285
|
if (stringWidth(flat) <= limit)
|
|
46281
46286
|
return flat;
|
|
46282
|
-
|
|
46283
|
-
|
|
46284
|
-
|
|
46285
|
-
if (width > limit - 1) {
|
|
46286
|
-
return limit <= 1 ? "\u2026" : `${flat.slice(0, i)}\u2026`;
|
|
46287
|
-
}
|
|
46288
|
-
}
|
|
46289
|
-
return flat;
|
|
46287
|
+
if (limit === 1)
|
|
46288
|
+
return "\u2026";
|
|
46289
|
+
return `${takeWidth(flat, limit - 1)}\u2026`;
|
|
46290
46290
|
}
|
|
46291
46291
|
function firstWord(value) {
|
|
46292
46292
|
return value.trim().split(/\s+/u)[0] ?? "";
|
|
@@ -46426,6 +46426,7 @@ function toolResultLine(output, limit = 120) {
|
|
|
46426
46426
|
}
|
|
46427
46427
|
var TOOL_RESULT_PLACEHOLDER = "tool result";
|
|
46428
46428
|
var init_tool_summarize = __esm(() => {
|
|
46429
|
+
init_locale();
|
|
46429
46430
|
init_string_width();
|
|
46430
46431
|
});
|
|
46431
46432
|
|
|
@@ -48640,15 +48641,44 @@ function contextSegment(used, window, theme) {
|
|
|
48640
48641
|
}
|
|
48641
48642
|
};
|
|
48642
48643
|
}
|
|
48643
|
-
function
|
|
48644
|
+
function turnsSegment(n, theme) {
|
|
48644
48645
|
if (!Number.isFinite(n) || n < 0)
|
|
48645
48646
|
return null;
|
|
48646
48647
|
return {
|
|
48647
|
-
text: t("footer.
|
|
48648
|
+
text: t(n === 1 ? "footer.turns.one" : "footer.turns.many", {
|
|
48648
48649
|
n
|
|
48649
48650
|
}),
|
|
48650
48651
|
bg: resolvePalette(theme).messages,
|
|
48651
|
-
priority:
|
|
48652
|
+
priority: 75
|
|
48653
|
+
};
|
|
48654
|
+
}
|
|
48655
|
+
function roundsSegment(n, theme) {
|
|
48656
|
+
if (!Number.isFinite(n) || n < 0)
|
|
48657
|
+
return null;
|
|
48658
|
+
return {
|
|
48659
|
+
text: t(n === 1 ? "footer.rounds.one" : "footer.rounds.many", {
|
|
48660
|
+
n
|
|
48661
|
+
}),
|
|
48662
|
+
bg: resolvePalette(theme).messages,
|
|
48663
|
+
priority: 75
|
|
48664
|
+
};
|
|
48665
|
+
}
|
|
48666
|
+
function turnsRoundsSegment(turns, rounds, theme) {
|
|
48667
|
+
const turnLeaf = turnsSegment(turns, theme);
|
|
48668
|
+
if (!turnLeaf)
|
|
48669
|
+
return null;
|
|
48670
|
+
if (rounds === undefined)
|
|
48671
|
+
return {
|
|
48672
|
+
...turnLeaf,
|
|
48673
|
+
priority: 75
|
|
48674
|
+
};
|
|
48675
|
+
const roundLeaf = roundsSegment(rounds, theme);
|
|
48676
|
+
if (!roundLeaf)
|
|
48677
|
+
return null;
|
|
48678
|
+
return {
|
|
48679
|
+
text: `${turnLeaf.text} \xB7 ${roundLeaf.text}`,
|
|
48680
|
+
bg: turnLeaf.bg,
|
|
48681
|
+
priority: 75
|
|
48652
48682
|
};
|
|
48653
48683
|
}
|
|
48654
48684
|
function toolSegment(n, theme) {
|
|
@@ -48921,8 +48951,8 @@ function sessionFooterSegments(data) {
|
|
|
48921
48951
|
add(modelSegment(data.model ?? "", effectiveEffort(data.effort), theme));
|
|
48922
48952
|
add(contextSegment(data.contextTokens ?? null, data.contextWindow ?? null, theme));
|
|
48923
48953
|
add(cacheSegment(data.cacheHitRate ?? null, theme));
|
|
48924
|
-
if (data.
|
|
48925
|
-
add(
|
|
48954
|
+
if (data.turns !== undefined)
|
|
48955
|
+
add(turnsRoundsSegment(data.turns, data.rounds, theme));
|
|
48926
48956
|
add(toolSegment(data.tools ?? 0, theme));
|
|
48927
48957
|
add(elapsedSegment(data.elapsedSec ?? null, theme));
|
|
48928
48958
|
add(speedSegment(data.tps ?? null, theme));
|
|
@@ -50810,6 +50840,120 @@ var init_notices_dock = __esm(() => {
|
|
|
50810
50840
|
noticeList = notices;
|
|
50811
50841
|
});
|
|
50812
50842
|
|
|
50843
|
+
// ../tui-base/src/routes/session/comet-track.tsx
|
|
50844
|
+
import { parseColor as parseColor4, Renderable as Renderable7 } from "@opentui/core";
|
|
50845
|
+
function cometHeadColor(theme) {
|
|
50846
|
+
return theme?.hue.accent[500] ?? COMET_FALLBACK_HEAD;
|
|
50847
|
+
}
|
|
50848
|
+
function cometFps(active) {
|
|
50849
|
+
return !active || getMotionTier() === "off" ? undefined : STREAM_FPS;
|
|
50850
|
+
}
|
|
50851
|
+
function cometPosition(step) {
|
|
50852
|
+
const span = COMET_TRACK_COLS - ASSEMBLY;
|
|
50853
|
+
const s = (step % (span * 2) + span * 2) % (span * 2);
|
|
50854
|
+
const start = s < span ? s : span * 2 - s;
|
|
50855
|
+
const dirRight = s < span;
|
|
50856
|
+
const stern = dirRight ? start : start + ASSEMBLY;
|
|
50857
|
+
const tailEnd = dirRight ? stern - TAIL : stern + TAIL;
|
|
50858
|
+
return {
|
|
50859
|
+
start,
|
|
50860
|
+
dirRight,
|
|
50861
|
+
stern,
|
|
50862
|
+
tailEnd
|
|
50863
|
+
};
|
|
50864
|
+
}
|
|
50865
|
+
function cometRampChar(behind) {
|
|
50866
|
+
return RAMP[Math.min(RAMP.length - 1, Math.floor(behind / 2) + 1)];
|
|
50867
|
+
}
|
|
50868
|
+
var TAIL = 5, RAMP, ASSEMBLY = 2, COMET_FALLBACK_TRACK = "#565f89", COMET_FALLBACK_HEAD = "#7aa2f7", COMET_TRACK_COLS = 15, CometTrackRenderable;
|
|
50869
|
+
var init_comet_track = __esm(() => {
|
|
50870
|
+
init_index_bun();
|
|
50871
|
+
init_motion();
|
|
50872
|
+
init_identity();
|
|
50873
|
+
RAMP = ["\u2588", "\u2593", "\u2592", "\u2591"];
|
|
50874
|
+
CometTrackRenderable = class CometTrackRenderable extends Renderable7 {
|
|
50875
|
+
_step = 0;
|
|
50876
|
+
constructor(ctx, options = {}) {
|
|
50877
|
+
super(ctx, options);
|
|
50878
|
+
this._headFg = parseColor4(options.headFg ?? COMET_FALLBACK_HEAD);
|
|
50879
|
+
this._trackFg = parseColor4(options.trackFg ?? COMET_FALLBACK_TRACK);
|
|
50880
|
+
this._mode = options.mode ?? "dark";
|
|
50881
|
+
this._gradient = options.gradient ?? false;
|
|
50882
|
+
this.setMeasureProvider(() => ({
|
|
50883
|
+
width: COMET_TRACK_COLS,
|
|
50884
|
+
height: 1
|
|
50885
|
+
}));
|
|
50886
|
+
}
|
|
50887
|
+
set step(value) {
|
|
50888
|
+
if (value === this._step)
|
|
50889
|
+
return;
|
|
50890
|
+
this._step = value;
|
|
50891
|
+
this.requestRender();
|
|
50892
|
+
}
|
|
50893
|
+
set headFg(value) {
|
|
50894
|
+
const next = parseColor4(value);
|
|
50895
|
+
if (next.equals(this._headFg))
|
|
50896
|
+
return;
|
|
50897
|
+
this._headFg = next;
|
|
50898
|
+
this.requestRender();
|
|
50899
|
+
}
|
|
50900
|
+
set trackFg(value) {
|
|
50901
|
+
const next = parseColor4(value);
|
|
50902
|
+
if (next.equals(this._trackFg))
|
|
50903
|
+
return;
|
|
50904
|
+
this._trackFg = next;
|
|
50905
|
+
this.requestRender();
|
|
50906
|
+
}
|
|
50907
|
+
set mode(value) {
|
|
50908
|
+
if (value === this._mode)
|
|
50909
|
+
return;
|
|
50910
|
+
this._mode = value;
|
|
50911
|
+
this.requestRender();
|
|
50912
|
+
}
|
|
50913
|
+
set gradient(value) {
|
|
50914
|
+
if (value === this._gradient)
|
|
50915
|
+
return;
|
|
50916
|
+
this._gradient = value;
|
|
50917
|
+
this.requestRender();
|
|
50918
|
+
}
|
|
50919
|
+
renderSelf(buffer) {
|
|
50920
|
+
if (!this.visible || this.isDestroyed)
|
|
50921
|
+
return;
|
|
50922
|
+
const bg = parseColor4("transparent");
|
|
50923
|
+
const {
|
|
50924
|
+
start,
|
|
50925
|
+
dirRight,
|
|
50926
|
+
stern,
|
|
50927
|
+
tailEnd
|
|
50928
|
+
} = cometPosition(this._step);
|
|
50929
|
+
let c = 0;
|
|
50930
|
+
while (c < COMET_TRACK_COLS) {
|
|
50931
|
+
if (c === start) {
|
|
50932
|
+
buffer.drawText("\uD83D\uDC33", this.screenX + c, this.screenY, this._headFg, bg);
|
|
50933
|
+
c += ASSEMBLY;
|
|
50934
|
+
continue;
|
|
50935
|
+
}
|
|
50936
|
+
const behind = dirRight ? stern - c : c - stern;
|
|
50937
|
+
const inTail = dirRight ? c < stern && c > tailEnd : c > stern && c < tailEnd;
|
|
50938
|
+
if (inTail && behind >= 0) {
|
|
50939
|
+
if (this._gradient) {
|
|
50940
|
+
const color = parseColor4(identityHexAt(Math.min(1, behind / TAIL), this._mode));
|
|
50941
|
+
buffer.drawText("\u2588", this.screenX + c, this.screenY, color, bg);
|
|
50942
|
+
} else {
|
|
50943
|
+
buffer.drawText(cometRampChar(behind), this.screenX + c, this.screenY, this._trackFg, bg);
|
|
50944
|
+
}
|
|
50945
|
+
} else {
|
|
50946
|
+
buffer.drawText("\u2591", this.screenX + c, this.screenY, this._trackFg, bg);
|
|
50947
|
+
}
|
|
50948
|
+
c += 1;
|
|
50949
|
+
}
|
|
50950
|
+
}
|
|
50951
|
+
};
|
|
50952
|
+
extend({
|
|
50953
|
+
comet_track: CometTrackRenderable
|
|
50954
|
+
});
|
|
50955
|
+
});
|
|
50956
|
+
|
|
50813
50957
|
// ../tui-base/src/routes/session/hints-line.tsx
|
|
50814
50958
|
function footerHintsFromConfig(value) {
|
|
50815
50959
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
@@ -50919,29 +51063,59 @@ function transcriptHintsText(shown = true) {
|
|
|
50919
51063
|
function HintsLine(props) {
|
|
50920
51064
|
const dimensions = useTerminalSize();
|
|
50921
51065
|
const theme = useThemeOptional();
|
|
51066
|
+
const cometActive = () => props.busy() && hintsShown();
|
|
51067
|
+
const [tick, setTick] = createSignal(0);
|
|
51068
|
+
onAnimationTick(() => cometFps(cometActive()), () => setTick((t) => t + 1));
|
|
50922
51069
|
const row = () => {
|
|
50923
|
-
const
|
|
50924
|
-
|
|
51070
|
+
const busy = cometActive();
|
|
51071
|
+
const columns = dimensions().width - (busy ? COMET_TRACK_COLS + COMET_HINT_GAP : 0);
|
|
51072
|
+
return props.pane?.() === "transcript" ? clipToWidth(transcriptHintsText(hintsShown()), Math.max(8, columns - 2)) : hintsTextAtWidth(props.busy(), hintsShown(), subagentMarkerViews().some((v) => v.status === "running"), columns);
|
|
50925
51073
|
};
|
|
50926
51074
|
return createComponent2(Show, {
|
|
50927
51075
|
get when() {
|
|
50928
|
-
return memo2(() => !!hintsShown())() && row().length > 0;
|
|
51076
|
+
return memo2(() => !!hintsShown())() && (cometActive() || row().length > 0);
|
|
50929
51077
|
},
|
|
50930
51078
|
get children() {
|
|
50931
|
-
var _el$ = createElement("box"), _el$
|
|
50932
|
-
insertNode(_el$, _el$
|
|
51079
|
+
var _el$ = createElement("box"), _el$3 = createElement("text");
|
|
51080
|
+
insertNode(_el$, _el$3);
|
|
50933
51081
|
setProp(_el$, "flexShrink", 0);
|
|
50934
51082
|
setProp(_el$, "height", 1);
|
|
50935
51083
|
setProp(_el$, "width", "100%");
|
|
50936
51084
|
setProp(_el$, "paddingLeft", 1);
|
|
50937
|
-
setProp(_el
|
|
50938
|
-
insert(_el
|
|
50939
|
-
|
|
51085
|
+
setProp(_el$, "flexDirection", "row");
|
|
51086
|
+
insert(_el$, createComponent2(Show, {
|
|
51087
|
+
get when() {
|
|
51088
|
+
return cometActive();
|
|
51089
|
+
},
|
|
51090
|
+
get children() {
|
|
51091
|
+
var _el$2 = createElement("comet_track");
|
|
51092
|
+
effect((_p$) => {
|
|
51093
|
+
var _v$ = tick(), _v$2 = cometHeadColor(theme), _v$3 = theme?.border.base ?? COMET_FALLBACK_TRACK, _v$4 = motionDecorationsEnabled();
|
|
51094
|
+
_v$ !== _p$.e && (_p$.e = setProp(_el$2, "step", _v$, _p$.e));
|
|
51095
|
+
_v$2 !== _p$.t && (_p$.t = setProp(_el$2, "headFg", _v$2, _p$.t));
|
|
51096
|
+
_v$3 !== _p$.a && (_p$.a = setProp(_el$2, "trackFg", _v$3, _p$.a));
|
|
51097
|
+
_v$4 !== _p$.o && (_p$.o = setProp(_el$2, "gradient", _v$4, _p$.o));
|
|
51098
|
+
return _p$;
|
|
51099
|
+
}, {
|
|
51100
|
+
e: undefined,
|
|
51101
|
+
t: undefined,
|
|
51102
|
+
a: undefined,
|
|
51103
|
+
o: undefined
|
|
51104
|
+
});
|
|
51105
|
+
return _el$2;
|
|
51106
|
+
}
|
|
51107
|
+
}), _el$3);
|
|
51108
|
+
setProp(_el$3, "wrapMode", "none");
|
|
51109
|
+
insert(_el$3, (() => {
|
|
51110
|
+
var _c$ = memo2(() => !!(cometActive() && row().length > 0));
|
|
51111
|
+
return () => _c$() ? `${" ".repeat(COMET_HINT_GAP)}${row()}` : row();
|
|
51112
|
+
})());
|
|
51113
|
+
effect((_$p) => setProp(_el$3, "fg", theme?.text.faint ?? "#565f89", _$p));
|
|
50940
51114
|
return _el$;
|
|
50941
51115
|
}
|
|
50942
51116
|
});
|
|
50943
51117
|
}
|
|
50944
|
-
var hintsShown, setHintsShown, DEFAULT_FOOTER_HINTS, FOOTER_HINT_IDS, HINT_SEGMENT_PRIORITY, HINT_LOCALES, HINT_LABEL_KEYS, footerHints, setFooterHints, hintsLocale, setHintsLocale, TRANSCRIPT_HINT_KEY = "footer.hint.transcript";
|
|
51118
|
+
var hintsShown, setHintsShown, COMET_HINT_GAP = 1, DEFAULT_FOOTER_HINTS, FOOTER_HINT_IDS, HINT_SEGMENT_PRIORITY, HINT_LOCALES, HINT_LABEL_KEYS, footerHints, setFooterHints, hintsLocale, setHintsLocale, TRANSCRIPT_HINT_KEY = "footer.hint.transcript";
|
|
50945
51119
|
var init_hints_line = __esm(() => {
|
|
50946
51120
|
init_index_bun();
|
|
50947
51121
|
init_index_bun();
|
|
@@ -50951,12 +51125,15 @@ var init_hints_line = __esm(() => {
|
|
|
50951
51125
|
init_index_bun();
|
|
50952
51126
|
init_index_bun();
|
|
50953
51127
|
init_server();
|
|
51128
|
+
init_index_bun();
|
|
50954
51129
|
init_i18n();
|
|
50955
51130
|
init_terminal_size();
|
|
50956
51131
|
init_tool_summarize();
|
|
50957
51132
|
init_string_width();
|
|
50958
51133
|
init_theme3();
|
|
51134
|
+
init_motion();
|
|
50959
51135
|
init_subagent_markers();
|
|
51136
|
+
init_comet_track();
|
|
50960
51137
|
[hintsShown, setHintsShown] = createSignal(true);
|
|
50961
51138
|
DEFAULT_FOOTER_HINTS = Object.freeze({
|
|
50962
51139
|
send: true,
|
|
@@ -62756,7 +62933,7 @@ var init_subagents_viewer = __esm(() => {
|
|
|
62756
62933
|
import { TextAttributes as TextAttributes12 } from "@opentui/core";
|
|
62757
62934
|
function resolveVersion() {
|
|
62758
62935
|
try {
|
|
62759
|
-
return "0.
|
|
62936
|
+
return "0.21.0";
|
|
62760
62937
|
} catch {
|
|
62761
62938
|
return "dev";
|
|
62762
62939
|
}
|
|
@@ -64512,205 +64689,6 @@ var init_panel_kit_host = __esm(() => {
|
|
|
64512
64689
|
init_theme3();
|
|
64513
64690
|
});
|
|
64514
64691
|
|
|
64515
|
-
// ../tui-base/src/routes/session/status-bar.tsx
|
|
64516
|
-
import { parseColor as parseColor4, Renderable as Renderable7 } from "@opentui/core";
|
|
64517
|
-
function cometPosition(step) {
|
|
64518
|
-
const span = TRACK_COLS - ASSEMBLY;
|
|
64519
|
-
const s = (step % (span * 2) + span * 2) % (span * 2);
|
|
64520
|
-
const start = s < span ? s : span * 2 - s;
|
|
64521
|
-
const dirRight = s < span;
|
|
64522
|
-
const stern = dirRight ? start : start + ASSEMBLY;
|
|
64523
|
-
const tailEnd = dirRight ? stern - TAIL : stern + TAIL;
|
|
64524
|
-
return {
|
|
64525
|
-
start,
|
|
64526
|
-
dirRight,
|
|
64527
|
-
stern,
|
|
64528
|
-
tailEnd
|
|
64529
|
-
};
|
|
64530
|
-
}
|
|
64531
|
-
function cometRampChar(behind) {
|
|
64532
|
-
return RAMP[Math.min(RAMP.length - 1, Math.floor(behind / 2) + 1)];
|
|
64533
|
-
}
|
|
64534
|
-
function StatusBar(props) {
|
|
64535
|
-
const theme = useThemeOptional();
|
|
64536
|
-
const [tick, setTick] = createSignal(0);
|
|
64537
|
-
const fps = () => props.phase === null || getMotionTier() === "off" ? undefined : STREAM_FPS;
|
|
64538
|
-
onAnimationTick(fps, () => setTick((t) => t + 1));
|
|
64539
|
-
const pools = () => ({
|
|
64540
|
-
think: props.verbs?.think ?? DEFAULT_VERBS.think,
|
|
64541
|
-
tool: props.verbs?.tool ?? DEFAULT_VERBS.tool,
|
|
64542
|
-
stream: props.verbs?.stream ?? DEFAULT_VERBS.stream,
|
|
64543
|
-
approve: props.verbs?.approve ?? DEFAULT_VERBS.approve
|
|
64544
|
-
});
|
|
64545
|
-
const headFg = () => {
|
|
64546
|
-
switch (props.phase) {
|
|
64547
|
-
case "think":
|
|
64548
|
-
return theme?.hue.accent[400] ?? FALLBACK_HEAD;
|
|
64549
|
-
case "tool":
|
|
64550
|
-
return theme?.text.feedback.success.base ?? "#4caf50";
|
|
64551
|
-
case "approve":
|
|
64552
|
-
return theme?.text.feedback.warning.base ?? "#e0af68";
|
|
64553
|
-
default:
|
|
64554
|
-
return theme?.hue.accent[500] ?? FALLBACK_HEAD;
|
|
64555
|
-
}
|
|
64556
|
-
};
|
|
64557
|
-
const label = () => {
|
|
64558
|
-
const phase = props.phase;
|
|
64559
|
-
if (phase === null)
|
|
64560
|
-
return "";
|
|
64561
|
-
const pool = pools()[phase];
|
|
64562
|
-
const verb = pool[Math.floor(tick() * BAR_MS / VERB_MS) % pool.length];
|
|
64563
|
-
const detail = props.detail?.() ?? "";
|
|
64564
|
-
return `${PHASE_ICON[phase]} ${verb}... ${props.elapsed()}s${detail ? ` \xB7 ${detail}` : ""}`;
|
|
64565
|
-
};
|
|
64566
|
-
return createComponent2(Show, {
|
|
64567
|
-
get when() {
|
|
64568
|
-
return props.phase !== null;
|
|
64569
|
-
},
|
|
64570
|
-
get children() {
|
|
64571
|
-
var _el$ = createElement("box"), _el$2 = createElement("comet_track"), _el$3 = createElement("text");
|
|
64572
|
-
insertNode(_el$, _el$2);
|
|
64573
|
-
insertNode(_el$, _el$3);
|
|
64574
|
-
setProp(_el$, "style", {
|
|
64575
|
-
flexDirection: "row",
|
|
64576
|
-
paddingLeft: 1,
|
|
64577
|
-
paddingRight: 1,
|
|
64578
|
-
height: 1,
|
|
64579
|
-
flexGrow: 0,
|
|
64580
|
-
flexShrink: 0
|
|
64581
|
-
});
|
|
64582
|
-
setProp(_el$3, "wrapMode", "none");
|
|
64583
|
-
insert(_el$3, () => ` ${label()}`);
|
|
64584
|
-
effect((_p$) => {
|
|
64585
|
-
var _v$ = tick(), _v$2 = headFg(), _v$3 = theme?.border.base ?? FALLBACK_TRACK, _v$4 = motionDecorationsEnabled(), _v$5 = {
|
|
64586
|
-
fg: headFg()
|
|
64587
|
-
};
|
|
64588
|
-
_v$ !== _p$.e && (_p$.e = setProp(_el$2, "step", _v$, _p$.e));
|
|
64589
|
-
_v$2 !== _p$.t && (_p$.t = setProp(_el$2, "headFg", _v$2, _p$.t));
|
|
64590
|
-
_v$3 !== _p$.a && (_p$.a = setProp(_el$2, "trackFg", _v$3, _p$.a));
|
|
64591
|
-
_v$4 !== _p$.o && (_p$.o = setProp(_el$2, "gradient", _v$4, _p$.o));
|
|
64592
|
-
_v$5 !== _p$.i && (_p$.i = setProp(_el$3, "style", _v$5, _p$.i));
|
|
64593
|
-
return _p$;
|
|
64594
|
-
}, {
|
|
64595
|
-
e: undefined,
|
|
64596
|
-
t: undefined,
|
|
64597
|
-
a: undefined,
|
|
64598
|
-
o: undefined,
|
|
64599
|
-
i: undefined
|
|
64600
|
-
});
|
|
64601
|
-
return _el$;
|
|
64602
|
-
}
|
|
64603
|
-
});
|
|
64604
|
-
}
|
|
64605
|
-
var DEFAULT_VERBS, PHASE_ICON, TAIL = 5, RAMP, BAR_MS = 80, VERB_MS = 2500, FALLBACK_TRACK = "#565f89", FALLBACK_HEAD = "#7aa2f7", TRACK_COLS = 15, ASSEMBLY = 2, CometTrackRenderable;
|
|
64606
|
-
var init_status_bar = __esm(() => {
|
|
64607
|
-
init_index_bun();
|
|
64608
|
-
init_index_bun();
|
|
64609
|
-
init_index_bun();
|
|
64610
|
-
init_index_bun();
|
|
64611
|
-
init_index_bun();
|
|
64612
|
-
init_index_bun();
|
|
64613
|
-
init_server();
|
|
64614
|
-
init_index_bun();
|
|
64615
|
-
init_theme3();
|
|
64616
|
-
init_motion();
|
|
64617
|
-
init_identity();
|
|
64618
|
-
DEFAULT_VERBS = {
|
|
64619
|
-
think: ["Thinking", "Pondering", "Reasoning", "Reflecting", "Deliberating", "Mulling"],
|
|
64620
|
-
tool: ["Executing", "Running", "Processing", "Building"],
|
|
64621
|
-
stream: ["Writing", "Composing", "Typing", "Drafting"],
|
|
64622
|
-
approve: ["Waiting"]
|
|
64623
|
-
};
|
|
64624
|
-
PHASE_ICON = {
|
|
64625
|
-
think: "\uD83E\uDDE0",
|
|
64626
|
-
tool: "\uD83D\uDEE0",
|
|
64627
|
-
stream: "\uD83D\uDCDD",
|
|
64628
|
-
approve: "\u23F3"
|
|
64629
|
-
};
|
|
64630
|
-
RAMP = ["\u2588", "\u2593", "\u2592", "\u2591"];
|
|
64631
|
-
CometTrackRenderable = class CometTrackRenderable extends Renderable7 {
|
|
64632
|
-
_step = 0;
|
|
64633
|
-
constructor(ctx, options = {}) {
|
|
64634
|
-
super(ctx, options);
|
|
64635
|
-
this._headFg = parseColor4(options.headFg ?? FALLBACK_HEAD);
|
|
64636
|
-
this._trackFg = parseColor4(options.trackFg ?? FALLBACK_TRACK);
|
|
64637
|
-
this._mode = options.mode ?? "dark";
|
|
64638
|
-
this._gradient = options.gradient ?? false;
|
|
64639
|
-
this.setMeasureProvider(() => ({
|
|
64640
|
-
width: TRACK_COLS,
|
|
64641
|
-
height: 1
|
|
64642
|
-
}));
|
|
64643
|
-
}
|
|
64644
|
-
set step(value) {
|
|
64645
|
-
if (value === this._step)
|
|
64646
|
-
return;
|
|
64647
|
-
this._step = value;
|
|
64648
|
-
this.requestRender();
|
|
64649
|
-
}
|
|
64650
|
-
set headFg(value) {
|
|
64651
|
-
const next = parseColor4(value);
|
|
64652
|
-
if (next.equals(this._headFg))
|
|
64653
|
-
return;
|
|
64654
|
-
this._headFg = next;
|
|
64655
|
-
this.requestRender();
|
|
64656
|
-
}
|
|
64657
|
-
set trackFg(value) {
|
|
64658
|
-
const next = parseColor4(value);
|
|
64659
|
-
if (next.equals(this._trackFg))
|
|
64660
|
-
return;
|
|
64661
|
-
this._trackFg = next;
|
|
64662
|
-
this.requestRender();
|
|
64663
|
-
}
|
|
64664
|
-
set mode(value) {
|
|
64665
|
-
if (value === this._mode)
|
|
64666
|
-
return;
|
|
64667
|
-
this._mode = value;
|
|
64668
|
-
this.requestRender();
|
|
64669
|
-
}
|
|
64670
|
-
set gradient(value) {
|
|
64671
|
-
if (value === this._gradient)
|
|
64672
|
-
return;
|
|
64673
|
-
this._gradient = value;
|
|
64674
|
-
this.requestRender();
|
|
64675
|
-
}
|
|
64676
|
-
renderSelf(buffer) {
|
|
64677
|
-
if (!this.visible || this.isDestroyed)
|
|
64678
|
-
return;
|
|
64679
|
-
const bg = parseColor4("transparent");
|
|
64680
|
-
const {
|
|
64681
|
-
start,
|
|
64682
|
-
dirRight,
|
|
64683
|
-
stern,
|
|
64684
|
-
tailEnd
|
|
64685
|
-
} = cometPosition(this._step);
|
|
64686
|
-
let c = 0;
|
|
64687
|
-
while (c < TRACK_COLS) {
|
|
64688
|
-
if (c === start) {
|
|
64689
|
-
buffer.drawText("\uD83D\uDC33", this.screenX + c, this.screenY, this._headFg, bg);
|
|
64690
|
-
c += ASSEMBLY;
|
|
64691
|
-
continue;
|
|
64692
|
-
}
|
|
64693
|
-
const behind = dirRight ? stern - c : c - stern;
|
|
64694
|
-
const inTail = dirRight ? c < stern && c > tailEnd : c > stern && c < tailEnd;
|
|
64695
|
-
if (inTail && behind >= 0) {
|
|
64696
|
-
if (this._gradient) {
|
|
64697
|
-
const color = parseColor4(identityHexAt(Math.min(1, behind / TAIL), this._mode));
|
|
64698
|
-
buffer.drawText("\u2588", this.screenX + c, this.screenY, color, bg);
|
|
64699
|
-
} else {
|
|
64700
|
-
buffer.drawText(cometRampChar(behind), this.screenX + c, this.screenY, this._trackFg, bg);
|
|
64701
|
-
}
|
|
64702
|
-
} else {
|
|
64703
|
-
buffer.drawText("\u2591", this.screenX + c, this.screenY, this._trackFg, bg);
|
|
64704
|
-
}
|
|
64705
|
-
c += 1;
|
|
64706
|
-
}
|
|
64707
|
-
}
|
|
64708
|
-
};
|
|
64709
|
-
extend({
|
|
64710
|
-
comet_track: CometTrackRenderable
|
|
64711
|
-
});
|
|
64712
|
-
});
|
|
64713
|
-
|
|
64714
64692
|
// ../../node_modules/.pnpm/@opentui+solid@0.8.1_solid-js@1.9.17_typescript@5.9.3_web-tree-sitter@0.25.10/node_modules/@opentui/solid/jsx-runtime.js
|
|
64715
64693
|
function normalizeProps(props) {
|
|
64716
64694
|
if (!props) {
|
|
@@ -64847,15 +64825,20 @@ class RemoteSessionSeam {
|
|
|
64847
64825
|
if (sessionId === undefined)
|
|
64848
64826
|
return;
|
|
64849
64827
|
let messageCount = 0;
|
|
64828
|
+
let turnCount = 0;
|
|
64850
64829
|
try {
|
|
64851
64830
|
const rows = await this.#session.storedTranscript(sessionId);
|
|
64852
64831
|
messageCount = rows.filter((row) => row.kind === "user" || row.kind === "assistant").length;
|
|
64832
|
+
turnCount = rows.filter((row) => row.kind === "user").length;
|
|
64853
64833
|
} catch {}
|
|
64834
|
+
const roundCount = base.sessionId === undefined ? undefined : base.roundCount;
|
|
64854
64835
|
return {
|
|
64855
64836
|
...base,
|
|
64856
64837
|
sessionId,
|
|
64857
64838
|
model: base.model ?? null,
|
|
64858
64839
|
messageCount,
|
|
64840
|
+
turnCount,
|
|
64841
|
+
roundCount,
|
|
64859
64842
|
contextTokens: base.contextTokens,
|
|
64860
64843
|
contextWindow: base.contextWindow ?? null
|
|
64861
64844
|
};
|
|
@@ -65313,7 +65296,6 @@ function V2SessionPageBody(props) {
|
|
|
65313
65296
|
const [composerBusy, setComposerBusy] = createSignal(false);
|
|
65314
65297
|
const [turnBusy, setTurnBusy] = createSignal(false);
|
|
65315
65298
|
const busy = () => composerBusy() || turnBusy();
|
|
65316
|
-
const [busySince, setBusySince] = createSignal(0);
|
|
65317
65299
|
const [model, setModel] = createSignal();
|
|
65318
65300
|
const [tools, setTools] = createSignal(0);
|
|
65319
65301
|
const [effort, setEffort] = createSignal();
|
|
@@ -65380,14 +65362,12 @@ function V2SessionPageBody(props) {
|
|
|
65380
65362
|
const timer = setInterval(() => setNow(new Date), 1000);
|
|
65381
65363
|
onCleanup(() => clearInterval(timer));
|
|
65382
65364
|
});
|
|
65383
|
-
const elapsed = () => busy() ? Math.max(0, Math.floor((now().getTime() - busySince()) / 1000)) : 0;
|
|
65384
65365
|
const [lastRequest, setLastRequest] = createSignal();
|
|
65385
65366
|
const [composerPending, setComposerPending] = createSignal([]);
|
|
65386
65367
|
let turnAborted = false;
|
|
65387
65368
|
const send = (text) => {
|
|
65388
65369
|
turnAborted = false;
|
|
65389
65370
|
setTurnBusy(true);
|
|
65390
|
-
setBusySince(Date.now());
|
|
65391
65371
|
setLastRequest(text);
|
|
65392
65372
|
const done = projection.send(text);
|
|
65393
65373
|
done.finally(() => setTurnBusy(false));
|
|
@@ -65484,7 +65464,12 @@ function V2SessionPageBody(props) {
|
|
|
65484
65464
|
settleEffort();
|
|
65485
65465
|
return;
|
|
65486
65466
|
}
|
|
65487
|
-
setRemoteInfo({
|
|
65467
|
+
setRemoteInfo({
|
|
65468
|
+
messageCount: info.messageCount,
|
|
65469
|
+
turnCount: info.turnCount,
|
|
65470
|
+
roundCount: info.roundCount,
|
|
65471
|
+
tps: info.lastTurnTps ?? info.sessionAvgTps
|
|
65472
|
+
});
|
|
65488
65473
|
labelEffortWord = effortFromModelLabel(info.model);
|
|
65489
65474
|
settleEffort();
|
|
65490
65475
|
}).catch(() => {
|
|
@@ -65505,7 +65490,8 @@ function V2SessionPageBody(props) {
|
|
|
65505
65490
|
provider: model()?.providerID,
|
|
65506
65491
|
model: model()?.modelID,
|
|
65507
65492
|
effort: effort(),
|
|
65508
|
-
|
|
65493
|
+
turns: remoteInfo()?.turnCount,
|
|
65494
|
+
rounds: remoteInfo()?.roundCount,
|
|
65509
65495
|
tools: tools(),
|
|
65510
65496
|
tps: remoteInfo()?.tps ?? null,
|
|
65511
65497
|
contextTokens: ctxTokens(),
|
|
@@ -65822,12 +65808,6 @@ function V2SessionPageBody(props) {
|
|
|
65822
65808
|
projection,
|
|
65823
65809
|
focused: paneFocus.transcriptFocused,
|
|
65824
65810
|
scrollRef: (value) => transcriptScroll = value,
|
|
65825
|
-
status: createComponent2(StatusBar, {
|
|
65826
|
-
get phase() {
|
|
65827
|
-
return busy() ? "stream" : null;
|
|
65828
|
-
},
|
|
65829
|
-
elapsed
|
|
65830
|
-
}),
|
|
65831
65811
|
widgets: createComponent2(WidgetsDock, {
|
|
65832
65812
|
get rows() {
|
|
65833
65813
|
return projection.rows;
|
|
@@ -65918,9 +65898,7 @@ function V2SessionPageBody(props) {
|
|
|
65918
65898
|
theme
|
|
65919
65899
|
}),
|
|
65920
65900
|
createComponent2(HintsLine, {
|
|
65921
|
-
|
|
65922
|
-
return busy();
|
|
65923
|
-
},
|
|
65901
|
+
busy: () => busy(),
|
|
65924
65902
|
pane: paneFocus.pane
|
|
65925
65903
|
}),
|
|
65926
65904
|
overlayHost
|
|
@@ -66208,7 +66186,6 @@ var init_v2_entry = __esm(() => {
|
|
|
66208
66186
|
init_theme2();
|
|
66209
66187
|
init_motion();
|
|
66210
66188
|
init_powerline();
|
|
66211
|
-
init_status_bar();
|
|
66212
66189
|
init_jsx_dev_runtime();
|
|
66213
66190
|
SHELL = "../../" + "shell/src/client/";
|
|
66214
66191
|
overlays = new TurnOverlayController;
|
|
@@ -66396,5 +66373,5 @@ export {
|
|
|
66396
66373
|
themeNameFromConfig
|
|
66397
66374
|
};
|
|
66398
66375
|
|
|
66399
|
-
//# debugId=
|
|
66376
|
+
//# debugId=E699F36F630F501D64756E2164756E21
|
|
66400
66377
|
//# sourceMappingURL=index.js.map
|