@kolisachint/hoocode-agent 0.5.32 → 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.
- package/CHANGELOG.md +65 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +16 -3
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +18 -10
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- 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 +132 -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 +19 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +45 -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.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.
|
|
2292
|
+
const assistantComponent = new AssistantMessageComponent(message, this.thinkingDisplayForView(), 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,46 @@ export class InteractiveMode {
|
|
|
2710
2714
|
const next = cycleToolOutputView(this.toolOutputView, direction);
|
|
2711
2715
|
this.applyToolOutputView(next);
|
|
2712
2716
|
}
|
|
2717
|
+
/**
|
|
2718
|
+
* How much of a thinking trace this view shows.
|
|
2719
|
+
*
|
|
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.
|
|
2728
|
+
*
|
|
2729
|
+
* It is also what keeps a running chain on screen. A chain stays open across
|
|
2730
|
+
* a thinking block (thinking is not text, so it is not a chain boundary), and
|
|
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.
|
|
2734
|
+
*/
|
|
2735
|
+
thinkingDisplayForView() {
|
|
2736
|
+
if (this.toolOutputView === "radar")
|
|
2737
|
+
return "omit";
|
|
2738
|
+
return this.hideThinkingBlock ? "label" : "full";
|
|
2739
|
+
}
|
|
2713
2740
|
applyToolOutputView(view) {
|
|
2741
|
+
const previousThinking = this.thinkingDisplayForView();
|
|
2714
2742
|
this.toolOutputView = view;
|
|
2715
2743
|
this.settingsManager.setToolOutputView(view);
|
|
2716
2744
|
this.footer.setToolOutputView(view);
|
|
2745
|
+
const thinking = this.thinkingDisplayForView();
|
|
2717
2746
|
for (const child of this.chatContainer.children) {
|
|
2718
2747
|
if (child instanceof ToolChainComponent)
|
|
2719
2748
|
child.setView(view);
|
|
2720
2749
|
else if (child instanceof ToolExecutionComponent)
|
|
2721
2750
|
child.setView(view);
|
|
2751
|
+
else if (child instanceof AssistantMessageComponent && thinking !== previousThinking) {
|
|
2752
|
+
child.setThinkingDisplay(thinking);
|
|
2753
|
+
}
|
|
2754
|
+
}
|
|
2755
|
+
if (this.streamingComponent && thinking !== previousThinking) {
|
|
2756
|
+
this.streamingComponent.setThinkingDisplay(thinking);
|
|
2722
2757
|
}
|
|
2723
2758
|
this.ui.requestRender();
|
|
2724
2759
|
}
|
|
@@ -2770,11 +2805,15 @@ export class InteractiveMode {
|
|
|
2770
2805
|
this.rebuildChatFromMessages();
|
|
2771
2806
|
// If streaming, re-add the streaming component with updated visibility and re-render
|
|
2772
2807
|
if (this.streamingComponent && this.streamingMessage) {
|
|
2773
|
-
this.streamingComponent.
|
|
2808
|
+
this.streamingComponent.setThinkingDisplay(this.thinkingDisplayForView());
|
|
2774
2809
|
this.streamingComponent.updateContent(this.streamingMessage);
|
|
2775
2810
|
this.chatContainer.addChild(this.streamingComponent);
|
|
2776
2811
|
}
|
|
2777
|
-
|
|
2812
|
+
// Radar overrides the setting, so say so rather than claiming a change the
|
|
2813
|
+
// screen does not show.
|
|
2814
|
+
this.showStatus(!this.hideThinkingBlock && this.toolOutputView === "radar"
|
|
2815
|
+
? "Thinking blocks: visible (radar hides them)"
|
|
2816
|
+
: `Thinking blocks: ${this.hideThinkingBlock ? "hidden" : "visible"}`);
|
|
2778
2817
|
}
|
|
2779
2818
|
openExternalEditor() {
|
|
2780
2819
|
// Determine editor (respect $VISUAL, then $EDITOR)
|
|
@@ -3166,9 +3205,10 @@ export class InteractiveMode {
|
|
|
3166
3205
|
onHideThinkingBlockChange: (hidden) => {
|
|
3167
3206
|
this.hideThinkingBlock = hidden;
|
|
3168
3207
|
this.settingsManager.setHideThinkingBlock(hidden);
|
|
3208
|
+
const effective = this.thinkingDisplayForView();
|
|
3169
3209
|
for (const child of this.chatContainer.children) {
|
|
3170
3210
|
if (child instanceof AssistantMessageComponent) {
|
|
3171
|
-
child.
|
|
3211
|
+
child.setThinkingDisplay(effective);
|
|
3172
3212
|
}
|
|
3173
3213
|
}
|
|
3174
3214
|
this.chatContainer.clear();
|