Skip to main content
Glama

GenAIScript

Official
by microsoft
MIT License
43
2,820
  • Linux
  • Apple
scriptquickpick.ts1.7 kB
import * as vscode from "vscode" import { templateGroup } from "../../core/src/ast" import { groupBy } from "../../core/src/util" import { TemplateQuickPickItem } from "./parameterquickpick" export function scriptsToQuickPickItems( templates: PromptScript[], options?: { create?: boolean } ): TemplateQuickPickItem[] { const { create } = options || {} const cats = groupBy(templates, templateGroup) const items: vscode.QuickPickItem[] = [] for (const cat in cats) { items.push(<vscode.QuickPickItem>{ label: cat, kind: vscode.QuickPickItemKind.Separator, }) items.push( ...cats[cat].map( (template) => <TemplateQuickPickItem>{ label: template.title ?? (template.filename && vscode.workspace.asRelativePath( template.filename )) ?? template.id, description: `${template.id} ${ template.description || "" }`, template, } ) ) } if (create) { items.push(<vscode.QuickPickItem>{ label: "", kind: vscode.QuickPickItemKind.Separator, }) items.push(<TemplateQuickPickItem>{ label: "Create a new GenAIScript script...", description: "Create a new script script in the current workspace.", action: "create", }) } return items }

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