+ {children}
+
+ ) : (
+
+ {children}
+
+ );
+ },
+ },
+});
+```
+
+## Environment Variables
+
+ALWAYS use environment variables:
+
+```bash
+# .env.local
+ECHO_APP_ID=your_echo_app_id
+NEXT_PUBLIC_ECHO_APP_ID=your_echo_app_id
+```
+
+NEVER hardcode credentials:
+
+```typescript
+// ✅ CORRECT
+const appId = process.env.ECHO_APP_ID!;
+
+// ❌ INCORRECT
+const appId = 'echo_app_123abc';
+```
+
+## TypeScript Types
+
+### Message and Tool Types
+
+ALWAYS define strict types:
+
+```typescript
+// src/lib/types.ts
+export interface ChatMessage {
+ id: string;
+ role: 'user' | 'assistant' | 'system';
+ content: string;
+ createdAt: number;
+ toolCalls?: ToolCall[];
+}
+
+export interface ToolCall {
+ id: string;
+ name: string;
+ arguments: Record{image.prompt}
+{job.progress}%
+ + {job.status === 'completed' && job.videoUrl && ( + + )} + + {job.status === 'failed' && ( +{job.error}
+ )} +{error.message}
+ +{image.prompt}
+ +{image.prompt}
+{image.prompt}
+{image.prompt}
+