@@ -111,7 +111,8 @@ async fn start_local_agent_with_preflight(
111111 . iter ( )
112112 . find ( |record| record. pubkey == pubkey)
113113 . ok_or_else ( || format ! ( "agent {pubkey} not found" ) ) ?;
114- build_managed_agent_summary ( app, record, & runtimes)
114+ let personas = load_personas ( app) . unwrap_or_default ( ) ;
115+ build_managed_agent_summary ( app, record, & runtimes, & personas)
115116}
116117
117118/// Build the standard agent JSON payload for provider deploy calls.
@@ -283,9 +284,10 @@ pub fn list_managed_agents(
283284 save_managed_agents ( & app, & records) ?;
284285 }
285286
287+ let personas = load_personas ( & app) . unwrap_or_default ( ) ;
286288 records
287289 . iter ( )
288- . map ( |record| build_managed_agent_summary ( & app, record, & runtimes) )
290+ . map ( |record| build_managed_agent_summary ( & app, record, & runtimes, & personas ) )
289291 . collect ( )
290292}
291293
@@ -565,8 +567,9 @@ pub async fn create_managed_agent(
565567 . iter ( )
566568 . find ( |record| record. pubkey == pubkey)
567569 . ok_or_else ( || "created agent disappeared unexpectedly" . to_string ( ) ) ?;
570+ let personas = load_personas ( & app) . unwrap_or_default ( ) ;
568571 (
569- build_managed_agent_summary ( & app, record, & runtimes) ?,
572+ build_managed_agent_summary ( & app, record, & runtimes, & personas ) ?,
570573 resolved_avatar_url,
571574 )
572575 } ;
@@ -595,7 +598,8 @@ pub async fn create_managed_agent(
595598 . iter ( )
596599 . find ( |record| record. pubkey == pubkey)
597600 . ok_or_else ( || "created agent disappeared unexpectedly" . to_string ( ) ) ?;
598- build_managed_agent_summary ( & app, record, & runtimes) ?
601+ let personas = load_personas ( & app) . unwrap_or_default ( ) ;
602+ build_managed_agent_summary ( & app, record, & runtimes, & personas) ?
599603 }
600604 }
601605 } else {
@@ -681,7 +685,8 @@ pub async fn create_managed_agent(
681685 . iter ( )
682686 . find ( |r| r. pubkey == pubkey)
683687 . ok_or_else ( || "agent disappeared" . to_string ( ) ) ?;
684- build_managed_agent_summary ( & app, record, & runtimes) ?
688+ let personas = load_personas ( & app) . unwrap_or_default ( ) ;
689+ build_managed_agent_summary ( & app, record, & runtimes, & personas) ?
685690 } else {
686691 agent
687692 } ;
@@ -811,7 +816,8 @@ pub async fn start_managed_agent(
811816 . iter ( )
812817 . find ( |r| r. pubkey == pubkey)
813818 . ok_or_else ( || format ! ( "agent {pubkey} not found" ) ) ?;
814- build_managed_agent_summary ( & app, record, & runtimes)
819+ let personas = load_personas ( & app) . unwrap_or_default ( ) ;
820+ build_managed_agent_summary ( & app, record, & runtimes, & personas)
815821 }
816822 StartTarget :: Provider { backend, .. } => Err ( format ! (
817823 "agent {pubkey} has unsupported backend kind: {backend:?}"
@@ -1003,7 +1009,8 @@ pub fn stop_managed_agent(
10031009 . iter ( )
10041010 . find ( |record| record. pubkey == pubkey)
10051011 . ok_or_else ( || format ! ( "agent {pubkey} not found" ) ) ?;
1006- build_managed_agent_summary ( & app, record, & runtimes)
1012+ let personas = load_personas ( & app) . unwrap_or_default ( ) ;
1013+ build_managed_agent_summary ( & app, record, & runtimes, & personas)
10071014}
10081015
10091016#[ tauri:: command]
0 commit comments