mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
minor prompt fix
This commit is contained in:
parent
8511681710
commit
90a282a1f7
3 changed files with 10 additions and 14 deletions
|
|
@ -753,6 +753,7 @@ class ChatThreadService extends Disposable implements IChatThreadService {
|
||||||
{ role: 'user', content: userMessageFullContent },
|
{ role: 'user', content: userMessageFullContent },
|
||||||
...messages_.slice(lastUserMsgIdx + 1, Infinity),
|
...messages_.slice(lastUserMsgIdx + 1, Infinity),
|
||||||
]
|
]
|
||||||
|
// console.log('MESSAGES!!!', messages)
|
||||||
return messages
|
return messages
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1245,18 +1245,18 @@ class EditCodeService extends Disposable implements IEditCodeService {
|
||||||
// ctrlkzone should never have any conflicts
|
// ctrlkzone should never have any conflicts
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log('KEEPING CONFLICTS!!!!!!!!')
|
// console.log('KEEPING CONFLICTS!!!!!!!!')
|
||||||
// keep conflict on whole file - to keep conflict, revert the change and use those contents as original, then un-revert the file
|
// keep conflict on whole file - to keep conflict, revert the change and use those contents as original, then un-revert the file
|
||||||
console.log('originalFile', originalFileStr)
|
// console.log('originalFile', originalFileStr)
|
||||||
console.log('diffareas A', JSON.stringify(this.diffAreasOfURI, null, 2))
|
// console.log('diffareas A', JSON.stringify(this.diffAreasOfURI, null, 2))
|
||||||
this.acceptOrRejectAllDiffAreas({ uri, removeCtrlKs: true, behavior: 'reject', _addToHistory: false })
|
this.acceptOrRejectAllDiffAreas({ uri, removeCtrlKs: true, behavior: 'reject', _addToHistory: false })
|
||||||
console.log('diffareas B', JSON.stringify(this.diffAreasOfURI, null, 2))
|
// console.log('diffareas B', JSON.stringify(this.diffAreasOfURI, null, 2))
|
||||||
const oldFileStr = model.getValue(EndOfLinePreference.LF) // use this as original code
|
const oldFileStr = model.getValue(EndOfLinePreference.LF) // use this as original code
|
||||||
console.log('oldFileStr', { oldFileStr })
|
// console.log('oldFileStr', { oldFileStr })
|
||||||
this._writeURIText(uri, originalFileStr, 'wholeFileRange', { shouldRealignDiffAreas: true }) // un-revert
|
this._writeURIText(uri, originalFileStr, 'wholeFileRange', { shouldRealignDiffAreas: true }) // un-revert
|
||||||
originalCode = oldFileStr
|
originalCode = oldFileStr
|
||||||
console.log('originalCode', { originalCode })
|
// console.log('originalCode', { originalCode })
|
||||||
console.log('NEW STR', { newStr: model.getValue(EndOfLinePreference.LF) })
|
// console.log('NEW STR', { newStr: model.getValue(EndOfLinePreference.LF) })
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -282,13 +282,8 @@ export const chat_selectionsString = async (
|
||||||
const filesStr = await stringifyFileSelections(fileSelections, voidModelService)
|
const filesStr = await stringifyFileSelections(fileSelections, voidModelService)
|
||||||
const selnsStr = stringifyCodeSelections(codeSelections)
|
const selnsStr = stringifyCodeSelections(codeSelections)
|
||||||
|
|
||||||
|
const fileContents = [filesStr, selnsStr].filter(Boolean).join('\n')
|
||||||
if (filesStr || selnsStr) return `\
|
return fileContents || null
|
||||||
ALL FILE CONTENTS
|
|
||||||
${filesStr}
|
|
||||||
${selnsStr}`
|
|
||||||
|
|
||||||
return null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const chat_lastUserMessageWithFilesAdded = (userMessage: string, selectionsString: string | null) => {
|
export const chat_lastUserMessageWithFilesAdded = (userMessage: string, selectionsString: string | null) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue