mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-04 18:20:09 +00:00
fix : use effect
This commit is contained in:
parent
0f09ef92dd
commit
26e5159c1d
2
api.py
2
api.py
@ -175,7 +175,7 @@ async def process_query(request: QueryRequest):
|
||||
agent_name="Unknown",
|
||||
success="false",
|
||||
blocks={},
|
||||
status="Agent working...",
|
||||
status="Ready",
|
||||
timestamp=str(time.time())
|
||||
)
|
||||
if is_generating:
|
||||
|
@ -14,15 +14,13 @@ function App() {
|
||||
const messagesEndRef = useRef(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (!isLoading) {
|
||||
const intervalId = setInterval(() => {
|
||||
checkHealth();
|
||||
fetchLatestAnswer();
|
||||
fetchScreenshot();
|
||||
}, 1500);
|
||||
return () => clearInterval(intervalId);
|
||||
}
|
||||
}, [isLoading, messages]);
|
||||
const intervalId = setInterval(() => {
|
||||
checkHealth();
|
||||
fetchLatestAnswer();
|
||||
fetchScreenshot();
|
||||
}, 1500);
|
||||
return () => clearInterval(intervalId);
|
||||
}, [messages]);
|
||||
|
||||
const checkHealth = async () => {
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user