fix: skip migrations and version check when called as git hook

Move isHookCalled() check before runMigrations() and
checkIsLatestVersion() so that during git rebase, each pick commit
exits immediately without expensive I/O and network calls.

Also adds missing await on prepareCommitMessageHook() to properly
handle async errors.

Closes #493

Signed-off-by: majiayu000 <1835304752@qq.com>
This commit is contained in:
majiayu000
2026-03-21 10:55:47 +08:00
parent 40182f26b3
commit bc608e97bd
3 changed files with 47 additions and 34 deletions

View File

@@ -88062,8 +88062,8 @@ var MLXEngine = class {
var DeepseekEngine = class extends OpenAiEngine {
constructor(config6) {
super({
...config6,
baseURL: "https://api.deepseek.com/v1"
baseURL: "https://api.deepseek.com/v1",
...config6
});
// Identical method from OpenAiEngine, re-implemented here
this.generateCommitMessage = async (messages) => {