fix(tui): applied follow-up slash commands
Route follow-up shortcut submissions through the builtin slash-command dispatcher before queueing them as deferred prompts. Added regression coverage for /goal set submitted through InputController.handleFollowUp while a stream is active. Fixes #2038
This commit is contained in:
@@ -589,7 +589,7 @@ export class InputController {
|
||||
|
||||
/** Send editor text as a follow-up message (queued behind current stream). */
|
||||
async handleFollowUp(): Promise<void> {
|
||||
const text = this.ctx.editor.getText().trim();
|
||||
let text = this.ctx.editor.getText().trim();
|
||||
if (!text) return;
|
||||
|
||||
// Compaction first: while compacting, free text gets queued via
|
||||
@@ -603,6 +603,16 @@ export class InputController {
|
||||
return;
|
||||
}
|
||||
|
||||
const slashResult = await executeBuiltinSlashCommand(text, {
|
||||
ctx: this.ctx,
|
||||
});
|
||||
if (slashResult === true) {
|
||||
return;
|
||||
}
|
||||
if (typeof slashResult === "string") {
|
||||
text = slashResult;
|
||||
}
|
||||
|
||||
// Skill commands invoke through the custom-message path regardless of
|
||||
// which keybinding submitted them. Enter routes them as `steer`;
|
||||
// Ctrl+Enter (this handler) routes them as `followUp`.
|
||||
|
||||
Reference in New Issue
Block a user