Skip to content

armgit / E2B

Public Imported from GitHub
0

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

handle empty logs file

Vasek Mlejnsky773660b95625
diff --git a/components/AgentPromptLogsList.tsx b/components/AgentPromptLogsList.tsx
index 1ac44435d..0cd56b4f2 100644
--- a/components/AgentPromptLogsList.tsx
+++ b/components/AgentPromptLogsList.tsx
@@ -72,6 +72,12 @@ function AgentPromptLogsList({
<div className="flex-1 flex flex-col space-y-2 max-w-full w-full overflow-hidden">
<h2 className="font-medium text-sm text-gray-500">Logs</h2>
+ {logs.length === 0 && (
+ <div className="flex-1 flex items-center justify-center">
+ <p className="text-gray-400">No logs</p>
+ </div>
+ )}
+
<div className="flex-1 flex flex-col space-y-1 max-w-full w-full overflow-auto">
{logs.map((ctx, idx) => (
<Fragment key={idx}>
diff --git a/pages/log/[logFileID].tsx b/pages/log/[logFileID].tsx
index 228ae7e18..fbe4a9d44 100644
--- a/pages/log/[logFileID].tsx
+++ b/pages/log/[logFileID].tsx
@@ -132,7 +132,6 @@ export const getServerSideProps: GetServerSideProps<Props, PathProps> = async (c
}
function LogFile({ logFile }: Props) {
- console.log('logFile', logFile)
const [isResizing, setIsResizing] = useState(false)
const [sizes, setSizes] = useState([60, 40])
const [selectedLog, setSelectedLog] = useState<SystemPromptLog | UserPromptLog | AssistantPromptLog>()