diff --git a/playground/src/Chat.tsx b/playground/src/Chat.tsx index 7b942f0..4cc4113 100644 --- a/playground/src/Chat.tsx +++ b/playground/src/Chat.tsx @@ -62,6 +62,11 @@ export function Chat() { }, ); + // 新增:处理输入变化的回调函数 + const handleInputChange = (value: string) => { + setPrompt(value); + }; + const footer = useMemo(() => { const onClear = () => { setPrompt(""); @@ -104,6 +109,8 @@ export function Chat() {