Skip to content

feat: add /btw side-question slash command - #933

Open
gsabatie wants to merge 1 commit into
mistralai:mainfrom
gsabatie:feat/btw-command
Open

feat: add /btw side-question slash command#933
gsabatie wants to merge 1 commit into
mistralai:mainfrom
gsabatie:feat/btw-command

Conversation

@gsabatie

@gsabatie gsabatie commented Jul 22, 2026

Copy link
Copy Markdown

Summary

Adds /btw <question>, a one-shot side question you can ask between turns,
using the current system prompt and session history as read-only context,
with no tools. Neither the question nor the answer is added to the main
conversation history — the next model turn sends the same history as before
/btw. Only available while the agent is idle (blocked while a turn is
running); interactive mode only, -p and ACP reply with an interactive-only
message.

Demo

ezgif-62463da3d1a318bf

Design choices

  • Builds a local message list ([*self.messages, question]) and calls the
    backend directly with tools=[], so the model can't trigger tool calls
    during the side question. Nothing is appended to self.messages.
  • Token usage is still counted in session stats (/status) via the normal
    accounting path.
  • UI follows existing Mistral patterns: slash echo + ExpandingBorder aside
    (BtwMessage), with the usual Generating spinner during the call.

Limitations

  • Session meta.json stats only rewrite when messages change; /status is
    live in-memory.
  • Not available in programmatic (-p) or ACP surfaces by design.
  • Blocked while the agent is actively running a turn.

One-shot LLM reply that reuses session context with no tools and without mutating conversation history. Interactive TUI only; -p and ACP return an interactive-only message.
@gsabatie
gsabatie requested a review from a team as a code owner July 22, 2026 21:54
@ED-RO

ED-RO commented Jul 23, 2026

Copy link
Copy Markdown

💯 👌👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants