2026-11-10 01:24:28 +08:00
|
|
|
package client
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
|
|
|
|
|
localruntime "cursor/internal/runtime"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// runtimeConfigSnapshot 用于处理与 runtimeConfigSnapshot 相关的逻辑。
|
|
|
|
|
func (s *ProxyService) runtimeConfigSnapshot(_ context.Context) (localruntime.RuntimeConfigSnapshot, error) {
|
|
|
|
|
if s == nil {
|
|
|
|
|
return localruntime.RuntimeConfigSnapshot{}, nil
|
|
|
|
|
}
|
2026-11-10 09:59:34 +08:00
|
|
|
if s.backend() != nil && s.backend().ConfigManager() != nil {
|
|
|
|
|
return s.backend().ConfigManager().LegacyRuntimeSnapshot(context.Background())
|
2026-11-10 01:24:28 +08:00
|
|
|
}
|
|
|
|
|
if s.store == nil {
|
|
|
|
|
return localruntime.RuntimeConfigSnapshot{}, nil
|
|
|
|
|
}
|
|
|
|
|
return s.store.LegacyRuntimeSnapshot(context.Background())
|
|
|
|
|
}
|