feat(server): add doc embedding switch for workspace (#11760)

fix AI-33
This commit is contained in:
darkskygit
2025-04-17 07:13:22 +00:00
parent ebf1d5476d
commit 38e8806787
11 changed files with 71 additions and 11 deletions

View File

@@ -16,7 +16,12 @@ declare global {
export type { Workspace };
export type UpdateWorkspaceInput = Pick<
Partial<Workspace>,
'public' | 'enableAi' | 'enableUrlPreview' | 'name' | 'avatarKey'
| 'public'
| 'enableAi'
| 'enableUrlPreview'
| 'enableDocEmbedding'
| 'name'
| 'avatarKey'
>;
@Injectable()
@@ -88,5 +93,10 @@ export class WorkspaceModel extends BaseModel {
const workspace = await this.get(workspaceId);
return workspace?.enableUrlPreview ?? false;
}
async allowEmbedding(workspaceId: string) {
const workspace = await this.get(workspaceId);
return workspace?.enableDocEmbedding ?? false;
}
// #endregion
}