Elffuss BraidHub

kikocis/continue public

add changes in doLoadConfig
Changeset0144befdba85f549c4d9d73370e8b8ccc29eaa61e8d9c3de185cc5cbe5658c27
Authoruinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-07-10 08:31 +05:30
Committeruinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-07-10 08:31 +05:30
Parents4077bfafafbd

Browse the files at this changeset

1 file changed

modified core/config/profile/doLoadConfig.ts +6 −0
@@ -20,6 +20,7 @@
2020 Tool,
2121 } from "../../";
2222 import { MCPManagerSingleton } from "../../context/mcp/MCPManagerSingleton";
23+import CurrentFileContextProvider from "../../context/providers/CurrentFileContextProvider";
2324 import MCPContextProvider from "../../context/providers/MCPContextProvider";
2425 import RulesContextProvider from "../../context/providers/RulesContextProvider";
2526 import { ControlPlaneProxyInfo } from "../../control-plane/analytics/IAnalyticsProvider.js";
@@ -152,6 +153,11 @@
152153 newConfig.rules.unshift(...rules);
153154 newConfig.contextProviders.push(new RulesContextProvider({}));
154155
156+ // Add current file as context if setting is enabled
157+ if (newConfig.experimental?.useCurrentFileAsContext === true) {
158+ newConfig.contextProviders.push(new CurrentFileContextProvider({}));
159+ }
160+
155161 // Add rules from colocated rules.md files in the codebase
156162 const { rules: codebaseRules, errors: codebaseRulesErrors } =
157163 await loadCodebaseRules(ide);