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

Function chatKnowledgeEnabled

cli/chat_knowledge.go:37–46  ·  view source on GitHub ↗

chatKnowledgeEnabled reports whether the chat-mode knowledge exception is on. Default is ON when the env var is unset.

()

Source from the content-addressed store, hash-verified

35// chatKnowledgeEnabled reports whether the chat-mode knowledge exception is
36// on. Default is ON when the env var is unset.
37func chatKnowledgeEnabled() bool {
38 switch strings.ToLower(strings.TrimSpace(os.Getenv(chatKnowledgeEnvVar))) {
39 case "false", "0", "off", "no":
40 return false
41 case "true", "1", "on", "yes":
42 return true
43 default:
44 return true // default ON
45 }
46}
47
48// chatKnowledgeActive reports whether the exception applies to THIS turn:
49// enabled and at least one knowledge base attached to the session. Without an

Callers 4

chatKnowledgeActiveMethod · 0.85
configChatKnowledgeMethod · 0.85
showConfigChatMethod · 0.85

Calls

no outgoing calls

Tested by 1