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:
Peter Steinberger
2026-07-31 03:48:21 -07:00
committed by GitHub
parent 27fa5a8950
commit a94e1c8d8b
2 changed files with 2 additions and 5 deletions
@@ -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();
+2 -4
View File
@@ -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;
}