jcode icon indicating copy to clipboard operation
jcode copied to clipboard

conversation_search panics on multi-byte chars near a hit

Open SiavZ opened this issue 2 months ago • 0 comments

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

  1. Have a session whose history contains text with a multi-byte char (for example '·' in tool output) within 50 bytes of a word.
  2. Run conversation_search for that word.
  3. The tool task panics instead of returning results.

Expected

The snippet widens to whole characters and the search returns normally.

SiavZ avatar Sep 29 '26 13:09 SiavZ