@kolisachint/hoocode-agent 0.4.54 → 0.4.55

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.
@@ -2128,7 +2128,8 @@ export class InteractiveMode {
2128
2128
  * is set, before run(). Enables team focus (app.team.focus), nudging (n),
2129
2129
  * the attach side panel (a) on the task panel's teams view, and approval
2130
2130
  * gates: task_paused events (and gates already pending on the server)
2131
- * surface in the options pane; the answer goes back over
2131
+ * surface inline in the attach panel when it shows the paused role,
2132
+ * otherwise in the options pane; the answer goes back over
2132
2133
  * POST /tasks/:id/resume.
2133
2134
  */
2134
2135
  attachTeamClient(client) {
@@ -2149,12 +2150,24 @@ export class InteractiveMode {
2149
2150
  });
2150
2151
  }
2151
2152
  /**
2152
- * Show one team approval gate in the options pane and resolve with the
2153
- * chosen (or free-form) answer, undefined when skipped. Waits politely
2154
- * while another ask is on screen; the signal (gate answered elsewhere)
2155
- * dismisses both the wait and the pane.
2153
+ * Show one team approval gate and resolve with the chosen (or free-form)
2154
+ * answer, undefined when skipped. When the attach side panel is open on the
2155
+ * role that paused, the gate renders inline in the panel right where its
2156
+ * stream stopped; otherwise it goes to the options pane, waiting politely
2157
+ * while another ask is on screen. Either way the signal (gate answered
2158
+ * elsewhere) dismisses the prompt.
2156
2159
  */
2157
2160
  async presentTeamApproval(approval, signal) {
2161
+ const panel = this.teamAttachPanel;
2162
+ if (panel && approval.role === panel.role) {
2163
+ this.teamAttachHandle?.focus();
2164
+ const answer = await panel.presentApproval(approval, signal);
2165
+ // Detaching mid-gate settles as skipped — fall through to the options
2166
+ // pane so the question isn't silently lost. A skip with the panel
2167
+ // still open is a real skip.
2168
+ if (answer !== undefined || signal.aborted || this.teamAttachPanel === panel)
2169
+ return answer;
2170
+ }
2158
2171
  while (this.askOptions && !signal.aborted) {
2159
2172
  await new Promise((resolve) => setTimeout(resolve, 200));
2160
2173
  }