fix(gpt-runner-vscode): do not provide all the editing context when only checked provide select text
This commit is contained in:
@@ -296,6 +296,7 @@ export const createChatSlice: StateCreator<
|
||||
chatIdAbortCtrlMap.set(chatId, abortCtrl)
|
||||
|
||||
const contextFilePaths = state.getContextFilePaths()
|
||||
const shouldProvideEditingPath = state.provideFileInfoToGptMap.activeIdeFileContents || state.provideFileInfoToGptMap.openingIdeFileContents
|
||||
|
||||
await fetchLlmStream({
|
||||
signal: abortCtrl.signal,
|
||||
@@ -304,7 +305,7 @@ export const createChatSlice: StateCreator<
|
||||
appendSystemPrompt,
|
||||
singleFilePath,
|
||||
contextFilePaths,
|
||||
editingFilePath: tempState.ideActiveFilePath,
|
||||
editingFilePath: shouldProvideEditingPath ? tempState.ideActiveFilePath : undefined,
|
||||
overrideModelType: state.overrideModelType || undefined,
|
||||
overrideModelsConfig: state.overrideModelsConfig,
|
||||
rootPath: getGlobalConfig().rootPath,
|
||||
|
||||
@@ -42,8 +42,8 @@ function getInitialState() {
|
||||
provideFileInfoToGptMap: {
|
||||
allFilePaths: false,
|
||||
checkedFileContents: true,
|
||||
activeIdeFileContents: false,
|
||||
openingIdeFileContents: true,
|
||||
activeIdeFileContents: true,
|
||||
openingIdeFileContents: false,
|
||||
userSelectedText: true,
|
||||
},
|
||||
provideFileInfoPromptMap: {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user