refactor(agents): hide update plan gating helper · openclaw/openclaw@e188350
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,17 +4,14 @@ import type { OpenClawConfig } from "../config/config.js";
|
4 | 4 | import { setEmbeddedMode } from "../infra/embedded-mode.js"; |
5 | 5 | import { isToolWrappedWithBeforeToolCallHook } from "./agent-tools.before-tool-call.js"; |
6 | 6 | import { createOpenClawTools } from "./openclaw-tools.js"; |
7 | | -import { |
8 | | -isUpdatePlanToolEnabledForOpenClawTools, |
9 | | -shouldIncludeUpdatePlanToolForOpenClawTools, |
10 | | -} from "./openclaw-tools.registration.js"; |
| 7 | +import { shouldIncludeUpdatePlanToolForOpenClawTools } from "./openclaw-tools.registration.js"; |
11 | 8 | import { createUpdatePlanTool } from "./tools/update-plan-tool.js"; |
12 | 9 | |
13 | | -type UpdatePlanGatingParams = Parameters<typeof isUpdatePlanToolEnabledForOpenClawTools>[0]; |
| 10 | +type UpdatePlanGatingParams = Parameters<typeof shouldIncludeUpdatePlanToolForOpenClawTools>[0]; |
14 | 11 | type CreateOpenClawToolsOptions = NonNullable<Parameters<typeof createOpenClawTools>[0]>; |
15 | 12 | |
16 | 13 | function expectUpdatePlanEnabled(params: UpdatePlanGatingParams, expected: boolean): void { |
17 | | -expect(isUpdatePlanToolEnabledForOpenClawTools(params)).toBe(expected); |
| 14 | +expect(shouldIncludeUpdatePlanToolForOpenClawTools(params)).toBe(expected); |
18 | 15 | } |
19 | 16 | |
20 | 17 | function toolNames(tools: ReturnType<typeof createOpenClawTools>): string[] { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。