Skip to content

Commit c8708af

Browse files
mfrachetclaude
andauthored
refactor(playground): remove duplicate Chat button from agent header (#12365)
Removes the redundant Chat button from the agent header since users can already navigate to chat through the agent combobox dropdown. Also cleaned up the unused `agentName` prop that was only being passed for this button. --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 66ef41b commit c8708af

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

packages/playground/src/domains/agents/agent-header.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
AgentCombobox,
1515
} from '@mastra/playground-ui';
1616

17-
export function AgentHeader({ agentName, agentId }: { agentName: string; agentId: string }) {
17+
export function AgentHeader({ agentId }: { agentId: string }) {
1818
return (
1919
<Header>
2020
<Breadcrumb>
@@ -30,10 +30,6 @@ export function AgentHeader({ agentName, agentId }: { agentName: string; agentId
3030
</Breadcrumb>
3131

3232
<HeaderGroup>
33-
<Button as={Link} to={`/agents/${agentId}/chat`}>
34-
Chat
35-
</Button>
36-
3733
<DividerIcon />
3834

3935
<Button as={Link} to={`/observability?entity=${agentId}`}>

packages/playground/src/domains/agents/agent-layout.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
import { useParams } from 'react-router';
22

33
import { AgentHeader } from './agent-header';
4-
import { HeaderTitle, Header, MainContentLayout, useAgent, Skeleton } from '@mastra/playground-ui';
4+
import { MainContentLayout } from '@mastra/playground-ui';
55

66
export const AgentLayout = ({ children }: { children: React.ReactNode }) => {
77
const { agentId } = useParams();
8-
const { data: agent, isLoading: isAgentLoading } = useAgent(agentId!);
8+
99
return (
1010
<MainContentLayout>
11-
{isAgentLoading ? (
12-
<Header>
13-
<HeaderTitle>
14-
<Skeleton className="h-6 w-[200px]" />
15-
</HeaderTitle>
16-
</Header>
17-
) : (
18-
<AgentHeader agentName={agent?.name!} agentId={agentId!} />
19-
)}
11+
<AgentHeader agentId={agentId!} />
12+
2013
{children}
2114
</MainContentLayout>
2215
);

0 commit comments

Comments
 (0)