mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-06 16:34:36 +00:00
fix: preserve inherited fork context and live history attachments
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
/** Remove the fork prompt envelope while preserving the snapshot body verbatim. */
|
||||
export function extractChatHistoryBody(text: string): string {
|
||||
const bodyStart = text.indexOf("\n\n");
|
||||
return text.startsWith("<chat-history-summary>\n") &&
|
||||
text.endsWith("\n</chat-history-summary>") &&
|
||||
bodyStart !== -1
|
||||
? text.slice(bodyStart + 2, -"\n</chat-history-summary>".length)
|
||||
: text;
|
||||
}
|
||||
Reference in New Issue
Block a user