fix(coding-agent): allow tool expansion during extension confirms

closes #4429
This commit is contained in:
Mario Zechner
2026-05-12 23:34:57 +02:00
Unverified
parent 5ac874c849
commit d62c416cfd
3 changed files with 8 additions and 2 deletions
+1
View File
@@ -8,6 +8,7 @@
### Fixed
- Fixed tool output expansion while extension confirmation dialogs are focused ([#4429](https://github.com/earendil-works/pi/issues/4429)).
- Fixed auto-retry for Anthropic streams that end before `message_stop` ([#4433](https://github.com/earendil-works/pi/issues/4433)).
- Fixed theme sharing across package scopes so extensions do not crash with `Theme not initialized` ([#4333](https://github.com/earendil-works/pi/issues/4333)).
- Fixed keybinding hints to show Option instead of Alt on macOS ([#4289](https://github.com/earendil-works/pi/issues/4289)).
@@ -12,6 +12,7 @@ import { keyHint, rawKeyHint } from "./keybinding-hints.js";
export interface ExtensionSelectorOptions {
tui?: TUI;
timeout?: number;
onToggleToolsExpanded?: () => void;
}
export class ExtensionSelectorComponent extends Container {
@@ -23,6 +24,7 @@ export class ExtensionSelectorComponent extends Container {
private titleText: Text;
private baseTitle: string;
private countdown: CountdownTimer | undefined;
private onToggleToolsExpanded: (() => void) | undefined;
constructor(
title: string,
@@ -36,6 +38,7 @@ export class ExtensionSelectorComponent extends Container {
this.options = options;
this.onSelectCallback = onSelect;
this.onCancelCallback = onCancel;
this.onToggleToolsExpanded = opts?.onToggleToolsExpanded;
this.baseTitle = title;
this.addChild(new DynamicBorder());
@@ -87,7 +90,9 @@ export class ExtensionSelectorComponent extends Container {
handleInput(keyData: string): void {
const kb = getKeybindings();
if (kb.matches(keyData, "tui.select.up") || keyData === "k") {
if (kb.matches(keyData, "app.tools.expand")) {
this.onToggleToolsExpanded?.();
} else if (kb.matches(keyData, "tui.select.up") || keyData === "k") {
this.selectedIndex = Math.max(0, this.selectedIndex - 1);
this.updateList();
} else if (kb.matches(keyData, "tui.select.down") || keyData === "j") {
@@ -2024,7 +2024,7 @@ export class InteractiveMode {
this.hideExtensionSelector();
resolve(undefined);
},
{ tui: this.ui, timeout: opts?.timeout },
{ tui: this.ui, timeout: opts?.timeout, onToggleToolsExpanded: () => this.toggleToolOutputExpansion() },
);
this.editorContainer.clear();