Skip to main content
Glama

GenAIScript

Official
by microsoft
MIT License
43
2,820
  • Linux
  • Apple
ci.ts1.17 kB
import { confirm } from "@inquirer/prompts" import { logVerbose } from "../../core/src/util" import { indent } from "../../core/src/indent" import { isCI } from "../../core/src/ci" const confirmed: string[] = [] /** * Prompts the user for confirmation or skips the prompt in a CI environment. * * @param message - The prompt message to display to the user. * @param options - Optional configuration for the prompt. * @param options.preview - An optional preview message to display before the prompt. If provided, it will be logged before the prompt. * @returns A promise that resolves to `true` if the user confirmed, if running in CI, or if the message was already confirmed, and `false` otherwise. */ export async function confirmOrSkipInCI( message: string, options?: { preview?: string } ): Promise<boolean> { if (isCI || confirmed.includes(message)) return true const { preview } = options || {} if (preview) { logVerbose(indent(`preview:`, " ")) logVerbose(indent(preview, " ")) } const res = await confirm({ message, default: true, }) if (res) confirmed.push(message) return res }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/microsoft/genaiscript'

If you have feedback or need assistance with the MCP directory API, please join our Discord server