chore(go): audit providers kimi grok qwen letta
Move Kimi, Grok, and Qwen onto managed_runtime.go and shell_command.go; share the encoded and shell command builders and the quoted Windows legacy parser with Droid; split managed_changes.go; dedupe Letta's hook entry filtering and stop swallowing settings read errors. Claude-Session: https://claude.ai/code/session_01Agoc9bRVE9KL7mmWtey9Vq
This commit is contained in:
1 parent
1ede03d989
commit
34ff4c1ea8
34 files changed
+421
-1876
No files matched your search
@@ -85,32 +85,17 @@ func writeGrokChanges(
|
||||
agentDirectory string,
|
||||
hooksDirectory string,
|
||||
) error {
|
||||
hasChanges := false
|
||||
for _, change := range changes {
|
||||
if change != nil {
|
||||
hasChanges = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !hasChanges {
|
||||
if !hasFileChanges(changes) {
|
||||
return nil
|
||||
}
|
||||
if agentDirectory != "" {
|
||||
if err := EnsurePrivateDirectory(runtimeRoot); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := EnsurePrivateDirectory(agentDirectory); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if err := ensureManagedDirectory(
|
||||
filepath.Dir(hooksDirectory),
|
||||
"Grok home directory",
|
||||
); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := ensureManagedDirectory(hooksDirectory, "Grok hooks directory"); err != nil {
|
||||
return err
|
||||
}
|
||||
return writeChanges(changes, label, rename)
|
||||
return writeManagedChanges(
|
||||
changes, label, rename, runtimeRoot, agentDirectory,
|
||||
hooksDirectory, "Grok hooks directory",
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user