@xynogen/pix-hunk 0.2.0 → 0.2.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 +4 -4
  2. package/src/index.ts +6 -8
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xynogen/pix-hunk",
3
- "version": "0.2.0",
4
- "description": "Pi tool — drive live Hunk diff reviews with ordered bulk operations",
3
+ "version": "0.2.1",
4
+ "description": "Pi tool \u2014 drive live Hunk diff reviews with ordered bulk operations",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "exports": {
@@ -44,8 +44,8 @@
44
44
  "access": "public"
45
45
  },
46
46
  "dependencies": {
47
- "@xynogen/pix-pretty": "^1.29.0",
48
- "@xynogen/pix-runtime": "^0.12.0"
47
+ "@xynogen/pix-pretty": "^1.30.0",
48
+ "@xynogen/pix-runtime": "^0.13.0"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "typebox": "*",
package/src/index.ts CHANGED
@@ -4,6 +4,7 @@ import { reportToolStatus, type ToolStatusUI } from "@xynogen/pix-pretty/tool-st
4
4
  import {
5
5
  dotJoin,
6
6
  formatCollapsedToolRow,
7
+ formatToolCallTitle,
7
8
  frameToolResult,
8
9
  getErrorMessage,
9
10
  hideCollapsedToolCall,
@@ -479,7 +480,7 @@ export default function registerHunk(pi: ExtensionAPI, runner: HunkRunner = runH
479
480
  return text;
480
481
  const actions = ((args as { ops?: ToolOp[] }).ops ?? []).map((op) => op.action);
481
482
  text.setText(
482
- `${theme.fg("toolTitle", theme.bold("hunk"))} ${theme.fg("dim", actionSummary(actions))}`,
483
+ `${formatToolCallTitle(theme, "hunk", context)} ${theme.fg("dim", actionSummary(actions))}`,
483
484
  );
484
485
  return text;
485
486
  },
@@ -490,14 +491,11 @@ export default function registerHunk(pi: ExtensionAPI, runner: HunkRunner = runH
490
491
  text.setText(
491
492
  result.content.flatMap((part) => (part.type === "text" ? [part.text] : [])).join("\n"),
492
493
  );
493
- return text;
494
+ return options.isPartial ? text : frameToolResult(text, theme, context.isError);
494
495
  }
495
- const collapsed = tickCollapse(
496
- "hunk",
497
- context.state as CollapseState,
498
- context.invalidate,
499
- options.expanded,
500
- );
496
+ const collapsed =
497
+ !options.isPartial &&
498
+ tickCollapse("hunk", context.state as CollapseState, context.invalidate, options.expanded);
501
499
  if (collapsed) {
502
500
  text.setText(renderSummary(details, theme as HunkTheme));
503
501
  return text;