Changesets · Branches · Tags · Compare
| Changeset | 0144befdba85f549c4d9d73370e8b8ccc29eaa61e8d9c3de185cc5cbe5658c27 |
|---|---|
| Author | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-07-10 08:31 +05:30 |
| Committer | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-07-10 08:31 +05:30 |
| Parents | 4077bfafafbd |
1 file changed
modified core/config/profile/doLoadConfig.ts +6 −0
| @@ -20,6 +20,7 @@ | ||
| 20 | 20 | Tool, |
| 21 | 21 | } from "../../"; |
| 22 | 22 | import { MCPManagerSingleton } from "../../context/mcp/MCPManagerSingleton"; |
| 23 | +import CurrentFileContextProvider from "../../context/providers/CurrentFileContextProvider"; | |
| 23 | 24 | import MCPContextProvider from "../../context/providers/MCPContextProvider"; |
| 24 | 25 | import RulesContextProvider from "../../context/providers/RulesContextProvider"; |
| 25 | 26 | import { ControlPlaneProxyInfo } from "../../control-plane/analytics/IAnalyticsProvider.js"; |
| @@ -152,6 +153,11 @@ | ||
| 152 | 153 | newConfig.rules.unshift(...rules); |
| 153 | 154 | newConfig.contextProviders.push(new RulesContextProvider({})); |
| 154 | 155 | |
| 156 | + // Add current file as context if setting is enabled | |
| 157 | + if (newConfig.experimental?.useCurrentFileAsContext === true) { | |
| 158 | + newConfig.contextProviders.push(new CurrentFileContextProvider({})); | |
| 159 | + } | |
| 160 | + | |
| 155 | 161 | // Add rules from colocated rules.md files in the codebase |
| 156 | 162 | const { rules: codebaseRules, errors: codebaseRulesErrors } = |
| 157 | 163 | await loadCodebaseRules(ide); |