Skip to content

Commit

Permalink
Fix Jetpack AI features control types (#39826)
Browse files Browse the repository at this point in the history
* add changelog

* fix types for featuresControl and add default value for logo-generator feature
  • Loading branch information
CGastrell authored Oct 21, 2024
1 parent 8a7e99f commit e8806f8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: changed

AI Client: add types for AI assistant feature payload data branch featuresControl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ const INITIAL_STATE: LogoGeneratorStateProp = {
asyncRequestTimerId: 0,
isRequestingImage: false,
},
featuresControl: {
'logo-generator': {
enabled: false,
styles: [],
},
},
},
},
history: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ export type LogoGeneratorFeatureControl = FeatureControl & {

export type FeatureControl = {
enabled: boolean;
'min-jetpack-version': string;
[ key: string ]: FeatureControl | LogoGeneratorFeatureControl | boolean | string;
};

export type FeaturesControl = { [ key: string ]: FeatureControl };
export type FeaturesControl = {
[ key: string ]: FeatureControl | LogoGeneratorFeatureControl;
};

export type AiFeatureProps = {
hasFeature: boolean;
Expand Down

0 comments on commit e8806f8

Please sign in to comment.