@vincemakes/kiso-tui 0.46.1 → 0.46.2
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/dist/status.d.ts +5 -6
- package/dist/status.js +5 -12
- package/package.json +2 -2
package/dist/status.d.ts
CHANGED
|
@@ -117,16 +117,15 @@ export interface RetryOnRow {
|
|
|
117
117
|
* counts against, what failed, and how long until it is tried. Whole
|
|
118
118
|
* seconds, rounded UP, so the row never says 0s while still waiting. */
|
|
119
119
|
export declare function retrySegment(r: RetryOnRow): string;
|
|
120
|
-
/** ADR-0058 (3e): the
|
|
120
|
+
/** ADR-0058 (3e, Amendment 8): the tasks kiso manages, as the status rows
|
|
121
|
+
* count them. */
|
|
121
122
|
export interface TaskCountsOnRow {
|
|
122
123
|
/** running or starting */
|
|
123
124
|
readonly running: number;
|
|
124
|
-
/** an outcome that cannot be known, not yet looked at in `/tasks` */
|
|
125
|
-
readonly unknown: number;
|
|
126
125
|
}
|
|
127
|
-
/** `● 2 tasks running
|
|
128
|
-
*
|
|
129
|
-
*
|
|
126
|
+
/** `● 2 tasks running` — or nothing. A task kiso lost track of is not a
|
|
127
|
+
* second count here: it is an event, said once in the transcript
|
|
128
|
+
* (Amendment 8). */
|
|
130
129
|
export declare function tasksSegment(c: TaskCountsOnRow | undefined): string;
|
|
131
130
|
export declare function runningStatus(glyph: string, since: number, outTokens: number | null, ctxRatio: number, tokPerSec?: number | null, W?: number, retry?: RetryOnRow | null, tasks?: TaskCountsOnRow, detachable?: boolean): string;
|
|
132
131
|
/**
|
package/dist/status.js
CHANGED
|
@@ -118,20 +118,13 @@ export function retrySegment(r) {
|
|
|
118
118
|
const head = `retrying ${r.attempt}/${r.maxRetries} · ${r.code}`;
|
|
119
119
|
return r.remainingMs > 0 ? `${head} · ${Math.ceil(r.remainingMs / 1000)}s` : head;
|
|
120
120
|
}
|
|
121
|
-
/** `● 2 tasks running
|
|
122
|
-
*
|
|
123
|
-
*
|
|
121
|
+
/** `● 2 tasks running` — or nothing. A task kiso lost track of is not a
|
|
122
|
+
* second count here: it is an event, said once in the transcript
|
|
123
|
+
* (Amendment 8). */
|
|
124
124
|
export function tasksSegment(c) {
|
|
125
|
-
if (c === undefined)
|
|
125
|
+
if (c === undefined || c.running <= 0)
|
|
126
126
|
return "";
|
|
127
|
-
|
|
128
|
-
if (c.running > 0 && c.unknown > 0)
|
|
129
|
-
return `● ${n(c.running, "task")} running · ◌ ${c.unknown} unknown`;
|
|
130
|
-
if (c.running > 0)
|
|
131
|
-
return `● ${n(c.running, "task")} running`;
|
|
132
|
-
if (c.unknown > 0)
|
|
133
|
-
return `◌ ${n(c.unknown, "task")} unknown`;
|
|
134
|
-
return "";
|
|
127
|
+
return `● ${c.running} task${c.running === 1 ? "" : "s"} running`;
|
|
135
128
|
}
|
|
136
129
|
export function runningStatus(glyph, since, outTokens, ctxRatio, tokPerSec = null, W, retry,
|
|
137
130
|
// 3e: the session's tasks, and whether a running command can be moved
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincemakes/kiso-tui",
|
|
3
|
-
"version": "0.46.
|
|
3
|
+
"version": "0.46.2",
|
|
4
4
|
"description": "kiso tui \u2014 the pure terminal layer (cell renderer, dock, raw editor, diff, palette). Zero runtime dependencies: input is data, output is bytes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,6 +35,6 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/vincemakes/kiso/tree/main/packages/tui#readme",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@vincemakes/kiso-tui-cells": "0.46.
|
|
38
|
+
"@vincemakes/kiso-tui-cells": "0.46.2"
|
|
39
39
|
}
|
|
40
40
|
}
|