fix: opencode message argument must come before flags in init
PR #54 fixed opencode arg order in cmd_delegate and cmd_start, but kugetsu init function still had message AFTER flags. Fixed in: - kugetsu_init function: message before --fork --session - Similar patterns in session creation code Closes related to #53
This commit is contained in:
@@ -654,9 +654,9 @@ cmd_doctor() {
|
||||
|
||||
local pm_context=$(kugetsu_get_pm_context)
|
||||
if [ -n "$pm_context" ]; then
|
||||
opencode run --fork --session "$base" "You are a PM (Project Manager) agent. Your role is to coordinate task delegation and review PRs. $pm_context" 2>&1 || true
|
||||
opencode run "You are a PM (Project Manager) agent. Your role is to coordinate task delegation and review PRs. $pm_context" --fork --session "$base" 2>&1 || true
|
||||
else
|
||||
opencode run --fork --session "$base" "You are a PM (Project Manager) agent. Your role is to coordinate task delegation and review PRs. Wait for instructions." 2>&1 || true
|
||||
opencode run "You are a PM (Project Manager) agent. Your role is to coordinate task delegation and review PRs. Wait for instructions." --fork --session "$base" 2>&1 || true
|
||||
fi
|
||||
|
||||
local after_sessions=$(opencode session list 2>/dev/null | grep -oP '^ses_\w+' | sort)
|
||||
@@ -774,7 +774,7 @@ cmd_init() {
|
||||
pm_prompt="You are a PM (Project Manager) agent. Your role is to coordinate task delegation and review PRs. $pm_context"
|
||||
fi
|
||||
|
||||
opencode run --fork --session "$new_session_id" "$pm_prompt" 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 new_pm_session_id=""
|
||||
|
||||
Reference in New Issue
Block a user