@kolisachint/hoocode-agent 0.5.33 → 0.5.34

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.
@@ -1941,7 +1941,7 @@ export class InteractiveMode {
1941
1941
  this.ui.requestRender();
1942
1942
  }
1943
1943
  else if (event.message.role === "assistant") {
1944
- this.streamingComponent = new AssistantMessageComponent(undefined, this.thinkingHiddenForView(), this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel);
1944
+ this.streamingComponent = new AssistantMessageComponent(undefined, this.thinkingDisplayForView(), this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel);
1945
1945
  this.streamingMessage = event.message;
1946
1946
  this.sawTextInCurrentMessage = false;
1947
1947
  this.chatContainer.addChild(this.streamingComponent);
@@ -2289,7 +2289,7 @@ export class InteractiveMode {
2289
2289
  break;
2290
2290
  }
2291
2291
  case "assistant": {
2292
- const assistantComponent = new AssistantMessageComponent(message, this.thinkingHiddenForView(), this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel);
2292
+ const assistantComponent = new AssistantMessageComponent(message, this.thinkingDisplayForView(), this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel);
2293
2293
  this.chatContainer.addChild(assistantComponent);
2294
2294
  break;
2295
2295
  }
@@ -2715,39 +2715,45 @@ export class InteractiveMode {
2715
2715
  this.applyToolOutputView(next);
2716
2716
  }
2717
2717
  /**
2718
- * Whether thinking traces render folded to their one-line label.
2718
+ * How much of a thinking trace this view shows.
2719
2719
  *
2720
- * Radar folds them regardless of the setting. The dial is one question asked
2721
- * once — "how much do I ever want to see" — and a view whose whole job is to
2722
- * fold a tool's output down to a row cannot then spend forty lines on the
2723
- * reasoning that led to it.
2720
+ * Radar drops them outright, regardless of the setting. The dial is one
2721
+ * question asked once — "how much do I ever want to see" — and a view whose
2722
+ * whole job is to fold a run of tool calls down to a row cannot then spend
2723
+ * forty lines on the reasoning that led to it. Folding to the label is not
2724
+ * enough either: a message that only thought and called tools has nothing
2725
+ * else on screen once its calls join the chain, so its label would stand
2726
+ * alone under the summary and one row per chain would become one row plus a
2727
+ * label per call.
2724
2728
  *
2725
2729
  * It is also what keeps a running chain on screen. A chain stays open across
2726
2730
  * a thinking block (thinking is not text, so it is not a chain boundary), and
2727
- * an unfolded trace streaming in below pushes the chain's own summary line off
2728
- * the top — where every subsequent call rewrites a line above the viewport and
2729
- * forces the full redraw that clears terminal scrollback.
2731
+ * a trace rendering below pushes the chain's own summary line off the top —
2732
+ * where every subsequent call rewrites a line above the viewport and forces
2733
+ * the full redraw that clears terminal scrollback.
2730
2734
  */
2731
- thinkingHiddenForView() {
2732
- return this.hideThinkingBlock || this.toolOutputView === "radar";
2735
+ thinkingDisplayForView() {
2736
+ if (this.toolOutputView === "radar")
2737
+ return "omit";
2738
+ return this.hideThinkingBlock ? "label" : "full";
2733
2739
  }
2734
2740
  applyToolOutputView(view) {
2735
- const thinkingWasHidden = this.thinkingHiddenForView();
2741
+ const previousThinking = this.thinkingDisplayForView();
2736
2742
  this.toolOutputView = view;
2737
2743
  this.settingsManager.setToolOutputView(view);
2738
2744
  this.footer.setToolOutputView(view);
2739
- const thinkingHidden = this.thinkingHiddenForView();
2745
+ const thinking = this.thinkingDisplayForView();
2740
2746
  for (const child of this.chatContainer.children) {
2741
2747
  if (child instanceof ToolChainComponent)
2742
2748
  child.setView(view);
2743
2749
  else if (child instanceof ToolExecutionComponent)
2744
2750
  child.setView(view);
2745
- else if (child instanceof AssistantMessageComponent && thinkingHidden !== thinkingWasHidden) {
2746
- child.setHideThinkingBlock(thinkingHidden);
2751
+ else if (child instanceof AssistantMessageComponent && thinking !== previousThinking) {
2752
+ child.setThinkingDisplay(thinking);
2747
2753
  }
2748
2754
  }
2749
- if (this.streamingComponent && thinkingHidden !== thinkingWasHidden) {
2750
- this.streamingComponent.setHideThinkingBlock(thinkingHidden);
2755
+ if (this.streamingComponent && thinking !== previousThinking) {
2756
+ this.streamingComponent.setThinkingDisplay(thinking);
2751
2757
  }
2752
2758
  this.ui.requestRender();
2753
2759
  }
@@ -2799,14 +2805,14 @@ export class InteractiveMode {
2799
2805
  this.rebuildChatFromMessages();
2800
2806
  // If streaming, re-add the streaming component with updated visibility and re-render
2801
2807
  if (this.streamingComponent && this.streamingMessage) {
2802
- this.streamingComponent.setHideThinkingBlock(this.thinkingHiddenForView());
2808
+ this.streamingComponent.setThinkingDisplay(this.thinkingDisplayForView());
2803
2809
  this.streamingComponent.updateContent(this.streamingMessage);
2804
2810
  this.chatContainer.addChild(this.streamingComponent);
2805
2811
  }
2806
2812
  // Radar overrides the setting, so say so rather than claiming a change the
2807
2813
  // screen does not show.
2808
2814
  this.showStatus(!this.hideThinkingBlock && this.toolOutputView === "radar"
2809
- ? "Thinking blocks: visible (radar keeps them folded)"
2815
+ ? "Thinking blocks: visible (radar hides them)"
2810
2816
  : `Thinking blocks: ${this.hideThinkingBlock ? "hidden" : "visible"}`);
2811
2817
  }
2812
2818
  openExternalEditor() {
@@ -3199,10 +3205,10 @@ export class InteractiveMode {
3199
3205
  onHideThinkingBlockChange: (hidden) => {
3200
3206
  this.hideThinkingBlock = hidden;
3201
3207
  this.settingsManager.setHideThinkingBlock(hidden);
3202
- const effective = this.thinkingHiddenForView();
3208
+ const effective = this.thinkingDisplayForView();
3203
3209
  for (const child of this.chatContainer.children) {
3204
3210
  if (child instanceof AssistantMessageComponent) {
3205
- child.setHideThinkingBlock(effective);
3211
+ child.setThinkingDisplay(effective);
3206
3212
  }
3207
3213
  }
3208
3214
  this.chatContainer.clear();