fix: use system prompts for default endpoint type instances in next edit (#8660)

fix: use system prompts for default endpointtype models
This commit is contained in:
Aditya Mitra 2025-11-18 00:30:59 +05:30 • committed by GitHub
parent 824e45c5b7
commit 7bc39db04d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -461,9 +461,13 @@ export class NextEditProvider {
// prompts[1] extracts the user prompt from the system-user prompt pair.
// NOTE: Stream is currently set to false, but this should ideally be a per-model flag.
// Mercury Coder currently does not support streaming.
const msg: ChatMessage = await llm.chat([prompts[1]], token, {
stream: false,
});
const msg: ChatMessage = await llm.chat(
this.endpointType === "fineTuned" ? [prompts[1]] : prompts,
token,
{
stream: false,
},
);
if (typeof msg.content !== "string") {
return undefined;