feat: agent-pickable brainless UI blocks in web chat via render_ui tool - #94
Open
sandydasari wants to merge 1 commit into
Open
feat: agent-pickable brainless UI blocks in web chat via render_ui tool#94sandydasari wants to merge 1 commit into
sandydasari wants to merge 1 commit into
Conversation
Vendors claude-todo-list, claude-diff, and claude-thinking from the brainless shadcn registry (namespace registered in components.json), rethemed from hard-coded terminal hex colors to the paper/ink tokens so they read as native in both light and dark themes. The thinking line drops the fabricated token counter and the esc-to-interrupt hint — neither is true in the web chat. New always-on render_ui system tool: presentation-only, the web renders the call's INPUT so blocks appear progressively while arguments stream. todo_list renders a status checklist; diff renders a before/after hunk computed client-side by the ToolBlock differ (now exported). Failed or unrecognized calls fall back to the generic ToolBlock; the TUI shows raw arguments. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deploying openacme-ai with
|
| Latest commit: |
1394e88
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a067b5f1.openacme-ai.pages.dev |
| Branch Preview URL: | https://worktree-brainless-agent-ui.openacme-ai.pages.dev |
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
Integrates the brainless shadcn registry so agents can dynamically pick rich UI blocks when answering in the web chat.
render_uisystem tool — presentation-only; the web renders the call's input, so blocks draw progressively while arguments stream. Two components in v1:todo_list(plan/checklist with per-item status) anddiff(before/after hunk for one file, computed client-side by the exported ToolBlock differ).claude-todo-list,claude-diff,claude-thinkingunderapps/web/app/components/brainless/claude/, with the@brainlessnamespace registered incomponents.jsonfor future adds.#101010background) that clash with the app theme and break in light mode. Structure, glyph grammar, and a11y semantics (sr-onlylabels,role="status",aria-live) are preserved; colors map tosignal-green/plot-red/ink-*/paper-*so both themes work for free. The thinking line drops the fabricated token counter and "esc to interrupt" hint.ClaudeThinkingline.render_uicalls fall back to the genericToolBlock; the TUI shows raw arguments.Testing
packages/tools/test/render-ui.test.ts); full workspace type-check, lint, and tests pass (pre-commit hook ran all 30 tasks).🤖 Generated with Claude Code