SurfSense/surfsense_browser_extension/sidepanel/chat/ChatMessages.tsx
API Test Bot a052b01a68 docs: update PRD with comprehensive extension features and UX integration strategy
- Added UX strategy: Extension for Quick Actions, Frontend for Management
- Organized features into 4 phases (Phase 1 completed)
- Added 14 new extension features (FR-EXT-07 to FR-EXT-17):
  * Smart Monitoring: Price alerts, whale tracking, rug pull detection
  * Trading Intelligence: Token analysis, entry/exit suggestions, portfolio tracker
  * Content Creation: Chart screenshots, AI thread generator
  * Productivity: Quick actions, notifications, keyboard shortcuts
- Added Feature Responsibility Matrix showing Extension vs Frontend roles
- Added Settings Sync strategy (FR-EXT-06) with deep links to frontend
- Documented state sync architecture: Extension ↔ Backend API ↔ Frontend
2026-02-01 21:32:06 +07:00

33 lines
1 KiB
TypeScript

/**
* Chat messages display component
*/
export function ChatMessages({ messages }: { messages: any[] }) {
if (messages.length === 0) {
return (
<div className="flex items-center justify-center h-full text-muted-foreground">
<p>Start a conversation...</p>
</div>
);
}
return (
<div className="p-4 space-y-4">
{messages.map((message) => (
<div
key={message.id}
className={`flex ${message.role === "user" ? "justify-end" : "justify-start"
}`}
>
<div
className={`max-w-[80%] rounded-lg p-3 ${message.role === "user"
? "bg-primary text-primary-foreground"
: "bg-muted"
}`}
>
<p className="text-sm">{message.content}</p>
</div>
</div>
))}
</div>
);
}