feat: new runtime options

This commit is contained in:
Harry
2026-01-07 00:01:55 +08:00
parent 1c7c475c43
commit 3902929d9f
15 changed files with 108 additions and 7 deletions

View File

@ -54,6 +54,9 @@ export const createFeaturesStore = (initProps?: Partial<FeaturesState>) => {
annotationReply: {
enabled: false,
},
runtime: {
enabled: false,
},
},
}
return createStore<FeatureStoreState>()(set => ({

View File

@ -77,6 +77,10 @@ export type AnnotationReplyConfig = {
}
}
export type Runtime = {
enabled: boolean
}
export enum FeatureEnum {
moreLikeThis = 'moreLikeThis',
opening = 'opening',
@ -87,6 +91,7 @@ export enum FeatureEnum {
moderation = 'moderation',
file = 'file',
annotationReply = 'annotationReply',
runtime = 'runtime',
}
export type Features = {
@ -99,6 +104,7 @@ export type Features = {
[FeatureEnum.moderation]?: SensitiveWordAvoidance
[FeatureEnum.file]?: FileUpload
[FeatureEnum.annotationReply]?: AnnotationReplyConfig
[FeatureEnum.runtime]?: Runtime
}
export type OnFeaturesChange = (features?: Features) => void