diff --git a/agents/anvillm-agent.conf b/agents/anvillm-agent.conf new file mode 100644 index 0000000..906138b --- /dev/null +++ b/agents/anvillm-agent.conf @@ -0,0 +1,17 @@ +{ + "prompt": "", + "mcpServers": { + "superpowers-mcp-server": { + "command": "superpowers-mcp-server", + "args": [], + "env": { + "SUPERPOWERD_SESSION_TOKEN": "${SUPERPOWERD_SESSION_TOKEN}" + } + } + }, + "hooks": { + "agentSpawn": "anvillm-hook agentSpawn", + "userPromptSubmit": "anvillm-hook userPromptSubmit", + "stop": "anvillm-hook stop" + } +} diff --git a/agents/default.json b/agents/default.json new file mode 100644 index 0000000..87134db --- /dev/null +++ b/agents/default.json @@ -0,0 +1,17 @@ +{ + "prompt": "", + "mcpServers": { + "superpowers-mcp-server": { + "command": "superpowers-mcp-server", + "args": [], + "env": { + "SUPERPOWERD_SESSION_TOKEN": "${SUPERPOWERD_SESSION_TOKEN}" + } + } + }, + "hooks": { + "agentSpawn": "true", + "userPromptSubmit": "true", + "stop": "true" + } +} diff --git a/config.json.sample b/config.json.sample deleted file mode 100644 index ce11e73..0000000 --- a/config.json.sample +++ /dev/null @@ -1,17 +0,0 @@ -{ - "globalShortcut": "Ctrl+Space", - "mcpServers": { - "superpowers-mcp-server": { - "command": "superpowers-mcp-server", - "args": [], - "env": { - "SUPERPOWERD_SESSION_TOKEN": "${SUPERPOWERD_SESSION_TOKEN}" - } - } - }, - "hooks": { - "agentSpawn": "anvillm-hook agentSpawn", - "userPromptSubmit": "anvillm-hook userPromptSubmit", - "stop": "anvillm-hook stop" - } -} diff --git a/main.go b/main.go index c02b857..9941623 100644 --- a/main.go +++ b/main.go @@ -274,7 +274,10 @@ func main() { ) // Load the default agent config. - agentName := "default" + agentName := os.Getenv("OLLIE_AGENT") + if agentName == "" { + agentName = "default" + } if len(os.Args) > 2 { agentName = os.Args[2] } @@ -539,7 +542,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case "ctrl+c": now := time.Now() - + // Handle double-press to quit if m.quitPending && now.Sub(m.lastCtrlC) <= 1*time.Second { // Double Ctrl+C within 1 second: quit diff --git a/mkfile b/mkfile index be99067..e631d5b 100644 --- a/mkfile +++ b/mkfile @@ -4,8 +4,11 @@ all:V: install build:V: go build -o $INSTALL_PATH/ollie + mkdir -p $HOME/.config/ollie + cp -rf agents $HOME/.config/ollie install:V: build clean:V: rm -f $INSTALL_PATH/ollie +