@mariozechner/pi-coding-agent 0.45.5 → 0.45.6

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.
@@ -1038,8 +1038,21 @@ export class InteractiveMode {
1038
1038
  return;
1039
1039
  component = c;
1040
1040
  if (isOverlay) {
1041
- const w = component.width;
1042
- this.ui.showOverlay(component, w ? { width: w } : undefined);
1041
+ // Resolve overlay options - can be static or dynamic function
1042
+ const resolveOptions = () => {
1043
+ if (options?.overlayOptions) {
1044
+ const opts = typeof options.overlayOptions === "function"
1045
+ ? options.overlayOptions()
1046
+ : options.overlayOptions;
1047
+ return opts;
1048
+ }
1049
+ // Fallback: use component's width property if available
1050
+ const w = component.width;
1051
+ return w ? { width: w } : undefined;
1052
+ };
1053
+ const handle = this.ui.showOverlay(component, resolveOptions());
1054
+ // Expose handle to caller for visibility control
1055
+ options?.onHandle?.(handle);
1043
1056
  }
1044
1057
  else {
1045
1058
  this.editorContainer.clear();