opencode-subagent-magazine 1.5.1 → 1.5.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/_version.d.ts +1 -1
- package/dist/_version.js +1 -1
- package/dist/index.js +9 -5
- package/dist/tui.js +3 -4
- package/package.json +1 -1
- package/src/_version.ts +1 -1
- package/src/index.tsx +10 -5
package/dist/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PLUGIN_VERSION = "1.5.
|
|
1
|
+
export declare const PLUGIN_VERSION = "1.5.2";
|
package/dist/_version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// auto-generated
|
|
2
|
-
export const PLUGIN_VERSION = "1.5.
|
|
2
|
+
export const PLUGIN_VERSION = "1.5.2";
|
package/dist/index.js
CHANGED
|
@@ -369,8 +369,9 @@ function SubAgentPanel(props) {
|
|
|
369
369
|
const [renderTick, setRenderTick] = createSignal(0);
|
|
370
370
|
let boxEl;
|
|
371
371
|
let disposed = false;
|
|
372
|
-
/** Total
|
|
373
|
-
* Matches opencode
|
|
372
|
+
/** Total usage tokens for a sub-agent session.
|
|
373
|
+
* Matches opencode's bottom status bar usage: last assistant message with
|
|
374
|
+
* output > 0, summing input + output + reasoning + cache read/write. */
|
|
374
375
|
const readSessionTokens = (sid) => {
|
|
375
376
|
if (!sid)
|
|
376
377
|
return undefined;
|
|
@@ -382,10 +383,13 @@ function SubAgentPanel(props) {
|
|
|
382
383
|
if (m.role !== "assistant")
|
|
383
384
|
continue;
|
|
384
385
|
const t = m.tokens;
|
|
385
|
-
if (!t)
|
|
386
|
+
if (!t || !(Number(t.output) > 0))
|
|
386
387
|
continue;
|
|
387
|
-
const
|
|
388
|
-
|
|
388
|
+
const ctx = (Number(t.input) || 0) +
|
|
389
|
+
(Number(t.output) || 0) +
|
|
390
|
+
(Number(t.reasoning) || 0) +
|
|
391
|
+
(Number(t.cache?.read) || 0) +
|
|
392
|
+
(Number(t.cache?.write) || 0);
|
|
389
393
|
if (ctx > 0)
|
|
390
394
|
return ctx;
|
|
391
395
|
}
|
package/dist/tui.js
CHANGED
|
@@ -11,7 +11,7 @@ import { createElement as _$createElement } from "@opentui/solid";
|
|
|
11
11
|
import { createMemo, createSignal, createEffect, onMount, onCleanup, untrack, Show, For } from "solid-js";
|
|
12
12
|
|
|
13
13
|
// src/_version.ts
|
|
14
|
-
var PLUGIN_VERSION = "1.5.
|
|
14
|
+
var PLUGIN_VERSION = "1.5.2";
|
|
15
15
|
|
|
16
16
|
// src/clipboard.ts
|
|
17
17
|
import { spawn } from "node:child_process";
|
|
@@ -755,9 +755,8 @@ function SubAgentPanel(props) {
|
|
|
755
755
|
const m = msgs[i];
|
|
756
756
|
if (m.role !== "assistant") continue;
|
|
757
757
|
const t2 = m.tokens;
|
|
758
|
-
if (!t2) continue;
|
|
759
|
-
const
|
|
760
|
-
const ctx = (Number(t2.input) || 0) + (cache?.read ?? 0);
|
|
758
|
+
if (!t2 || !(Number(t2.output) > 0)) continue;
|
|
759
|
+
const ctx = (Number(t2.input) || 0) + (Number(t2.output) || 0) + (Number(t2.reasoning) || 0) + (Number(t2.cache?.read) || 0) + (Number(t2.cache?.write) || 0);
|
|
761
760
|
if (ctx > 0) return ctx;
|
|
762
761
|
}
|
|
763
762
|
}
|
package/package.json
CHANGED
package/src/_version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// auto-generated
|
|
2
|
-
export const PLUGIN_VERSION="1.5.
|
|
2
|
+
export const PLUGIN_VERSION="1.5.2";
|
package/src/index.tsx
CHANGED
|
@@ -428,8 +428,9 @@ function SubAgentPanel(props: {
|
|
|
428
428
|
let boxEl: any
|
|
429
429
|
let disposed = false
|
|
430
430
|
|
|
431
|
-
/** Total
|
|
432
|
-
* Matches opencode
|
|
431
|
+
/** Total usage tokens for a sub-agent session.
|
|
432
|
+
* Matches opencode's bottom status bar usage: last assistant message with
|
|
433
|
+
* output > 0, summing input + output + reasoning + cache read/write. */
|
|
433
434
|
const readSessionTokens = (sid: string): number | undefined => {
|
|
434
435
|
if (!sid) return undefined
|
|
435
436
|
try {
|
|
@@ -439,9 +440,13 @@ function SubAgentPanel(props: {
|
|
|
439
440
|
const m = (msgs as any[])[i]
|
|
440
441
|
if (m.role !== "assistant") continue
|
|
441
442
|
const t = m.tokens
|
|
442
|
-
if (!t) continue
|
|
443
|
-
const
|
|
444
|
-
|
|
443
|
+
if (!t || !(Number(t.output) > 0)) continue
|
|
444
|
+
const ctx =
|
|
445
|
+
(Number(t.input) || 0) +
|
|
446
|
+
(Number(t.output) || 0) +
|
|
447
|
+
(Number(t.reasoning) || 0) +
|
|
448
|
+
(Number(t.cache?.read) || 0) +
|
|
449
|
+
(Number(t.cache?.write) || 0)
|
|
445
450
|
if (ctx > 0) return ctx
|
|
446
451
|
}
|
|
447
452
|
}
|