Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/init/features/ailogic.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export interface AiLogicInfo {
// Minimal interface - no configuration needed
[key: string]: unknown;
}

/**
*
*/
Comment on lines +6 to +8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The JSDoc comment for this function is empty. Adding a brief description, even for a no-op function, improves code clarity and helps other developers understand its purpose without reading the implementation details.

Suggested change
/**
*
*/
/**
* Does nothing as AI Logic questions are handled by the MCP schema.
*/

export async function askQuestions(): Promise<void> {
// No-op - questions already handled by MCP schema
}

/**
*
*/
Comment on lines +13 to +15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This JSDoc comment is empty. Please add a brief description to explain why this function is a no-op. This improves code documentation and maintainability.

Suggested change
/**
*
*/
/**
* Does nothing as AI Logic provisioning happens via API and requires no local config changes.
*/

export async function actuate(): Promise<void> {
// No-op - AI Logic provisioning happens via API, no local config changes needed
}
5 changes: 5 additions & 0 deletions src/init/features/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ export {
actuate as apptestingAcutate,
} from "./apptesting";
export { doSetup as aitools } from "./aitools";
export {
askQuestions as aiLogicAskQuestions,
AiLogicInfo,
actuate as aiLogicActuate,
} from "./ailogic";
9 changes: 9 additions & 0 deletions src/init/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
instructions: string[];

/** Basic Project information */
project?: Record<string, any>;

Check warning on line 26 in src/init/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
projectId?: string;
projectLocation?: string;
isBillingEnabled?: boolean;

hosting?: Record<string, any>;

Check warning on line 31 in src/init/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
}

export interface SetupInfo {
Expand All @@ -38,6 +38,7 @@
dataconnectSdk?: features.DataconnectSdkInfo;
storage?: features.StorageInfo;
apptesting?: features.ApptestingInfo;
ailogic?: features.AiLogicInfo;
}

interface Feature {
Expand Down Expand Up @@ -96,12 +97,20 @@
askQuestions: features.apptestingAskQuestions,
actuate: features.apptestingAcutate,
},
{
name: "ailogic",
askQuestions: features.aiLogicAskQuestions,
actuate: features.aiLogicActuate,
},
{ name: "aitools", displayName: "AI Tools", doSetup: features.aitools },
];

const featureMap = new Map(featuresList.map((feature) => [feature.name, feature]));

/**
*
*/
Comment on lines +110 to +112
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This JSDoc comment is empty. Adding a description for the init function will improve code documentation and make it easier for others to understand its role in the initialization process.

Suggested change
/**
*
*/
/**
* Kicks off the init flow for the specified features.
*/

export async function init(setup: Setup, config: Config, options: any): Promise<any> {

Check warning on line 113 in src/init/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type

Check warning on line 113 in src/init/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
const nextFeature = setup.features?.shift();
if (nextFeature) {
const start = process.uptime();
Expand All @@ -121,17 +130,17 @@
);

if (f.doSetup) {
await f.doSetup(setup, config, options);

Check warning on line 133 in src/init/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe argument of type `any` assigned to a parameter of type `Options`
} else {
if (f.askQuestions) {
await f.askQuestions(setup, config, options);

Check warning on line 136 in src/init/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe argument of type `any` assigned to a parameter of type `Options`
}
if (f.actuate) {
await f.actuate(setup, config, options);

Check warning on line 139 in src/init/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe argument of type `any` assigned to a parameter of type `Options`
}
}
if (f.postSetup) {
await f.postSetup(setup, config, options);

Check warning on line 143 in src/init/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe argument of type `any` assigned to a parameter of type `Options`
}

const duration = Math.floor((process.uptime() - start) * 1000);
Expand All @@ -142,7 +151,7 @@
}

/** Actuate the feature init flow from firebase_init MCP tool. */
export async function actuate(setup: Setup, config: Config, options: any): Promise<any> {

Check warning on line 154 in src/init/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type

Check warning on line 154 in src/init/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
const nextFeature = setup.features?.shift();
if (nextFeature) {
const start = process.uptime();
Expand Down
Loading
Loading