Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Remove useCallback

Tomas Valenta06ebad549d56
diff --git a/components/Editor/Sidebar/Logs/LogEntry.tsx b/components/Editor/Sidebar/Logs/LogEntry.tsx
index 603245c16..f3dc380e4 100644
--- a/components/Editor/Sidebar/Logs/LogEntry.tsx
+++ b/components/Editor/Sidebar/Logs/LogEntry.tsx
@@ -22,7 +22,7 @@ function LogEntry({ log, onAnswer }: Props) {
/>
}
{log.type === LogType.Tool &&
- <Tool
+ <Tool
log={log}
onAnswer={onAnswer}
/>
diff --git a/components/Editor/Sidebar/Logs/index.tsx b/components/Editor/Sidebar/Logs/index.tsx
index b1d27c181..4cf9d6fc7 100644
--- a/components/Editor/Sidebar/Logs/index.tsx
+++ b/components/Editor/Sidebar/Logs/index.tsx
@@ -45,8 +45,7 @@ function Logs({
// }
// }, [logs, selectedTab])
-
- const saveAnswer = useCallback(async (logID: string, answer: string) => {
+ async function saveAnswer(logID: string, answer: string) {
console.log('BEFORE', { logID, answer })
if (!deployment) return
@@ -64,7 +63,7 @@ function Logs({
console.log('LOGS', logs)
await client.from(deploymentsTable).update({ logs: logs as unknown as Json[] }).eq('id', deployment.id).single()
- }, [deployment, client])
+ }
return (
<div className="