Spaces:
Build error
Build error
fix: Remove unused setDiffBuffer calls
Browse files
src/components/ask-ai/ask-ai.tsx
CHANGED
|
@@ -222,7 +222,6 @@ function AskAI({
|
|
| 222 |
console.error("[AI Response] Stream ended with incomplete diff block:", finalRemaining);
|
| 223 |
toast.error("AI response ended with an incomplete change block.");
|
| 224 |
}
|
| 225 |
-
setDiffBuffer(""); // Clear state buffer
|
| 226 |
}
|
| 227 |
// Final update for full HTML mode
|
| 228 |
if (responseType === 'full') {
|
|
@@ -253,7 +252,6 @@ function AskAI({
|
|
| 253 |
currentDiffBuffer += chunk;
|
| 254 |
const remaining = processDiffBuffer(currentDiffBuffer, editorRef.current);
|
| 255 |
currentDiffBuffer = remaining; // Update local buffer with unprocessed part
|
| 256 |
-
setDiffBuffer(currentDiffBuffer); // Update state for potential display/debugging
|
| 257 |
} else {
|
| 258 |
// --- Full HTML Mode ---
|
| 259 |
fullContentResponse += chunk;
|
|
|
|
| 222 |
console.error("[AI Response] Stream ended with incomplete diff block:", finalRemaining);
|
| 223 |
toast.error("AI response ended with an incomplete change block.");
|
| 224 |
}
|
|
|
|
| 225 |
}
|
| 226 |
// Final update for full HTML mode
|
| 227 |
if (responseType === 'full') {
|
|
|
|
| 252 |
currentDiffBuffer += chunk;
|
| 253 |
const remaining = processDiffBuffer(currentDiffBuffer, editorRef.current);
|
| 254 |
currentDiffBuffer = remaining; // Update local buffer with unprocessed part
|
|
|
|
| 255 |
} else {
|
| 256 |
// --- Full HTML Mode ---
|
| 257 |
fullContentResponse += chunk;
|