feat: synced blocks (transclusion) (#2163)

* feat: synced blocks (transclusion)

* fix:remove name

* make placeholders smaller

* feat: enforce strict transclusion schema

* fix: scope synced blocks to workspace, gate unsync on edit permission

* fix collab module error
This commit is contained in:
Philip Okugbe
2026-05-08 13:23:16 +01:00
committed by GitHub
parent c9fa6e20b3
commit de60aa7e61
64 changed files with 4388 additions and 105 deletions
@@ -89,6 +89,22 @@ export class AttachmentRepo {
.execute();
}
async findByIds(
ids: string[],
opts?: {
trx?: KyselyTransaction;
},
): Promise<Attachment[]> {
if (ids.length === 0) return [];
const db = dbOrTx(this.db, opts?.trx);
return db
.selectFrom('attachments')
.select(this.baseFields)
.where('id', 'in', ids)
.execute();
}
async findByAiChatId(
aiChatId: string,
opts?: {