|
|
|
@@ -228,7 +228,6 @@ cmd_delegate() {
|
|
|
|
local msg_file="$LOGS_DIR/msg-$new_session.txt"
|
|
|
|
local msg_file="$LOGS_DIR/msg-$new_session.txt"
|
|
|
|
printf '%s' "$message" > "$msg_file"
|
|
|
|
printf '%s' "$message" > "$msg_file"
|
|
|
|
nohup sh -c "GITEA_TOKEN='${GITEA_TOKEN:-}' opencode run '@$msg_file' --session '$new_session'" >> "$log_file" 2>&1 &
|
|
|
|
nohup sh -c "GITEA_TOKEN='${GITEA_TOKEN:-}' opencode run '@$msg_file' --session '$new_session'" >> "$log_file" 2>&1 &
|
|
|
|
rm -f "$msg_file"
|
|
|
|
|
|
|
|
echo "Delegated to new session (logged to $(basename "$log_file"))"
|
|
|
|
echo "Delegated to new session (logged to $(basename "$log_file"))"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -379,10 +378,9 @@ cmd_start() {
|
|
|
|
|
|
|
|
|
|
|
|
cd "$worktree_path"
|
|
|
|
cd "$worktree_path"
|
|
|
|
local sanitized_id=$(echo "$new_session_id" | sed 's/[^a-zA-Z0-9_-]/_/g')
|
|
|
|
local sanitized_id=$(echo "$new_session_id" | sed 's/[^a-zA-Z0-9_-]/_/g')
|
|
|
|
local msg_file="$LOGS_DIR/msg-$sanitized_id.txt"
|
|
|
|
local msg_file="$worktree_path/.kugetsu-msg.txt"
|
|
|
|
printf '%s' "$dev_message" > "$msg_file"
|
|
|
|
printf '%s' "$dev_message" > "$msg_file"
|
|
|
|
nohup sh -c "GITEA_TOKEN='${GITEA_TOKEN:-}' opencode run '@$msg_file' --session '$new_session_id'" >> "$LOGS_DIR/dev-$sanitized_id.log" 2>&1 &
|
|
|
|
nohup sh -c "GITEA_TOKEN='${GITEA_TOKEN:-}' opencode run '@$msg_file' --session '$new_session_id'" >> "$LOGS_DIR/dev-$sanitized_id.log" 2>&1 &
|
|
|
|
rm -f "$msg_file"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "Session started for '$issue_ref': $new_session_id"
|
|
|
|
echo "Session started for '$issue_ref': $new_session_id"
|
|
|
|
echo "Worktree: $worktree_path"
|
|
|
|
echo "Worktree: $worktree_path"
|
|
|
|
@@ -446,10 +444,9 @@ cmd_continue() {
|
|
|
|
|
|
|
|
|
|
|
|
cd "$worktree_path"
|
|
|
|
cd "$worktree_path"
|
|
|
|
local sanitized_id=$(echo "$opencode_session_id" | sed 's/[^a-zA-Z0-9_-]/_/g')
|
|
|
|
local sanitized_id=$(echo "$opencode_session_id" | sed 's/[^a-zA-Z0-9_-]/_/g')
|
|
|
|
local msg_file="$LOGS_DIR/msg-$sanitized_id.txt"
|
|
|
|
local msg_file="$worktree_path/.kugetsu-msg.txt"
|
|
|
|
printf '%s' "$message" > "$msg_file"
|
|
|
|
printf '%s' "$message" > "$msg_file"
|
|
|
|
nohup sh -c "GITEA_TOKEN='${GITEA_TOKEN:-}' opencode run '@$msg_file' --session '$opencode_session_id'" >> "$LOGS_DIR/dev-$sanitized_id.log" 2>&1 &
|
|
|
|
nohup sh -c "GITEA_TOKEN='${GITEA_TOKEN:-}' opencode run '@$msg_file' --session '$opencode_session_id'" >> "$LOGS_DIR/dev-$sanitized_id.log" 2>&1 &
|
|
|
|
rm -f "$msg_file"
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
cmd_list() {
|
|
|
|
cmd_list() {
|
|
|
|
|