Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Use db logs

Tomas Valentab7a483c9679d
diff --git a/pages/log/[logFileID].tsx b/pages/log/[logFileID].tsx
index 8a8720b31..bbec39b36 100644
--- a/pages/log/[logFileID].tsx
+++ b/pages/log/[logFileID].tsx
@@ -7,9 +7,6 @@ import { prisma } from 'db/prisma'
import { serverCreds } from 'db/credentials'
-import testLogs from './logfile.json'
-
-
interface PathProps extends ParsedUrlQuery {
logFileID: string
}
@@ -113,13 +110,7 @@ export interface Props {
logFile: LogFile & { content: AgentLogs }
}
-function LogFile({ logFile: log }: Props) {
- const logFile: Props['logFile'] = {
- id: 'test',
- name: 'test.json',
- content: testLogs as any as AgentLogs,
- }
-
+function LogFile({ logFile }: Props) {
return (
<main className="overflow-hidden flex flex-col max-h-full">
<header className="flex items-center justify-between p-4 sm:p-6 lg:px-8">
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 980921f5d..44f80267a 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -307,7 +307,7 @@ model flow_state {
/// This model contains row level security and requires additional setup for migrations. Visit https://pris.ly/d/row-level-security for more info.
model logs {
- id String @id @db.Uuid
+ id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
created_at DateTime? @default(now()) @db.Timestamptz(6)
data Json[]
project_id String