Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(prompts): satisfy product clippy

Steven Enamakel518e42d2176f
diff --git a/crates/openhuman-core/src/agent/debug/mod.rs b/crates/openhuman-core/src/agent/debug/mod.rs
index a67bfae866..c23b4bdf45 100644
--- a/crates/openhuman-core/src/agent/debug/mod.rs
+++ b/crates/openhuman-core/src/agent/debug/mod.rs
@@ -492,9 +492,11 @@ async fn render_integrations_agent(config: &Config, toolkit: &str) -> Result<Dum
)
})
.collect();
- let dispatcher_instructions = (!text_mode_schemas.is_empty())
- .then(|| tinyagents_harness::tool::prompt_tool_instructions(&text_mode_schemas))
- .unwrap_or_default();
+ let dispatcher_instructions = if text_mode_schemas.is_empty() {
+ String::new()
+ } else {
+ tinyagents_harness::tool::prompt_tool_instructions(&text_mode_schemas)
+ };
let ctx = PromptContext {
workspace_dir: agent.workspace_dir(),
model_name: &model_name,
diff --git a/crates/openhuman-core/src/agent/prompts/types.rs b/crates/openhuman-core/src/agent/prompts/types.rs
index 7c1b15750a..a30f01e42b 100644
--- a/crates/openhuman-core/src/agent/prompts/types.rs
+++ b/crates/openhuman-core/src/agent/prompts/types.rs
@@ -284,7 +284,7 @@ impl<'a> PromptTool<'a> {
///
/// The prompt layer carries this only to select the TinyTools dialect; it does
/// not define a tool-call protocol of its own.
-#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
pub enum ToolCallFormat {
/// Compact positional legacy dialect.
PFormat,
@@ -294,17 +294,12 @@ pub enum ToolCallFormat {
/// informational. Renders in the same JSON-schema form as `Json`.
Native,
/// Python `def` signatures; the model calls `name(arg="value")`.
+ #[default]
Python,
/// TypeScript `function` signatures; the model calls `name({arg: "value"})`.
TypeScript,
}
-impl Default for ToolCallFormat {
- fn default() -> Self {
- Self::Python
- }
-}
-
impl ToolCallFormat {
/// The harness policy that speaks this format.
///