refactor: /btw is now an alias for /background (#16053)

The ephemeral no-tools side-question variant of /btw confused users who
expected 'by-the-way' to mean 'run this off to the side with tools' —
they'd type /btw and get a toolless agent that couldn't do the work.
/bg worked because it was /background with full tools.

Collapse the two: /btw and /bg both alias to /background. One command,
one behavior, no more gotchas about which variant has tools.

Removed:
- _handle_btw_command in cli.py and gateway/run.py
- _run_btw_task + _active_btw_tasks state in gateway/run.py
- prompt.btw JSON-RPC method + btw.complete event in tui_gateway
- BtwStartResponse type + btw.complete case in ui-tui
- Standalone /btw slash tree registration in Discord
- Standalone btw CommandDef in hermes_cli/commands.py

Updated:
- background CommandDef aliases: (bg,) -> (bg, btw)
- TUI session.ts: local btw handler merged into background
- Docs and tips updated to describe /btw as a /background alias
This commit is contained in:
Teknium 2026-04-26 07:11:08 -07:00 committed by GitHub
parent 9a70260490
commit 7fa70b6c87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 4 additions and 380 deletions

View file

@ -1,7 +1,6 @@
import { attachedImageNotice, introMsg, toTranscriptMessages } from '../../../domain/messages.js'
import type {
BackgroundStartResponse,
BtwStartResponse,
ConfigGetValueResponse,
ConfigSetResponse,
ImageAttachResponse,
@ -18,7 +17,7 @@ import type { SlashCommand } from '../types.js'
export const sessionCommands: SlashCommand[] = [
{
aliases: ['bg'],
aliases: ['bg', 'btw'],
help: 'launch a background prompt',
name: 'background',
run: (arg, ctx) => {
@ -39,23 +38,6 @@ export const sessionCommands: SlashCommand[] = [
}
},
{
help: 'by-the-way follow-up',
name: 'btw',
run: (arg, ctx) => {
if (!arg) {
return ctx.transcript.sys('/btw <question>')
}
ctx.gateway.rpc<BtwStartResponse>('prompt.btw', { session_id: ctx.sid, text: arg }).then(
ctx.guarded(() => {
patchUiState(state => ({ ...state, bgTasks: new Set(state.bgTasks).add('btw:x') }))
ctx.transcript.sys('btw running…')
})
)
}
},
{
help: 'change or show model',
aliases: ['provider'],