Agent sessions deliberately use a different policy from ds4-server: * * - sysprompt.kv is a fixed bootstrap checkpoint for the current tool/system * prompt. Because its name is fixed, the current rendered text is compared * with the text stored in the file before loading. A mismatch simply rebuilds * and overwrites the file. * - conversation sessions are explicit saves only. Their s
| 3686 | static const char fullwidth_marker[] = "|DSML|"; |
| 3687 | static const char ascii_marker[] = "|DSML|"; |
| 3688 | static const char missing_open[] = "<DSML|"; |
| 3689 | static const char missing_close[] = "</DSML|"; |
| 3690 | return agent_tail_matches(d->tail, d->len, |
| 3691 | fullwidth_marker, sizeof(fullwidth_marker) - 1) || |
| 3692 | agent_tail_matches(d->tail, d->len, |
| 3693 | ascii_marker, sizeof(ascii_marker) - 1) || |
| 3694 | agent_tail_matches(d->tail, d->len, |
| 3695 | missing_open, sizeof(missing_open) - 1) || |
| 3696 | agent_tail_matches(d->tail, d->len, |
| 3697 | missing_close, sizeof(missing_close) - 1); |
| 3698 | } |
| 3699 | |
| 3700 | static void agent_stream_note_thinking_dsml_byte(agent_stream_renderer *sr, |
| 3701 | char c) { |
| 3702 | if (!sr->in_think || sr->dsml_in_think) return; |
no test coverage detected