mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
chore(lint): add explicit returns in then() callbacks in server
This commit is contained in:
@@ -3769,6 +3769,7 @@ export class DaemonClient {
|
||||
.arrayBuffer()
|
||||
.then((buffer) => {
|
||||
this.handleTransportMessage(buffer);
|
||||
return;
|
||||
})
|
||||
.catch(() => {
|
||||
// Ignore failed blob decoding and allow reconnect logic to recover.
|
||||
|
||||
@@ -1914,6 +1914,7 @@ export class AgentManager {
|
||||
permission,
|
||||
lastMessage,
|
||||
});
|
||||
return;
|
||||
})
|
||||
.catch(reject);
|
||||
};
|
||||
@@ -2191,6 +2192,7 @@ export class AgentManager {
|
||||
return;
|
||||
}
|
||||
await this.dispatchSessionEvent(current, event);
|
||||
return;
|
||||
})
|
||||
.catch((err) => {
|
||||
this.logger.error(
|
||||
|
||||
@@ -140,6 +140,7 @@ export class AgentStorage {
|
||||
|
||||
this.cache.set(agentId, record);
|
||||
this.pathById.set(agentId, nextPath);
|
||||
return;
|
||||
});
|
||||
|
||||
this.pendingWrites.set(
|
||||
|
||||
@@ -123,6 +123,7 @@ async function startTurnAndCollectEvents(
|
||||
.startTurn(prompt)
|
||||
.then((result) => {
|
||||
turnId = result.turnId;
|
||||
return;
|
||||
})
|
||||
.catch((error) => {
|
||||
clearTimeout(timeout);
|
||||
@@ -384,6 +385,7 @@ test("Test 5: Interruption", async () => {
|
||||
return;
|
||||
}
|
||||
turnId = result.turnId;
|
||||
return;
|
||||
})
|
||||
.catch((error) => {
|
||||
clearTimeout(timeout);
|
||||
|
||||
@@ -908,6 +908,7 @@ export class ACPAgentSession implements AgentSession, ACPClient {
|
||||
})
|
||||
.then((response) => {
|
||||
this.handlePromptResponse(response, turnId);
|
||||
return;
|
||||
})
|
||||
.catch((error) => {
|
||||
const message = error instanceof Error ? error.message : String(error);
|
||||
|
||||
@@ -2057,6 +2057,7 @@ class OpenCodeAgentSession implements AgentSession {
|
||||
turnId,
|
||||
);
|
||||
}
|
||||
return;
|
||||
})
|
||||
.catch((err) => {
|
||||
if (isOpenCodeHeadersTimeoutFailure(err)) {
|
||||
@@ -2105,6 +2106,7 @@ class OpenCodeAgentSession implements AgentSession {
|
||||
turnId,
|
||||
);
|
||||
}
|
||||
return;
|
||||
})
|
||||
.catch((error) => {
|
||||
this.finishForegroundTurn(
|
||||
|
||||
@@ -317,6 +317,7 @@ export class TTSManager {
|
||||
if (result.kind === "prepared") {
|
||||
this.destroySpeechStream(result.prepared.stream);
|
||||
}
|
||||
return;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -885,6 +885,7 @@ export class LoopService {
|
||||
left.createdAt.localeCompare(right.createdAt),
|
||||
);
|
||||
await fs.writeFile(this.storePath, JSON.stringify(records, null, 2), "utf8");
|
||||
return;
|
||||
});
|
||||
this.persistQueue = nextPersist.catch(() => {});
|
||||
await nextPersist;
|
||||
|
||||
@@ -961,6 +961,7 @@ class FakeAgentSession implements AgentSession {
|
||||
let interrupted = false;
|
||||
const interrupt = this.interruptSignal.promise.then(() => {
|
||||
interrupted = true;
|
||||
return;
|
||||
});
|
||||
await Promise.race([interrupt, new Promise((r) => setTimeout(r, 500))]);
|
||||
if (!interrupted) {
|
||||
|
||||
@@ -59,6 +59,7 @@ async function startDaemonWithTimeout(
|
||||
() => {
|
||||
clearTimeout(timeoutHandle);
|
||||
resolve();
|
||||
return;
|
||||
},
|
||||
(error) => {
|
||||
clearTimeout(timeoutHandle);
|
||||
|
||||
@@ -89,6 +89,7 @@ export function createVoiceTurnController(params: {
|
||||
submissionQueue = submissionQueue
|
||||
.then(async () => {
|
||||
await params.utteranceSink.submitUtterance(utterance);
|
||||
return;
|
||||
})
|
||||
.catch((error) => {
|
||||
fail(error);
|
||||
|
||||
@@ -614,6 +614,7 @@ export async function runAsyncWorktreeBootstrap(
|
||||
"Failed to emit live worktree setup timeline update",
|
||||
);
|
||||
}
|
||||
return;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -1557,6 +1557,7 @@ export function warmCheckoutShortstatInBackground(
|
||||
void getOrLoadCheckoutShortstat(cwd, context)
|
||||
.then(() => {
|
||||
onComplete?.();
|
||||
return;
|
||||
})
|
||||
.catch(() => {
|
||||
// Non-critical: keep listing path resilient even if git commands fail.
|
||||
|
||||
Reference in New Issue
Block a user