mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Merge branch 'main' into fix/subagent-update
This commit is contained in:
@@ -13,10 +13,10 @@ import { DescriptionInput } from './DescriptionInput.js';
|
||||
import { ToolSelector } from './ToolSelector.js';
|
||||
import { ColorSelector } from './ColorSelector.js';
|
||||
import { CreationSummary } from './CreationSummary.js';
|
||||
import { WizardStepProps } from '../types.js';
|
||||
import { type WizardStepProps } from '../types.js';
|
||||
import { WIZARD_STEPS } from '../constants.js';
|
||||
import { getStepKind } from '../utils.js';
|
||||
import { Config } from '@qwen-code/qwen-code-core';
|
||||
import type { Config } from '@qwen-code/qwen-code-core';
|
||||
import { Colors } from '../../../colors.js';
|
||||
import { theme } from '../../../semantic-colors.js';
|
||||
import { TextEntryStep } from './TextEntryStep.js';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { Box, Text } from 'ink';
|
||||
import { RadioButtonSelect } from '../../shared/RadioButtonSelect.js';
|
||||
import { ColorOption } from '../types.js';
|
||||
import { type ColorOption } from '../types.js';
|
||||
import { Colors } from '../../../colors.js';
|
||||
import { COLOR_OPTIONS } from '../constants.js';
|
||||
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
|
||||
import { useCallback, useState, useEffect } from 'react';
|
||||
import { Box, Text, useInput } from 'ink';
|
||||
import { WizardStepProps } from '../types.js';
|
||||
import { SubagentManager, SubagentConfig } from '@qwen-code/qwen-code-core';
|
||||
import type { WizardStepProps } from '../types.js';
|
||||
import type {
|
||||
SubagentManager,
|
||||
SubagentConfig,
|
||||
} from '@qwen-code/qwen-code-core';
|
||||
import { theme } from '../../../semantic-colors.js';
|
||||
import { shouldShowColor, getColorForDisplay } from '../utils.js';
|
||||
import { useLaunchEditor } from '../../../hooks/useLaunchEditor.js';
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
import { useCallback, useRef } from 'react';
|
||||
import { Box, Text } from 'ink';
|
||||
import Spinner from 'ink-spinner';
|
||||
import { WizardStepProps, WizardAction } from '../types.js';
|
||||
import type { WizardStepProps, WizardAction } from '../types.js';
|
||||
import { sanitizeInput } from '../utils.js';
|
||||
import { Config, subagentGenerator } from '@qwen-code/qwen-code-core';
|
||||
import { useKeypress, Key } from '../../../hooks/useKeypress.js';
|
||||
import { type Config, subagentGenerator } from '@qwen-code/qwen-code-core';
|
||||
import { useKeypress, type Key } from '../../../hooks/useKeypress.js';
|
||||
import { keyMatchers, Command } from '../../../keyMatchers.js';
|
||||
import { theme } from '../../../semantic-colors.js';
|
||||
import { Colors } from '../../../colors.js';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import { Box } from 'ink';
|
||||
import { RadioButtonSelect } from '../../shared/RadioButtonSelect.js';
|
||||
import { WizardStepProps } from '../types.js';
|
||||
import type { WizardStepProps } from '../types.js';
|
||||
|
||||
interface GenerationOption {
|
||||
label: string;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import { Box } from 'ink';
|
||||
import { RadioButtonSelect } from '../../shared/RadioButtonSelect.js';
|
||||
import { WizardStepProps } from '../types.js';
|
||||
import type { WizardStepProps } from '../types.js';
|
||||
|
||||
interface LocationOption {
|
||||
label: string;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import { useCallback } from 'react';
|
||||
import { Box, Text } from 'ink';
|
||||
import { WizardStepProps } from '../types.js';
|
||||
import type { WizardStepProps } from '../types.js';
|
||||
import { Colors } from '../../../colors.js';
|
||||
import { TextInput } from '../../shared/TextInput.js';
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
import { useState, useMemo, useEffect } from 'react';
|
||||
import { Box, Text } from 'ink';
|
||||
import { RadioButtonSelect } from '../../shared/RadioButtonSelect.js';
|
||||
import { ToolCategory } from '../types.js';
|
||||
import { Kind, Config } from '@qwen-code/qwen-code-core';
|
||||
import type { ToolCategory } from '../types.js';
|
||||
import { Kind, type Config } from '@qwen-code/qwen-code-core';
|
||||
import { Colors } from '../../../colors.js';
|
||||
|
||||
interface ToolOption {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { useState } from 'react';
|
||||
import { Box } from 'ink';
|
||||
import { RadioButtonSelect } from '../../shared/RadioButtonSelect.js';
|
||||
import { MANAGEMENT_STEPS } from '../types.js';
|
||||
import { SubagentConfig } from '@qwen-code/qwen-code-core';
|
||||
import { type SubagentConfig } from '@qwen-code/qwen-code-core';
|
||||
|
||||
interface ActionSelectionStepProps {
|
||||
selectedAgent: SubagentConfig | null;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
*/
|
||||
|
||||
import { Box, Text } from 'ink';
|
||||
import { SubagentConfig } from '@qwen-code/qwen-code-core';
|
||||
import { StepNavigationProps } from '../types.js';
|
||||
import { type SubagentConfig } from '@qwen-code/qwen-code-core';
|
||||
import type { StepNavigationProps } from '../types.js';
|
||||
import { theme } from '../../../semantic-colors.js';
|
||||
import { useKeypress } from '../../../hooks/useKeypress.js';
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import { RadioButtonSelect } from '../../shared/RadioButtonSelect.js';
|
||||
import { MANAGEMENT_STEPS } from '../types.js';
|
||||
import { theme } from '../../../semantic-colors.js';
|
||||
import { useLaunchEditor } from '../../../hooks/useLaunchEditor.js';
|
||||
import { SubagentConfig } from '@qwen-code/qwen-code-core';
|
||||
import { type SubagentConfig } from '@qwen-code/qwen-code-core';
|
||||
|
||||
interface EditOption {
|
||||
id: string;
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Box, Text } from 'ink';
|
||||
import { theme } from '../../../semantic-colors.js';
|
||||
import { Colors } from '../../../colors.js';
|
||||
import { useKeypress } from '../../../hooks/useKeypress.js';
|
||||
import { SubagentConfig } from '@qwen-code/qwen-code-core';
|
||||
import { type SubagentConfig } from '@qwen-code/qwen-code-core';
|
||||
|
||||
interface NavigationState {
|
||||
currentBlock: 'project' | 'user' | 'builtin';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
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';
|
||||
import { type SubagentConfig } from '@qwen-code/qwen-code-core';
|
||||
|
||||
interface AgentViewerStepProps {
|
||||
selectedAgent: SubagentConfig | null;
|
||||
|
||||
@@ -17,7 +17,7 @@ import { MANAGEMENT_STEPS } from '../types.js';
|
||||
import { Colors } from '../../../colors.js';
|
||||
import { theme } from '../../../semantic-colors.js';
|
||||
import { getColorForDisplay, shouldShowColor } from '../utils.js';
|
||||
import { Config, SubagentConfig } from '@qwen-code/qwen-code-core';
|
||||
import type { SubagentConfig, Config } from '@qwen-code/qwen-code-core';
|
||||
import { useKeypress } from '../../../hooks/useKeypress.js';
|
||||
|
||||
interface AgentsManagerDialogProps {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { CreationWizardState, WizardAction } from './types.js';
|
||||
import { type CreationWizardState, type WizardAction } from './types.js';
|
||||
import { WIZARD_STEPS } from './constants.js';
|
||||
import { getStepKind, getTotalSteps } from './utils.js';
|
||||
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import { Box, Text } from 'ink';
|
||||
import { Colors } from '../../../colors.js';
|
||||
import {
|
||||
import type {
|
||||
TaskResultDisplay,
|
||||
SubagentStatsSummary,
|
||||
Config,
|
||||
} from '@qwen-code/qwen-code-core';
|
||||
import { theme } from '../../../semantic-colors.js';
|
||||
import { useKeypress } from '../../../hooks/useKeypress.js';
|
||||
@@ -23,6 +24,7 @@ export interface AgentExecutionDisplayProps {
|
||||
data: TaskResultDisplay;
|
||||
availableHeight?: number;
|
||||
childWidth: number;
|
||||
config: Config;
|
||||
}
|
||||
|
||||
const getStatusColor = (
|
||||
@@ -76,8 +78,9 @@ export const AgentExecutionDisplay: React.FC<AgentExecutionDisplayProps> = ({
|
||||
data,
|
||||
availableHeight,
|
||||
childWidth,
|
||||
}: AgentExecutionDisplayProps) => {
|
||||
const [displayMode, setDisplayMode] = React.useState<DisplayMode>('compact');
|
||||
config,
|
||||
}) => {
|
||||
const [displayMode, setDisplayMode] = React.useState<DisplayMode>('default');
|
||||
|
||||
const agentColor = useMemo(() => {
|
||||
const colorOption = COLOR_OPTIONS.find(
|
||||
@@ -157,6 +160,7 @@ export const AgentExecutionDisplay: React.FC<AgentExecutionDisplayProps> = ({
|
||||
availableTerminalHeight={availableHeight}
|
||||
terminalWidth={childWidth}
|
||||
compactMode={true}
|
||||
config={config}
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
@@ -199,6 +203,7 @@ export const AgentExecutionDisplay: React.FC<AgentExecutionDisplayProps> = ({
|
||||
<Box flexDirection="column">
|
||||
<ToolConfirmationMessage
|
||||
confirmationDetails={data.pendingConfirmation}
|
||||
config={config}
|
||||
isFocused={true}
|
||||
availableTerminalHeight={availableHeight}
|
||||
terminalWidth={childWidth}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { SubagentLevel, Config } from '@qwen-code/qwen-code-core';
|
||||
import type { SubagentLevel, Config } from '@qwen-code/qwen-code-core';
|
||||
|
||||
/**
|
||||
* State management for the subagent creation wizard.
|
||||
|
||||
Reference in New Issue
Block a user