fix: keep a chat pane mounted while its composer reads attachments

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Guilhem Lemouel
2026-09-18 18:08:08 +02:00
co-authored by Claude Opus 5
parent 05e0534caf
commit 4b7771e703
2 changed files with 9 additions and 6 deletions
@@ -378,7 +378,14 @@
)
$effect(() => {
chatHost.setComposerStaged(composerKey, editingMessageIndex, stagedBytes)
chatHost.setComposerHasDraft(composerKey, !draft.isEmpty || pendingFileBytes > 0)
chatHost.setComposerHasDraft(
composerKey,
!draft.isEmpty ||
pendingFileBytes > 0 ||
pendingImages > 0 ||
pendingBlobs > 0 ||
ingestionHolds > 0
)
})
$effect(() => () => chatHost.clearComposerStaged(composerKey))
@@ -2838,11 +2838,7 @@ export class AIChatManager implements ChatViewHost {
* queued message (whose text may be empty when it carries only attachments
* or context). */
get hasUnsentInput(): boolean {
return (
this.#composersWithDraft.size > 0 ||
!this.#queuedDraft.isEmpty ||
this.queuedContext !== undefined
)
return this.#composersWithDraft.size > 0 || this.#hasQueuedMessage()
}
/** Release the outgoing-files reservation identified by `key` (a per-send token).