When resuming a checkpoint always add items to history even if not shown (#1653)
Co-authored-by: Scott Densmore <scottdensmore@mac.com>
This commit is contained in:
parent
4d4b95a41d
commit
759ad4cc96
|
@ -719,6 +719,11 @@ export const useSlashCommandProcessor = (
|
||||||
let i = 0;
|
let i = 0;
|
||||||
for (const item of conversation) {
|
for (const item of conversation) {
|
||||||
i += 1;
|
i += 1;
|
||||||
|
|
||||||
|
// Add each item to history regardless of whether we display
|
||||||
|
// it.
|
||||||
|
chat.addHistory(item);
|
||||||
|
|
||||||
const text =
|
const text =
|
||||||
item.parts
|
item.parts
|
||||||
?.filter((m) => !!m.text)
|
?.filter((m) => !!m.text)
|
||||||
|
@ -728,7 +733,6 @@ export const useSlashCommandProcessor = (
|
||||||
// Parsing Part[] back to various non-text output not yet implemented.
|
// Parsing Part[] back to various non-text output not yet implemented.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
chat.addHistory(item);
|
|
||||||
if (i === 1 && text.match(/context for our chat/)) {
|
if (i === 1 && text.match(/context for our chat/)) {
|
||||||
hasSystemPrompt = true;
|
hasSystemPrompt = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue