@heyhuynhgiabuu/pi-pretty 0.6.3 → 0.6.4
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/CHANGELOG.md +15 -0
- package/package.json +1 -1
- package/src/index.ts +1 -14
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.6.4] - 2026-06-16
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **FFF service not loading** — Extension activation used `require("@ff-labs/fff-node")`
|
|
8
|
+
which fails because the package is ESM-only (only `"import"` export, no `"require"`).
|
|
9
|
+
The async `import()` fallback never resolved before tool registration, leaving
|
|
10
|
+
`fffService` permanently `null`. Tool execution never loaded FFF.
|
|
11
|
+
|
|
12
|
+
Fix: always create `FffService(undefined, agentDir)` during activation. The
|
|
13
|
+
`tryLoadModule()` in the tool execution handler uses `await import()` which
|
|
14
|
+
correctly loads the ESM-only package. The broken synchronous `require()` +
|
|
15
|
+
orphaned `.then()` pattern is removed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heyhuynhgiabuu/pi-pretty",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"description": "Pretty terminal output for pi — syntax-highlighted file reads, colored bash output, tree-view directory listings, and more.",
|
|
5
5
|
"author": "huynhgiabuu",
|
|
6
6
|
"license": "MIT",
|
package/src/index.ts
CHANGED
|
@@ -94,23 +94,10 @@ export default function piPrettyExtension(pi: ExtensionAPI, deps?: PiPrettyDeps)
|
|
|
94
94
|
|
|
95
95
|
const agentDir = getAgentDir ? getAgentDir() : getDefaultAgentDir();
|
|
96
96
|
|
|
97
|
-
let fffService: FffService | null =
|
|
97
|
+
let fffService: FffService | null = new FffService(undefined, agentDir);
|
|
98
98
|
|
|
99
99
|
if (deps?.fffModule) {
|
|
100
100
|
fffService = new FffService(deps.fffModule, agentDir);
|
|
101
|
-
} else if (!deps) {
|
|
102
|
-
// Production: try to load FFF module
|
|
103
|
-
try {
|
|
104
|
-
const fffMod = require("@ff-labs/fff-node");
|
|
105
|
-
fffService = new FffService(fffMod, agentDir);
|
|
106
|
-
} catch {
|
|
107
|
-
// Dynamic import fallback (ESM-only package)
|
|
108
|
-
import("@ff-labs/fff-node").then((mod) => {
|
|
109
|
-
if (!fffService) {
|
|
110
|
-
fffService = new FffService(mod, agentDir);
|
|
111
|
-
}
|
|
112
|
-
}).catch(() => {});
|
|
113
|
-
}
|
|
114
101
|
}
|
|
115
102
|
|
|
116
103
|
// Ripgrep fallback for multi_grep
|