feat: Public-Flag für Agents + verfügbare Agents/Bots Endpoints erweitert
- AgentRecord: neues IsPublic-Feld mit DB-Migration - GET /api/agents/available: eigene + public Agents (alle Properties + isOwner) - GET /api/telegram/bots/available: alle Properties außer Token/Secret + sessionCount - Agent-Page: Public-Checkbox (andere User können Agent in Sessions verwenden) - Dashboard: agentMap aus availableAgents gebaut (public Agents fremder User auflösbar) - Session-Page + Cronjob-Page: Agent-Picker nutzt /available statt /agents - Agent-Cards: Public- und Fremd-Badges - Fix: Chat-Button bei Sessions mit public Agent eines anderen Users nicht mehr disabled
This commit is contained in:
1 parent
ec73ccd71e
commit
b0d8bef5ea
11 files changed
+90
-10
No files matched your search
@@ -68,6 +68,12 @@ async function apiGetAgents() {
|
||||
return resp.json();
|
||||
}
|
||||
|
||||
async function apiGetAvailableAgents() {
|
||||
const resp = await fetch('/api/agents/available');
|
||||
if (!resp.ok) return [];
|
||||
return resp.json();
|
||||
}
|
||||
|
||||
async function apiGetAgent(agentId) {
|
||||
const resp = await fetch(`/api/agents/${agentId}`);
|
||||
if (!resp.ok) return null;
|
||||
|
||||
Reference in new issue
Block a user