Skip to content

feat(chat,examples-chat): expose model picker pill in all three modes#296

Merged
blove merged 3 commits into
mainfrom
claude/chat-model-picker
May 13, 2026
Merged

feat(chat,examples-chat): expose model picker pill in all three modes#296
blove merged 3 commits into
mainfrom
claude/chat-model-picker

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 13, 2026

Summary

  • Wires the existing chat-select model picker (already rendered by <chat> when [modelOptions] is non-empty) into the smoke app's embed-mode, popup-mode, and sidebar-mode.
  • Extends <chat-popup> and <chat-sidebar> to forward [modelOptions] + [(selectedModel)] to their inner <chat> so the pill renders in popup/sidebar modes too.
  • Pill reads shell.model() and writes via (selectedModelChange) → shell.onModelChange() so localStorage persistence keeps working.
  • Drops the protected qualifier on DemoShell.modelOptions and onModelChange so mode templates can reference them.

No new framework primitive — the underlying chat-select is already shipped with full keyboard nav, outside-click dismissal, and ARIA listbox semantics.

Plan

  • + "" + docs/superpowers/plans/2026-05-13-chat-model-picker-wiring.md + "" +

Test plan

  • Library tests pass (642/642)
  • Smoke app builds (development configuration)
  • Manual (reviewer):
    • Embed mode: pill visible bottom-left of chat input, opens, picks gpt-5/gpt-5-mini/gpt-5-nano, syncs with debug-panel dropdown, persists across reload
    • Popup mode: same
    • Sidebar mode: same
    • Submitting a message uses the selected model

🤖 Generated with Claude Code

blove and others added 2 commits May 13, 2026 09:10
The framework already ships chat-select + the [modelOptions] /
[(selectedModel)] inputs on the <chat> composition. The smoke app's
mode components just never pass them through. ~10-line wiring fix
across 4 files.

Earlier draft attempted to build a duplicate primitive — reset.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The <chat> composition already projects a chat-select into the
[chatInputModelSelect] slot when [modelOptions] is non-empty. Extend
<chat-popup> and <chat-sidebar> to forward the same [modelOptions]
and [(selectedModel)] inputs to their inner <chat>, and wire all
three smoke-app mode components (embed, popup, sidebar) to
shell.modelOptions + shell.model with persistence via
shell.onModelChange.

Drop `protected` from DemoShell.modelOptions and onModelChange so
mode templates can reference them.

No new framework primitive — chat-select already shipped.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 13, 2026 4:25pm

Request Review

…ectedModel inputs

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@blove blove merged commit 25905ef into main May 13, 2026
14 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.

1 participant