agent: use enum tag for eval tool name

This commit is contained in:
Adrià Arrufat
2026-05-05 10:36:46 +02:00
parent b3cd77b4b4
commit f84d830ff6

View File

@@ -364,7 +364,7 @@ fn handleSlash(self: *Self, body: []const u8) bool {
return false;
};
if (std.mem.eql(u8, schema.tool_name, "eval")) {
if (std.mem.eql(u8, schema.tool_name, @tagName(lp.tools.Action.eval))) {
// callEval surfaces the is_error flag separately from the text;
// tool_executor.call discards it.
const script = extractEvalScript(aa, args_json) catch {