Skip to content

Commit afa840d

Browse files
authored
Merge pull request #58 from SWangHash/zz/calendar
adapte calendar
2 parents 47b1a27 + d8caa65 commit afa840d

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/crates/core/src/agentic/tools/implementations/calendar_tool.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ use napi_ohos::threadsafe_function::ThreadsafeFunctionCallMode;
129129

130130
pub fn call_calender(args: String) -> Result<String, String>{
131131
let result = Ok(args);
132-
match JS_THREADSAFE_FUNCTION.write().get("call_calender") {
132+
match JS_THREADSAFE_FUNCTION.write().get("call_calendar") {
133133
None => {
134134
return Err("The Arkts has not register the functions".to_string());
135135
}

‎src/crates/core/src/agentic/tools/product_runtime.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
88
use crate::agentic::agents::{get_agent_registry, AgentToolPolicyOverrides};
99
use crate::agentic::tools::framework::{Tool, ToolExposure, ToolResult, ToolUseContext};
10+
use crate::agentic::tools::implementations::calendar_tool::CalendarTool;
1011
use crate::agentic::tools::implementations::*;
1112
use crate::agentic::tools::registry::{
1213
get_global_tool_registry, ProductToolDecoratorRef, ToolRef, ToolRegistry,
@@ -133,6 +134,7 @@ fn materialize_tool(tool_name: &str) -> Arc<dyn Tool> {
133134
"ControlHub" => Arc::new(ControlHubTool::new()),
134135
"ComputerUse" => Arc::new(ComputerUseTool::new()),
135136
"Playbook" => Arc::new(PlaybookTool::new()),
137+
"Calendar" => Arc::new(CalendarTool::new()),
136138
_ => panic!("unknown product tool provider plan entry: {tool_name}"),
137139
}
138140
}

‎src/crates/tool-packs/src/lib.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ const PRODUCT_TOOL_PROVIDER_GROUP_PLAN: &[ToolProviderGroupPlan] = &[
128128
"GetToolSpec",
129129
"GetFileDiff",
130130
"Log",
131+
"Calendar",
131132
],
132133
},
133134
ToolProviderGroupPlan {

0 commit comments

Comments
 (0)