| 8780 | } |
| 8781 | slot->responses_live.live_tokens = ds4_session_pos(slot->session); |
| 8782 | slot->responses_live.valid = true; |
| 8783 | pthread_mutex_unlock(&s->tool_mu); |
| 8784 | } |
| 8785 | |
| 8786 | static void anthropic_live_remember(server *s, server_slot *slot, |
| 8787 | const tool_calls *calls) { |
| 8788 | if (!s || !slot || !calls || calls->len == 0) return; |
| 8789 | pthread_mutex_lock(&s->tool_mu); |
| 8790 | live_tool_state_clear_locked(&slot->anthropic_live); |
| 8791 | for (int i = 0; i < calls->len; i++) { |
| 8792 | id_list_push_unique(&slot->anthropic_live.call_ids, calls->v[i].id); |
| 8793 | } |
| 8794 | slot->anthropic_live.live_tokens = ds4_session_pos(slot->session); |
| 8795 | slot->anthropic_live.valid = slot->anthropic_live.call_ids.len > 0; |
| 8796 | pthread_mutex_unlock(&s->tool_mu); |
| 8797 | } |
| 8798 |
no test coverage detected