@oh-my-pi/pi-coding-agent 5.3.1 → 5.4.0
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 +2 -0
- package/package.json +5 -5
- package/src/core/tools/lsp/utils.ts +20 -1
- package/src/core/tools/web-fetch.ts +14 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-pi/pi-coding-agent",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"ompConfig": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"prepublishOnly": "bun run generate-template && bun run clean && bun run build"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@oh-my-pi/pi-agent-core": "5.
|
|
43
|
-
"@oh-my-pi/pi-ai": "5.
|
|
44
|
-
"@oh-my-pi/pi-git-tool": "5.
|
|
45
|
-
"@oh-my-pi/pi-tui": "5.
|
|
42
|
+
"@oh-my-pi/pi-agent-core": "5.4.0",
|
|
43
|
+
"@oh-my-pi/pi-ai": "5.4.0",
|
|
44
|
+
"@oh-my-pi/pi-git-tool": "5.4.0",
|
|
45
|
+
"@oh-my-pi/pi-tui": "5.4.0",
|
|
46
46
|
"@openai/agents": "^0.3.7",
|
|
47
47
|
"@silvia-odwyer/photon-node": "^0.3.4",
|
|
48
48
|
"@sinclair/typebox": "^0.34.46",
|
|
@@ -226,6 +226,24 @@ export function severityToIcon(severity?: DiagnosticSeverity): string {
|
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
+
/**
|
|
230
|
+
* Strip noise from diagnostic messages (clippy URLs, override hints).
|
|
231
|
+
*/
|
|
232
|
+
function stripDiagnosticNoise(message: string): string {
|
|
233
|
+
return message
|
|
234
|
+
.split("\n")
|
|
235
|
+
.filter((line) => {
|
|
236
|
+
const trimmed = line.trim();
|
|
237
|
+
// Skip "for further information visit <url>" lines
|
|
238
|
+
if (trimmed.startsWith("for further information visit")) return false;
|
|
239
|
+
// Skip bare URLs
|
|
240
|
+
if (/^https?:\/\//.test(trimmed)) return false;
|
|
241
|
+
return true;
|
|
242
|
+
})
|
|
243
|
+
.join("\n")
|
|
244
|
+
.trim();
|
|
245
|
+
}
|
|
246
|
+
|
|
229
247
|
/**
|
|
230
248
|
* Format a diagnostic as a human-readable string.
|
|
231
249
|
*/
|
|
@@ -235,8 +253,9 @@ export function formatDiagnostic(diagnostic: Diagnostic, filePath: string): stri
|
|
|
235
253
|
const col = diagnostic.range.start.character + 1;
|
|
236
254
|
const source = diagnostic.source ? `[${diagnostic.source}] ` : "";
|
|
237
255
|
const code = diagnostic.code ? ` (${diagnostic.code})` : "";
|
|
256
|
+
const message = stripDiagnosticNoise(diagnostic.message);
|
|
238
257
|
|
|
239
|
-
return `${filePath}:${line}:${col} [${severity}] ${source}${
|
|
258
|
+
return `${filePath}:${line}:${col} [${severity}] ${source}${message}${code}`;
|
|
240
259
|
}
|
|
241
260
|
|
|
242
261
|
/**
|
|
@@ -519,6 +519,20 @@ async function renderUrl(
|
|
|
519
519
|
throw new Error("Operation aborted");
|
|
520
520
|
}
|
|
521
521
|
|
|
522
|
+
// Handle internal protocol URLs (e.g., pi-internal://) - return empty
|
|
523
|
+
if (url.startsWith("pi-internal://")) {
|
|
524
|
+
return {
|
|
525
|
+
url,
|
|
526
|
+
finalUrl: url,
|
|
527
|
+
contentType: "text/plain",
|
|
528
|
+
method: "internal",
|
|
529
|
+
content: "",
|
|
530
|
+
fetchedAt,
|
|
531
|
+
truncated: false,
|
|
532
|
+
notes: ["Internal protocol URL - no external content"],
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
|
|
522
536
|
// Step 0: Normalize URL (ensure scheme for special handlers)
|
|
523
537
|
url = normalizeUrl(url);
|
|
524
538
|
const origin = getOrigin(url);
|