feat: add browser script skill execution
This commit is contained in:
@@ -12,6 +12,7 @@ use zeroclaw::providers::traits::{
|
||||
ProviderCapabilities, StreamEvent, StreamOptions, StreamResult,
|
||||
};
|
||||
|
||||
use crate::compat::browser_script_skill_tool::build_browser_script_skill_tools;
|
||||
use crate::compat::browser_tool_adapter::ZeroClawBrowserTool;
|
||||
use crate::compat::config_adapter::{
|
||||
build_zeroclaw_config_from_sgclaw_settings,
|
||||
@@ -120,6 +121,7 @@ pub async fn execute_task_with_provider<T: Transport + 'static>(
|
||||
message: format!("loaded skills: {}", loaded_skill_labels.join(", ")),
|
||||
})?;
|
||||
}
|
||||
let browser_tool_for_scripts = browser_tool.clone();
|
||||
let mut tools: Vec<Box<dyn zeroclaw::tools::Tool>> = if browser_surface_present {
|
||||
vec![
|
||||
Box::new(ZeroClawBrowserTool::new_superrpa(browser_tool.clone())),
|
||||
@@ -128,6 +130,12 @@ pub async fn execute_task_with_provider<T: Transport + 'static>(
|
||||
} else {
|
||||
Vec::new()
|
||||
};
|
||||
if browser_surface_present {
|
||||
tools.extend(
|
||||
build_browser_script_skill_tools(&loaded_skills, browser_tool_for_scripts)
|
||||
.map_err(map_anyhow_to_pipe_error)?,
|
||||
);
|
||||
}
|
||||
if matches!(settings.office_backend, OfficeBackend::OpenXml) &&
|
||||
engine.should_attach_openxml_office_tool(instruction)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user