feat(core): add chat-panel track (#11323)

Close [AF-2434](https://linear.app/affine-design/issue/AF-2434).
This commit is contained in:
akumatus
2025-03-31 17:01:09 +00:00
parent bc0f32f20b
commit afd1a30b96
6 changed files with 48 additions and 2 deletions

View File

@@ -132,6 +132,10 @@ type PaymentEvents =
| 'confirmResumingSubscription';
// END SECTION
// SECTION: ai
type AIEvents = 'addEmbeddingDoc';
// END SECTION
// SECTION: attachment
type AttachmentEvents =
| 'openAttachmentInFullscreen'
@@ -177,6 +181,7 @@ type UserEvents =
| AccountEvents
| PaymentEvents
| DNDEvents
| AIEvents
| AttachmentEvents
| TemplateEvents
| NotificationEvents
@@ -362,6 +367,9 @@ const PageEvents = {
importModal: ['open'],
snapshot: ['import', 'export'],
},
chatPanel: {
chatPanelInput: ['addEmbeddingDoc'],
},
attachment: {
$: [
'openAttachmentInFullscreen',
@@ -567,6 +575,11 @@ export type EventArgs = {
linkDoc: { type: string; journal: boolean };
drop: { type: string };
dragStart: { type: string };
addEmbeddingDoc: {
type?: 'page' | 'edgeless';
control: 'addButton' | 'atMenu';
method: 'doc' | 'file' | 'tags' | 'collections' | 'suggestion';
};
openAttachmentInFullscreen: AttachmentEventArgs;
openAttachmentInNewTab: AttachmentEventArgs;
openAttachmentInPeekView: AttachmentEventArgs;