MCPcopy Create free account
hub / github.com/diillson/chatcli / hydeProviderForSession

Method hydeProviderForSession

cli/hyde_setup.go:36–44  ·  view source on GitHub ↗

hydeProviderForSession returns the embedding provider configured via CHATCLI_EMBED_PROVIDER, instantiating it on first use. Returns the null provider when nothing is configured or when construction fails (logged once per build).

()

Source from the content-addressed store, hash-verified

34// the null provider when nothing is configured or when construction
35// fails (logged once per build).
36func (cli *ChatCLI) hydeProviderForSession() embedding.Provider {
37 hydeMu.Lock()
38 defer hydeMu.Unlock()
39 if !hydeProviderReady {
40 hydeProvider = cli.buildEmbeddingProviderLocked()
41 hydeProviderReady = true
42 }
43 return hydeProvider
44}
45
46// buildEmbeddingProviderLocked constructs a provider from the current
47// environment. Callers must hold hydeMu.

Calls 3

LockMethod · 0.80
UnlockMethod · 0.80