pi-fast-resume 1.4.0 → 1.4.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/fast-resume.ts CHANGED
@@ -43,7 +43,7 @@
43
43
  * tradeoff is by design — the fast load time depends on partial reads.
44
44
  */
45
45
 
46
- import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
46
+ import { getAgentDir, type ExtensionAPI, type ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
47
47
  import type { KeyId } from "@earendil-works/pi-tui";
48
48
  import {
49
49
  DynamicBorder,
@@ -114,7 +114,7 @@ interface FastResumeConfig {
114
114
  shortcut?: string;
115
115
  }
116
116
 
117
- const CONFIG_PATH = join(HOME, ".pi", "agent", "extensions", "pi-fast-resume.json");
117
+ const CONFIG_PATH = join(getAgentDir(), "extensions", "pi-fast-resume.json");
118
118
 
119
119
  function readConfig(): FastResumeConfig {
120
120
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-fast-resume",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Fast session picker for pi — reads headers + first messages from 16KB partial reads instead of full-file parsing",
5
5
  "type": "module",
6
6
  "author": "Tom X Nguyen",
@@ -30,8 +30,8 @@
30
30
  "README.md"
31
31
  ],
32
32
  "devDependencies": {
33
- "@earendil-works/pi-coding-agent": "0.79.4",
34
- "@earendil-works/pi-tui": "0.79.4",
33
+ "@earendil-works/pi-coding-agent": "0.80.3",
34
+ "@earendil-works/pi-tui": "0.80.3",
35
35
  "@types/node": "25.9.1",
36
36
  "@vitest/coverage-v8": "4.1.7",
37
37
  "knip": "6.14.1",
package/src/scanner.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { openSync, readSync, closeSync, readdirSync, statSync, realpathSync } from "node:fs";
2
2
  import { join, resolve } from "node:path";
3
- import { homedir } from "node:os";
4
3
  import { StringDecoder } from "node:string_decoder";
4
+ import { getAgentDir } from "@earendil-works/pi-coding-agent";
5
5
 
6
6
  export interface SessionHeader {
7
7
  path: string;
@@ -337,8 +337,7 @@ function forEachLineForward(
337
337
  return { reachedEof: true, consumedBytes };
338
338
  }
339
339
 
340
- const HOME = homedir();
341
- const DEFAULT_SESSIONS_DIR = join(HOME, ".pi", "agent", "sessions");
340
+ const DEFAULT_SESSIONS_DIR = join(getAgentDir(), "sessions");
342
341
 
343
342
  /**
344
343
  * Scan ALL session directories under the root (~/.pi/agent/sessions/).