Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Remove old commented out code

Tomas Valentaf98faaaab8b7
diff --git a/components/AgentDeploymentsStepsList.tsx b/components/AgentDeploymentsStepsList.tsx
index c12f5cb97..0085938fc 100644
--- a/components/AgentDeploymentsStepsList.tsx
+++ b/components/AgentDeploymentsStepsList.tsx
@@ -83,36 +83,6 @@ function AgentDeploymentStepsList({
const groupedSteps = useMemo(() => groupSteps(steps), [steps])
- // useEffect(function listenToArrowNavigitons() {
- // function handleUpDownKey(e: KeyboardEvent) {
- // const currentGroupIdx = groupedSteps.findIndex((group) => group.steps.some((step) => step.id === selectedStepID))
- // if (currentGroupIdx === undefined) return
- // const currentGroupStepIdx = groupedSteps[currentGroupIdx].steps.findIndex((step) => step.id === selectedStepID)
-
-
-
- // if (e.key === 'ArrowUp') {
- // if (currentGroupStepIdx === 0) {
-
- // }
-
- // if (selectedLogID === 0) {
- // selectLog(logs.length - 1)
- // } else {
- // selectLog(selectedLogID - 1)
- // }
- // } else if (e.key === 'ArrowDown') {
- // if (selectedLogID === logs.length - 1) {
- // selectLog(0)
- // } else {
- // selectLog(selectedLogID + 1)
- // }
- // }
- // }
- // window.addEventListener('keydown', handleUpDownKey)
- // return () => window.removeEventListener('keydown', handleUpDownKey)
- // }, [groupedSteps, selectStep, selectedStepID])
-
return (
<div className="flex flex-col ml-4 overflow-auto">
{steps.length === 0 && (
diff --git a/components/AgentPromptLogDetail.tsx b/components/AgentPromptLogDetail.tsx
index 1706aeaa6..b5c625879 100644
--- a/components/AgentPromptLogDetail.tsx
+++ b/components/AgentPromptLogDetail.tsx
@@ -11,13 +11,13 @@ function handleJSONQuotes(content: string) {
try {
return JSON.parse(content)
} catch (err) {
- // console.log('JSON parse error', err, content)
+ // Don't log anything here, try parsing with quotes replaced
}
try {
return JSON.parse(content.replace(/"/g, '\\"').replace(/'/g, '"'))
} catch (err) {
- // console.log('JSON parse error', err, content)
+ // Don't log anything here, return undefined
}
}
diff --git a/components/AgentPromptLogsList.tsx b/components/AgentPromptLogsList.tsx
index c4c48f095..2a6848533 100644
--- a/components/AgentPromptLogsList.tsx
+++ b/components/AgentPromptLogsList.tsx
@@ -28,7 +28,6 @@ function AgentPromptLogsList({
setSelectedLogIdx(idx)
onSelected(logs[idx])
router.replace({
- // pathname: `/log/${router.query.logFileID}`,
pathname: '',
query: {
...router.query,
diff --git a/components/Filesystem/Dir.tsx b/components/Filesystem/Dir.tsx
index f53cc6c91..cccc8ab20 100644
--- a/components/Filesystem/Dir.tsx
+++ b/components/Filesystem/Dir.tsx
@@ -22,17 +22,6 @@ import {
import { useAddLogUploadTag } from 'hooks/useAddLogUploadTag'
import { useDeleteLogUploadTag } from 'hooks/useDeleteLogUploadTag'
-
-
-
-// export interface CustomProps {
-// tags: [{
-// type: string
-// challenge: string
-// }]
-// }
-// export type Props = DirProps & CustomProps
-
function Dir({
name,
path,
@@ -47,13 +36,6 @@ function Dir({
const [newTagName, setNewTagName] = useState('')
const [, setMetadata] = useMetadata<AgentChallengeTagType[]>(fs, path, 'tags', true)
const tags = metadata?.tags || [] as AgentChallengeTagType[]
- // console.log('metadata', metadata)
-
- // useEffect(() => {
- // if (path === '/20230616_054339_memory_challenge_a_level_3') {
- // setMetadata([{ challengeDir: '20230616_054339_memory_challenge_a_level_3', text: 'challenge', color: 'red' }])
- // }
- // }, [path])
const addTag = useAddLogUploadTag()
const deleteTag = useDeleteLogUploadTag()
diff --git a/components/FilesystemTree.tsx b/components/FilesystemTree.tsx
index 7b351b599..ea3ef7eb1 100644
--- a/components/FilesystemTree.tsx
+++ b/components/FilesystemTree.tsx
@@ -93,7 +93,6 @@ function FilesystemTree({
metadata={n.metadata}
name={n.name}
path={n.path}
- //onSelect={onSelect}
onSelect={handleSelect}
/>
)}
@@ -106,7 +105,6 @@ function FilesystemTree({
metadata={n.metadata}
name={n.name}
path={n.path}
- // onSelect={onSelect}
onSelect={handleSelect}
/>
)}