feat: add ephemeral /btw side-question panel (#399)

* feat: add ephemeral /btw side-question panel

* fix: preserve /btw live context and payload hooks

* fix: send /btw question through session pipeline
This commit is contained in:
maximhar
2026-03-14 10:42:26 +01:00
committed by GitHub
parent 820a17aa29
commit 952db9fd93
13 changed files with 906 additions and 10 deletions
@@ -29,6 +29,7 @@ export class InputController {
this.ctx.editor.shouldBypassAutocompleteOnEscape = () =>
Boolean(
this.ctx.loadingAnimation ||
this.ctx.hasActiveBtw() ||
this.ctx.session.isStreaming ||
this.ctx.session.isCompacting ||
this.ctx.session.isGeneratingHandoff ||
@@ -40,6 +41,9 @@ export class InputController {
this.ctx.retryEscapeHandler,
);
this.ctx.editor.onEscape = () => {
if (this.ctx.hasActiveBtw() && this.ctx.handleBtwEscape()) {
return;
}
if (this.ctx.loadingAnimation) {
if (this.ctx.cancelPendingSubmission()) {
return;
@@ -435,6 +439,9 @@ export class InputController {
this.ctx.showWarning("Agent is idle; nothing to background");
return;
}
if (this.ctx.hasActiveBtw()) {
this.ctx.handleBtwEscape();
}
this.ctx.isBackgrounded = true;
const backgroundUiContext = this.ctx.createBackgroundUiContext();