token-stats-timer 1.0.10 → 1.0.11
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/package.json +1 -1
- package/step-timer.ts +4 -3
package/package.json
CHANGED
package/step-timer.ts
CHANGED
|
@@ -92,11 +92,12 @@ export function createStepTimer(pi: ExtensionAPI): void {
|
|
|
92
92
|
lastCtx = undefined;
|
|
93
93
|
});
|
|
94
94
|
|
|
95
|
-
pi.registerEntryRenderer<FinalTimingData>(FINAL_TYPE, (entry, _opts,
|
|
95
|
+
pi.registerEntryRenderer<FinalTimingData>(FINAL_TYPE, (entry, _opts, theme) => {
|
|
96
96
|
const d = entry.data;
|
|
97
97
|
if (!d) return undefined;
|
|
98
|
-
const
|
|
99
|
-
box
|
|
98
|
+
const title = theme.fg("accent", "总耗时");
|
|
99
|
+
const box = new Box(1, 1, (text) => theme.bg("customMessageBg", text));
|
|
100
|
+
box.addChild(new Text(`${title} ${formatDuration(d.totalMs)}`, 0, 0));
|
|
100
101
|
return box;
|
|
101
102
|
});
|
|
102
103
|
}
|