Skip to content

Commit 381c843

Browse files
LEON-gittechsa-buc
authored andcommitted
Fix merge conflict: properly close goal_tools block and remove stray if
1 parent 7440f90 commit 381c843

1 file changed

Lines changed: 19 additions & 21 deletions

File tree

codex-rs/tools/src/tool_registry_plan.rs

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,25 @@ pub fn build_tool_registry_plan(
227227
);
228228
plan.register_handler("update_plan", ToolHandlerKind::Plan);
229229
if config.goal_tools {
230+
plan.push_spec(
231+
create_get_goal_tool(),
232+
/*supports_parallel_tool_calls*/ false,
233+
config.code_mode_enabled,
234+
);
235+
plan.register_handler("get_goal", ToolHandlerKind::Goal);
236+
plan.push_spec(
237+
create_create_goal_tool(),
238+
/*supports_parallel_tool_calls*/ false,
239+
config.code_mode_enabled,
240+
);
241+
plan.register_handler("create_goal", ToolHandlerKind::Goal);
242+
plan.push_spec(
243+
create_update_goal_tool(),
244+
/*supports_parallel_tool_calls*/ false,
245+
config.code_mode_enabled,
246+
);
247+
plan.register_handler("update_goal", ToolHandlerKind::Goal);
248+
}
230249

231250
// Memory and notepad tools (enabled when MemoryTool feature is on).
232251
if config.memory_tools_enabled {
@@ -293,27 +312,6 @@ pub fn build_tool_registry_plan(
293312
plan.register_handler("notepad_prune", ToolHandlerKind::NotepadPrune);
294313
}
295314

296-
if config.has_environment && config.js_repl_enabled {
297-
plan.push_spec(
298-
create_get_goal_tool(),
299-
/*supports_parallel_tool_calls*/ false,
300-
config.code_mode_enabled,
301-
);
302-
plan.register_handler("get_goal", ToolHandlerKind::Goal);
303-
plan.push_spec(
304-
create_create_goal_tool(),
305-
/*supports_parallel_tool_calls*/ false,
306-
config.code_mode_enabled,
307-
);
308-
plan.register_handler("create_goal", ToolHandlerKind::Goal);
309-
plan.push_spec(
310-
create_update_goal_tool(),
311-
/*supports_parallel_tool_calls*/ false,
312-
config.code_mode_enabled,
313-
);
314-
plan.register_handler("update_goal", ToolHandlerKind::Goal);
315-
}
316-
317315
plan.push_spec(
318316
create_request_user_input_tool(request_user_input_tool_description(
319317
config.default_mode_request_user_input,

0 commit comments

Comments
 (0)