fix: stabilize session tools and tests

This commit is contained in:
Peter Steinberger
2026-01-12 18:17:17 +00:00
parent 3ffb9a3b5e
commit 77b20377cc
4 changed files with 77 additions and 67 deletions

View File

@@ -44,11 +44,13 @@ export function createClawdbotTools(options?: {
/** Mutable ref to track if a reply was sent (for "first" mode). */
hasRepliedRef?: { value: boolean };
}): AnyAgentTool[] {
const imageTool = createImageTool({
config: options?.config,
agentDir: options?.agentDir,
sandboxRoot: options?.sandboxRoot,
});
const imageTool = options?.agentDir?.trim()
? createImageTool({
config: options?.config,
agentDir: options.agentDir,
sandboxRoot: options?.sandboxRoot,
})
: null;
const memorySearchTool = createMemorySearchTool({
config: options?.config,
agentSessionKey: options?.agentSessionKey,