feat(frontend): agent resource sections

This commit is contained in:
Shivering Ocelot committed 2026-06-06 21:56:12 -05:00
1 parent a10224d21e
commit 6134c026a6
3 files changed
+82 -80

No files matched your search

+8
View File
@@ -223,6 +223,14 @@ async def start_server(app):
elif action == "get-agents":
await send({'message': "agents retrieved", 'agents': await app.get_agents(user_id), 'nonce': nonce})
elif action == "get-agent-resources":
values = await app.get_agent_resources(body['agentId'], body.get('kind'), body.get('key'))
await send({'resources': [{'kind': r.kind, 'key': r.key, 'value': r.value} for r in values], 'nonce': nonce})
elif action == "save-agent-resource":
await app.save_agent_resource(body['agentId'], body['kind'], body['key'], body['value'])
await send({'message': "resource saved", 'nonce': nonce})
elif action == "get-agent-runs":
await send({
'runs': await app.get_agent_runs(agent_id=body.get('agentId'), user_id=user_id),