@@ -305,15 +305,10 @@ export default function TerminalChat({
|
|||||||
agentRef.current = undefined;
|
agentRef.current = undefined;
|
||||||
forceUpdate(); // re‑render after teardown too
|
forceUpdate(); // re‑render after teardown too
|
||||||
};
|
};
|
||||||
}, [
|
// We intentionally omit 'approvalPolicy' and 'confirmationPrompt' from the deps
|
||||||
model,
|
// so switching modes or showing confirmation dialogs doesn’t tear down the loop.
|
||||||
provider,
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
config,
|
}, [model, provider, config, requestConfirmation, additionalWritableRoots]);
|
||||||
approvalPolicy,
|
|
||||||
confirmationPrompt,
|
|
||||||
requestConfirmation,
|
|
||||||
additionalWritableRoots,
|
|
||||||
]);
|
|
||||||
|
|
||||||
// Whenever loading starts/stops, reset or start a timer — but pause the
|
// Whenever loading starts/stops, reset or start a timer — but pause the
|
||||||
// timer while a confirmation overlay is displayed so we don't trigger a
|
// timer while a confirmation overlay is displayed so we don't trigger a
|
||||||
|
|||||||
Reference in New Issue
Block a user