MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / ReloadDynamicConfig

Function ReloadDynamicConfig

config/config.go:159–204  ·  view source on GitHub ↗
(current Config)

Source from the content-addressed store, hash-verified

157 }
158 homeDir := userHomeDir()
159 paths, pathsErr := apppaths.ResolveCurrent()
160 if pathsErr != nil {
161 paths, _ = apppaths.Resolve(apppaths.ResolveOptions{GOOS: runtime.GOOS, HomeDir: homeDir, Env: map[string]string{}})
162 }
163 projectRoot, projectRootErr := apppaths.DiscoverProjectRoot(cwd, []string{".git"})
164 if projectRootErr != nil {
165 projectRoot = cwd
166 }
167 projectPaths, projectErr := paths.ForProject(projectRoot)
168 luminaRoot := FindLuminaRoot(cwd)
169 if luminaRoot == "" {
170 luminaRoot = paths.ResourcesDir
171 }
172 resourceDir := LuminaResourceDir(luminaRoot)
173 bundledSystemDir := resourceSubdir(resourceDir, apppaths.LegacySystemDirName, "system")
174 bundledSkillsDir := resourceSubdir(resourceDir, apppaths.LegacySkillsDirName, "skills")
175 bundledTeamsDir := resourceSubdir(resourceDir, apppaths.LegacyTeamsDirName, "teams")
176
177 cfg := Config{
178 Paths: paths,
179 ProjectPaths: projectPaths,
180 APIKey: "",
181 APIBaseURL: "",
182 APIModel: "",
183 APIType: "openai_compatible",
184 FallbackAPIEnabled: false,
185 FallbackAPIKey: "",
186 FallbackAPIBaseURL: "",
187 FallbackAPIModel: "",
188 FallbackAPIType: "auto",
189 APIMaxTokens: 16000,
190 APIStreamIdleTimeoutSeconds: 600.0,
191
192 Yolo: false,
193
194 MaxToolOutputChars: 50_000,
195 MaxToolResultCharsAbsolute: 400_000,
196 MaxMessageToolResultsChars: 200_000,
197 ShellTimeoutSeconds: 30.0,
198 ShellMaxOutputBytes: 5 * 1024 * 1024,
199 SandboxBackend: "auto",
200 WSLSandboxDistro: "LuminaSandbox",
201 WSLSandboxInstallDir: filepath.Join(homeDir, ".lumina", "wsl-sandbox", "LuminaSandbox"),
202 WSLSandboxAllowLocalFallback: true,
203
204 MCPEnabled: true,
205 MCPPingInterval: 30.0,
206 MCPConnectTimeout: 10.0,
207 MCPRequestTimeout: 30.0,

Calls 3

NewConfigForCWDFunction · 0.85
isPinnedFunction · 0.85
ApplyHarnessDefaultsFunction · 0.85