@aiwayds/dsh-opentui 0.20.0 → 0.21.1
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 +31 -0
- package/dist/client/index.js +184 -238
- package/dist/client/index.js.map +11 -11
- package/dist/locales/en.json +2 -0
- package/dist/locales/zh-CN.json +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,37 @@ 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.1] - 2026-11-17
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- The footer message counter is now a single `💬 N msgs`. One message is one
|
|
12
|
+
durable `assistant/message` event (the unit previously called a round). The
|
|
13
|
+
turn count is no longer displayed in the footer; it remains available to the
|
|
14
|
+
`/session` panel.
|
|
15
|
+
|
|
16
|
+
### Note
|
|
17
|
+
- `msg` also counts tool-only rounds that produce no assistant transcript row.
|
|
18
|
+
|
|
19
|
+
## [0.21.0] - 2026-11-17
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- The footer now shows turn and round counters as `💬 N turns · ↻ M rounds`.
|
|
23
|
+
Turns count durable `user` transcript rows; rounds count durable
|
|
24
|
+
`assistant/message` journal events (one assembled message = one round).
|
|
25
|
+
When the journal is unavailable the counters degrade honestly: the rounds
|
|
26
|
+
half is omitted rather than shown as a fake 0.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
- The busy status line is gone: no verb, elapsed time or detail text renders.
|
|
30
|
+
The animated comet now rides the key-hint row, to the left of the hints and
|
|
31
|
+
only while busy; its renderer moved to a shared `comet-track.tsx` module.
|
|
32
|
+
|
|
33
|
+
### Known limitations
|
|
34
|
+
- Round counts refresh only at turn boundaries, so a multi-round turn jumps
|
|
35
|
+
once at its end instead of ticking per round. Steer messages may inflate the
|
|
36
|
+
turn count; whether the host journals steer text as a user message cannot be
|
|
37
|
+
verified from this repo.
|
|
38
|
+
|
|
8
39
|
## [0.20.0] - 2026-11-17
|
|
9
40
|
|
|
10
41
|
### Added
|
package/dist/client/index.js
CHANGED
|
@@ -9370,6 +9370,7 @@ class RemoteHostSession {
|
|
|
9370
9370
|
#model;
|
|
9371
9371
|
#settings;
|
|
9372
9372
|
#journal = [];
|
|
9373
|
+
#msgs = 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
|
+
msgCount: this.#msgs,
|
|
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.#msgs = 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.#msgs++;
|
|
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,15 @@ function contextSegment(used, window, theme) {
|
|
|
48640
48641
|
}
|
|
48641
48642
|
};
|
|
48642
48643
|
}
|
|
48643
|
-
function
|
|
48644
|
+
function msgSegment(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.msgs.one" : "footer.msgs.many", {
|
|
48648
48649
|
n
|
|
48649
48650
|
}),
|
|
48650
48651
|
bg: resolvePalette(theme).messages,
|
|
48651
|
-
priority:
|
|
48652
|
+
priority: 75
|
|
48652
48653
|
};
|
|
48653
48654
|
}
|
|
48654
48655
|
function toolSegment(n, theme) {
|
|
@@ -48921,8 +48922,8 @@ function sessionFooterSegments(data) {
|
|
|
48921
48922
|
add(modelSegment(data.model ?? "", effectiveEffort(data.effort), theme));
|
|
48922
48923
|
add(contextSegment(data.contextTokens ?? null, data.contextWindow ?? null, theme));
|
|
48923
48924
|
add(cacheSegment(data.cacheHitRate ?? null, theme));
|
|
48924
|
-
if (data.
|
|
48925
|
-
add(
|
|
48925
|
+
if (data.msg !== undefined)
|
|
48926
|
+
add(msgSegment(data.msg, theme));
|
|
48926
48927
|
add(toolSegment(data.tools ?? 0, theme));
|
|
48927
48928
|
add(elapsedSegment(data.elapsedSec ?? null, theme));
|
|
48928
48929
|
add(speedSegment(data.tps ?? null, theme));
|
|
@@ -50810,6 +50811,120 @@ var init_notices_dock = __esm(() => {
|
|
|
50810
50811
|
noticeList = notices;
|
|
50811
50812
|
});
|
|
50812
50813
|
|
|
50814
|
+
// ../tui-base/src/routes/session/comet-track.tsx
|
|
50815
|
+
import { parseColor as parseColor4, Renderable as Renderable7 } from "@opentui/core";
|
|
50816
|
+
function cometHeadColor(theme) {
|
|
50817
|
+
return theme?.hue.accent[500] ?? COMET_FALLBACK_HEAD;
|
|
50818
|
+
}
|
|
50819
|
+
function cometFps(active) {
|
|
50820
|
+
return !active || getMotionTier() === "off" ? undefined : STREAM_FPS;
|
|
50821
|
+
}
|
|
50822
|
+
function cometPosition(step) {
|
|
50823
|
+
const span = COMET_TRACK_COLS - ASSEMBLY;
|
|
50824
|
+
const s = (step % (span * 2) + span * 2) % (span * 2);
|
|
50825
|
+
const start = s < span ? s : span * 2 - s;
|
|
50826
|
+
const dirRight = s < span;
|
|
50827
|
+
const stern = dirRight ? start : start + ASSEMBLY;
|
|
50828
|
+
const tailEnd = dirRight ? stern - TAIL : stern + TAIL;
|
|
50829
|
+
return {
|
|
50830
|
+
start,
|
|
50831
|
+
dirRight,
|
|
50832
|
+
stern,
|
|
50833
|
+
tailEnd
|
|
50834
|
+
};
|
|
50835
|
+
}
|
|
50836
|
+
function cometRampChar(behind) {
|
|
50837
|
+
return RAMP[Math.min(RAMP.length - 1, Math.floor(behind / 2) + 1)];
|
|
50838
|
+
}
|
|
50839
|
+
var TAIL = 5, RAMP, ASSEMBLY = 2, COMET_FALLBACK_TRACK = "#565f89", COMET_FALLBACK_HEAD = "#7aa2f7", COMET_TRACK_COLS = 15, CometTrackRenderable;
|
|
50840
|
+
var init_comet_track = __esm(() => {
|
|
50841
|
+
init_index_bun();
|
|
50842
|
+
init_motion();
|
|
50843
|
+
init_identity();
|
|
50844
|
+
RAMP = ["\u2588", "\u2593", "\u2592", "\u2591"];
|
|
50845
|
+
CometTrackRenderable = class CometTrackRenderable extends Renderable7 {
|
|
50846
|
+
_step = 0;
|
|
50847
|
+
constructor(ctx, options = {}) {
|
|
50848
|
+
super(ctx, options);
|
|
50849
|
+
this._headFg = parseColor4(options.headFg ?? COMET_FALLBACK_HEAD);
|
|
50850
|
+
this._trackFg = parseColor4(options.trackFg ?? COMET_FALLBACK_TRACK);
|
|
50851
|
+
this._mode = options.mode ?? "dark";
|
|
50852
|
+
this._gradient = options.gradient ?? false;
|
|
50853
|
+
this.setMeasureProvider(() => ({
|
|
50854
|
+
width: COMET_TRACK_COLS,
|
|
50855
|
+
height: 1
|
|
50856
|
+
}));
|
|
50857
|
+
}
|
|
50858
|
+
set step(value) {
|
|
50859
|
+
if (value === this._step)
|
|
50860
|
+
return;
|
|
50861
|
+
this._step = value;
|
|
50862
|
+
this.requestRender();
|
|
50863
|
+
}
|
|
50864
|
+
set headFg(value) {
|
|
50865
|
+
const next = parseColor4(value);
|
|
50866
|
+
if (next.equals(this._headFg))
|
|
50867
|
+
return;
|
|
50868
|
+
this._headFg = next;
|
|
50869
|
+
this.requestRender();
|
|
50870
|
+
}
|
|
50871
|
+
set trackFg(value) {
|
|
50872
|
+
const next = parseColor4(value);
|
|
50873
|
+
if (next.equals(this._trackFg))
|
|
50874
|
+
return;
|
|
50875
|
+
this._trackFg = next;
|
|
50876
|
+
this.requestRender();
|
|
50877
|
+
}
|
|
50878
|
+
set mode(value) {
|
|
50879
|
+
if (value === this._mode)
|
|
50880
|
+
return;
|
|
50881
|
+
this._mode = value;
|
|
50882
|
+
this.requestRender();
|
|
50883
|
+
}
|
|
50884
|
+
set gradient(value) {
|
|
50885
|
+
if (value === this._gradient)
|
|
50886
|
+
return;
|
|
50887
|
+
this._gradient = value;
|
|
50888
|
+
this.requestRender();
|
|
50889
|
+
}
|
|
50890
|
+
renderSelf(buffer) {
|
|
50891
|
+
if (!this.visible || this.isDestroyed)
|
|
50892
|
+
return;
|
|
50893
|
+
const bg = parseColor4("transparent");
|
|
50894
|
+
const {
|
|
50895
|
+
start,
|
|
50896
|
+
dirRight,
|
|
50897
|
+
stern,
|
|
50898
|
+
tailEnd
|
|
50899
|
+
} = cometPosition(this._step);
|
|
50900
|
+
let c = 0;
|
|
50901
|
+
while (c < COMET_TRACK_COLS) {
|
|
50902
|
+
if (c === start) {
|
|
50903
|
+
buffer.drawText("\uD83D\uDC33", this.screenX + c, this.screenY, this._headFg, bg);
|
|
50904
|
+
c += ASSEMBLY;
|
|
50905
|
+
continue;
|
|
50906
|
+
}
|
|
50907
|
+
const behind = dirRight ? stern - c : c - stern;
|
|
50908
|
+
const inTail = dirRight ? c < stern && c > tailEnd : c > stern && c < tailEnd;
|
|
50909
|
+
if (inTail && behind >= 0) {
|
|
50910
|
+
if (this._gradient) {
|
|
50911
|
+
const color = parseColor4(identityHexAt(Math.min(1, behind / TAIL), this._mode));
|
|
50912
|
+
buffer.drawText("\u2588", this.screenX + c, this.screenY, color, bg);
|
|
50913
|
+
} else {
|
|
50914
|
+
buffer.drawText(cometRampChar(behind), this.screenX + c, this.screenY, this._trackFg, bg);
|
|
50915
|
+
}
|
|
50916
|
+
} else {
|
|
50917
|
+
buffer.drawText("\u2591", this.screenX + c, this.screenY, this._trackFg, bg);
|
|
50918
|
+
}
|
|
50919
|
+
c += 1;
|
|
50920
|
+
}
|
|
50921
|
+
}
|
|
50922
|
+
};
|
|
50923
|
+
extend({
|
|
50924
|
+
comet_track: CometTrackRenderable
|
|
50925
|
+
});
|
|
50926
|
+
});
|
|
50927
|
+
|
|
50813
50928
|
// ../tui-base/src/routes/session/hints-line.tsx
|
|
50814
50929
|
function footerHintsFromConfig(value) {
|
|
50815
50930
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
@@ -50919,29 +51034,59 @@ function transcriptHintsText(shown = true) {
|
|
|
50919
51034
|
function HintsLine(props) {
|
|
50920
51035
|
const dimensions = useTerminalSize();
|
|
50921
51036
|
const theme = useThemeOptional();
|
|
51037
|
+
const cometActive = () => props.busy() && hintsShown();
|
|
51038
|
+
const [tick, setTick] = createSignal(0);
|
|
51039
|
+
onAnimationTick(() => cometFps(cometActive()), () => setTick((t) => t + 1));
|
|
50922
51040
|
const row = () => {
|
|
50923
|
-
const
|
|
50924
|
-
|
|
51041
|
+
const busy = cometActive();
|
|
51042
|
+
const columns = dimensions().width - (busy ? COMET_TRACK_COLS + COMET_HINT_GAP : 0);
|
|
51043
|
+
return props.pane?.() === "transcript" ? clipToWidth(transcriptHintsText(hintsShown()), Math.max(8, columns - 2)) : hintsTextAtWidth(props.busy(), hintsShown(), subagentMarkerViews().some((v) => v.status === "running"), columns);
|
|
50925
51044
|
};
|
|
50926
51045
|
return createComponent2(Show, {
|
|
50927
51046
|
get when() {
|
|
50928
|
-
return memo2(() => !!hintsShown())() && row().length > 0;
|
|
51047
|
+
return memo2(() => !!hintsShown())() && (cometActive() || row().length > 0);
|
|
50929
51048
|
},
|
|
50930
51049
|
get children() {
|
|
50931
|
-
var _el$ = createElement("box"), _el$
|
|
50932
|
-
insertNode(_el$, _el$
|
|
51050
|
+
var _el$ = createElement("box"), _el$3 = createElement("text");
|
|
51051
|
+
insertNode(_el$, _el$3);
|
|
50933
51052
|
setProp(_el$, "flexShrink", 0);
|
|
50934
51053
|
setProp(_el$, "height", 1);
|
|
50935
51054
|
setProp(_el$, "width", "100%");
|
|
50936
51055
|
setProp(_el$, "paddingLeft", 1);
|
|
50937
|
-
setProp(_el
|
|
50938
|
-
insert(_el
|
|
50939
|
-
|
|
51056
|
+
setProp(_el$, "flexDirection", "row");
|
|
51057
|
+
insert(_el$, createComponent2(Show, {
|
|
51058
|
+
get when() {
|
|
51059
|
+
return cometActive();
|
|
51060
|
+
},
|
|
51061
|
+
get children() {
|
|
51062
|
+
var _el$2 = createElement("comet_track");
|
|
51063
|
+
effect((_p$) => {
|
|
51064
|
+
var _v$ = tick(), _v$2 = cometHeadColor(theme), _v$3 = theme?.border.base ?? COMET_FALLBACK_TRACK, _v$4 = motionDecorationsEnabled();
|
|
51065
|
+
_v$ !== _p$.e && (_p$.e = setProp(_el$2, "step", _v$, _p$.e));
|
|
51066
|
+
_v$2 !== _p$.t && (_p$.t = setProp(_el$2, "headFg", _v$2, _p$.t));
|
|
51067
|
+
_v$3 !== _p$.a && (_p$.a = setProp(_el$2, "trackFg", _v$3, _p$.a));
|
|
51068
|
+
_v$4 !== _p$.o && (_p$.o = setProp(_el$2, "gradient", _v$4, _p$.o));
|
|
51069
|
+
return _p$;
|
|
51070
|
+
}, {
|
|
51071
|
+
e: undefined,
|
|
51072
|
+
t: undefined,
|
|
51073
|
+
a: undefined,
|
|
51074
|
+
o: undefined
|
|
51075
|
+
});
|
|
51076
|
+
return _el$2;
|
|
51077
|
+
}
|
|
51078
|
+
}), _el$3);
|
|
51079
|
+
setProp(_el$3, "wrapMode", "none");
|
|
51080
|
+
insert(_el$3, (() => {
|
|
51081
|
+
var _c$ = memo2(() => !!(cometActive() && row().length > 0));
|
|
51082
|
+
return () => _c$() ? `${" ".repeat(COMET_HINT_GAP)}${row()}` : row();
|
|
51083
|
+
})());
|
|
51084
|
+
effect((_$p) => setProp(_el$3, "fg", theme?.text.faint ?? "#565f89", _$p));
|
|
50940
51085
|
return _el$;
|
|
50941
51086
|
}
|
|
50942
51087
|
});
|
|
50943
51088
|
}
|
|
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";
|
|
51089
|
+
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
51090
|
var init_hints_line = __esm(() => {
|
|
50946
51091
|
init_index_bun();
|
|
50947
51092
|
init_index_bun();
|
|
@@ -50951,12 +51096,15 @@ var init_hints_line = __esm(() => {
|
|
|
50951
51096
|
init_index_bun();
|
|
50952
51097
|
init_index_bun();
|
|
50953
51098
|
init_server();
|
|
51099
|
+
init_index_bun();
|
|
50954
51100
|
init_i18n();
|
|
50955
51101
|
init_terminal_size();
|
|
50956
51102
|
init_tool_summarize();
|
|
50957
51103
|
init_string_width();
|
|
50958
51104
|
init_theme3();
|
|
51105
|
+
init_motion();
|
|
50959
51106
|
init_subagent_markers();
|
|
51107
|
+
init_comet_track();
|
|
50960
51108
|
[hintsShown, setHintsShown] = createSignal(true);
|
|
50961
51109
|
DEFAULT_FOOTER_HINTS = Object.freeze({
|
|
50962
51110
|
send: true,
|
|
@@ -62756,7 +62904,7 @@ var init_subagents_viewer = __esm(() => {
|
|
|
62756
62904
|
import { TextAttributes as TextAttributes12 } from "@opentui/core";
|
|
62757
62905
|
function resolveVersion() {
|
|
62758
62906
|
try {
|
|
62759
|
-
return "0.
|
|
62907
|
+
return "0.21.1";
|
|
62760
62908
|
} catch {
|
|
62761
62909
|
return "dev";
|
|
62762
62910
|
}
|
|
@@ -64512,205 +64660,6 @@ var init_panel_kit_host = __esm(() => {
|
|
|
64512
64660
|
init_theme3();
|
|
64513
64661
|
});
|
|
64514
64662
|
|
|
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
64663
|
// ../../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
64664
|
function normalizeProps(props) {
|
|
64716
64665
|
if (!props) {
|
|
@@ -64847,15 +64796,20 @@ class RemoteSessionSeam {
|
|
|
64847
64796
|
if (sessionId === undefined)
|
|
64848
64797
|
return;
|
|
64849
64798
|
let messageCount = 0;
|
|
64799
|
+
let turnCount = 0;
|
|
64850
64800
|
try {
|
|
64851
64801
|
const rows = await this.#session.storedTranscript(sessionId);
|
|
64852
64802
|
messageCount = rows.filter((row) => row.kind === "user" || row.kind === "assistant").length;
|
|
64803
|
+
turnCount = rows.filter((row) => row.kind === "user").length;
|
|
64853
64804
|
} catch {}
|
|
64805
|
+
const msgCount = base.sessionId === undefined ? undefined : base.msgCount;
|
|
64854
64806
|
return {
|
|
64855
64807
|
...base,
|
|
64856
64808
|
sessionId,
|
|
64857
64809
|
model: base.model ?? null,
|
|
64858
64810
|
messageCount,
|
|
64811
|
+
turnCount,
|
|
64812
|
+
msgCount,
|
|
64859
64813
|
contextTokens: base.contextTokens,
|
|
64860
64814
|
contextWindow: base.contextWindow ?? null
|
|
64861
64815
|
};
|
|
@@ -65313,7 +65267,6 @@ function V2SessionPageBody(props) {
|
|
|
65313
65267
|
const [composerBusy, setComposerBusy] = createSignal(false);
|
|
65314
65268
|
const [turnBusy, setTurnBusy] = createSignal(false);
|
|
65315
65269
|
const busy = () => composerBusy() || turnBusy();
|
|
65316
|
-
const [busySince, setBusySince] = createSignal(0);
|
|
65317
65270
|
const [model, setModel] = createSignal();
|
|
65318
65271
|
const [tools, setTools] = createSignal(0);
|
|
65319
65272
|
const [effort, setEffort] = createSignal();
|
|
@@ -65380,14 +65333,12 @@ function V2SessionPageBody(props) {
|
|
|
65380
65333
|
const timer = setInterval(() => setNow(new Date), 1000);
|
|
65381
65334
|
onCleanup(() => clearInterval(timer));
|
|
65382
65335
|
});
|
|
65383
|
-
const elapsed = () => busy() ? Math.max(0, Math.floor((now().getTime() - busySince()) / 1000)) : 0;
|
|
65384
65336
|
const [lastRequest, setLastRequest] = createSignal();
|
|
65385
65337
|
const [composerPending, setComposerPending] = createSignal([]);
|
|
65386
65338
|
let turnAborted = false;
|
|
65387
65339
|
const send = (text) => {
|
|
65388
65340
|
turnAborted = false;
|
|
65389
65341
|
setTurnBusy(true);
|
|
65390
|
-
setBusySince(Date.now());
|
|
65391
65342
|
setLastRequest(text);
|
|
65392
65343
|
const done = projection.send(text);
|
|
65393
65344
|
done.finally(() => setTurnBusy(false));
|
|
@@ -65484,7 +65435,11 @@ function V2SessionPageBody(props) {
|
|
|
65484
65435
|
settleEffort();
|
|
65485
65436
|
return;
|
|
65486
65437
|
}
|
|
65487
|
-
setRemoteInfo({
|
|
65438
|
+
setRemoteInfo({
|
|
65439
|
+
messageCount: info.messageCount,
|
|
65440
|
+
msgCount: info.msgCount,
|
|
65441
|
+
tps: info.lastTurnTps ?? info.sessionAvgTps
|
|
65442
|
+
});
|
|
65488
65443
|
labelEffortWord = effortFromModelLabel(info.model);
|
|
65489
65444
|
settleEffort();
|
|
65490
65445
|
}).catch(() => {
|
|
@@ -65505,7 +65460,7 @@ function V2SessionPageBody(props) {
|
|
|
65505
65460
|
provider: model()?.providerID,
|
|
65506
65461
|
model: model()?.modelID,
|
|
65507
65462
|
effort: effort(),
|
|
65508
|
-
|
|
65463
|
+
msg: remoteInfo()?.msgCount,
|
|
65509
65464
|
tools: tools(),
|
|
65510
65465
|
tps: remoteInfo()?.tps ?? null,
|
|
65511
65466
|
contextTokens: ctxTokens(),
|
|
@@ -65822,12 +65777,6 @@ function V2SessionPageBody(props) {
|
|
|
65822
65777
|
projection,
|
|
65823
65778
|
focused: paneFocus.transcriptFocused,
|
|
65824
65779
|
scrollRef: (value) => transcriptScroll = value,
|
|
65825
|
-
status: createComponent2(StatusBar, {
|
|
65826
|
-
get phase() {
|
|
65827
|
-
return busy() ? "stream" : null;
|
|
65828
|
-
},
|
|
65829
|
-
elapsed
|
|
65830
|
-
}),
|
|
65831
65780
|
widgets: createComponent2(WidgetsDock, {
|
|
65832
65781
|
get rows() {
|
|
65833
65782
|
return projection.rows;
|
|
@@ -65918,9 +65867,7 @@ function V2SessionPageBody(props) {
|
|
|
65918
65867
|
theme
|
|
65919
65868
|
}),
|
|
65920
65869
|
createComponent2(HintsLine, {
|
|
65921
|
-
|
|
65922
|
-
return busy();
|
|
65923
|
-
},
|
|
65870
|
+
busy: () => busy(),
|
|
65924
65871
|
pane: paneFocus.pane
|
|
65925
65872
|
}),
|
|
65926
65873
|
overlayHost
|
|
@@ -66208,7 +66155,6 @@ var init_v2_entry = __esm(() => {
|
|
|
66208
66155
|
init_theme2();
|
|
66209
66156
|
init_motion();
|
|
66210
66157
|
init_powerline();
|
|
66211
|
-
init_status_bar();
|
|
66212
66158
|
init_jsx_dev_runtime();
|
|
66213
66159
|
SHELL = "../../" + "shell/src/client/";
|
|
66214
66160
|
overlays = new TurnOverlayController;
|
|
@@ -66396,5 +66342,5 @@ export {
|
|
|
66396
66342
|
themeNameFromConfig
|
|
66397
66343
|
};
|
|
66398
66344
|
|
|
66399
|
-
//# debugId=
|
|
66345
|
+
//# debugId=83D4422F420B351864756E2164756E21
|
|
66400
66346
|
//# sourceMappingURL=index.js.map
|