feat: start queued prompts when provider capacity returns #10132
main fromrefs/pull/10132/head·opened View on GitHubShowing 49 changed files with 138 additions and 46 deletions (loading 48).
🟠 High threads/ThreadComposer.tsx:141
The when-available path queues prompts with the prior thread runtimeMode and interactionMode, so unsaved per-draft selections are lost when the prompt eventually starts. The wait branch stores targetThread.runtimeMode/interactionMode instead of the command values passed by use-thread-composer-state.ts; preserve those overrides in the queued turn snapshot, as normal sends do.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/mobile/src/features/threads/ThreadComposer.tsx around line 141:
The `when-available` path queues prompts with the prior thread `runtimeMode` and `interactionMode`, so unsaved per-draft selections are lost when the prompt eventually starts. The wait branch stores `targetThread.runtimeMode`/`interactionMode` instead of the command values passed by `use-thread-composer-state.ts`; preserve those overrides in the queued turn snapshot, as normal sends do.
Not a defect — the wait path already preserves per-draft selections. onSendMessage in use-thread-composer-state.ts reads getComposerDraftSnapshot(threadKey) and enqueues runtimeMode: draft.runtimeMode ?? thread.runtimeMode and resolveProviderInteractionMode(provider, draft.interactionMode ?? thread.interactionMode) — the same resolved values a normal send uses; when-available only adds the waitForProvider flag on the same record. There is no targetThread reference in the mobile outbox path.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.