Improve agent prompting and classifier latency; clean up build warnings

This commit is contained in:
2026-09-15 14:25:00 -05:00
parent 66b73b1aac
commit 76d492aa75
69 changed files with 368 additions and 205 deletions
+20
View File
@@ -63,6 +63,26 @@ impl ProviderActionContext {
}
}
pub(crate) fn tool_call_title(&self, call: &ToolCall) -> Option<String> {
let parameter = match self.mcp_tool_aliases.get(&call.name) {
Some(target) => target.title_parameter.as_deref()?,
None => super::rig_request::TOOL_TITLE_PARAMETER,
};
call.arguments
.get(parameter)
.and_then(serde_json::Value::as_str)
.map(|title| {
title
.split_whitespace()
.collect::<Vec<_>>()
.join(" ")
.chars()
.take(120)
.collect::<String>()
})
.filter(|title| !title.is_empty())
}
pub(crate) fn action_from_tool_call(&self, call: &ToolCall) -> Result<AIAgentAction, String> {
action_from_tool_call(
&self.task_id,