mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
refactor(reply): simplify task-owned typing refresh (#116770)
* refactor(reply): simplify task-owned typing refresh * chore(format): restore autonomous sweep skill formatting --------- Co-authored-by: Peter Steinberger <steipete@macos.shared>
This commit is contained in:
committed by
GitHub
parent
27fa5a8950
commit
a94e1c8d8b
@@ -467,7 +467,6 @@ describe("runReplyAgent active steering", () => {
|
||||
|
||||
expect(state.runEmbeddedAgentMock).not.toHaveBeenCalled();
|
||||
expect(taskTyping.startTypingLoop).toHaveBeenCalledOnce();
|
||||
expect(taskTyping.refreshTypingTtl).toHaveBeenCalledOnce();
|
||||
expect(taskTyping.cleanup).not.toHaveBeenCalled();
|
||||
expect(typing.cleanup).toHaveBeenCalledOnce();
|
||||
|
||||
|
||||
@@ -25,12 +25,10 @@ export function bindReplyOperationTyping(
|
||||
export async function refreshReplyOperationTyping(
|
||||
operation: ReplyOperation,
|
||||
options: { startIfIdle: boolean },
|
||||
): Promise<boolean> {
|
||||
): Promise<void> {
|
||||
const typing = typingByReplyOperation.get(operation);
|
||||
if (!typing || operation.result || (!options.startIfIdle && !typing.isActive())) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
await typing.startTypingLoop();
|
||||
typing.refreshTypingTtl();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user