perf: 支持显示思考过程

This commit is contained in:
kuaifan
2025-02-05 15:38:07 +09:00
parent 9fd8d44a6e
commit b467dc55e5
5 changed files with 104 additions and 1 deletions

View File

@@ -657,6 +657,7 @@ class WebSocketDialogMsg extends AbstractModel
$text = $msgData['text'] ?? '';
if (!$text) return '';
if ($msgData['type'] === 'md') {
$text = preg_replace("/:::\s*reasoning[\s\S]*?:::/", "", $text);
$text = Base::markdown2html($text);
$text = self::previewConvertTaskList($text);
}