throughline 0.3.16 → 0.3.17

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "throughline",
3
- "version": "0.3.16",
3
+ "version": "0.3.17",
4
4
  "type": "module",
5
5
  "description": "Claude Code hooks plugin for structured context compression (/clear-safe persistent memory)",
6
6
  "keywords": [
@@ -587,7 +587,10 @@ export function main() {
587
587
  setMeasuredColumns(cols);
588
588
  const curr = resolveColumns();
589
589
  if (prev !== curr) {
590
- // 幅が実際に変わった時だけ全再描画。同値なら needsRerender の通常経路に任せる
590
+ // 幅が変わると前フレームは別幅で wrap している可能性があり、CUU ベースの
591
+ // 部分再描画では消し残る。全画面クリアで確実にリセットしてから描き直す。
592
+ // greeting も消えるが、resize の瞬間だけの一時的コスト。
593
+ process.stdout.write(ANSI.clearScreen);
591
594
  lastRenderedLines = 0;
592
595
  resetRenderKeyCache();
593
596
  safeRenderFrame(args);
@@ -612,6 +615,7 @@ export function main() {
612
615
  const currCols = process.stdout.columns ?? 0;
613
616
  if (shouldForceFullRedraw(lastColumns, currCols)) {
614
617
  lastColumns = currCols;
618
+ process.stdout.write(ANSI.clearScreen);
615
619
  lastRenderedLines = 0;
616
620
  resetRenderKeyCache();
617
621
  safeRenderFrame(args);
@@ -631,8 +635,9 @@ export function main() {
631
635
  if (resizeTimer) clearTimeout(resizeTimer);
632
636
  resizeTimer = setTimeout(() => {
633
637
  resizeTimer = null;
634
- // 既存描画が新しい幅では崩れている可能性があるため座標情報を破棄して再描画
638
+ // 既存描画が新しい幅では崩れている可能性があるため全画面クリアで描き直す
635
639
  lastColumns = process.stdout.columns ?? 0;
640
+ process.stdout.write(ANSI.clearScreen);
636
641
  lastRenderedLines = 0;
637
642
  resetRenderKeyCache();
638
643
  safeRenderFrame(args);