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

Function agent_slash_command_known

ds4_agent.c:441–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439/* GLM and Qwen both open a call with <tool_call> and render as chat messages */
440static bool agent_syntax_is_xml_tool_call(agent_tool_syntax syntax) {
441 return syntax == AGENT_TOOL_SYNTAX_GLM || syntax == AGENT_TOOL_SYNTAX_QWEN;
442}
443
444static void agent_worker_append_assistant_turn_end(agent_worker *w) {
445 if (agent_tool_syntax_assistant_turn_uses_eos(
446 agent_tool_syntax_for_engine(w->engine)))
447 ds4_tokens_push(&w->transcript, ds4_token_eos(w->engine));
448}
449
450static int agent_worker_effective_ctx_size(const agent_worker *w) {
451 int ctx = 0;
452 if (w && w->session) ctx = ds4_session_ctx(w->session);
453 if (ctx <= 0 && w && w->cfg) ctx = w->cfg->gen.ctx_size;
454 return ctx;
455}
456
457/* ============================================================================

Callers 1

run_agentFunction · 0.85

Calls 1

Tested by

no test coverage detected