File tree Expand file tree Collapse file tree 1 file changed +21
-7
lines changed
src/routes/page/conversation Expand file tree Collapse file tree 1 file changed +21
-7
lines changed Original file line number Diff line number Diff line change 102102 };
103103
104104 isLoading = true ;
105- Promise .all ([
106- loadAgentOptions (),
107- loadSearchOption (),
108- loadConversations ()])
109- .finally (() => {
110- isLoading = false
111- });
105+ try {
106+ const [agents ] = await Promise .all ([
107+ loadAgentOptions (),
108+ loadSearchOption ()
109+ ]);
110+
111+ searchOption = {
112+ ... searchOption,
113+ agentIds: agents? .length > 0 ? [agents[0 ].value ] : []
114+ };
115+ filter = {
116+ ... filter,
117+ agentIds: searchOption .agentIds
118+ };
119+
120+ await loadConversations ();
121+ } catch (error) {
122+ console .error (' Error loading conversation data:' , error);
123+ } finally {
124+ isLoading = false ;
125+ }
112126 });
113127
114128 function loadConversations () {
You can’t perform that action at this time.
0 commit comments