Skip to main content
Glama

GenAIScript

Official
by microsoft
MIT License
43
2,820
  • Linux
  • Apple
commit-msg.genai.mts889 B
const msg = env.files[0] const msgContent = msg.content ?.split(/\n/g) .filter((l) => l && !/^#/.test(l)) .join("\n") if (msgContent) cancel("commit message already exists") // Check for staged changes and stage all changes if none are staged const diff = await git.diff({ staged: true, askStageOnEmpty: true }) if (!diff) cancel("no staged changes") // Generate commit message const res = await runPrompt( (_) => { _.def("GIT_DIFF", diff, { maxTokens: 20000 }) _.$`GIT_DIFF is a diff of all staged changes, coming from the command: \`\`\` git diff --cached \`\`\` Please generate a concise, one-line commit message for these changes. - do NOT add quotes` }, { cache: false, temperature: 0.8 } ) if (res.error) throw res.error const message = res.text if (!message) cancel("no message generated") await workspace.writeText(msg.filename, message)

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