Per-session workspace, tools only when workspace set
- Session has workspace field (absolute path, optional) - ToolService stateless, receives workspace per call - No workspace = no tools sent to API - Removed hardcoded workspace from Program.cs - Workspace field in session edit form
This commit is contained in:
1 parent
002ef293f0
commit
b752c99a64
9 files changed
+50
-40
No files matched your search
@@ -50,8 +50,9 @@ public static class SessionEndpoint
|
||||
var description = body.TryGetProperty("description", out var d) ? d.GetString() : null;
|
||||
var image = body.TryGetProperty("image", out var img) ? img.GetString() : null;
|
||||
var agentId = body.TryGetProperty("agentId", out var a) ? a.GetString() : null;
|
||||
var workspace = body.TryGetProperty("workspace", out var w) ? w.GetString() : null;
|
||||
|
||||
var session = await db.CreateSession(name, description, image, agentId);
|
||||
var session = await db.CreateSession(name, description, image, agentId, workspace);
|
||||
await ctx.Response.WriteAsJsonAsync(session);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user