Skip to content

feat: Make agent name clickable to open agent picker#37

Merged
geier merged 2 commits intomainfrom
issue-31
Mar 4, 2026
Merged

feat: Make agent name clickable to open agent picker#37
geier merged 2 commits intomainfrom
issue-31

Conversation

@geier
Copy link
Contributor

@geier geier commented Mar 4, 2026

Summary

  • Make the agent name in the session info bar a clickable button that opens the agent picker dialog
  • Provides an alternative to Tab-key cycling when text is already in the textarea

Closes #31

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables switching agents mid-composition by making the currently selected agent label in the session info bar clickable, opening the existing Agent Picker dialog.

Changes:

  • Add an onAgentClick callback prop to SessionInfo and render the agent label as a <button> that invokes it.
  • Wire SessionInfo’s onAgentClick in session.tsx to setShowAgentPicker(true) to open the Agent Picker.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
app-prefixable/src/pages/session.tsx Passes onAgentClick to SessionInfo to open the Agent Picker dialog.
app-prefixable/src/components/session-info.tsx Converts the agent display into a clickable button and adds an onAgentClick prop.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +103 to +107
<button
type="button"
class="flex items-center gap-1 shrink-0 hover:opacity-80 cursor-pointer"
onClick={() => props.onAgentClick?.()}
>
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onAgentClick is optional, but the UI is always rendered as an interactive <button> with hover + pointer cursor. If a caller omits onAgentClick, this produces a focusable/clickable control that does nothing. Either make onAgentClick required (and remove the optional chaining), or conditionally render a non-interactive <span> / disable the button and remove hover/cursor styles when the callback isn’t provided.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@geier geier merged commit 1dd9447 into main Mar 4, 2026
4 of 5 checks passed
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.

feat: make agent name in session info bar clickable to open agent picker

2 participants