When LLM summary generation fails, the fallback logic truncates the first chunk content to 500 characters. Previously used byte-based slicing (summary[:500]) which could cut multi-byte UTF-8 characters in half, causing PostgreSQL to reject invalid byte sequences. Changed to rune-based truncation to ensure valid UTF-8 after truncation. Fixes: Documents stuck in "Generating summary" status when containing Chinese/emoji characters and summary generation fails. |
||
|---|---|---|
| .. | ||
| agent | ||
| application | ||
| common | ||
| config | ||
| container | ||
| database | ||
| errors | ||
| event | ||
| handler | ||
| im | ||
| infrastructure | ||
| logger | ||
| mcp | ||
| middleware | ||
| models | ||
| router | ||
| runtime | ||
| sandbox | ||
| searchutil | ||
| stream | ||
| tracing | ||
| types | ||
| utils | ||