mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-08-28 05:25:33 +00:00
add comment
This commit is contained in:
parent
4365fbd2a2
commit
8436229cbb
1 changed files with 2 additions and 1 deletions
|
|
@ -70,7 +70,8 @@ const addSystemPrompt = async (
|
|||
const queryText =
|
||||
mode !== "profile"
|
||||
? params.prompt
|
||||
.slice().reverse()
|
||||
// Create a shallow copy before reversing to avoid mutating the original array
|
||||
.slice().reverse()
|
||||
.find((prompt) => prompt.role === "user")
|
||||
?.content?.filter((content) => content.type === "text")
|
||||
?.map((content) => (content.type === "text" ? content.text : ""))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue