fix: streaming msg

This commit is contained in:
Han Xiao
2025-02-12 09:36:22 +08:00
parent c8a68a043f
commit bdf03ef978
2 changed files with 3 additions and 3 deletions

View File

@@ -51,7 +51,7 @@ ${i + 1}. [${ref.exactQuote}](${ref.url})`).join('')}
</references> </references>
`.trim(); `.trim();
} }
return `${answer.answer.replace(/\(REF_(\d+)\)/g, (_, num) => `[^${num}]`)}\n${refStr}`; return `${answer.answer.replace(/\(REF_(\d+)\)/g, (_, num) => `[^${num}]`)}\n\n${refStr}`;
} }

View File

@@ -22,8 +22,8 @@ export class ActionTracker extends EventEmitter {
} }
trackThink(think: string) { trackThink(think: string) {
// update the think field of the current step // only update the think field of the current state
this.trackAction({thisStep: {...this.state.thisStep, think}}); this.state = { ...this.state, thisStep: { ...this.state.thisStep, think } };
this.emit('action', this.state); this.emit('action', this.state);
} }