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,12 +1,14 @@
import { cancel, isCancel, select } from "@clack/prompts";
import pc from "picocolors";
import { DEFAULT_CONFIG } from "../constants";
import type { Runtime } from "../types";
import type { ProjectRuntime } from "../types";
export async function getRuntimeChoice(runtime?: Runtime): Promise<Runtime> {
export async function getRuntimeChoice(
runtime?: ProjectRuntime,
): Promise<ProjectRuntime> {
if (runtime !== undefined) return runtime;
const response = await select<Runtime>({
const response = await select<ProjectRuntime>({
message: "Which runtime would you like to use?",
options: [
{