pi-repoprompt-mcp 0.5.4 → 0.5.5
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/README.md
CHANGED
|
@@ -53,7 +53,7 @@ Forked sessions inherit the parent session-plus-node's window, tab, and auto-sel
|
|
|
53
53
|
<img width="270" height="936" alt="Collapsed call/result summaries" src="https://raw.githubusercontent.com/w-winter/dot314/main/packages/pi-repoprompt-mcp/docs/images/collapsed-summaries.png" />
|
|
54
54
|
</p>
|
|
55
55
|
|
|
56
|
-
- RepoPrompt `apply_edits` calls are forwarded with `verbose: true` by default
|
|
56
|
+
- RepoPrompt `apply_edits` calls are forwarded with `verbose: true` by default, while the returned diff is normalized into `details.diff` and presented to the agent as a terse summary. The same is done for `file_actions create/delete` outputs, so you see all edited/created/deleted LOC with rich rendering but the extension prevents the context window from getting bloated by round-tripping tool I/O tokens
|
|
57
57
|
- Adaptive diff rendering for RepoPrompt `git` and `apply_edits` outputs by default (`diffViewMode: "auto"` picks split, unified, compact, or summary at render time based on pane width). This uses the active Pi theme's `toolDiffAdded`, `toolDiffRemoved`, and `toolDiffContext` colors (typically mapped to chosen hues for green and red), and its visual design and rendering logic are indebted to [MasuRii/pi-tool-display](https://github.com/MasuRii/pi-tool-display). Two different examples at different pane widths:
|
|
58
58
|
|
|
59
59
|
<p align="center">
|
|
@@ -207,7 +207,6 @@ but this is best-effort
|
|
|
207
207
|
|
|
208
208
|
## Readcache gotchas
|
|
209
209
|
|
|
210
|
-
- `raw: true` disables readcache (and rendering). Don't use unless debugging
|
|
211
210
|
- Need full content? use `bypass_cache: true` in `read_file` args
|
|
212
211
|
- Multi-root: use absolute or specific relative paths (MCP `read_file` has no `RootName:` disambiguation)
|
|
213
212
|
|
|
@@ -546,9 +546,6 @@ const RpToolSchema = Type.Object({
|
|
|
546
546
|
confirmEdits: Type.Optional(
|
|
547
547
|
Type.Boolean({ description: "Confirm edit-like operations (required when confirmEdits is enabled)" })
|
|
548
548
|
),
|
|
549
|
-
|
|
550
|
-
// Formatting
|
|
551
|
-
raw: Type.Optional(Type.Boolean({ description: "Return raw output without formatting" })),
|
|
552
549
|
});
|
|
553
550
|
|
|
554
551
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -1783,10 +1780,6 @@ Mode priority: call > describe > search > windows > bind > status`,
|
|
|
1783
1780
|
return new Text(theme.fg("error", "↳ " + textContent), 0, 0);
|
|
1784
1781
|
}
|
|
1785
1782
|
|
|
1786
|
-
if (details.raw) {
|
|
1787
|
-
return new Text(textContent, 0, 0);
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
1783
|
const successPrefix = theme.fg("success", "↳ ");
|
|
1791
1784
|
const collapsedMaxLines = config.collapsedMaxLines ?? 15;
|
|
1792
1785
|
const normalizedToolName = typeof details.tool === "string" ? normalizeToolName(details.tool) : undefined;
|
|
@@ -2577,14 +2570,12 @@ Mode priority: call > describe > search > windows > bind > status`,
|
|
|
2577
2570
|
const forwardedUserArgs = buildForwardedUserArgs({
|
|
2578
2571
|
toolName: normalizedTool,
|
|
2579
2572
|
userArgs,
|
|
2580
|
-
raw: params.raw,
|
|
2581
2573
|
});
|
|
2582
2574
|
|
|
2583
2575
|
const mergedArgs = { ...forwardedUserArgs, ...bindingArgs };
|
|
2584
2576
|
|
|
2585
2577
|
const fileActionDeleteSnapshot = normalizedTool === "file_actions"
|
|
2586
2578
|
&& userArgs.action === "delete"
|
|
2587
|
-
&& params.raw !== true
|
|
2588
2579
|
&& typeof userArgs.path === "string"
|
|
2589
2580
|
? (() => {
|
|
2590
2581
|
try {
|
|
@@ -2611,7 +2602,6 @@ Mode priority: call > describe > search > windows > bind > status`,
|
|
|
2611
2602
|
|
|
2612
2603
|
const shouldReadcache =
|
|
2613
2604
|
config.readcacheReadFile === true &&
|
|
2614
|
-
params.raw !== true &&
|
|
2615
2605
|
normalizedTool === "read_file" &&
|
|
2616
2606
|
typeof userArgs.path === "string" &&
|
|
2617
2607
|
ctx !== undefined;
|
|
@@ -2668,9 +2658,8 @@ Mode priority: call > describe > search > windows > bind > status`,
|
|
|
2668
2658
|
: normalizeToolResultText({
|
|
2669
2659
|
toolName: normalizedTool,
|
|
2670
2660
|
text: textContent,
|
|
2671
|
-
raw: params.raw,
|
|
2672
2661
|
});
|
|
2673
|
-
const normalizedFileActionResult = result.isError
|
|
2662
|
+
const normalizedFileActionResult = result.isError
|
|
2674
2663
|
? null
|
|
2675
2664
|
: normalizeFileActionResult({
|
|
2676
2665
|
action: userArgs.action,
|
|
@@ -2733,7 +2722,6 @@ Mode priority: call > describe > search > windows > bind > status`,
|
|
|
2733
2722
|
warning: guardResult.warning,
|
|
2734
2723
|
editNoop,
|
|
2735
2724
|
rpReadcache: rpReadcache ?? undefined,
|
|
2736
|
-
raw: params.raw,
|
|
2737
2725
|
...(normalizedTextResult ? normalizedTextResult.details : {}),
|
|
2738
2726
|
...(normalizedFileActionResult ?? {}),
|
|
2739
2727
|
},
|
|
@@ -39,9 +39,8 @@ function normalizeDiffBlockCode(code: string): string {
|
|
|
39
39
|
export function normalizeToolResultText(args: {
|
|
40
40
|
toolName: string | undefined;
|
|
41
41
|
text: string;
|
|
42
|
-
raw: boolean | undefined;
|
|
43
42
|
}): ToolResultNormalization | null {
|
|
44
|
-
if (args.toolName !== "apply_edits" ||
|
|
43
|
+
if (args.toolName !== "apply_edits" || !args.text.includes("```diff")) {
|
|
45
44
|
return null;
|
|
46
45
|
}
|
|
47
46
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export function buildForwardedUserArgs(args: {
|
|
2
2
|
toolName: string | undefined;
|
|
3
3
|
userArgs: Record<string, unknown>;
|
|
4
|
-
raw: boolean | undefined;
|
|
5
4
|
}): Record<string, unknown> {
|
|
6
5
|
const forwardedUserArgs: Record<string, unknown> = { ...args.userArgs };
|
|
7
6
|
|
|
@@ -9,7 +8,7 @@ export function buildForwardedUserArgs(args: {
|
|
|
9
8
|
delete forwardedUserArgs.bypass_cache;
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
if (args.toolName === "apply_edits"
|
|
11
|
+
if (args.toolName === "apply_edits") {
|
|
13
12
|
forwardedUserArgs.verbose = true;
|
|
14
13
|
}
|
|
15
14
|
|
|
@@ -152,9 +152,6 @@ export interface RpToolParams {
|
|
|
152
152
|
// Safety overrides
|
|
153
153
|
allowDelete?: boolean; // Allow delete operations
|
|
154
154
|
confirmEdits?: boolean; // Confirm edit-like operations when confirmEdits is enabled
|
|
155
|
-
|
|
156
|
-
// Formatting
|
|
157
|
-
raw?: boolean; // Return raw output without formatting
|
|
158
155
|
}
|
|
159
156
|
|
|
160
157
|
// ─────────────────────────────────────────────────────────────────────────────
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-repoprompt-mcp",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "A token-efficient RepoPrompt integration for Pi with automated and branch-safe workspace management",
|
|
5
5
|
"keywords": ["pi-package", "pi", "pi-coding-agent", "repoprompt", "mcp"],
|
|
6
6
|
"license": "MIT",
|