Add occurrence search for paginated threads (#33907)

## What changed

- Add the experimental `thread/searchOccurrences` app-server method for case-insensitive literal search across visible user messages and final assistant messages without replaying the thread.
- Return paginated snippets with UTF-16 match ranges and `thread/turns/list` cursors for navigating to each matching turn.
- Index persisted item types to efficiently select searchable messages from paginated thread history.

## Testing

- Add an app-server integration test covering pagination, steering messages, final-answer selection, Markdown normalization, and UTF-16 offsets.

GitOrigin-RevId: e80160e0f83eb4e5db8de862307085093bee362b
This commit is contained in:
Owen Lin authored and copyberry committed 2026-07-17 21:24:26 +00:00
1 parent 9f6c29e281
commit c1862b8db4
21 files changed
+875 -23

No files matched your search

@@ -50,6 +50,8 @@ const EXPERIMENTAL_CLIENT_METHOD_DEPENDENCY_TYPES: &[&str] = &[
"RemoteControlClient",
"RemoteControlClientsListOrder",
"ThreadBackgroundTerminal",
"ThreadSearchOccurrence",
"ThreadSearchTextRange",
];
const SPECIAL_DEFINITIONS: &[&str] = &[
"ClientNotification",