- 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
7 lines
161 B
Python
7 lines
161 B
Python
#!/usr/bin/env python3
|
|
"""Fix corrupted lines in chat.ts"""
|
|
|
|
with open('src/routes/chat.ts', 'r') as f:
|
|
content = f.read()
|
|
|
|
# Fix corrupted lines: "undefined |