mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 04:11:22 +00:00
fix(image): propagate workspace root for image allowlist (#16722)
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 24a13675cb
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Reviewed-by: @steipete
This commit is contained in:
committed by
GitHub
parent
69dd1a31bf
commit
b79e7fdb7a
@@ -60,11 +60,12 @@ export function createOpenClawTools(options?: {
|
||||
/** If true, omit the message tool from the tool list. */
|
||||
disableMessageTool?: boolean;
|
||||
}): AnyAgentTool[] {
|
||||
const workspaceDir = options?.workspaceDir?.trim() || process.cwd();
|
||||
const imageTool = options?.agentDir?.trim()
|
||||
? createImageTool({
|
||||
config: options?.config,
|
||||
agentDir: options.agentDir,
|
||||
workspaceDir: options?.workspaceDir,
|
||||
workspaceDir,
|
||||
sandbox:
|
||||
options?.sandboxRoot && options?.sandboxFsBridge
|
||||
? { root: options.sandboxRoot, bridge: options.sandboxFsBridge }
|
||||
@@ -157,7 +158,7 @@ export function createOpenClawTools(options?: {
|
||||
const pluginTools = resolvePluginTools({
|
||||
context: {
|
||||
config: options?.config,
|
||||
workspaceDir: options?.workspaceDir,
|
||||
workspaceDir,
|
||||
agentDir: options?.agentDir,
|
||||
agentId: resolveSessionAgentId({
|
||||
sessionKey: options?.agentSessionKey,
|
||||
|
||||
Reference in New Issue
Block a user