feat: add ai chat example and update flags structure

This commit is contained in:
Aman Varshney
2025-03-31 22:52:21 +05:30
parent d6c4127bf5
commit a6ac5dc86c
32 changed files with 485 additions and 263 deletions

View File

@@ -1,16 +1,16 @@
import { cancel, isCancel, select } from "@clack/prompts";
import pc from "picocolors";
import type { PackageManager, Runtime } from "../types";
import type { ProjectPackageManager, ProjectRuntime } from "../types";
import { getUserPkgManager } from "../utils/get-package-manager";
export async function getPackageManagerChoice(
packageManager?: PackageManager,
): Promise<PackageManager> {
packageManager?: ProjectPackageManager,
): Promise<ProjectPackageManager> {
if (packageManager !== undefined) return packageManager;
const detectedPackageManager = getUserPkgManager();
const response = await select<PackageManager>({
const response = await select<ProjectPackageManager>({
message: "Which package manager do you want to use?",
options: [
{ value: "npm", label: "npm", hint: "Node Package Manager" },