Changesets · Branches · Tags · Compare
| Changeset | 9fd9cbd996b9497fad1f4e37599ee88a6e3cb6f36e7d380c490133c541f03bbf |
|---|---|
| Author | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-07-08 12:54 +05:30 |
| Committer | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-07-08 12:54 +05:30 |
| Parents | d717cb1b1923 |
1 file changed
modified core/config/sharedConfig.ts +8 −0
| @@ -4,8 +4,10 @@ | ||
| 4 | 4 | BrowserSerializedContinueConfig, |
| 5 | 5 | Config, |
| 6 | 6 | ContinueConfig, |
| 7 | + IContextProvider, | |
| 7 | 8 | SerializedContinueConfig, |
| 8 | 9 | } from ".."; |
| 10 | +import CurrentFileContextProvider from "../context/providers/CurrentFileContextProvider"; | |
| 9 | 11 | |
| 10 | 12 | export const sharedConfigSchema = z |
| 11 | 13 | .object({ |
| @@ -180,6 +182,12 @@ | ||
| 180 | 182 | if (sharedConfig.useCurrentFileAsContext !== undefined) { |
| 181 | 183 | configCopy.experimental.useCurrentFileAsContext = |
| 182 | 184 | sharedConfig.useCurrentFileAsContext; |
| 185 | + if (sharedConfig.useCurrentFileAsContext === true) { | |
| 186 | + configCopy.contextProviders = [ | |
| 187 | + ...((configCopy.contextProviders ?? []) as IContextProvider[]), | |
| 188 | + new CurrentFileContextProvider({}), | |
| 189 | + ]; | |
| 190 | + } | |
| 183 | 191 | } |
| 184 | 192 | if (sharedConfig.logEditingData !== undefined) { |
| 185 | 193 | configCopy.experimental.logEditingData = sharedConfig.logEditingData; |