MCPcopy Create free account
hub / github.com/NoFxAiOS/nofx / GetLanguage

Method GetLanguage

kernel/engine.go:269–279  ·  view source on GitHub ↗

GetLanguage returns the language from config or falls back to auto-detection

()

Source from the content-addressed store, hash-verified

267
268// GetLanguage returns the language from config or falls back to auto-detection
269func (e *StrategyEngine) GetLanguage() Language {
270 switch e.config.Language {
271 case "zh":
272 return LangChinese
273 case "en":
274 return LangEnglish
275 default:
276 // Fall back to auto-detection from prompt content for backward compatibility
277 return detectLanguage(e.config.PromptSections.RoleDefinition)
278 }
279}
280
281// GetConfig gets complete strategy configuration
282func (e *StrategyEngine) GetConfig() *store.StrategyConfig {

Callers 1

BuildUserPromptMethod · 0.95

Calls 1

detectLanguageFunction · 0.85

Tested by

no test coverage detected