Add GoQ backend support

This commit is contained in:
Levi Neely 2026-04-10 16:14:08 +02:00
parent 9e01b123c9
commit f5ae186cc8
1 changed files with 15 additions and 4 deletions

19
main.go
View File

@ -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,
"ollie": true,
"goq": true,
}
for _, line := range strings.Split(content, "\n") {
line = strings.TrimSpace(line)