mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 02:31:38 +00:00
chore: We have a sleep at home. The sleep at home:
This commit is contained in:
@@ -2,6 +2,7 @@ import type { HumanDelayConfig } from "../../config/types.js";
|
||||
import type { GetReplyOptions, ReplyPayload } from "../types.js";
|
||||
import type { ResponsePrefixContext } from "./response-prefix-template.js";
|
||||
import type { TypingController } from "./typing.js";
|
||||
import { sleep } from "../../utils.js";
|
||||
import { normalizeReplyPayload, type NormalizeReplySkipReason } from "./normalize-reply.js";
|
||||
|
||||
export type ReplyDispatchKind = "tool" | "block" | "final";
|
||||
@@ -37,9 +38,6 @@ function getHumanDelay(config: HumanDelayConfig | undefined): number {
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
}
|
||||
|
||||
/** Sleep for a given number of milliseconds. */
|
||||
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
|
||||
export type ReplyDispatcherOptions = {
|
||||
deliver: ReplyDispatchDeliverer;
|
||||
responsePrefix?: string;
|
||||
|
||||
Reference in New Issue
Block a user