@@ -99,7 +99,7 @@ export function applySettingsFromUrl(host: SettingsHost) {
9999 if ( passwordRaw != null ) {
100100 const password = passwordRaw . trim ( ) ;
101101 if ( password ) {
102- ( host as { password : string } ) . password = password ;
102+ ( host as unknown as { password : string } ) . password = password ;
103103 }
104104 params . delete ( "password" ) ;
105105 shouldCleanUrl = true ;
@@ -189,23 +189,24 @@ export async function refreshActiveTab(host: SettingsHost) {
189189 await loadSkills ( host as unknown as OpenClawApp ) ;
190190 }
191191 if ( host . tab === "agents" ) {
192- await loadAgents ( host as unknown as OpenClawApp ) ;
193- await loadConfig ( host as unknown as OpenClawApp ) ;
194- const agentIds = host . agentsList ?. agents ?. map ( ( entry ) => entry . id ) ?? [ ] ;
192+ const app = host as unknown as OpenClawApp ;
193+ await loadAgents ( app ) ;
194+ await loadConfig ( app ) ;
195+ const agentIds = app . agentsList ?. agents ?. map ( ( entry ) => entry . id ) ?? [ ] ;
195196 if ( agentIds . length > 0 ) {
196- void loadAgentIdentities ( host as unknown as OpenClawApp , agentIds ) ;
197+ void loadAgentIdentities ( app , agentIds ) ;
197198 }
198199 const agentId =
199- host . agentsSelectedId ?? host . agentsList ?. defaultId ?? host . agentsList ?. agents ?. [ 0 ] ?. id ;
200+ app . agentsSelectedId ?? app . agentsList ?. defaultId ?? app . agentsList ?. agents ?. [ 0 ] ?. id ;
200201 if ( agentId ) {
201- void loadAgentIdentity ( host as unknown as OpenClawApp , agentId ) ;
202- if ( host . agentsPanel === "skills" ) {
203- void loadAgentSkills ( host as unknown as OpenClawApp , agentId ) ;
202+ void loadAgentIdentity ( app , agentId ) ;
203+ if ( app . agentsPanel === "skills" ) {
204+ void loadAgentSkills ( app , agentId ) ;
204205 }
205- if ( host . agentsPanel === "channels" ) {
206- void loadChannels ( host as unknown as OpenClawApp , false ) ;
206+ if ( app . agentsPanel === "channels" ) {
207+ void loadChannels ( app , false ) ;
207208 }
208- if ( host . agentsPanel === "cron" ) {
209+ if ( app . agentsPanel === "cron" ) {
209210 void loadCron ( host ) ;
210211 }
211212 }
@@ -380,7 +381,7 @@ export function syncUrlWithTab(host: SettingsHost, tab: Tab, replace: boolean) {
380381 }
381382}
382383
383- export function syncUrlWithSessionKey ( host : SettingsHost , sessionKey : string , replace : boolean ) {
384+ export function syncUrlWithSessionKey ( sessionKey : string , replace : boolean ) {
384385 if ( typeof window === "undefined" ) {
385386 return ;
386387 }
0 commit comments