Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Merge branch 'master' into edit

Tomas Valentab29be5d90fdf
diff --cc components/Editor/Sidebar/Logs/Tool/Curl.tsx
index 000000000,999c2f80b..999c2f80b
mode 000000,100644..100644
--- a/components/Editor/Sidebar/Logs/Tool/Curl.tsx
+++ b/components/Editor/Sidebar/Logs/Tool/Curl.tsx
diff --cc components/Editor/Sidebar/Logs/Tool/CurlServer.tsx
index 4b7ceaa55,000000000..999c2f80b
mode 100644,000000..100644
--- a/components/Editor/Sidebar/Logs/Tool/CurlServer.tsx
+++ b/components/Editor/Sidebar/Logs/Tool/CurlServer.tsx
@@@ -1,44 -1,0 +1,44 @@@
+import {
+ ReactNode
+} from 'react'
+import {
- TerminalSquare,
++ Terminal,
+} from 'lucide-react'
+
+import { ToolName, ToolLog } from 'db/types'
+
+import Base from './Base'
+
+
+export interface Props {
+ log: ToolLog
+}
+
- function CurlServer({
++function Curl({
+ log,
+}: Props) {
- if (log.tool_name !== ToolName.CurlJavaScriptServer) throw new Error(`'${log.tool_name}': This component supports only logs for '${ToolName.CurlJavaScriptServer}' tool`)
++ if (log.tool_name !== ToolName.Curl) throw new Error(`'${log.tool_name}': This component supports only logs for '${ToolName.Curl}' tool`)
+
+ let body: ReactNode = null
+ if (log.tool_input.trim()) {
+ body = (
+ <div className="
+ pt-2
+ ">
+ <pre>
+ {log.tool_input.trim()}
+ </pre>
+ </div>
+ )
+ }
+
+ return (
+ <Base
+ log={log}
- icon={<TerminalSquare size="16px" />}
++ icon={<Terminal size="16px" />}
+ body={body}
+ />
+ )
+}
+
- export default CurlServer
++export default Curl
diff --cc components/Editor/Sidebar/Logs/Tool/RunSavedCode.tsx
index 000000000,000000000..a4babc2ed
new file mode 100644
--- /dev/null
+++ b/components/Editor/Sidebar/Logs/Tool/RunSavedCode.tsx
@@@ -1,0 -1,0 +1,44 @@@
++import {
++ ReactNode
++} from 'react'
++import {
++ Code2,
++} from 'lucide-react'
++
++import { ToolName, ToolLog } from 'db/types'
++
++import Base from './Base'
++
++
++export interface Props {
++ log: ToolLog
++}
++
++function RunSavedCode({
++ log,
++}: Props) {
++ if (log.tool_name !== ToolName.RunSavedCode) throw new Error(`'${log.tool_name}': This component supports only logs for '${ToolName.WriteJavaScriptCode}' tool`)
++
++ let body: ReactNode = null
++ if (log.tool_input.trim()) {
++ body = (
++ <div className="
++ pt-2
++ ">
++ <pre>
++ {log.tool_input.trim()}
++ </pre>
++ </div>
++ )
++ }
++
++ return (
++ <Base
++ log={log}
++ icon={<Code2 size="16px" />}
++ body={body}
++ />
++ )
++}
++
++export default RunSavedCode
diff --cc components/Editor/Sidebar/Logs/Tool/WriteCode.tsx
index 000000000,ba021a14f..ba021a14f
mode 000000,100644..100644
--- a/components/Editor/Sidebar/Logs/Tool/WriteCode.tsx
+++ b/components/Editor/Sidebar/Logs/Tool/WriteCode.tsx