fix(kugetsu): set GIT_EDITOR=cat for non-interactive git operations

Set GIT_EDITOR and EDITOR to 'cat' in kugetsu init to prevent
vim from opening during git operations in headless mode.

This fixes issues where git rebase --continue would hang waiting
for vim TTY input in opencode sessions.

Fixes #70
This commit is contained in:
shokollm
2026-04-01 08:49:57 +00:00
parent 4d3205de86
commit ad468f39da

View File

@@ -734,6 +734,10 @@ cmd_init() {
pm_prompt="You are a PM (Project Manager) agent. Your role is to coordinate task delegation and review PRs. $pm_context" pm_prompt="You are a PM (Project Manager) agent. Your role is to coordinate task delegation and review PRs. $pm_context"
fi fi
# Set GIT_EDITOR to cat for non-interactive git operations (rebase, etc.)
export GIT_EDITOR=cat
export EDITOR=cat
opencode run "$pm_prompt" --fork --session "$new_session_id" 2>&1 || true opencode run "$pm_prompt" --fork --session "$new_session_id" 2>&1 || true
local after_sessions=$(opencode session list 2>/dev/null | grep -oP '^ses_\w+' | sort) local after_sessions=$(opencode session list 2>/dev/null | grep -oP '^ses_\w+' | sort)