@heyhuynhgiabuu/pi-pretty 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +10 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyhuynhgiabuu/pi-pretty",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
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
@@ -457,6 +457,7 @@ async function renderGrepResults(
457
457
  // ---------------------------------------------------------------------------
458
458
 
459
459
  export default function piPrettyExtension(pi: any): void {
460
+ console.error("[pi-pretty] Extension function called");
460
461
  let createReadTool: any;
461
462
  let createBashTool: any;
462
463
  let createLsTool: any;
@@ -466,16 +467,23 @@ export default function piPrettyExtension(pi: any): void {
466
467
 
467
468
  try {
468
469
  const sdk = require("@mariozechner/pi-coding-agent");
470
+ console.error("[pi-pretty] SDK loaded, keys:", Object.keys(sdk).filter((k: string) => k.startsWith("create")).join(", "));
469
471
  createReadTool = sdk.createReadTool;
470
472
  createBashTool = sdk.createBashTool;
471
473
  createLsTool = sdk.createLsTool;
472
474
  createFindTool = sdk.createFindTool;
473
475
  createGrepTool = sdk.createGrepTool;
474
476
  TextComponent = require("@mariozechner/pi-tui").Text;
475
- } catch {
477
+ console.error("[pi-pretty] TextComponent:", typeof TextComponent);
478
+ } catch (e: any) {
479
+ console.error("[pi-pretty] LOAD ERROR:", e.message);
480
+ return;
481
+ }
482
+ if (!createReadTool || !TextComponent) {
483
+ console.error("[pi-pretty] Missing: createReadTool=", typeof createReadTool, "TextComponent=", typeof TextComponent);
476
484
  return;
477
485
  }
478
- if (!createReadTool || !TextComponent) return;
486
+ console.error("[pi-pretty] Registering tools...");
479
487
 
480
488
  const cwd = process.cwd();
481
489
  const home = process.env.HOME ?? "";