🐛 fix undefined prefix, suffix and language for /edit (#1216)
This commit is contained in:
parent
6492263fb5
commit
aa2ea26bbd
1 changed files with 7 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ import {
|
|||
} from "../../autocomplete/lineStream";
|
||||
import { streamLines } from "../../diff/util";
|
||||
import { stripImages } from "../../llm/countTokens";
|
||||
import { dedentAndGetCommonWhitespace } from "../../util";
|
||||
import { dedentAndGetCommonWhitespace, getMarkdownLanguageTagForFile } from "../../util";
|
||||
import {
|
||||
RangeInFileWithContents,
|
||||
contextItemToRangeInFileWithContents,
|
||||
|
|
@ -456,6 +456,12 @@ const EditSlashCommand: SlashCommand = {
|
|||
userInput,
|
||||
filePrefix: filePrefix,
|
||||
fileSuffix: fileSuffix,
|
||||
|
||||
// Some built-in templates use these instead of the above
|
||||
prefix: filePrefix,
|
||||
suffix: fileSuffix,
|
||||
|
||||
language: getMarkdownLanguageTagForFile(rif.filepath),
|
||||
systemMessage: llm.systemMessage ?? "",
|
||||
// "contextItems": (await sdk.getContextItemChatMessages()).map(x => x.content || "").join("\n\n"),
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue