🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(seeder): make the demo seeder import-safe outside a monorepo checkout (#15070)
Max Deichmann072b78f27cea
diff --git a/packages/shared/scripts/seeder/seed-postgres.ts b/packages/shared/scripts/seeder/seed-postgres.tsindex 408d3933c8..e0901eda77 100644--- a/packages/shared/scripts/seeder/seed-postgres.ts+++ b/packages/shared/scripts/seeder/seed-postgres.ts@@ -49,10 +49,20 @@ const IN_APP_AGENT_SYSTEM_PROMPT_PATH = resolve("web/src/ee/features/in-app-agent/prompts/in-app-agent-system-prompt.txt",);-const inAppAgentSystemPrompt = readFileSync(- IN_APP_AGENT_SYSTEM_PROMPT_PATH,- "utf-8",-);+// The path above resolves to `web/src` relative to this file, which only exists+// in a monorepo checkout. In built/published packages (e.g. the worker image+// that runs the seeder in deployed environments) the web source isn't present,+// so fall back to an empty prompt instead of throwing at import time — the+// in-app-agent demo prompt is optional seed content.+let inAppAgentSystemPrompt = "";+try {+ inAppAgentSystemPrompt = readFileSync(+ IN_APP_AGENT_SYSTEM_PROMPT_PATH,+ "utf-8",+ );+} catch {+ inAppAgentSystemPrompt = "";+}async function main() {const environment = parseArgs({