jcode
jcode copied to clipboard
conversation_search panics on multi-byte chars near a hit
What happens
The conversation_search tool task panics with:
start byte index N is not a char boundary; it is inside '·'
when a search hit sits within 50 bytes of a multi-byte char. The snippet window is cut at raw byte offsets around the match.
Steps to reproduce
- Have a session whose history contains text with a multi-byte char (for example '·' in tool output) within 50 bytes of a word.
- Run conversation_search for that word.
- The tool task panics instead of returning results.
Expected
The snippet widens to whole characters and the search returns normally.