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