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