@dreb/coding-agent 2.34.1 → 2.34.3
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 +2 -0
- package/dist/core/buddy/buddy-controller.d.ts +35 -1
- package/dist/core/buddy/buddy-controller.d.ts.map +1 -1
- package/dist/core/buddy/buddy-controller.js +65 -4
- package/dist/core/buddy/buddy-controller.js.map +1 -1
- package/dist/core/buddy/buddy-manager.d.ts +6 -0
- package/dist/core/buddy/buddy-manager.d.ts.map +1 -1
- package/dist/core/buddy/buddy-manager.js +25 -2
- package/dist/core/buddy/buddy-manager.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +18 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/buddy.md +9 -1
- package/docs/tui.md +7 -7
- package/package.json +1 -1
|
@@ -197,6 +197,7 @@ export class InteractiveMode {
|
|
|
197
197
|
throw new Error("No API key available for the current model.");
|
|
198
198
|
return manager.reroll(model, apiKey);
|
|
199
199
|
},
|
|
200
|
+
onVisibilityChange: (visible) => this.syncBuddyWidget(visible),
|
|
200
201
|
});
|
|
201
202
|
this.ui = new TUI(new ProcessTerminal(), this.settingsManager.getShowHardwareCursor());
|
|
202
203
|
this.headerContainer = new Container();
|
|
@@ -1993,7 +1994,10 @@ export class InteractiveMode {
|
|
|
1993
1994
|
return;
|
|
1994
1995
|
}
|
|
1995
1996
|
}
|
|
1996
|
-
// Capture user message for buddy context and reset idle timer
|
|
1997
|
+
// Capture user message for buddy context and reset idle timer.
|
|
1998
|
+
// refreshVisibility() first, so a /buddy off from another concurrent
|
|
1999
|
+
// instance unmounts this TUI's widget as the user resumes interacting.
|
|
2000
|
+
this.buddyController.refreshVisibility();
|
|
1997
2001
|
this.buddyController.appendContext(`User: ${text}`);
|
|
1998
2002
|
this.buddyController.markActivity();
|
|
1999
2003
|
this.buddyController.resetIdleTimer();
|
|
@@ -4569,6 +4573,19 @@ ${cycleModelForward || cycleModelBackward ? `| \`${cycleModelForward}\` / \`${cy
|
|
|
4569
4573
|
this.mountBuddy(existingBuddy);
|
|
4570
4574
|
}
|
|
4571
4575
|
}
|
|
4576
|
+
syncBuddyWidget(visible) {
|
|
4577
|
+
// Another concurrent dreb instance toggled the buddy via /buddy off
|
|
4578
|
+
// or /buddy. Converge this TUI's widget to the persisted state.
|
|
4579
|
+
if (visible) {
|
|
4580
|
+
const state = this.buddyController.manager.getState() ?? this.buddyController.manager.load();
|
|
4581
|
+
if (state)
|
|
4582
|
+
this.mountBuddy(state);
|
|
4583
|
+
}
|
|
4584
|
+
else {
|
|
4585
|
+
this.removeBuddy();
|
|
4586
|
+
}
|
|
4587
|
+
this.ui.requestRender();
|
|
4588
|
+
}
|
|
4572
4589
|
mountBuddy(state) {
|
|
4573
4590
|
// Remove existing if any
|
|
4574
4591
|
this.removeBuddy();
|