@each1024/pi-mini-mode 2.0.12 → 2.0.14
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/lib/minimal-output.ts +5 -7
- package/package.json +1 -1
package/lib/minimal-output.ts
CHANGED
|
@@ -30,8 +30,7 @@ export function minimalOutputComponent(theme: ExtensionContext["ui"]["theme"], g
|
|
|
30
30
|
const expandedSubagents = new Set<string>();
|
|
31
31
|
const expandedTools = new Set<string>();
|
|
32
32
|
const expandedThinking = new Set<string>();
|
|
33
|
-
const thinkingPreviews = new Map<string, { text: string; source: string; width: number; rows: number; live: boolean
|
|
34
|
-
const THINKING_SCROLL_MS = 480;
|
|
33
|
+
const thinkingPreviews = new Map<string, { text: string; source: string; width: number; rows: number; live: boolean }>();
|
|
35
34
|
const agentModes = new Map<number, "all" | "preview">();
|
|
36
35
|
const runningTurns = new Set<number>();
|
|
37
36
|
let pinnedToolId: string | undefined;
|
|
@@ -312,11 +311,10 @@ export function minimalOutputComponent(theme: ExtensionContext["ui"]["theme"], g
|
|
|
312
311
|
const available = Math.max(0, width - visibleWidth(prefix));
|
|
313
312
|
if (entry.thinking) {
|
|
314
313
|
const cached = thinkingPreviews.get(entry.id);
|
|
315
|
-
const previewRows =
|
|
316
|
-
const
|
|
317
|
-
const
|
|
318
|
-
|
|
319
|
-
if (!sameFrame && !holdTail) thinkingPreviews.set(entry.id, { text: display, source: entry.detail, width: available, rows: previewRows, live: activeThinking, shownAt: Date.now() });
|
|
314
|
+
const previewRows = 1;
|
|
315
|
+
const reuse = cached?.source === entry.detail && cached.width === available && cached.rows === previewRows && cached.live === activeThinking;
|
|
316
|
+
const display = reuse ? cached.text : thinkingPreview(entry.detail, available, previewRows, activeThinking);
|
|
317
|
+
if (!reuse) thinkingPreviews.set(entry.id, { text: display, source: entry.detail, width: available, rows: previewRows, live: activeThinking });
|
|
320
318
|
const outcome = turn.thinkingOutcomes?.[entry.processIndex];
|
|
321
319
|
const fallback = activeThinking ? "正在思考,等待可显示摘要"
|
|
322
320
|
: outcome === "aborted" ? "思考已中断,未返回可显示摘要"
|
package/package.json
CHANGED