mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-11 22:18:54 +08:00
feat(server): improve context management (#15448)
#### PR Dependency Tree * **PR #15448** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added workspace artifact upload, browsing, removal, deduplication, and library ownership support. * Copilot now supports scoped document and artifact search, canvas reading, live editor context, and frontend tools. * Added scope and focus selectors with source-resolution receipts in chat. * Added embedding health, progress, synchronization, and retrieval capabilities. * Added BYOK policy visibility, provider restrictions, endpoint dialect selection, and validation. * Added delegated editor interactions and userdata document authorization. * **Bug Fixes** * Improved attachment handling, cancellation, access control, retrieval fallbacks, workspace synchronization, and configuration validation. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -173,10 +173,12 @@ export class AffineFootnoteNode extends WithDisposable(ShadowlessElement) {
|
||||
};
|
||||
|
||||
private readonly _FootNoteDefaultContent = (footnote: FootNote) => {
|
||||
const label =
|
||||
footnote.label.match(/^(?:doc|attachment)-(\d+)$/)?.[1] ?? footnote.label;
|
||||
return html`<span
|
||||
class="footnote-content-default"
|
||||
@click=${this.onFootnoteClick}
|
||||
>${footnote.label}</span
|
||||
>${label}</span
|
||||
>`;
|
||||
};
|
||||
|
||||
|
||||
@@ -63,17 +63,19 @@ export type ReferenceInfo = z.infer<typeof ReferenceInfoSchema>;
|
||||
* It supports the following types:
|
||||
* 1. docId: string - the id of the doc
|
||||
* 2. blobId: string - the id of the attachment
|
||||
* 3. url: string - the url of the reference
|
||||
* 4. fileName: string - the name of the attachment
|
||||
* 5. fileType: string - the type of the attachment
|
||||
* 6. favicon: string - the favicon of the url reference
|
||||
* 7. title: string - the title of the url reference
|
||||
* 8. description: string - the description of the url reference
|
||||
* 3. artifactId: string - the id of a Copilot artifact
|
||||
* 4. url: string - the url of the reference
|
||||
* 5. fileName: string - the name of the attachment
|
||||
* 6. fileType: string - the type of the attachment
|
||||
* 7. favicon: string - the favicon of the url reference
|
||||
* 8. title: string - the title of the url reference
|
||||
* 9. description: string - the description of the url reference
|
||||
*/
|
||||
export const FootNoteReferenceParamsSchema = z.object({
|
||||
type: z.enum(FootNoteReferenceTypes),
|
||||
docId: z.string().optional(),
|
||||
blobId: z.string().optional(),
|
||||
artifactId: z.string().optional(),
|
||||
fileName: z.string().optional(),
|
||||
fileType: z.string().optional(),
|
||||
url: z.string().optional(),
|
||||
|
||||
Reference in New Issue
Block a user