ai调试ok

This commit is contained in:
2026-06-10 16:36:26 +08:00
parent cd03cdc44a
commit ffbb6b5125
6 changed files with 650 additions and 82 deletions
+4
View File
@@ -81,6 +81,10 @@ export async function streamChat(messages, options = {}, handlers = {}) {
switch (frame.type) {
case 'delta':
handlers.onDelta?.(frame.text || '')
if (frame.stats) handlers.onStats?.(frame.stats)
break
case 'reasoning':
handlers.onReasoning?.(frame.text || '', frame)
break
case 'trace':
handlers.onTrace?.(frame)