MCPcopy Create free account
hub / github.com/antirez/ds4 / worker_force_generated_text

Function worker_force_generated_text

ds4_agent.c:7551–7575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7549 AGENT_TEST_ASSERT(match_len == strlen(data) - strlen("\trm -f bc\n"));
7550}
7551
7552static void test_agent_edit_upto_requires_tail_after_newline_strip(void) {
7553 const char *data = "head\nbody\ntail\n";
7554 const char *old = "head\n[upto]\n";
7555 const char *match = NULL;
7556 size_t match_len = 0;
7557 bool anchored = false;
7558 char err[128] = {0};
7559
7560 AGENT_TEST_ASSERT(!agent_edit_find_old_span(data, strlen(data), old, true,
7561 &match, &match_len, &anchored,
7562 err, sizeof(err)));
7563 AGENT_TEST_ASSERT(strstr(err, "must include a unique tail anchor") != NULL);
7564}
7565
7566static char *agent_test_stream_capture(agent_tool_syntax syntax,
7567 const char **chunks,
7568 size_t chunk_count,
7569 agent_dsml_parser *p,
7570 bool *dsml_in_think) {
7571 agent_tail_capture tail = {
7572 .cap = 16384,
7573 };
7574 agent_token_renderer renderer = {
7575 .format_thinking = true,
7576 .format_markdown = false,
7577 .last_output_newline = true,
7578 .capture = &tail,

Callers 1

worker_run_turnFunction · 0.85

Calls 3

ds4_tokenize_textFunction · 0.85
ds4_tokens_freeFunction · 0.85

Tested by

no test coverage detected