Skip to content

Commit fb7dac8

Browse files
committed
fix(thinkingPlugin): update thinking condition to use length check
1 parent ca51f9d commit fb7dac8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/kit/src/message/plugins/thinkingPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const thinkingPlugin = (options: MessageEnginePlugin = {}): MessageEngine
1313
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1414
const c = choice as any
1515
const reasoning_content = c?.message?.reasoning_content || c?.delta?.reasoning_content
16-
const thinking = typeof reasoning_content === 'string' && reasoning_content.trim() !== ''
16+
const thinking = typeof reasoning_content === 'string' && reasoning_content.length > 0
1717

1818
if (thinking) {
1919
if (currentMessage.state && typeof currentMessage.state === 'object') {

0 commit comments

Comments
 (0)