mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
fix(core): chat block opens and throws an error (#12407)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved stability of the AI chat input to prevent errors when certain configuration options are missing. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -274,7 +274,7 @@ export class AIChatInput extends SignalWatcher(WithDisposable(LitElement)) {
|
||||
accessor reasoningConfig!: AIReasoningConfig;
|
||||
|
||||
@property({ attribute: false })
|
||||
accessor modelSwitchConfig!: AIModelSwitchConfig;
|
||||
accessor modelSwitchConfig: AIModelSwitchConfig | undefined = undefined;
|
||||
|
||||
@property({ attribute: false })
|
||||
accessor docDisplayConfig!: DocDisplayConfig;
|
||||
@@ -394,7 +394,7 @@ export class AIChatInput extends SignalWatcher(WithDisposable(LitElement)) {
|
||||
${ImageIcon()}
|
||||
<affine-tooltip>Upload</affine-tooltip>
|
||||
</div>
|
||||
${this.modelSwitchConfig.visible.value
|
||||
${this.modelSwitchConfig?.visible.value
|
||||
? html`
|
||||
<ai-chat-models
|
||||
class="chat-input-icon"
|
||||
|
||||
Reference in New Issue
Block a user