UNPKG

firebase-tools

Version:
34 lines (33 loc) 1.79 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.consult_assistant = void 0; const zod_1 = require("zod"); const tool_1 = require("../../tool"); const util_1 = require("../../util"); const fdcExperience_1 = require("../../../gemini/fdcExperience"); exports.consult_assistant = (0, tool_1.tool)({ name: "consult_assistant", description: "Access an AI assistant specialized in all aspects of **Firebase**. " + "Use this tool to get **detailed information**, **best practices**, **troubleshooting steps**, **code examples**, and **contextual help** regarding Firebase services, features, and project configuration. " + "This includes questions about Firestore, Authentication, Cloud Functions, Hosting, Storage, Analytics, and more. " + "It can also provide insights based on the **current Firebase project context**.", inputSchema: zod_1.z.object({ prompt: zod_1.z .string() .describe("The specific question or task related to Firebase. " + "Be precise and include relevant details, such as the Firebase service in question, the desired outcome, or any error messages encountered. " + "Examples: 'What's the best way to deploy a React app to Firebase Hosting?', 'Explain Firebase Authentication with Google Sign-In.' , 'What are the current project settings for 'projectId'? "), }), annotations: { title: "Consult Firebase Assistant", readOnlyHint: true, }, _meta: { requiresProject: true, requiresAuth: true, requiresGemini: true, }, }, async ({ prompt }, { projectId }) => { const schema = await (0, fdcExperience_1.chatWithFirebase)(prompt, projectId); return (0, util_1.toContent)(schema); });