openclaw / src /agents /tools /ask-user-tool.test-support.ts
SaylorTwift's picture
SaylorTwift HF Staff
Add files using upload-large-folder tool
eb3f11e verified
Raw History Blame Contribute Delete
501 Bytes
import "./ask-user-tool.js";
type AskUserToolTestApi = {
resetPendingAskUserQuestionsForTest(): void;
};
function getTestApi(): AskUserToolTestApi {
const api = (globalThis as Record<PropertyKey, unknown>)[
Symbol.for("openclaw.askUserToolTestApi")
];
if (!api) {
throw new Error("ask_user tool test API is unavailable");
}
return api as AskUserToolTestApi;
}
export function resetPendingAskUserQuestionsForTest(): void {
getTestApi().resetPendingAskUserQuestionsForTest();
}