Add GoQ backend support
This commit is contained in:
parent
9e01b123c9
commit
f5ae186cc8
17
main.go
17
main.go
|
|
@ -178,6 +178,16 @@ func main() {
|
|||
continue
|
||||
}
|
||||
refreshList(w)
|
||||
case "GoQ":
|
||||
if arg == "" {
|
||||
fmt.Fprintf(os.Stderr, "Error: GoQ requires a path argument\n")
|
||||
continue
|
||||
}
|
||||
if err := createSession("goq", arg); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
|
||||
continue
|
||||
}
|
||||
refreshList(w)
|
||||
case "Stop":
|
||||
if arg == "" {
|
||||
fmt.Fprintf(os.Stderr, "Usage: Stop <session-id>\n")
|
||||
|
|
@ -329,7 +339,7 @@ func main() {
|
|||
// parseCommand extracts command and argument from input text
|
||||
// Handles cases like "Kiro /path" -> ("Kiro", "/path")
|
||||
func parseCommand(cmd, arg string) (string, string) {
|
||||
commandsWithArgs := []string{"Kiro", "Claude", "Ollie", "Stop", "Restart", "Kill", "Alias", "Context"}
|
||||
commandsWithArgs := []string{"Kiro", "Claude", "Ollie", "GoQ", "Stop", "Restart", "Kill", "Alias", "Context"}
|
||||
|
||||
for _, cmdName := range commandsWithArgs {
|
||||
prefix := cmdName + " "
|
||||
|
|
@ -568,7 +578,7 @@ func writeFile(path string, data []byte) error {
|
|||
|
||||
func refreshList(w *acme.Win) {
|
||||
var buf strings.Builder
|
||||
buf.WriteString("Backends: [Kiro] [Claude] [Ollie]\n\n")
|
||||
buf.WriteString("Backends: [Kiro] [Claude] [Ollie] [GoQ]\n\n")
|
||||
|
||||
if !isConnected() {
|
||||
buf.WriteString("Not connected to anvillm daemon.\n")
|
||||
|
|
@ -644,13 +654,14 @@ type sessionEdit struct {
|
|||
// - <id> Kill the session with that ID
|
||||
// ~ <id> Stop the session (graceful)
|
||||
// @ <id> <alias> Set alias on the session
|
||||
// + <backend> <path> [alias] Start a new session (backends: claude, kiro-cli, ollie)
|
||||
// + <backend> <path> [alias] Start a new session (backends: claude, kiro-cli, ollie, goq)
|
||||
func parseSessionEdits(content string) []sessionEdit {
|
||||
var edits []sessionEdit
|
||||
validBackends := map[string]bool{
|
||||
"claude": true,
|
||||
"kiro-cli": true,
|
||||
"ollie": true,
|
||||
"goq": true,
|
||||
}
|
||||
for _, line := range strings.Split(content, "\n") {
|
||||
line = strings.TrimSpace(line)
|
||||
|
|
|
|||
Reference in New Issue