MCPcopy
hub / github.com/7836246/cursor2api / hasLeadingThinking

Function hasLeadingThinking

src/streaming-text.ts:64–67  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

62 * 导致正文内容被错误截断或丢失。
63 */
64export function hasLeadingThinking(text: string): boolean {
65 if (!text) return false;
66 return /^\s*<thinking>/.test(text);
67}
68
69/**
70 * 只解析“前导 thinking 块”。

Callers 7

handleOpenAIStreamFunction · 0.85
handleOpenAINonStreamFunction · 0.85
handleResponsesStreamFunction · 0.85
handleResponsesNonStreamFunction · 0.85
handleDirectTextStreamFunction · 0.85
handleStreamFunction · 0.85
handleNonStreamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected