feat(playground): tailor empty-state claim to selected agent#2245
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the playground chat empty state so its heading and provider-configuration subtext reflect the currently selected agent instead of always using ToolHive Assistant copy.
Changes:
- Added a pure helper for resolving empty-state copy from an agent.
- Wired
ChatInterfaceto load the thread’s selected agent and render agent-specific copy. - Added component tests for default, Skill Engineer, and custom-agent empty-state copy.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
renderer/src/features/chat/lib/empty-state-copy.ts |
Adds centralized empty-state copy resolution for built-in and custom agents. |
renderer/src/features/chat/components/chat-interface.tsx |
Uses agent hooks to select and render the appropriate empty-state heading/subtext. |
renderer/src/features/chat/components/__tests__/chat-interface.test.tsx |
Adds mocked agent data and tests for per-agent empty-state behavior. |
The empty-state heading was hardcoded to "Test & evaluate your MCP
Servers", which only describes the ToolHive Assistant use case. With
the Skill Engineer and custom agents now selectable per thread, the
heading and provider-config subtext now resolve from the selected
agent: ToolHive Assistant keeps the existing copy, Skill Engineer
shows "Build & audit your Skills", and custom agents show
"Chat with {agent.name}".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
930c551 to
acc30f1
Compare
peppescg
approved these changes
May 14, 2026
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
renderer/src/features/chat/lib/empty-state-copy.ts):chat-interface.tsxresolves the thread's agent with the sameuseThreadAgentId+useAgentspattern already used byAgentSelector.Test plan
pnpm run test run renderer/src/features/chat/components/__tests__/chat-interface.test.tsx— 37/37 pass (3 new cases underempty state (no messages) › per-agent empty-state copy).pnpm run type-check— clean.eslinton the three changed files — clean.pnpm run start/playgroundwith no threads → empty state shows "Test & evaluate your MCP Servers".🤖 Generated with Claude Code