| 9799 | byte_prefix_match(req->prompt_text, prompt_len, |
| 9800 | slot->responses_live.visible_text, |
| 9801 | slot->responses_live.visible_len); |
| 9802 | if (ok) visible_len = slot->responses_live.visible_len; |
| 9803 | pthread_mutex_unlock(&s->tool_mu); |
| 9804 | if (!ok) return 0; |
| 9805 | |
| 9806 | const ds4_tokens *live_tokens = ds4_session_tokens(slot->session); |
| 9807 | if (!live_tokens || live_tokens->len != live_pos) return 0; |
| 9808 | |
| 9809 | build_prompt_from_exact_prefix_and_text_suffix( |
| 9810 | s->engine, live_tokens, req->prompt_text + visible_len, |
| 9811 | effective_prompt); |
| 9812 | return live_tokens->len; |
| 9813 | } |
| 9814 | |
| 9815 | /* Tool-less thinking continuation. |
| 9816 | * |
| 9817 | * Chat/completions and Anthropic do not have a previous_response_id object that |
no test coverage detected