mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-19 06:45:50 +00:00
style: 完成所有文件的lint
This commit is contained in:
@@ -1,27 +1,21 @@
|
||||
import * as React from 'react'
|
||||
import type {
|
||||
CommandResultDisplay,
|
||||
LocalJSXCommandContext,
|
||||
} from '../../commands.js'
|
||||
import { Feedback } from '../../components/Feedback.js'
|
||||
import type { LocalJSXCommandOnDone } from '../../types/command.js'
|
||||
import type { Message } from '../../types/message.js'
|
||||
import * as React from 'react';
|
||||
import type { CommandResultDisplay, LocalJSXCommandContext } from '../../commands.js';
|
||||
import { Feedback } from '../../components/Feedback.js';
|
||||
import type { LocalJSXCommandOnDone } from '../../types/command.js';
|
||||
import type { Message } from '../../types/message.js';
|
||||
|
||||
// Shared function to render the Feedback component
|
||||
export function renderFeedbackComponent(
|
||||
onDone: (
|
||||
result?: string,
|
||||
options?: { display?: CommandResultDisplay },
|
||||
) => void,
|
||||
onDone: (result?: string, options?: { display?: CommandResultDisplay }) => void,
|
||||
abortSignal: AbortSignal,
|
||||
messages: Message[],
|
||||
initialDescription: string = '',
|
||||
backgroundTasks: {
|
||||
[taskId: string]: {
|
||||
type: string
|
||||
identity?: { agentId: string }
|
||||
messages?: Message[]
|
||||
}
|
||||
type: string;
|
||||
identity?: { agentId: string };
|
||||
messages?: Message[];
|
||||
};
|
||||
} = {},
|
||||
): React.ReactNode {
|
||||
return (
|
||||
@@ -32,7 +26,7 @@ export function renderFeedbackComponent(
|
||||
onDone={onDone}
|
||||
backgroundTasks={backgroundTasks}
|
||||
/>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export async function call(
|
||||
@@ -40,11 +34,6 @@ export async function call(
|
||||
context: LocalJSXCommandContext,
|
||||
args?: string,
|
||||
): Promise<React.ReactNode> {
|
||||
const initialDescription = args || ''
|
||||
return renderFeedbackComponent(
|
||||
onDone,
|
||||
context.abortController.signal,
|
||||
context.messages,
|
||||
initialDescription,
|
||||
)
|
||||
const initialDescription = args || '';
|
||||
return renderFeedbackComponent(onDone, context.abortController.signal, context.messages, initialDescription);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user