feat: implement Agent Chat Widget for entity pages

TASK_PHASE_AGENT_CHAT_WIDGET_MVP.md completed:

Backend:
- Add /api/v1/agents/{agent_id}/chat-room endpoint
- Add /api/v1/nodes/{node_id}/chat-room endpoint
- Add /api/v1/microdaos/{slug}/chat-room endpoint

Frontend:
- Create AgentChatWidget.tsx floating chat component
- Integrate into /agents/:agentId page
- Integrate into /nodes/:nodeId page
- Integrate into /microdao/:slug page

Ontology rule implemented:
'No page without agents' = ability to directly talk to agents on that page
This commit is contained in:
Apple
2025-11-30 09:10:45 -08:00
parent fb4a33f016
commit 6297adc0dc
6 changed files with 692 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ import {
NodeStandardComplianceCard
} from '@/components/node-dashboard';
import { NodeGuardianCard } from '@/components/nodes/NodeGuardianCard';
import { AgentChatWidget } from '@/components/chat/AgentChatWidget';
function getNodeLabel(nodeId: string): string {
if (nodeId.includes('node-1')) return 'НОДА1';
@@ -182,6 +183,9 @@ export default function NodeCabinetPage() {
</div>
</div>
</div>
{/* Floating Chat Widget */}
<AgentChatWidget contextType="node" contextId={nodeId} />
);
}
@@ -337,6 +341,9 @@ export default function NodeCabinetPage() {
<ExternalLink className="w-3 h-3" />
</Link>
</div>
{/* Floating Chat Widget */}
<AgentChatWidget contextType="node" contextId={nodeId} />
</div>
);
}