@kolisachint/hoocode-agent 0.5.32 → 0.5.33
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.
- package/CHANGELOG.md +45 -0
- package/dist/modes/interactive/components/tool-chain-summary.d.ts +9 -2
- package/dist/modes/interactive/components/tool-chain-summary.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-chain-summary.js +114 -29
- package/dist/modes/interactive/components/tool-chain-summary.js.map +1 -1
- package/dist/modes/interactive/components/tool-chain.d.ts +12 -1
- package/dist/modes/interactive/components/tool-chain.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-chain.js +15 -2
- package/dist/modes/interactive/components/tool-chain.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +15 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +39 -5
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/keybindings.md +5 -0
- package/docs/terminal-setup.md +51 -0
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +4 -4
|
@@ -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.
|
|
1944
|
+
this.streamingComponent = new AssistantMessageComponent(undefined, this.thinkingHiddenForView(), 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.
|
|
2292
|
+
const assistantComponent = new AssistantMessageComponent(message, this.thinkingHiddenForView(), this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel);
|
|
2293
2293
|
this.chatContainer.addChild(assistantComponent);
|
|
2294
2294
|
break;
|
|
2295
2295
|
}
|
|
@@ -2681,6 +2681,10 @@ export class InteractiveMode {
|
|
|
2681
2681
|
for (let i = chains.length - 1; i >= 0; i--) {
|
|
2682
2682
|
if (chains[i].isEmpty || chains[i].isOpened === wantOpen)
|
|
2683
2683
|
continue;
|
|
2684
|
+
// A chain of one is never summarised, so there is nothing for unfold to
|
|
2685
|
+
// reveal; skipping it keeps the press moving to a chain that will change.
|
|
2686
|
+
if (wantOpen && !chains[i].isSummarised)
|
|
2687
|
+
continue;
|
|
2684
2688
|
chains[i].setOpened(wantOpen);
|
|
2685
2689
|
this.ui.requestRender();
|
|
2686
2690
|
return;
|
|
@@ -2710,15 +2714,40 @@ export class InteractiveMode {
|
|
|
2710
2714
|
const next = cycleToolOutputView(this.toolOutputView, direction);
|
|
2711
2715
|
this.applyToolOutputView(next);
|
|
2712
2716
|
}
|
|
2717
|
+
/**
|
|
2718
|
+
* Whether thinking traces render folded to their one-line label.
|
|
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.
|
|
2724
|
+
*
|
|
2725
|
+
* It is also what keeps a running chain on screen. A chain stays open across
|
|
2726
|
+
* 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.
|
|
2730
|
+
*/
|
|
2731
|
+
thinkingHiddenForView() {
|
|
2732
|
+
return this.hideThinkingBlock || this.toolOutputView === "radar";
|
|
2733
|
+
}
|
|
2713
2734
|
applyToolOutputView(view) {
|
|
2735
|
+
const thinkingWasHidden = this.thinkingHiddenForView();
|
|
2714
2736
|
this.toolOutputView = view;
|
|
2715
2737
|
this.settingsManager.setToolOutputView(view);
|
|
2716
2738
|
this.footer.setToolOutputView(view);
|
|
2739
|
+
const thinkingHidden = this.thinkingHiddenForView();
|
|
2717
2740
|
for (const child of this.chatContainer.children) {
|
|
2718
2741
|
if (child instanceof ToolChainComponent)
|
|
2719
2742
|
child.setView(view);
|
|
2720
2743
|
else if (child instanceof ToolExecutionComponent)
|
|
2721
2744
|
child.setView(view);
|
|
2745
|
+
else if (child instanceof AssistantMessageComponent && thinkingHidden !== thinkingWasHidden) {
|
|
2746
|
+
child.setHideThinkingBlock(thinkingHidden);
|
|
2747
|
+
}
|
|
2748
|
+
}
|
|
2749
|
+
if (this.streamingComponent && thinkingHidden !== thinkingWasHidden) {
|
|
2750
|
+
this.streamingComponent.setHideThinkingBlock(thinkingHidden);
|
|
2722
2751
|
}
|
|
2723
2752
|
this.ui.requestRender();
|
|
2724
2753
|
}
|
|
@@ -2770,11 +2799,15 @@ export class InteractiveMode {
|
|
|
2770
2799
|
this.rebuildChatFromMessages();
|
|
2771
2800
|
// If streaming, re-add the streaming component with updated visibility and re-render
|
|
2772
2801
|
if (this.streamingComponent && this.streamingMessage) {
|
|
2773
|
-
this.streamingComponent.setHideThinkingBlock(this.
|
|
2802
|
+
this.streamingComponent.setHideThinkingBlock(this.thinkingHiddenForView());
|
|
2774
2803
|
this.streamingComponent.updateContent(this.streamingMessage);
|
|
2775
2804
|
this.chatContainer.addChild(this.streamingComponent);
|
|
2776
2805
|
}
|
|
2777
|
-
|
|
2806
|
+
// Radar overrides the setting, so say so rather than claiming a change the
|
|
2807
|
+
// screen does not show.
|
|
2808
|
+
this.showStatus(!this.hideThinkingBlock && this.toolOutputView === "radar"
|
|
2809
|
+
? "Thinking blocks: visible (radar keeps them folded)"
|
|
2810
|
+
: `Thinking blocks: ${this.hideThinkingBlock ? "hidden" : "visible"}`);
|
|
2778
2811
|
}
|
|
2779
2812
|
openExternalEditor() {
|
|
2780
2813
|
// Determine editor (respect $VISUAL, then $EDITOR)
|
|
@@ -3166,9 +3199,10 @@ export class InteractiveMode {
|
|
|
3166
3199
|
onHideThinkingBlockChange: (hidden) => {
|
|
3167
3200
|
this.hideThinkingBlock = hidden;
|
|
3168
3201
|
this.settingsManager.setHideThinkingBlock(hidden);
|
|
3202
|
+
const effective = this.thinkingHiddenForView();
|
|
3169
3203
|
for (const child of this.chatContainer.children) {
|
|
3170
3204
|
if (child instanceof AssistantMessageComponent) {
|
|
3171
|
-
child.setHideThinkingBlock(
|
|
3205
|
+
child.setHideThinkingBlock(effective);
|
|
3172
3206
|
}
|
|
3173
3207
|
}
|
|
3174
3208
|
this.chatContainer.clear();
|