fix(go): mirror official Grok hooks

This commit is contained in:
ZacharyZhang-NY committed 2026-07-20 06:11:19 -04:00
1 parent ed36743d77
commit 7fe99f7e5f
18 files changed
+2239 -640

No files matched your search

@@ -63,6 +63,14 @@ func prepareSourceChange(
if !existed {
original = nil
}
if !remove && int64(len(next)) > maxManagedSourceBytes {
return nil, fmt.Errorf(
"%s exceeds %d bytes: %s",
label,
maxManagedSourceBytes,
filePath,
)
}
snapshot, err := readManagedFile(filePath, label, maxManagedSourceBytes)
if err != nil {
return nil, err