fix(coding-agent): hint when extensions fail to load

This commit is contained in:
Armin Ronacher 2026-06-23 18:20:15 +02:00
parent 2be6e67028
commit 192fcccd2d
2 changed files with 6 additions and 0 deletions

View file

@ -14,6 +14,7 @@
### Fixed
- Fixed extension-related crash and startup-failure reporting to suggest restarting with `pi -ne`.
- Fixed context usage and compaction estimates to ignore malformed all-zero assistant usage after truncated responses ([#5526](https://github.com/earendil-works/pi/pull/5526) by [@dmmulroy](https://github.com/dmmulroy)).
- Fixed `pi --resume` to load user package themes and resolve automatic light/dark theme settings.
- Fixed `models.json` custom providers so stored credentials can satisfy auth without a redundant provider-level `apiKey` ([#5953](https://github.com/earendil-works/pi/issues/5953)).

View file

@ -49,6 +49,8 @@ import { handleConfigCommand, handlePackageCommand } from "./package-manager-cli
import { isLocalPath, normalizePath, resolvePath } from "./utils/paths.ts";
import { cleanupWindowsSelfUpdateQuarantine } from "./utils/windows-self-update.ts";
const EXTENSION_LOAD_FAILURE_HINT = 'Hint: Start without extensions using "pi -ne".';
/**
* Read all content from piped stdin.
* Returns undefined if stdin is a TTY (interactive terminal).
@ -774,6 +776,9 @@ export async function main(args: string[], options?: MainOptions) {
time("resolveModelScope");
reportDiagnostics(runtime.diagnostics);
if (runtime.diagnostics.some((diagnostic) => diagnostic.type === "error")) {
if (runtime.diagnostics.some((diagnostic) => diagnostic.message.includes("Failed to load extension"))) {
console.error(chalk.yellow(EXTENSION_LOAD_FAILURE_HINT));
}
process.exit(1);
}
time("createAgentSession");