Skip to content

Commit 9b5d1f9

Browse files
author
prima
committed
fix: Ensured that loading saves with agent choices will display after loading
1 parent ad04516 commit 9b5d1f9

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

klite.embd

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25049,6 +25049,29 @@ let checkFinalThoughtsPrompt = `Action: {"command":{"name":"thought","args":{"me
2504925049
out.message = elem.replace(usertag, "").replace(aitag, "").replace(systag, "")
2505025050
return out
2505125051
})
25052+
25053+
for (let i = combined_chunks.length - 1; i >= 0 && i > combined_chunks.length - 10; i--)
25054+
{
25055+
let elem = combined_chunks[i]
25056+
if (elem.message.indexOf("Action: ") === 0)
25057+
{
25058+
let actionJson = elem.message.replace("Action:", "").trim()
25059+
try
25060+
{
25061+
let actionObj = JSON.parse(actionJson.replaceAll(""", `"`))
25062+
if (actionObj?.command?.name === "ask_user" && Array.isArray(actionObj?.command?.args?.suggestionsToPickFrom))
25063+
{
25064+
setSuggestions(actionObj?.command?.args?.suggestionsToPickFrom.map(String))
25065+
break
25066+
}
25067+
}
25068+
catch (e)
25069+
{
25070+
// Surpress errors
25071+
}
25072+
}
25073+
}
25074+
2505225075
if (filterOutActions)
2505325076
{
2505425077
let listOfExclusions = ["Action: {", "History search performed:", "Chain of thought complete", "Stop thinking action confirmed",

0 commit comments

Comments
 (0)