From c9bdc0dd88a7dd3543b3062a48243396617c40b6 Mon Sep 17 00:00:00 2001 From: shokollm <270575765+shokollm@users.noreply.github.com> Date: Wed, 8 Apr 2026 02:35:30 +0000 Subject: [PATCH] refactor: unify duplicated prompt sections using conditional variables - Extract conflict_check and delegator_section as conditional variables - Single heredoc instead of duplicate blocks - Resolve code duplication raised in PR comment --- skills/kugetsu/scripts/kugetsu-session.sh | 68 ++++++++--------------- 1 file changed, 22 insertions(+), 46 deletions(-) diff --git a/skills/kugetsu/scripts/kugetsu-session.sh b/skills/kugetsu/scripts/kugetsu-session.sh index 0960f87..91113e7 100755 --- a/skills/kugetsu/scripts/kugetsu-session.sh +++ b/skills/kugetsu/scripts/kugetsu-session.sh @@ -270,60 +270,37 @@ build_dev_agent_message() { local number=$(echo "$issue_ref" | grep -oE '#[0-9]+$' | tr -d '#') local worktree_path=$(issue_ref_to_worktree_path "$issue_ref") + local conflict_check="" + local review_notes="" + local delegator_header="" + local delegator_footer="" if [ -n "$user_message" ]; then - cat <