/**
* @license
* Copyright 2025 Qwen
* SPDX-License-Identifier: Apache-2.0
*/
import { Box, Text } from 'ink';
import { theme } from '../../semantic-colors.js';
import { shouldShowColor, getColorForDisplay } from './utils.js';
import { SubagentConfig } from '@qwen-code/qwen-code-core';
interface AgentViewerStepProps {
selectedAgent: SubagentConfig | null;
}
export const AgentViewerStep = ({ selectedAgent }: AgentViewerStepProps) => {
if (!selectedAgent) {
return (
No agent selected
);
}
const agent = selectedAgent;
const toolsDisplay = agent.tools ? agent.tools.join(', ') : '*';
return (
Location:
{agent.level === 'project'
? 'Project Level (.qwen/agents/)'
: 'User Level (~/.qwen/agents/)'}
File Path:
{agent.filePath}
Tools:
{toolsDisplay}
{shouldShowColor(agent.backgroundColor) && (
Color:
{` ${agent.name} `}
)}
Description:
{agent.description}
System Prompt:
{agent.systemPrompt}
);
};