@caupulican/pi-adaptative 0.80.16 → 0.80.18

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.
@@ -62,7 +62,7 @@ import { SettingsSelectorComponent } from "./components/settings-selector.js";
62
62
  import { SkillInvocationMessageComponent } from "./components/skill-invocation-message.js";
63
63
  import { ToolExecutionComponent } from "./components/tool-execution.js";
64
64
  import { ToolGroupComponent } from "./components/tool-group.js";
65
- import { getToolPanelActionKey, shouldReuseToolPanelInPlace, ToolPanelRegistry, } from "./components/tool-panel-registry.js";
65
+ import { getToolPanelActionKey, getToolPanelResultActionKeys, shouldReuseToolPanelInPlace, ToolPanelRegistry, } from "./components/tool-panel-registry.js";
66
66
  import { TreeSelectorComponent } from "./components/tree-selector.js";
67
67
  import { TrustSelectorComponent } from "./components/trust-selector.js";
68
68
  import { UserMessageComponent } from "./components/user-message.js";
@@ -2357,6 +2357,23 @@ export class InteractiveMode {
2357
2357
  text = text.trim();
2358
2358
  if (!text)
2359
2359
  return;
2360
+ // User input submitted while work is active is always steering. Treat
2361
+ // slash/bang text as user steering text instead of executing commands that
2362
+ // would interrupt the current stream or compaction.
2363
+ if (this.session.isCompacting) {
2364
+ const images = this.takeClipboardImagesForText(text);
2365
+ this.queueCompactionMessage(text, "steer", images);
2366
+ return;
2367
+ }
2368
+ if (this.session.isStreaming) {
2369
+ const images = this.takeClipboardImagesForText(text);
2370
+ this.editor.addToHistory?.(text);
2371
+ this.editor.setText("");
2372
+ await this.session.prompt(text, { streamingBehavior: "steer", images, processSlashCommands: false });
2373
+ this.updatePendingMessagesDisplay();
2374
+ this.ui.requestRender();
2375
+ return;
2376
+ }
2360
2377
  // Handle commands
2361
2378
  if (text === "/settings") {
2362
2379
  this.showSettingsSelector();
@@ -2512,30 +2529,6 @@ export class InteractiveMode {
2512
2529
  return;
2513
2530
  }
2514
2531
  }
2515
- // Queue input during compaction (extension commands execute immediately)
2516
- if (this.session.isCompacting) {
2517
- if (this.isExtensionCommand(text)) {
2518
- this.editor.addToHistory?.(text);
2519
- this.editor.setText("");
2520
- await this.session.prompt(text);
2521
- }
2522
- else {
2523
- const images = this.takeClipboardImagesForText(text);
2524
- this.queueCompactionMessage(text, "steer", images);
2525
- }
2526
- return;
2527
- }
2528
- // If streaming, use prompt() with steer behavior
2529
- // This handles extension commands (execute immediately), prompt template expansion, and queueing
2530
- if (this.session.isStreaming) {
2531
- const images = this.takeClipboardImagesForText(text);
2532
- this.editor.addToHistory?.(text);
2533
- this.editor.setText("");
2534
- await this.session.prompt(text, { streamingBehavior: "steer", images });
2535
- this.updatePendingMessagesDisplay();
2536
- this.ui.requestRender();
2537
- return;
2538
- }
2539
2532
  // Normal message submission
2540
2533
  // First, move any pending bash components to chat
2541
2534
  this.flushPendingBashComponents();
@@ -2696,6 +2689,7 @@ export class InteractiveMode {
2696
2689
  const component = this.toolPanels.getActive(event.toolCallId);
2697
2690
  if (component) {
2698
2691
  component.updateResult({ ...event.result, isError: event.isError });
2692
+ this.toolPanels.registerAliases(component, getToolPanelResultActionKeys(this.getToolPanelScope(), event.toolName, event.result));
2699
2693
  this.toolPanels.finish(event.toolCallId);
2700
2694
  this.ui.requestRender();
2701
2695
  }