fix: align Kimi hooks with official contracts

This commit is contained in:
ZacharyZhang-NY committed 2026-07-20 04:56:41 -04:00
1 parent f0e4694da2
commit c60b46b994
17 files changed
+1991 -635

No files matched your search

+2 -2
View File
@@ -2,6 +2,7 @@ package plugins
import (
"encoding/base64"
"encoding/binary"
"os"
"path/filepath"
"runtime"
@@ -29,8 +30,7 @@ func encodeCodexPowerShell(source string) string {
runes := utf16.Encode([]rune(source))
raw := make([]byte, len(runes)*2)
for index, value := range runes {
raw[index*2] = byte(value)
raw[index*2+1] = byte(value >> 8)
binary.LittleEndian.PutUint16(raw[index*2:], value)
}
return base64.StdEncoding.EncodeToString(raw)
}