fix(core): cannot abort AI chat immediately after sending a message (#12209)

Close [AI-118](https://linear.app/affine-design/issue/AI-118)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - The abort button in the chat input is now available during both "transmitting" and "loading" states, giving users more control to cancel ongoing actions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
akumatus
2025-05-12 03:47:05 +00:00
parent 62fe906f04
commit 8cbefba341

View File

@@ -426,7 +426,7 @@ export class AIChatInput extends SignalWatcher(WithDisposable(LitElement)) {
? html`<span class="chat-input-icon-label">Reason</span>`
: nothing}
</div>
${status === 'transmitting'
${status === 'transmitting' || status === 'loading'
? html`<div @click=${this._handleAbort} data-testid="chat-panel-stop">
${ChatAbortIcon}
</div>`