fix(coding-agent): use configured model scope cycle hint closes #4508
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed the scoped model startup hint to show the configured model-cycle keybinding ([#4508](https://github.com/earendil-works/pi/issues/4508)).
|
||||
- Fixed `fd` auto-download on macOS x86_64 by pinning the last release that ships an Intel macOS binary ([#4559](https://github.com/earendil-works/pi/issues/4559)).
|
||||
- Fixed skill diagnostics to stop warning when a skill name differs from its parent directory ([#4534](https://github.com/earendil-works/pi/issues/4534)).
|
||||
- Fixed prompt template argument parsing to split unquoted multiline input on newlines ([#4553](https://github.com/earendil-works/pi/issues/4553)).
|
||||
|
||||
@@ -651,7 +651,6 @@ export async function main(args: string[], options?: MainOptions) {
|
||||
await showDeprecationWarnings(deprecationWarnings);
|
||||
}
|
||||
|
||||
const scopedModels = [...session.scopedModels];
|
||||
time("resolveModelScope");
|
||||
reportDiagnostics(runtime.diagnostics);
|
||||
if (runtime.diagnostics.some((diagnostic) => diagnostic.type === "error")) {
|
||||
@@ -674,16 +673,6 @@ export async function main(args: string[], options?: MainOptions) {
|
||||
printTimings();
|
||||
await runRpcMode(runtime);
|
||||
} else if (appMode === "interactive") {
|
||||
if (scopedModels.length > 0 && (parsed.verbose || !settingsManager.getQuietStartup())) {
|
||||
const modelList = scopedModels
|
||||
.map((sm) => {
|
||||
const thinkingStr = sm.thinkingLevel ? `:${sm.thinkingLevel}` : "";
|
||||
return `${sm.model.id}${thinkingStr}`;
|
||||
})
|
||||
.join(", ");
|
||||
console.log(chalk.dim(`Model scope: ${modelList} ${chalk.gray("(Ctrl+P to cycle)")}`));
|
||||
}
|
||||
|
||||
const interactiveMode = new InteractiveMode(runtime, {
|
||||
migratedProviders,
|
||||
modelFallbackMessage,
|
||||
|
||||
@@ -572,6 +572,21 @@ export class InteractiveMode {
|
||||
const [fdPath] = await Promise.all([ensureTool("fd"), ensureTool("rg")]);
|
||||
this.fdPath = fdPath;
|
||||
|
||||
if (this.session.scopedModels.length > 0 && (this.options.verbose || !this.settingsManager.getQuietStartup())) {
|
||||
const modelList = this.session.scopedModels
|
||||
.map((sm) => {
|
||||
const thinkingStr = sm.thinkingLevel ? `:${sm.thinkingLevel}` : "";
|
||||
return `${sm.model.id}${thinkingStr}`;
|
||||
})
|
||||
.join(", ");
|
||||
const cycleKeys = this.keybindings.getKeys("app.model.cycleForward");
|
||||
const cycleHint =
|
||||
cycleKeys.length > 0
|
||||
? theme.fg("muted", ` (${formatKeyText(cycleKeys.join("/"), { capitalize: true })} to cycle)`)
|
||||
: "";
|
||||
console.log(theme.fg("dim", `Model scope: ${modelList}${cycleHint}`));
|
||||
}
|
||||
|
||||
// Add header container as first child
|
||||
this.ui.addChild(this.headerContainer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user