mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-01 05:00:46 +00:00
feat: subagent list dialog - done
This commit is contained in:
parent
e44e28a640
commit
17b2c357a0
21 changed files with 701 additions and 976 deletions
|
|
@ -4,20 +4,17 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { Box, Text, useInput } from 'ink';
|
||||
import { ManagementStepProps } from './types.js';
|
||||
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';
|
||||
|
||||
export const AgentViewerStep = ({ state, onPrevious }: ManagementStepProps) => {
|
||||
// Handle keyboard input
|
||||
useInput((input, key) => {
|
||||
if (key.escape || input === 'b') {
|
||||
onPrevious();
|
||||
}
|
||||
});
|
||||
interface AgentViewerStepProps {
|
||||
selectedAgent: SubagentConfig | null;
|
||||
}
|
||||
|
||||
if (!state.selectedAgent) {
|
||||
export const AgentViewerStep = ({ selectedAgent }: AgentViewerStepProps) => {
|
||||
if (!selectedAgent) {
|
||||
return (
|
||||
<Box>
|
||||
<Text color={theme.status.error}>No agent selected</Text>
|
||||
|
|
@ -25,7 +22,7 @@ export const AgentViewerStep = ({ state, onPrevious }: ManagementStepProps) => {
|
|||
);
|
||||
}
|
||||
|
||||
const agent = state.selectedAgent;
|
||||
const agent = selectedAgent;
|
||||
|
||||
const toolsDisplay = agent.tools ? agent.tools.join(', ') : '*';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue