mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
fix: type errors
This commit is contained in:
@@ -13,7 +13,7 @@ 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';
|
||||
|
||||
@@ -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,8 @@
|
||||
|
||||
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 { SubagentManager, type 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 { 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,7 +7,7 @@
|
||||
import { useState, useMemo, useEffect } from 'react';
|
||||
import { Box, Text } from 'ink';
|
||||
import { RadioButtonSelect } from '../../shared/RadioButtonSelect.js';
|
||||
import { ToolCategory } from '../types.js';
|
||||
import type { ToolCategory } from '../types.js';
|
||||
import { Kind, Config } from '@qwen-code/qwen-code-core';
|
||||
import { Colors } from '../../../colors.js';
|
||||
|
||||
|
||||
@@ -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;
|
||||
@@ -35,8 +35,8 @@ export const ActionSelectionStep = ({
|
||||
|
||||
const actions = selectedAgent?.isBuiltin
|
||||
? allActions.filter(
|
||||
(action) => action.value === 'view' || action.value === 'back',
|
||||
)
|
||||
(action) => action.value === 'view' || action.value === 'back',
|
||||
)
|
||||
: allActions;
|
||||
|
||||
const handleActionSelect = (value: 'view' | 'edit' | 'delete' | 'back') => {
|
||||
|
||||
@@ -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';
|
||||
@@ -318,12 +318,12 @@ export const AgentSelectionStep = ({
|
||||
{(projectAgents.length > 0 ||
|
||||
userAgents.length > 0 ||
|
||||
builtinAgents.length > 0) && (
|
||||
<Box marginTop={1}>
|
||||
<Text color={theme.text.secondary}>
|
||||
Using: {enabledAgentsCount} agents
|
||||
</Text>
|
||||
</Box>
|
||||
)}
|
||||
<Box marginTop={1}>
|
||||
<Text color={theme.text.secondary}>
|
||||
Using: {enabledAgentsCount} agents
|
||||
</Text>
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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 { Config, type SubagentConfig } from '@qwen-code/qwen-code-core';
|
||||
|
||||
interface AgentsManagerDialogProps {
|
||||
onClose: () => void;
|
||||
@@ -170,8 +170,8 @@ export function AgentsManagerDialog({
|
||||
// Use agent color for the Agent Viewer header
|
||||
const headerColor =
|
||||
currentStep === MANAGEMENT_STEPS.AGENT_VIEWER &&
|
||||
selectedAgent &&
|
||||
shouldShowColor(selectedAgent.color)
|
||||
selectedAgent &&
|
||||
shouldShowColor(selectedAgent.color)
|
||||
? getColorForDisplay(selectedAgent.color)
|
||||
: undefined;
|
||||
|
||||
|
||||
@@ -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,7 +7,7 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import { Box, Text } from 'ink';
|
||||
import { Colors } from '../../../colors.js';
|
||||
import {
|
||||
import type {
|
||||
TaskResultDisplay,
|
||||
SubagentStatsSummary,
|
||||
} from '@qwen-code/qwen-code-core';
|
||||
@@ -163,8 +163,8 @@ export const AgentExecutionDisplay: React.FC<AgentExecutionDisplayProps> = ({
|
||||
{(data.status === 'completed' ||
|
||||
data.status === 'failed' ||
|
||||
data.status === 'cancelled') && (
|
||||
<ResultsSection data={data} displayMode={displayMode} />
|
||||
)}
|
||||
<ResultsSection data={data} displayMode={displayMode} />
|
||||
)}
|
||||
|
||||
{/* Footer with keyboard shortcuts */}
|
||||
{footerText && (
|
||||
|
||||
@@ -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