rename agents/main→assistant, role-based default entry agent
Nightly Build / build (push) Successful in 6m31s
Nightly Build / build (push) Successful in 6m31s
This commit is contained in:
@@ -379,6 +379,9 @@ impl Conversation {
|
||||
Arc::clone(&interaction.approval),
|
||||
rt.global_tx.clone(),
|
||||
rt.shutdown_token.clone(),
|
||||
// Inert ownerless bundle (§19): no owner to resolve a role default from, so
|
||||
// the neutral fallback. Nothing consumes this hub's sessions.
|
||||
crate::agents::DEFAULT_CHAT_AGENT.to_string(),
|
||||
);
|
||||
chat_hub.register("web").await;
|
||||
chat_hub.register("talk").await;
|
||||
|
||||
@@ -293,12 +293,20 @@ impl UserContextFactory {
|
||||
Arc::new(ToolDiscovery::new(Arc::clone(&self.registry_pool))),
|
||||
));
|
||||
|
||||
// The owner's default entry agent, snapshotted at login from their role
|
||||
// (like fs membership / MCP access above): every lazy session-creation path
|
||||
// on this owner-bound hub routes through it, so a member's role-assigned
|
||||
// assistant is honored no matter which path opens their first session.
|
||||
let default_agent =
|
||||
crate::db::roles::default_chat_agent_for_user(&self.registry_pool, user_id).await;
|
||||
|
||||
let chat_hub = ChatHub::new(
|
||||
Arc::clone(&pool),
|
||||
Arc::clone(&manager),
|
||||
Arc::clone(&approval),
|
||||
global_tx.clone(),
|
||||
self.shutdown_token.clone(),
|
||||
default_agent,
|
||||
);
|
||||
chat_hub.register("web").await;
|
||||
chat_hub.register("talk").await;
|
||||
|
||||
Reference in New Issue
Block a user