MCPcopy Create free account
hub / github.com/AI45Lab/Code / push_candidate

Function push_candidate

core/src/llm/structured.rs:1003–1008  ·  view source on GitHub ↗

Append `s` to `out` if it is non-empty and not already present (trimmed, deduped).

(out: &mut Vec<String>, s: String)

Source from the content-addressed store, hash-verified

1001
1002/// Append `s` to `out` if it is non-empty and not already present (trimmed, deduped).
1003fn push_candidate(out: &mut Vec<String>, s: String) {
1004 let trimmed = s.trim();
1005 if !trimmed.is_empty() && !out.iter().any(|c| c == trimmed) {
1006 out.push(trimmed.to_string());
1007 }
1008}
1009
1010/// Ordered raw strings to mine for the structured object, most authoritative first:
1011/// tool-call arguments, then text content, then the reasoning channel.

Callers 1

extract_raw_candidatesFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected