feat(chat,examples-chat): expose model picker pill in all three modes#296
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ectedModel inputs Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
chat-selectmodel picker (already rendered by<chat>when[modelOptions]is non-empty) into the smoke app'sembed-mode,popup-mode, andsidebar-mode.<chat-popup>and<chat-sidebar>to forward[modelOptions]+[(selectedModel)]to their inner<chat>so the pill renders in popup/sidebar modes too.shell.model()and writes via(selectedModelChange) → shell.onModelChange()so localStorage persistence keeps working.protectedqualifier onDemoShell.modelOptionsandonModelChangeso mode templates can reference them.No new framework primitive — the underlying
chat-selectis 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
🤖 Generated with Claude Code