mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 18:26:05 +08:00
feat(core): open artifacts tools automatically (#13668)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * The AI Artifact Tool now auto-opens its preview panel as soon as it loads, giving immediate visibility without extra clicks. * The preview initializes proactively and remains in sync as data updates, streamlining the workflow and reducing setup friction. * Improves first-use experience by ensuring the preview is ready and visible on connection, enhancing responsiveness and clarity. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -160,6 +160,12 @@ export abstract class ArtifactTool<
|
||||
`;
|
||||
}
|
||||
|
||||
override connectedCallback() {
|
||||
super.connectedCallback();
|
||||
// open the preview panel immediately
|
||||
this.openOrUpdatePreviewPanel();
|
||||
}
|
||||
|
||||
override render() {
|
||||
const err = this.getErrorTemplate();
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user