Merge pull request #271 from n4ze3m/next
feat: Set system prompt from last used chat prompt
This commit is contained in:
commit
9faeca9a5b
@ -104,11 +104,13 @@ export const Playground = () => {
|
||||
const lastUsedPrompt = await getLastUsedChatSystemPrompt(
|
||||
recentChat.history.id
|
||||
)
|
||||
console.log("lastUsedPrompt", lastUsedPrompt)
|
||||
if (lastUsedPrompt) {
|
||||
if (lastUsedPrompt.prompt_id) {
|
||||
const prompt = await getPromptById(lastUsedPrompt.prompt_id)
|
||||
if (prompt) {
|
||||
setSelectedSystemPrompt(lastUsedPrompt.prompt_id)
|
||||
setSystemPrompt(lastUsedPrompt.prompt_content)
|
||||
}
|
||||
}
|
||||
setSystemPrompt(lastUsedPrompt.prompt_content)
|
||||
|
Loading…
x
Reference in New Issue
Block a user