refactor(monorepo): extract inbox and orch runtimes
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package orch
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"ai-workflow-skill/packages/coord-core/protocol"
|
||||
)
|
||||
|
||||
func resolveBodyValue(body, bodyFile string) (string, error) {
|
||||
if body != "" && bodyFile != "" {
|
||||
return "", protocol.InvalidInput("body and body-file are mutually exclusive", nil)
|
||||
}
|
||||
if bodyFile == "" {
|
||||
return body, nil
|
||||
}
|
||||
|
||||
content, err := os.ReadFile(bodyFile)
|
||||
if err != nil {
|
||||
return "", protocol.InvalidInput("failed to read body-file", err)
|
||||
}
|
||||
return string(content), nil
|
||||
}
|
||||
Reference in New Issue
Block a user