项目文件夹

文件
Octopus 60fcb9a824 feat(provider/minimax): add MiniMax LLM support (#579)
* feat(provider/minimax): add MiniMax LLM support

* fix(provider/minimax): align model behavior

* fix(provider/minimax): recommend MiniMax-M3

---------

Co-authored-by: octo-patch <266937838+octo-patch@users.noreply.github.com>
Co-authored-by: kapelame <kape@kapedeMacBook-Air.local>
Co-authored-by: Louistiti <louis.grenard@gmail.com>
2026-07-13 00:38:50 +08:00

37 行
1.3 KiB
JavaScript

import fs from 'node:fs'
import { LogHelper } from '@/helpers/log-helper'
/**
* This script is executed after "git commit" or "git merge" (Git hook https://git-scm.com/docs/githooks#_commit_msg)
* it ensures the authenticity of commit messages
*
* @see https://gist.github.com/qoomon/5dfcdf8eec66a051ecd85625518cfd13
*/
;(async () => {
LogHelper.info('Checking commit message...')
const commitEditMsgFile = '.git/COMMIT_EDITMSG'
if (fs.existsSync(commitEditMsgFile)) {
try {
const commitMessage = await fs.promises.readFile(
commitEditMsgFile,
'utf8'
)
const regex =
'(build|BREAKING|chore|ci|docs|feat|fix|perf|refactor|style|test)(\\((web app|scripts|server|agent mode|controlled mode|aurora|messaging app|built-in command|hotword|python tcp server|bridge\\/(python|nodejs)|tool\\/([\\w-]+)|skill\\/([\\w-]+)|provider\\/(llamacpp|sglang|openrouter|zai|minimax|openai|anthropic|moonshotai|huggingface|cerebras|groq)))?\\)?: .{1,50}'
if (commitMessage.match(regex) !== null) {
LogHelper.success('Commit message validated')
} else {
LogHelper.error(`Commit message does not match the format: ${regex}`)
process.exit(1)
}
} catch (e) {
LogHelper.error(e.message)
process.exit(1)
}
}
})()