Skip to content

A conversation opened with a ! command is named after the shell line, title-cased #1663

Description

@AbirAbbas

What happens

A conversation whose first message is a ! command (bash mode, #1654) is named from the shell line, and the name is title-cased like prose. On Home and in the tab bar it reads:

○ ! For I In 1 2 3; Do Echo COMBO-$i; Sleep 1; Done
· ! pwd

When a real message follows, the title job still picks the ! line as the opening question: firstExchangeLocked (internal/session/title.go ~500) takes the first user message, and a ! turn journals as a user message answered by a user_bash_… tool call.

Replication

  1. make build, open bin/codeaf in any git folder with a fresh CODEAF_HOME.
  2. In the new conversation type ! for i in 1 2 3; do echo x$i; done and press enter.
  3. Press alt+1. The Home row and the tab read ! For I In 1 2 3; Do Echo X$i; Done (the tab keeps the raw line).
  4. Go back in and ask an ordinary question. The title the namer settles on is derived from the ! line.

Acceptance

  • A conversation that has only ! turns keeps a name that is the command verbatim or a neutral placeholder, and is never title-cased.
  • Once an ordinary message is sent, the title comes from that message and its answer. A user message answered by a user_bash_ call is skipped when choosing the opening question.
  • A unit test in internal/session covers both, and the Home row is checked in the tmux suite or by a tui3 test.

Activity

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

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