You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(dataconnect): Add confirmation for Gemini schema generation (#9282)
* feat(dataconnect): add confirmation for Gemini schema generation
Instead of directly asking for an app description to generate a schema with Gemini, this change first asks the user to confirm if they want to use Gemini.
If the user confirms, it then prompts for the app description with a default value of "an app for ${setup.projectId}".
* prompts
* changelog
* m
* feedback
* typo
* metrics
* Update index.ts
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
"Learn more about Gemini in Firebase and how it uses your data: https://firebase.google.com/docs/gemini-in-firebase#how-gemini-in-firebase-uses-your-data",
119
119
);
120
120
}
121
-
info.appDescription=awaitinput({
122
-
message: `Describe your app to automatically generate a schema with Gemini [Enter to use a template]:`,
121
+
constwantToGenerate=awaitconfirm({
122
+
message: "Do you want to generate schema and queries with Gemini?",
123
+
default: false,
123
124
});
124
-
if(info.appDescription){
125
+
if(wantToGenerate){
125
126
configstore.set("gemini",true);
126
127
awaitensureGIFApiTos(setup.projectId);
128
+
info.appDescription=awaitinput({
129
+
message: `Describe your app idea:`,
130
+
validate: async(s: string)=>{
131
+
if(s.length>0){
132
+
returntrue;
133
+
}
134
+
return"Please enter a description for your app idea.";
0 commit comments