|
|
@@ -245,7 +245,7 @@ export namespace SessionProcessor {
|
|
|
|
|
|
case "reasoning-end":
|
|
|
if (!(value.id in ctx.reasoningMap)) return
|
|
|
- ctx.reasoningMap[value.id].text = ctx.reasoningMap[value.id].text.trimEnd()
|
|
|
+ ctx.reasoningMap[value.id].text = ctx.reasoningMap[value.id].text
|
|
|
ctx.reasoningMap[value.id].time = { ...ctx.reasoningMap[value.id].time, end: Date.now() }
|
|
|
if (value.providerMetadata) ctx.reasoningMap[value.id].metadata = value.providerMetadata
|
|
|
yield* session.updatePart(ctx.reasoningMap[value.id])
|
|
|
@@ -425,7 +425,7 @@ export namespace SessionProcessor {
|
|
|
|
|
|
case "text-end":
|
|
|
if (!ctx.currentText) return
|
|
|
- ctx.currentText.text = ctx.currentText.text.trimEnd()
|
|
|
+ ctx.currentText.text = ctx.currentText.text
|
|
|
ctx.currentText.text = (yield* plugin.trigger(
|
|
|
"experimental.text.complete",
|
|
|
{
|