Replace 30+ files with upstream's exact versions to eliminate merge conflicts. Fork-only additions (interfaces, struct fields, methods) are re-added at non-conflicting positions or in separate _ext.go files. Files replaced: READMEs, CI configs, docs, Makefile, and ~20 Go source files with <30 line diffs from upstream. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
748 B
Go
30 lines
748 B
Go
package agent
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func NewAgentCommand() *cobra.Command {
|
|
var (
|
|
message string
|
|
sessionKey string
|
|
model string
|
|
debug bool
|
|
)
|
|
|
|
cmd := &cobra.Command{
|
|
Use: "agent",
|
|
Short: "Interact with the agent directly",
|
|
Args: cobra.NoArgs,
|
|
RunE: func(cmd *cobra.Command, _ []string) error {
|
|
return agentCmd(message, sessionKey, model, debug)
|
|
},
|
|
}
|
|
|
|
cmd.Flags().BoolVarP(&debug, "debug", "d", false, "Enable debug logging")
|
|
cmd.Flags().StringVarP(&message, "message", "m", "", "Send a single message (non-interactive mode)")
|
|
cmd.Flags().StringVarP(&sessionKey, "session", "s", "cli:default", "Session key")
|
|
cmd.Flags().StringVarP(&model, "model", "", "", "Model to use")
|
|
|
|
return cmd
|
|
}
|