fix: use prompt file sys msg

This commit is contained in:
Test 2024-08-29 09:51:05 -07:00
parent 40f8601da9
commit 093225d4fe
2 changed files with 7 additions and 2 deletions

View file

@ -99,6 +99,9 @@ export function slashCommandFromPromptFile(
name,
description,
run: async function* (context) {
const originalSystemMessage = context.llm.systemMessage;
context.llm.systemMessage = systemMessage;
const userInput = extractUserInput(context.input, name);
const renderedPrompt = await renderPrompt(prompt, context, userInput);
const messages = updateChatHistory(
@ -111,6 +114,8 @@ export function slashCommandFromPromptFile(
for await (const chunk of context.llm.streamChat(messages)) {
yield stripImages(chunk.content);
}
context.llm.systemMessage = originalSystemMessage;
},
};
}

View file

@ -91,7 +91,7 @@ function HelpPage() {
</SecondaryButton>
</div>
<div className="grid grid-cols-3 gap-4 items-center">
<div className="grid grid-cols-3 gap-4 items-center w-full">
<div className="col-span-2">
<h3 className="my-0">Have an issue?</h3>
<p>Let us know on GitHub and we'll do our best to resolve it.</p>
@ -101,7 +101,7 @@ function HelpPage() {
target="_blank"
className="no-underline"
>
<SecondaryButton className="grid grid-flow-col items-center gap-2">
<SecondaryButton className="grid grid-flow-col items-center gap-2 w-full">
Create a GitHub issue
</SecondaryButton>
</a>