mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 18:43:43 +00:00
refactor(core): extract shared dedup helpers
This commit is contained in:
15
src/agents/pi-tool-handler-state.test-helpers.ts
Normal file
15
src/agents/pi-tool-handler-state.test-helpers.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export function createBaseToolHandlerState() {
|
||||
return {
|
||||
toolMetas: [] as Array<{ toolName?: string; meta?: string }>,
|
||||
toolSummaryById: new Set<string>(),
|
||||
lastToolError: undefined,
|
||||
pendingMessagingTexts: new Map<string, string>(),
|
||||
pendingMessagingTargets: new Map<string, unknown>(),
|
||||
pendingMessagingMediaUrls: new Map<string, string[]>(),
|
||||
messagingToolSentTexts: [] as string[],
|
||||
messagingToolSentTextsNormalized: [] as string[],
|
||||
messagingToolSentMediaUrls: [] as string[],
|
||||
messagingToolSentTargets: [] as unknown[],
|
||||
blockBuffer: "",
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user