mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 05:07:38 +00:00
refactor(src): split oversized modules
This commit is contained in:
16
src/commands/onboard-non-interactive/local/workspace.ts
Normal file
16
src/commands/onboard-non-interactive/local/workspace.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import type { ClawdbotConfig } from "../../../config/config.js";
|
||||
import { resolveUserPath } from "../../../utils.js";
|
||||
import type { OnboardOptions } from "../../onboard-types.js";
|
||||
|
||||
export function resolveNonInteractiveWorkspaceDir(params: {
|
||||
opts: OnboardOptions;
|
||||
baseConfig: ClawdbotConfig;
|
||||
defaultWorkspaceDir: string;
|
||||
}) {
|
||||
const raw = (
|
||||
params.opts.workspace ??
|
||||
params.baseConfig.agents?.defaults?.workspace ??
|
||||
params.defaultWorkspaceDir
|
||||
).trim();
|
||||
return resolveUserPath(raw);
|
||||
}
|
||||
Reference in New Issue
Block a user