mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-23 00:35:51 +00:00
style: 完成所有文件的lint
This commit is contained in:
@@ -1,28 +1,27 @@
|
||||
import React, { type ReactNode } from 'react'
|
||||
import type { Tools } from '../../../../Tool.js'
|
||||
import { Byline, KeyboardShortcutHint } from '@anthropic/ink'
|
||||
import { ConfigurableShortcutHint } from '../../../ConfigurableShortcutHint.js'
|
||||
import { useWizard } from '../../../wizard/index.js'
|
||||
import { WizardDialogLayout } from '../../../wizard/WizardDialogLayout.js'
|
||||
import { ToolSelector } from '../../ToolSelector.js'
|
||||
import type { AgentWizardData } from '../types.js'
|
||||
import React, { type ReactNode } from 'react';
|
||||
import type { Tools } from '../../../../Tool.js';
|
||||
import { Byline, KeyboardShortcutHint } from '@anthropic/ink';
|
||||
import { ConfigurableShortcutHint } from '../../../ConfigurableShortcutHint.js';
|
||||
import { useWizard } from '../../../wizard/index.js';
|
||||
import { WizardDialogLayout } from '../../../wizard/WizardDialogLayout.js';
|
||||
import { ToolSelector } from '../../ToolSelector.js';
|
||||
import type { AgentWizardData } from '../types.js';
|
||||
|
||||
type Props = {
|
||||
tools: Tools
|
||||
}
|
||||
tools: Tools;
|
||||
};
|
||||
|
||||
export function ToolsStep({ tools }: Props): ReactNode {
|
||||
const { goNext, goBack, updateWizardData, wizardData } =
|
||||
useWizard<AgentWizardData>()
|
||||
const { goNext, goBack, updateWizardData, wizardData } = useWizard<AgentWizardData>();
|
||||
|
||||
const handleComplete = (selectedTools: string[] | undefined): void => {
|
||||
updateWizardData({ selectedTools })
|
||||
goNext()
|
||||
}
|
||||
updateWizardData({ selectedTools });
|
||||
goNext();
|
||||
};
|
||||
|
||||
// Pass through undefined to preserve "all tools" semantic
|
||||
// ToolSelector will expand it internally for display purposes
|
||||
const initialTools = wizardData.selectedTools
|
||||
const initialTools = wizardData.selectedTools;
|
||||
|
||||
return (
|
||||
<WizardDialogLayout
|
||||
@@ -31,21 +30,11 @@ export function ToolsStep({ tools }: Props): ReactNode {
|
||||
<Byline>
|
||||
<KeyboardShortcutHint shortcut="Enter" action="toggle selection" />
|
||||
<KeyboardShortcutHint shortcut="↑↓" action="navigate" />
|
||||
<ConfigurableShortcutHint
|
||||
action="confirm:no"
|
||||
context="Confirmation"
|
||||
fallback="Esc"
|
||||
description="go back"
|
||||
/>
|
||||
<ConfigurableShortcutHint action="confirm:no" context="Confirmation" fallback="Esc" description="go back" />
|
||||
</Byline>
|
||||
}
|
||||
>
|
||||
<ToolSelector
|
||||
tools={tools}
|
||||
initialTools={initialTools}
|
||||
onComplete={handleComplete}
|
||||
onCancel={goBack}
|
||||
/>
|
||||
<ToolSelector tools={tools} initialTools={initialTools} onComplete={handleComplete} onCancel={goBack} />
|
||||
</WizardDialogLayout>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user