Skip to content

feat(tui) Add --name flag to attach command to apply usernames to sessions#1

Draft
alecook wants to merge 1 commit intodevfrom
feat/tui-attach-usernames
Draft

feat(tui) Add --name flag to attach command to apply usernames to sessions#1
alecook wants to merge 1 commit intodevfrom
feat/tui-attach-usernames

Conversation

@alecook
Copy link
Copy Markdown
Owner

@alecook alecook commented Mar 11, 2026

Issue for this PR

Closes anomalyco#17103

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds an optional --name flag to the attach command.

This flag sets and threads user names through server/session prompt flows (message, prompt_async, command, shell) and persist/display them in user messages within the TUI. Along with display also sanitizes username for transcript export. While this isn't a game changer its nice when collaborating to see which user added what prompts.

How did you verify your code works?

This was tested by starting a local serve session opencode serve then connecting two local clients with the opencode attach --name with two different names. Chatted in both terminal sessions, see screenshot below

Screenshots / recordings

image

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@alecook alecook force-pushed the feat/tui-attach-usernames branch from 21fced0 to 4b434da Compare March 11, 2026 22:52
@alecook alecook changed the title Feat/tui attach usernames feat(tui) Add --name flag to attach command to apply usernames to sessions Mar 11, 2026
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.

[FEATURE]: (tui) Add --name option to opencode attach command

1 participant