pi-cc-extensions 0.7.0 → 0.7.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/extensions/claude-code-style.ts +13 -13
- package/package.json +1 -1
|
@@ -326,7 +326,7 @@ let scrollButtonWidget: any = null;
|
|
|
326
326
|
let pendingScrollMessages = 0;
|
|
327
327
|
let assistantMessageActive = false;
|
|
328
328
|
let scrollButtonSyncScheduled = false;
|
|
329
|
-
let
|
|
329
|
+
let sessionRenderTimer: ReturnType<typeof setTimeout> | null = null;
|
|
330
330
|
|
|
331
331
|
function parseSgrMousePackets(data: string): SgrMousePacket[] | null {
|
|
332
332
|
const pattern = /\x1b\[<(\d+);(\d+);(\d+)([Mm])/g;
|
|
@@ -888,9 +888,9 @@ function handleToolMouseInput(data: string): { consume: true } | undefined {
|
|
|
888
888
|
}
|
|
889
889
|
|
|
890
890
|
function teardownToolMouseInteraction(): void {
|
|
891
|
-
if (
|
|
892
|
-
clearTimeout(
|
|
893
|
-
|
|
891
|
+
if (sessionRenderTimer) {
|
|
892
|
+
clearTimeout(sessionRenderTimer);
|
|
893
|
+
sessionRenderTimer = null;
|
|
894
894
|
}
|
|
895
895
|
toolMouseInputUnsubscribe?.();
|
|
896
896
|
toolMouseInputUnsubscribe = null;
|
|
@@ -934,15 +934,15 @@ function installToolMouseInteraction(ctx: any): void {
|
|
|
934
934
|
toolMouseInputUnsubscribe = ctx.ui.onTerminalInput(handleToolMouseInput);
|
|
935
935
|
}
|
|
936
936
|
|
|
937
|
-
function
|
|
937
|
+
function scheduleSessionRender(): void {
|
|
938
938
|
const tui = toolMouseTui;
|
|
939
939
|
if (!tui || typeof tui.requestRender !== "function") return;
|
|
940
|
-
if (
|
|
941
|
-
//
|
|
942
|
-
//
|
|
943
|
-
// not left hidden until the next
|
|
944
|
-
|
|
945
|
-
|
|
940
|
+
if (sessionRenderTimer) clearTimeout(sessionRenderTimer);
|
|
941
|
+
// Restored transcripts are populated at different points for startup, reload,
|
|
942
|
+
// and session replacement. Repaint after session_start and the surrounding UI
|
|
943
|
+
// rebuild finish so messages are not left hidden until the next terminal input.
|
|
944
|
+
sessionRenderTimer = setTimeout(() => {
|
|
945
|
+
sessionRenderTimer = null;
|
|
946
946
|
if (toolMouseTui === tui) tui.requestRender(true);
|
|
947
947
|
}, 0);
|
|
948
948
|
}
|
|
@@ -1569,13 +1569,13 @@ export default function (pi: ExtensionAPI) {
|
|
|
1569
1569
|
},
|
|
1570
1570
|
});
|
|
1571
1571
|
|
|
1572
|
-
pi.on("session_start", async (
|
|
1572
|
+
pi.on("session_start", async (_event, ctx) => {
|
|
1573
1573
|
diffPreviewByCall.clear();
|
|
1574
1574
|
pendingScrollMessages = 0;
|
|
1575
1575
|
assistantMessageActive = false;
|
|
1576
1576
|
ctx.ui.setStatus("ccstyle", undefined);
|
|
1577
1577
|
installToolMouseInteraction(ctx);
|
|
1578
|
-
|
|
1578
|
+
scheduleSessionRender();
|
|
1579
1579
|
});
|
|
1580
1580
|
|
|
1581
1581
|
pi.on("message_start", async (event) => {
|