diff --git a/openclaw/src/index.ts b/openclaw/src/index.ts index 97240222..ea33da74 100644 --- a/openclaw/src/index.ts +++ b/openclaw/src/index.ts @@ -124,7 +124,7 @@ interface ObservationSSEPayload { concepts: string | null; files_read: string | null; files_modified: string | null; - project: string; + project: string | null; prompt_number: number; created_at_epoch: number; } @@ -181,7 +181,7 @@ const AGENT_EMOJI_MAP: Record = { const CLAUDE_CODE_EMOJI = "⌨️"; const OPENCLAW_DEFAULT_EMOJI = "🦀"; -function getSourceLabel(project: string): string { +function getSourceLabel(project: string | null | undefined): string { if (!project) return OPENCLAW_DEFAULT_EMOJI; // OpenClaw agent projects are formatted as "openclaw-" if (project.startsWith("openclaw-")) {