fix(coding-agent): hint when extensions fail to load
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
### Fixed
|
### 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 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 `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)).
|
- 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)).
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ import { handleConfigCommand, handlePackageCommand } from "./package-manager-cli
|
|||||||
import { isLocalPath, normalizePath, resolvePath } from "./utils/paths.ts";
|
import { isLocalPath, normalizePath, resolvePath } from "./utils/paths.ts";
|
||||||
import { cleanupWindowsSelfUpdateQuarantine } from "./utils/windows-self-update.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.
|
* Read all content from piped stdin.
|
||||||
* Returns undefined if stdin is a TTY (interactive terminal).
|
* Returns undefined if stdin is a TTY (interactive terminal).
|
||||||
@@ -774,6 +776,9 @@ export async function main(args: string[], options?: MainOptions) {
|
|||||||
time("resolveModelScope");
|
time("resolveModelScope");
|
||||||
reportDiagnostics(runtime.diagnostics);
|
reportDiagnostics(runtime.diagnostics);
|
||||||
if (runtime.diagnostics.some((diagnostic) => diagnostic.type === "error")) {
|
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);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
time("createAgentSession");
|
time("createAgentSession");
|
||||||
|
|||||||
Reference in New Issue
Block a user