Compare commits
10 Commits
fix/issue-
...
1a8c64c0a8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a8c64c0a8 | ||
|
|
fd79bfa3ea | ||
| 119c9b8fd9 | |||
|
|
7f7f8b1085 | ||
| 1a523a805a | |||
|
|
6aa84a35b9 | ||
| 6e2841bbda | |||
| 383f538438 | |||
| 3a2095861f | |||
| 4f2a04e0b4 |
@@ -53,5 +53,9 @@ load_agent_env() {
|
||||
set -a
|
||||
source "$ENV_DIR/default.env"
|
||||
set +a
|
||||
elif [ -f "$ENV_DIR/pm-agent.env" ]; then
|
||||
set -a
|
||||
source "$ENV_DIR/pm-agent.env"
|
||||
set +a
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ process_task() {
|
||||
|
||||
source "$SCRIPT_DIR/kugetsu-session.sh"
|
||||
|
||||
if worktree_exists "$issue_ref" "$HOME/.kugetsu-worktrees" || [ -f "$SESSIONS_DIR/$(issue_ref_to_filename "$issue_ref").json" ]; then
|
||||
if worktree_exists "$issue_ref" "$WORKTREES_DIR" || [ -f "$SESSIONS_DIR/$(issue_ref_to_filename "$issue_ref").json" ]; then
|
||||
log_file="$LOGS_DIR/delegate-$(date +%s).log"
|
||||
if cmd_continue "$issue_ref" "$message" >> "$log_file" 2>&1; then
|
||||
sleep 1
|
||||
|
||||
@@ -194,8 +194,8 @@ cmd_delegate() {
|
||||
|
||||
mkdir -p "$LOGS_DIR"
|
||||
local log_file="$LOGS_DIR/delegate-$(date +%s).log"
|
||||
nohup sh -c "GITEA_TOKEN='***' opencode run '$message' --continue --session '$pm_session' >> '$log_file' 2>&1" > /dev/null 2>&1 &
|
||||
disown
|
||||
load_agent_env "pm-agent"
|
||||
nohup sh -c "GITEA_TOKEN='${GITEA_TOKEN:-}' opencode run '$message' --continue --session '$pm_session'" >> "$log_file" 2>&1 &
|
||||
echo "Delegated to PM agent (logged to $(basename "$log_file"))"
|
||||
}
|
||||
|
||||
@@ -313,7 +313,8 @@ cmd_start() {
|
||||
|
||||
load_agent_env "dev"
|
||||
|
||||
(cd "$worktree_path" && nohup sh -c "GITEA_TOKEN='$GITEA_TOKEN' opencode run '$dev_message' --continue --session '$new_session_id'" >> "$LOGS_DIR/dev-$new_session_id.log" 2>&1 &) && disown
|
||||
cd "$worktree_path"
|
||||
nohup sh -c "GITEA_TOKEN='${GITEA_TOKEN:-}' opencode run '$dev_message' --continue --session '$new_session_id'" >> "$LOGS_DIR/dev-$new_session_id.log" 2>&1 &
|
||||
|
||||
echo "Session started for '$issue_ref': $new_session_id"
|
||||
echo "Worktree: $worktree_path"
|
||||
@@ -367,9 +368,10 @@ cmd_continue() {
|
||||
fi
|
||||
|
||||
if [ -n "$worktree_path" ] && [ -d "$worktree_path" ]; then
|
||||
(cd "$worktree_path" && nohup sh -c "GITEA_TOKEN='$GITEA_TOKEN' opencode run '$message' --continue --session '$opencode_session_id'" >> "$LOGS_DIR/dev-$opencode_session_id.log" 2>&1 &) && disown
|
||||
cd "$worktree_path"
|
||||
nohup sh -c "GITEA_TOKEN='${GITEA_TOKEN:-}' opencode run '$message' --continue --session '$opencode_session_id'" >> "$LOGS_DIR/dev-$opencode_session_id.log" 2>&1 &
|
||||
else
|
||||
nohup sh -c "GITEA_TOKEN='$GITEA_TOKEN' opencode run '$message' --continue --session '$opencode_session_id'" >> "$LOGS_DIR/dev-$opencode_session_id.log" 2>&1 & && disown
|
||||
nohup sh -c "GITEA_TOKEN='${GITEA_TOKEN:-}' opencode run '$message' --continue --session '$opencode_session_id'" >> "$LOGS_DIR/dev-$opencode_session_id.log" 2>&1 &
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -521,7 +523,7 @@ cmd_destroy() {
|
||||
local target="${1:-}"
|
||||
local force=false
|
||||
|
||||
if [ "$2" = "-y" ]; then
|
||||
if [ "${2:-}" = "-y" ]; then
|
||||
force=true
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user