Skip to content

Commit 9926bcf

Browse files
Extend FeatureData types and parsing for visual-card presentation
Add presentation and image fields to the FeatureData interface and update parseFeature() to extract them from the server-provided data.
1 parent e4473e1 commit 9926bcf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

routes/ai-home/stage.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ interface FeatureData {
4141
description: string;
4242
category: string;
4343
settingsFields: SettingsFieldData[];
44+
presentation: string;
45+
image: string;
4446
}
4547

4648
interface PageData {
@@ -120,6 +122,8 @@ function parseFeature( value: unknown ): FeatureData | null {
120122
description: toStringValue( feature.description ),
121123
category: toStringValue( feature.category ) || 'other',
122124
settingsFields: ( rawFields as unknown[] ).filter( isSettingsField ),
125+
presentation: toStringValue( feature.presentation ) || 'toggle',
126+
image: toStringValue( feature.image ),
123127
};
124128
}
125129

@@ -449,6 +453,8 @@ function AISettingsPage() {
449453
description: '',
450454
category: 'other',
451455
settingsFields: [],
456+
presentation: 'toggle',
457+
image: '',
452458
};
453459
} );
454460

0 commit comments

Comments
 (0)