Skip to content

Title: feat(cli): add /btw slash command for ephemeral side questions #2370

@wenshao

Description

@wenshao

Summary

Add a /btw (by the way) slash command that allows users to ask quick side questions during a conversation without polluting the main conversation history.

Motivation

When working on a task, users often have quick clarifying questions (e.g., "what does this function return?", "what's the difference between X and Y?") that don't need to be part of the permanent conversation record. Currently, asking these questions adds noise to the context and consumes unnecessary tokens in subsequent turns.

Feature Details

  • Ephemeral: The question and answer are displayed in the UI but are NOT added to the LLM's conversation history, keeping the main context clean
  • Context-aware: Uses the current conversation history as context via generateContent, so the model can reference everything discussed so far
  • No tool access: Answers purely from existing context — no file reads, shell commands, or searches
  • Low cost: Reuses the parent conversation's prompt cache, minimizing additional token usage
  • Cancellable: Supports ESC to abort via abortSignal
  • Skip recording: Not tracked in chat recording analytics

Usage

/btw what does the generateContent method return?
/btw what's the difference between Content and PartListUnion?
/btw how many files have we changed so far?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions