summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/slashCommandProcessor.ts
diff options
context:
space:
mode:
authorBilly Biggs <[email protected]>2025-06-25 21:23:47 -0700
committerGitHub <[email protected]>2025-06-26 04:23:47 +0000
commit759ad4cc966df0b472505efce653c3badd2a5537 (patch)
tree248fd3dfea6b1ac321d6800e8e157c204e1cf157 /packages/cli/src/ui/hooks/slashCommandProcessor.ts
parent4d4b95a41d0626f9dd2c22ac80c66b18ac309293 (diff)
When resuming a checkpoint always add items to history even if not shown (#1653)
Co-authored-by: Scott Densmore <[email protected]>
Diffstat (limited to 'packages/cli/src/ui/hooks/slashCommandProcessor.ts')
-rw-r--r--packages/cli/src/ui/hooks/slashCommandProcessor.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
index b3b515e0..82cb0237 100644
--- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts
+++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
@@ -719,6 +719,11 @@ export const useSlashCommandProcessor = (
let i = 0;
for (const item of conversation) {
i += 1;
+
+ // Add each item to history regardless of whether we display
+ // it.
+ chat.addHistory(item);
+
const text =
item.parts
?.filter((m) => !!m.text)
@@ -728,7 +733,6 @@ export const useSlashCommandProcessor = (
// Parsing Part[] back to various non-text output not yet implemented.
continue;
}
- chat.addHistory(item);
if (i === 1 && text.match(/context for our chat/)) {
hasSystemPrompt = true;
}