chore: remove link preview cache feature flag (#12568)

This commit is contained in:
donteatfriedrice
2025-05-27 10:07:32 +00:00
parent 69c7767003
commit af3c002022
6 changed files with 3 additions and 46 deletions

View File

@@ -5,7 +5,6 @@ import {
LinkPreviewService,
LinkPreviewServiceIdentifier,
} from '@blocksuite/affine/shared/services';
import { type BlockStdScope, StdIdentifier } from '@blocksuite/affine/std';
import { type ExtensionType } from '@blocksuite/affine/store';
import type { Container } from '@blocksuite/global/di';
import type { FrameworkProvider } from '@toeverything/infra';
@@ -13,12 +12,8 @@ import type { FrameworkProvider } from '@toeverything/infra';
import { ServerService } from '../../../modules/cloud/services/server';
class AffineLinkPreviewService extends LinkPreviewService {
constructor(
endpoint: string,
std: BlockStdScope,
cache: LinkPreviewCacheProvider
) {
super(std, cache);
constructor(endpoint: string, cache: LinkPreviewCacheProvider) {
super(cache);
this.setEndpoint(endpoint);
}
}
@@ -52,7 +47,6 @@ export function patchLinkPreviewService(
di.override(LinkPreviewServiceIdentifier, provider => {
return new AffineLinkPreviewService(
linkPreviewUrl,
provider.get(StdIdentifier),
provider.get(LinkPreviewCacheIdentifier)
);
});

View File

@@ -106,16 +106,6 @@ export const AFFINE_FLAGS = {
configurable: isCanaryBuild,
defaultState: isCanaryBuild,
},
enable_link_preview_cache: {
category: 'blocksuite',
bsFlag: 'enable_link_preview_cache',
displayName:
'com.affine.settings.workspace.experimental-features.enable-link-preview-cache.name',
description:
'com.affine.settings.workspace.experimental-features.enable-link-preview-cache.description',
configurable: isCanaryBuild,
defaultState: isCanaryBuild,
},
enable_emoji_folder_icon: {
category: 'affine',

View File

@@ -5778,14 +5778,6 @@ export function useAFFiNEI18N(): {
* `Let your words stand out. This also include the callout in the transcription block.`
*/
["com.affine.settings.workspace.experimental-features.enable-callout.description"](): string;
/**
* `Link Preview Cache`
*/
["com.affine.settings.workspace.experimental-features.enable-link-preview-cache.name"](): string;
/**
* `Once enabled, the link preview will be cached and cached data will be used when the same link is fetched again. Otherwise, the link preview will be fetched every time.`
*/
["com.affine.settings.workspace.experimental-features.enable-link-preview-cache.description"](): string;
/**
* `Embed Iframe Block`
*/

View File

@@ -1443,8 +1443,6 @@
"com.affine.settings.workspace.experimental-features.enable-block-meta.description": "Once enabled, all blocks will have created time, updated time, created by and updated by.",
"com.affine.settings.workspace.experimental-features.enable-callout.name": "Callout",
"com.affine.settings.workspace.experimental-features.enable-callout.description": "Let your words stand out. This also include the callout in the transcription block.",
"com.affine.settings.workspace.experimental-features.enable-link-preview-cache.name": "Link Preview Cache",
"com.affine.settings.workspace.experimental-features.enable-link-preview-cache.description": "Once enabled, the link preview will be cached and cached data will be used when the same link is fetched again. Otherwise, the link preview will be fetched every time.",
"com.affine.settings.workspace.experimental-features.enable-embed-iframe-block.name": "Embed Iframe Block",
"com.affine.settings.workspace.experimental-features.enable-embed-iframe-block.description": "Enables Embed Iframe Block.",
"com.affine.settings.workspace.experimental-features.enable-emoji-folder-icon.name": "Emoji Folder Icon",