terminalSource = "terminal"
)
-// checkSocketPath makes sure that path fits in the address of a Unix socket.
-func checkSocketPath(path string) error {
- if len(path) > socketPathBytes {
- return fmt.Errorf("socket path %s is longer than %d bytes: set ONECHAT_DIR to a shorter path", path, socketPathBytes)
- }
-
- return nil
-}
-
// SocketRequest is one line from a client: "send" with the text of a user
// message, "interrupt", "stop" with the name of a subagent in Text, or
// "whatsapp" with the text after /whatsapp of a WhatsApp command, or "backup"
Text string `json:"text,omitempty"`
Path string `json:"path,omitempty"`
}
+
+// checkSocketPath makes sure that path fits in the address of a Unix socket.
+func checkSocketPath(path string) error {
+ if len(path) > socketPathBytes {
+ return fmt.Errorf("socket path %s is longer than %d bytes: set ONECHAT_DIR to a shorter path", path, socketPathBytes)
+ }
+
+ return nil
+}