@myassis/gateway 1.0.105 → 1.0.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -406,7 +406,7 @@ function foldPairsToLedger(messages, originals, pairs, foldCount, protectFrom, s
|
|
|
406
406
|
}
|
|
407
407
|
const kept = messages.filter((_, index) => !foldIndexes.has(index));
|
|
408
408
|
if (!ledgerContent)
|
|
409
|
-
return
|
|
409
|
+
return messages;
|
|
410
410
|
// 并入首条 system 消息:部分厂商只允许 system 位于首位
|
|
411
411
|
if (kept[0]?.role === 'system' && typeof kept[0].content === 'string') {
|
|
412
412
|
kept[0] = { ...kept[0], content: `${kept[0].content}\n\n${ledgerContent}` };
|