You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(desktop): preserve generation timeout reason and raise dropdown ceiling (#164)
When a long-running generation hits the configured timeout, the main-process
AbortController was stamped with a CodesignError(GENERATION_TIMEOUT) — but the
Anthropic / OpenAI SDKs catch the aborted fetch and rethrow a generic
'Request was aborted.' error, dropping signal.reason. The user ended up with
an opaque message with no hint about which limit was hit or where to raise it.
- Add extractGenerationTimeoutError(signal) to recover the stashed error.
- Both generate IPC catches (v1 + legacy) now upgrade the SDK error back to
GENERATION_TIMEOUT when our own timer fired, so the log row and the renderer
toast both show the configured seconds + Settings → Advanced path.
- Expand the Settings timeout dropdown to 60s / 2m / 3m / 5m / 10m / 20m /
30m / 1h / 2h (the default prefs value is 1200s but the old 60-300s list
silently downgraded to 300 on save). When a stored value is outside the
canonical list, inject it so the select shows the user's existing choice
instead of rendering blank.
Signed-off-by: hqhq1025 <1506751656@qq.com>
Fix: preserve the generation-timeout reason so long runs no longer surface a bare "Request was aborted." Provider SDKs rewrite aborted fetches into a generic message that drops `signal.reason`; the generate IPC now re-surfaces the stashed `GENERATION_TIMEOUT` CodesignError (with configured seconds + Settings path) when the controller was aborted by our own timer. Settings → Advanced → Generation timeout also gains 10m / 20m / 30m / 1h / 2h choices so the default 1200s and longer full-PDP runs can actually be configured without the dropdown silently downgrading the stored value.
it('covers the default 1200s stored value and long-generation 30m / 1h / 2h choices so users can configure what they need without hitting the old 300s ceiling',()=>{
40
+
expect(TIMEOUT_OPTION_SECONDS).toContain(1200);
41
+
expect(TIMEOUT_OPTION_SECONDS).toContain(1800);
42
+
expect(TIMEOUT_OPTION_SECONDS).toContain(3600);
43
+
expect(TIMEOUT_OPTION_SECONDS).toContain(7200);
44
+
});
45
+
46
+
it('returns the canonical options unchanged when the stored value is already present',()=>{
it("merges a stored value that is not in the canonical list and keeps the list sorted so the select shows the user's existing choice instead of silently downgrading on save",()=>{
0 commit comments