refactor: remove stepCounterRef prop and manage step counter internally

This commit is contained in:
dayuan.jiang
2025-03-25 04:23:38 +00:00
parent dedb5855c3
commit 21537f6e7b
2 changed files with 18 additions and 16 deletions

View File

@@ -27,7 +27,7 @@ export default function ChatPanel({
onAddToHistory = () => {},
}: ChatPanelProps) {
// Add a step counter to track updates
const stepCounterRef = useRef<number>(0);
// Add state for file attachments
const [files, setFiles] = useState<FileList | undefined>(undefined);
// Add state for showing the history dialog
@@ -109,7 +109,6 @@ export default function ChatPanel({
setInput={setInput}
setFiles={handleFileChange}
onDisplayChart={onDisplayChart}
stepCounterRef={stepCounterRef}
/>
</CardContent>