mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 13:00:52 +08:00
feat(gemini-web): Enable config hot-reload and fix Gem selection
This commit is contained in:
@@ -168,6 +168,8 @@ func (e *GeminiWebExecutor) stateFor(auth *cliproxyauth.Auth) (*geminiwebapi.Gem
|
||||
return nil, fmt.Errorf("gemini-web executor: auth is nil")
|
||||
}
|
||||
if runtime, ok := auth.Runtime.(*geminiWebRuntime); ok && runtime != nil && runtime.state != nil {
|
||||
// Hot-reload: ensure cached state sees the latest config
|
||||
runtime.state.SetConfig(e.cfg)
|
||||
return runtime.state, nil
|
||||
}
|
||||
|
||||
@@ -175,6 +177,8 @@ func (e *GeminiWebExecutor) stateFor(auth *cliproxyauth.Auth) (*geminiwebapi.Gem
|
||||
defer e.mu.Unlock()
|
||||
|
||||
if runtime, ok := auth.Runtime.(*geminiWebRuntime); ok && runtime != nil && runtime.state != nil {
|
||||
// Hot-reload: ensure cached state sees the latest config
|
||||
runtime.state.SetConfig(e.cfg)
|
||||
return runtime.state, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user