feat(onboard): add --skip-hooks flag (#81220) · openclaw/openclaw@e7c9e84
sjf
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -169,6 +169,7 @@ export function registerOnboardCommand(program: Command) {
|
169 | 169 | .option("--skip-search", "Skip search provider setup") |
170 | 170 | .option("--skip-health", "Skip health check") |
171 | 171 | .option("--skip-ui", "Skip Control UI/TUI prompts") |
| 172 | +.option("--skip-hooks", "Skip hook setup") |
172 | 173 | .option("--node-manager <name>", "Node manager for skills: npm|pnpm|bun") |
173 | 174 | .option("--import-from <provider>", "Migration provider to run during onboarding") |
174 | 175 | .option("--import-source <path>", "Source agent home for --import-from") |
@@ -245,6 +246,7 @@ export function registerOnboardCommand(program: Command) {
|
245 | 246 | skipSearch: Boolean(opts.skipSearch), |
246 | 247 | skipHealth: Boolean(opts.skipHealth), |
247 | 248 | skipUi: Boolean(opts.skipUi), |
| 249 | +skipHooks: Boolean(opts.skipHooks), |
248 | 250 | nodeManager: opts.nodeManager as NodeManagerChoice | undefined, |
249 | 251 | importFrom: opts.importFrom as string | undefined, |
250 | 252 | importSource: opts.importSource as string | undefined, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -79,6 +79,7 @@ export type OnboardOptions = OnboardDynamicProviderOptions & {
|
79 | 79 | skipSearch?: boolean; |
80 | 80 | skipHealth?: boolean; |
81 | 81 | skipUi?: boolean; |
| 82 | +skipHooks?: boolean; |
82 | 83 | nodeManager?: NodeManagerChoice; |
83 | 84 | remoteUrl?: string; |
84 | 85 | remoteToken?: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -780,9 +780,11 @@ export async function runSetupWizard(
|
780 | 780 | }); |
781 | 781 | } |
782 | 782 | |
783 | | -// Setup hooks (session memory on /new) |
784 | | -const { setupInternalHooks } = await import("../commands/onboard-hooks.js"); |
785 | | -nextConfig = await setupInternalHooks(nextConfig, runtime, prompter); |
| 783 | +if (!opts.skipHooks) { |
| 784 | +// Setup hooks (session memory on /new) |
| 785 | +const { setupInternalHooks } = await import("../commands/onboard-hooks.js"); |
| 786 | +nextConfig = await setupInternalHooks(nextConfig, runtime, prompter); |
| 787 | +} |
786 | 788 | |
787 | 789 | nextConfig = onboardHelpers.applyWizardMetadata(nextConfig, { command: "onboard", mode }); |
788 | 790 | nextConfig = await writeWizardConfigFile(nextConfig); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。