Agents: CRUD, DB table, session binding, replace model picker
- agents table with name, avatar, description, model, persona, instructions, soft-delete - AgentEndpoint (GET/POST/PUT/DELETE /api/agents) - sessions + chains now reference agent_id - ChatEndpoint resolves agent from session (no agent = no chat) - system prompt built from agent persona + instructions - frontend: agent editor with avatar upload, agent cards on dashboard - session: agent dropdown replaces model picker, choice persisted
This commit is contained in:
1 parent
0cd2d51d32
commit
449c872296
16 files changed
+552
-46
No files matched your search
@@ -61,6 +61,10 @@ public static class SessionEndpoint
|
||||
{
|
||||
await db.UpdateSessionName(sessionId, nameEl.GetString());
|
||||
}
|
||||
if (body.TryGetProperty("agentId", out var agentEl))
|
||||
{
|
||||
await db.UpdateSessionAgent(sessionId, agentEl.GetString());
|
||||
}
|
||||
|
||||
var session = await db.GetSession(sessionId);
|
||||
await ctx.Response.WriteAsJsonAsync(session);
|
||||
|
||||
Reference in new issue
Block a user