Skip to content

Commit 0ff8fe4

Browse files
committed
UI tweaks
1 parent c9de9cd commit 0ff8fe4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/core/Cline.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,7 @@ export class Cline {
811811
} catch (error) {
812812
// note that this api_req_failed ask is unique in that we only present this option if the api hasn't streamed any content yet (ie it fails on the first chunk due), as it would allow them to hit a retry button. However if the api failed mid-stream, it could be in any arbitrary state where some tools may have executed, so that error is handled differently and requires cancelling the task entirely.
813813
if (alwaysApproveResubmit) {
814+
const requestDelay = requestDelaySeconds || 5
814815
// Automatically retry with delay
815816
await this.say(
816817
"error",
@@ -823,10 +824,10 @@ export class Cline {
823824
: error.message?.includes("500") || error.message?.includes("503")
824825
? "internal server error"
825826
: "unknown"
826-
}). ↺ Retrying...`,
827+
}). ↺ Retrying in ${requestDelay} seconds...`,
827828
)
828829
await this.say("api_req_retry_delayed")
829-
await delay((requestDelaySeconds || 5) * 1000)
830+
await delay(requestDelay * 1000)
830831
await this.say("api_req_retried")
831832
// delegate generator output from the recursive call
832833
yield* this.attemptApiRequest(previousApiReqIndex)

webview-ui/src/components/settings/SettingsView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,10 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
370370
<VSCodeCheckbox
371371
checked={alwaysApproveResubmit}
372372
onChange={(e: any) => setAlwaysApproveResubmit(e.target.checked)}>
373-
<span style={{ fontWeight: "500" }}>Always approve resubmit request</span>
373+
<span style={{ fontWeight: "500" }}>Always retry failed API requests</span>
374374
</VSCodeCheckbox>
375375
<p style={{ fontSize: "12px", marginTop: "5px", color: "var(--vscode-descriptionForeground)" }}>
376-
Automatically retry request when server returns an error response, with a configurable delay
376+
Automatically retry failed API requests when server returns an error response
377377
</p>
378378
{alwaysApproveResubmit && (
379379
<div style={{ marginTop: 10 }}>

0 commit comments

Comments
 (0)