Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Merge branch 'production' into autogpt

Tomas Valentae1d146199596
diff --cc components/AgentLogFilesList.tsx
index 1e5377e22,785d31bf8..07d3fa758
--- a/components/AgentLogFilesList.tsx
+++ b/components/AgentLogFilesList.tsx
@@@ -20,10 -21,9 +20,9 @@@ import
LiteLogUpload,
LiteLogFile,
} from 'utils/agentLogs'
--import Spinner from 'components/Spinner'
import AgentLogFileContent from 'components/AgentLogFileContent'
-import UploadTree from './UploadFiletree'
+import UploadTree from 'components/UploadFiletree'
+import RenameLogUploadButton from 'components/RenameLogUploadButton'
import { useLocalStorage } from 'hooks/useLocalStorage'
export interface Props {
diff --cc components/Filesystem/index.tsx
index 9063c341c,e6f9dd65e..211be1df6
--- a/components/Filesystem/index.tsx
+++ b/components/Filesystem/index.tsx
@@@ -29,8 -28,9 +30,9 @@@ export interface Props
rootPath: string
ignore?: string[]
onFiletreeClick?: (path: string, type: NodeType) => void
- fetchContent: (dirpath: string) => (FileInfo & { id?: string, logUploadID: string })[]
- fetchContent: (dirpath: string) => (FileInfo & { href?: any, id?: string, timestamp?: Date })[]
++ fetchContent: (dirpath: string) => (FileInfo & { href?: any, id?: string, timestamp?: Date, logUploadID: string })[]
expandedPath?: string
+ file?: React.ComponentType<FileProps>
}
function Filesystem({
@@@ -45,16 -46,12 +48,12 @@@
const fetchDirContent = useCallback(async (dirpath: string) => {
const files = fetchContent(dirpath)
const ns = files.map(f => (f.isDir
- ? new DirNode({ name: f.name })
+ ? new DirNode({ name: f.name, metadata: { logUploadID: f.logUploadID } })
: new FileNode({
name: f.name, metadata: {
- href: {
- pathname: '/',
- query: {
- view: 'logs',
- logFileID: f.id,
- }
- }
+ href: f.href,
+ id: f.id,
+ timestamp: f.timestamp,
}
})))
fs.add(dirpath, ns, ignore)
diff --cc components/UploadFiletree.tsx
index 6c0be3803,638dc573c..83e1dcbea
--- a/components/UploadFiletree.tsx
+++ b/components/UploadFiletree.tsx
@@@ -14,7 -14,7 +14,7 @@@ function UploadTree(
log: logUpload,
selectedLogFile,
}: Props) {
- const fetchLogDirContent = useCallback<(dirpath: string) => (FileInfo & { id?: string, logUploadID: string })[]>(dirpath => {
- const fetchLogDirContent = useCallback<(dirpath: string) => (FileInfo & { href?: any })[]>(dirpath => {
++ const fetchLogDirContent = useCallback<(dirpath: string) => (FileInfo & { id?: string, logUploadID: string, href?: any })[]>(dirpath => {
const currentDir = dirpath.slice(1)
const childFiles = logUpload
.log_files
@@@ -48,9 -46,13 +48,16 @@@
...childFiles.map(f => ({
name: f.filename,
isDir: false,
+ id: f.id,
+ tags: [],
+ logUploadID: logUpload.id,
+ href: {
+ pathname: '/',
+ query: {
+ view: 'logs',
+ logFileID: f.id,
+ },
+ },
})),
...Array.from(childDirs).map(dir => ({
name: dir,