- StreamingToolParser now extracts <think> and <thinking> blocks before tool call parsing, buffering content until closing tag (same pattern as <tool_call>) — nothing leaks to client text - Partial think tag detection prevents fragments like '<thi' from flushing - flush() emits remaining thinking as reasoning_content - chat.ts non-streaming path strips residual think tags from content - Move Python debug/fix scripts to scripts/ directory - Add integration, largeBuffer, and leak test files - Improve JSON parsing robustness and tool call guard validation - Update README and .gitignore
9 lines
244 B
Python
9 lines
244 B
Python
#!/usr/bin/env python3
|
|
with open('src/routes/chat.ts', 'r') as f:
|
|
lines = f.readlines()
|
|
|
|
for i, line in enumerate(lines):
|
|
stripped = line.lstrip()
|
|
if stripped.startswith('undefined'):
|
|
print(f"Line {i+1}: {repr(line[:80])}")
|