mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-26 02:35:58 +08: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;
|
accessor reasoningConfig!: AIReasoningConfig;
|
||||||
|
|
||||||
@property({ attribute: false })
|
@property({ attribute: false })
|
||||||
accessor modelSwitchConfig!: AIModelSwitchConfig;
|
accessor modelSwitchConfig: AIModelSwitchConfig | undefined = undefined;
|
||||||
|
|
||||||
@property({ attribute: false })
|
@property({ attribute: false })
|
||||||
accessor docDisplayConfig!: DocDisplayConfig;
|
accessor docDisplayConfig!: DocDisplayConfig;
|
||||||
@@ -394,7 +394,7 @@ export class AIChatInput extends SignalWatcher(WithDisposable(LitElement)) {
|
|||||||
${ImageIcon()}
|
${ImageIcon()}
|
||||||
<affine-tooltip>Upload</affine-tooltip>
|
<affine-tooltip>Upload</affine-tooltip>
|
||||||
</div>
|
</div>
|
||||||
${this.modelSwitchConfig.visible.value
|
${this.modelSwitchConfig?.visible.value
|
||||||
? html`
|
? html`
|
||||||
<ai-chat-models
|
<ai-chat-models
|
||||||
class="chat-input-icon"
|
class="chat-input-icon"
|
||||||
|
|||||||
Reference in New Issue
Block a user