From ab5d515c702fceb1e0b0de40d44007b3bf124e64 Mon Sep 17 00:00:00 2001 From: Grant Braught Date: Wed, 1 Jul 2026 18:55:11 +0000 Subject: [PATCH 01/12] test post-session skill --- .github/copilot-instructions.md | 2 +- .github/skills/log-session/SKILL.md | 23 ++++++ .../log-session/post_copilot_session.sh | 78 +++++++++++++++++++ 3 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 .github/skills/log-session/SKILL.md create mode 100755 .github/skills/log-session/post_copilot_session.sh diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 72c92ff..d8641bb 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,4 +1,4 @@ -## Co-Pilot Pull Request Reviews +## Copilot Pull Request Reviews - When reviewing a pull request read the body of the pull request and identify the "Type of Work" and the "Topic". - If no "Type of Work" or "Topic" is checked in the task list or more than one "Type of Work" or more than one "Topic" is checked, leave a comment on the pull request asking the author to check exactly one "Type of Work" and exactly one "Topic" and do not perform a review. diff --git a/.github/skills/log-session/SKILL.md b/.github/skills/log-session/SKILL.md new file mode 100644 index 0000000..b4a77df --- /dev/null +++ b/.github/skills/log-session/SKILL.md @@ -0,0 +1,23 @@ +--- +name: log-session +description: Publishes the current Copilot session transcript to the pull request that is open for the active branch. +disable-model-invocation: true +allowed-tools: shell +--- + +# Role & Intent + +This skill allows Copilot to log the current session transcript to an open Pull Request on GitHub. + +## When to use + +Use this skill when the user asks to "log this session", "post the transcript to the PR", or similar commands. + +## Execution + +1. Get the current session name and transcript from the session context. +2. Run the following command in the terminal to invoke the script substituting the session name and transcript for the placeholders: + +```bash +post_copilot_session.sh "" "" +``` diff --git a/.github/skills/log-session/post_copilot_session.sh b/.github/skills/log-session/post_copilot_session.sh new file mode 100755 index 0000000..37ca1d1 --- /dev/null +++ b/.github/skills/log-session/post_copilot_session.sh @@ -0,0 +1,78 @@ +#!/bin/bash + +# Script to post the current Copilot session to a PR comment. +# Usage: ./bin/post_copilot_session.sh "Session Name" "Session Content" + +SESSION_NAME=$1 +SESSION_CONTENT=$2 +DATE_TIME=$(date '+%Y-%m-%d %H:%M:%S') +MODEL_USED="Gemini 3 Flash (Preview)" + +if [ -z "$SESSION_NAME" ] || [ -z "$SESSION_CONTENT" ]; then + echo "Usage: $0 \"Session Name\" \"Session Content\"" + exit 1 +fi + +BRANCH=$(git branch --show-current) +UPSTREAM=$(gh repo view --json nameWithOwner -q .nameWithOwner) + +# 1. Check if a pull request is open for the active branch +PR_NUMBER=$(gh pr list --head "$BRANCH" --json number --jq '.[0].number') + +if [ -z "$PR_NUMBER" ]; then + echo "No open pull request found for branch: $BRANCH" + + # 2. Check if the current user is a maintainer + IS_MAINTAINER=$(gh api "repos/$UPSTREAM" --jq '.permissions.maintain') + + if [ "$IS_MAINTAINER" = "true" ]; then + # Check if we are in a non-interactive shell (like a skill) + if [ -t 0 ]; then + read -p "You are a maintainer. Would you like to create a new pull request for $BRANCH? (y/n): " -n 1 -r + echo + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + echo "Operation cancelled by user." + exit 0 + fi + else + echo "Non-interactive shell detected. Skipping PR creation for maintainer." + exit 1 + fi + fi + + echo "Creating a new pull request..." + PR_URL=$(gh pr create --title "Session Log: $BRANCH" --body "Automated pull request for session logging." --base main) + PR_NUMBER=$(echo "$PR_URL" | grep -oE '[0-9]+$') + + if [ -z "$PR_NUMBER" ]; then + echo "Failed to create or retrieve PR number." + exit 1 + fi + echo "Created PR #$PR_NUMBER" +fi + +# 3. Check for an existing comment for this session to update it +# Using gh api to find a comment that starts with the session header. +EXISTING_COMMENT_ID=$(gh api "repos/$UPSTREAM/issues/$PR_NUMBER/comments" --jq ".[] | select(.body | startswith(\"### Copilot Session: $SESSION_NAME\")) | .id" | head -n 1) + +# 4. Prepare the comment body +COMMENT_BODY=$(cat < /dev/null +else + echo "Posting new session log to PR #$PR_NUMBER..." + gh pr comment "$PR_NUMBER" --body "$COMMENT_BODY" +fi + +echo "Done." From ee1907488848667081d29da7c81c3d3e2ee34fae Mon Sep 17 00:00:00 2001 From: Grant Braught Date: Fri, 3 Jul 2026 12:29:00 +0000 Subject: [PATCH 02/12] wip --- .github/skills/log-prompts/SKILL.md | 14 +++ .github/skills/log-prompts/createComment.bash | 3 + .github/skills/log-prompts/openPR.bash | 87 +++++++++++++++++++ .github/skills/log-prompts/postPrompts.bash | 3 + 4 files changed, 107 insertions(+) create mode 100644 .github/skills/log-prompts/SKILL.md create mode 100755 .github/skills/log-prompts/createComment.bash create mode 100755 .github/skills/log-prompts/openPR.bash create mode 100755 .github/skills/log-prompts/postPrompts.bash diff --git a/.github/skills/log-prompts/SKILL.md b/.github/skills/log-prompts/SKILL.md new file mode 100644 index 0000000..ce5266e --- /dev/null +++ b/.github/skills/log-prompts/SKILL.md @@ -0,0 +1,14 @@ +--- +name: log-prompts +description: Logs the prompts in the active chat window to a comment on the open pull request for the active branch. +allowed-tools: shell +--- + +The user will run this skill when they want to log the prompts in the active chat window to a comment on the open pull request for the active branch. + +## Instructions: + +1. Copy the entire contents of the chat window into a text file named `chat.txt` in the `skills/log-prompts` directory. +2. Run the `openPR.bash` script in the terminal. +3. Run the `createComment.bash` script in the terminal. +4. Run the `postPrompts.bash` script in the terminal. diff --git a/.github/skills/log-prompts/createComment.bash b/.github/skills/log-prompts/createComment.bash new file mode 100755 index 0000000..d32b676 --- /dev/null +++ b/.github/skills/log-prompts/createComment.bash @@ -0,0 +1,3 @@ +#!/bin/bash + +echo "Creating Prompt Log comment for pull request..." diff --git a/.github/skills/log-prompts/openPR.bash b/.github/skills/log-prompts/openPR.bash new file mode 100755 index 0000000..d186a77 --- /dev/null +++ b/.github/skills/log-prompts/openPR.bash @@ -0,0 +1,87 @@ +#!/bin/bash + +# Get the current branch name +CURRENT_BRANCH=$(git branch --show-current) + +# Check if we're on a branch (not in detached HEAD state) +if [ -z "$CURRENT_BRANCH" ]; then + echo "Error: Not on a branch" + exit 1 +fi + +# Check if there's already an open pull request for this branch +EXISTING_PR=$(gh pr list --head "$CURRENT_BRANCH" --state open --json number --jq '.[0].number' 2>/dev/null) + +if [ -n "$EXISTING_PR" ]; then + # PR already exists, do nothing + exit 0 +fi + +# No PR exists, prompt the user +echo "" +echo "No open pull request found for branch: $CURRENT_BRANCH" +read -p "Do you want to create a pull request? (y/n) " -n 1 -r +echo "" + +if [[ ! $REPLY =~ ^[Yy]$ ]]; then + echo "Pull request creation cancelled." + exit 0 +fi + +# Read PULL_REQUEST_TEMPLATE.md and extract options dynamically +TEMPLATE_FILE="../../PULL_REQUEST_TEMPLATE.md" + +if [ ! -f "$TEMPLATE_FILE" ]; then + echo "Error: $TEMPLATE_FILE not found" + exit 1 +fi + +# Extract Type of Work options (between "### Type of Work" and "### Topic") +mapfile -t TYPE_OPTIONS < <(sed -n '/^### Type of Work/,/^### Topic/p' "$TEMPLATE_FILE" | grep -oP '(?<=- \[ \] - )\S+' | grep -v '^$') + +# Extract Topic options (between "### Topic" and "### Time Estimate") +mapfile -t TOPIC_OPTIONS < <(sed -n '/^### Topic/,/^### Time Estimate/p' "$TEMPLATE_FILE" | grep -oP '(?<=- \[ \] - ).+' | sed 's/^[[:space:]]*//') + +# Ask for Type of Work +echo "" +echo "Select Type of Work:" +for i in "${!TYPE_OPTIONS[@]}"; do + echo "$((i + 1))) ${TYPE_OPTIONS[$i]}" +done +read -p "Enter your choice (1-${#TYPE_OPTIONS[@]}): " -r TYPE_CHOICE + +if [[ ! $TYPE_CHOICE =~ ^[0-9]+$ ]] || [ "$TYPE_CHOICE" -lt 1 ] || [ "$TYPE_CHOICE" -gt ${#TYPE_OPTIONS[@]} ]; then + echo "Invalid choice. Exiting." + exit 1 +fi + +TYPE_OF_WORK="${TYPE_OPTIONS[$((TYPE_CHOICE - 1))]}" + +# Ask for Topic +echo "" +echo "Select Topic:" +for i in "${!TOPIC_OPTIONS[@]}"; do + echo "$((i + 1))) ${TOPIC_OPTIONS[$i]}" +done +read -p "Enter your choice (1-${#TOPIC_OPTIONS[@]}): " -r TOPIC_CHOICE + +if [[ ! $TOPIC_CHOICE =~ ^[0-9]+$ ]] || [ "$TOPIC_CHOICE" -lt 1 ] || [ "$TOPIC_CHOICE" -gt ${#TOPIC_OPTIONS[@]} ]; then + echo "Invalid choice. Exiting." + exit 1 +fi + +TOPIC="${TOPIC_OPTIONS[$((TOPIC_CHOICE - 1))]}" + +# Check if the active branch has any commits +COMMIT_COUNT=$(git rev-list --count HEAD 2>/dev/null || echo "0") + +if [ "$COMMIT_COUNT" -eq 0 ]; then + # No commits on this branch, create an empty commit + COMMIT_MESSAGE="Starting $TYPE_OF_WORK - $TOPIC" + git commit --allow-empty -m "$COMMIT_MESSAGE" +fi + +# Create the PR with a title that includes the Type of Work and Topic +PR_TITLE="$TYPE_OF_WORK - $TOPIC" + +gh pr create --base main --head "$CURRENT_BRANCH" --title "$PR_TITLE" --body "" --draft \ No newline at end of file diff --git a/.github/skills/log-prompts/postPrompts.bash b/.github/skills/log-prompts/postPrompts.bash new file mode 100755 index 0000000..13a8a8f --- /dev/null +++ b/.github/skills/log-prompts/postPrompts.bash @@ -0,0 +1,3 @@ +#!/bin/bash + +echo "Posting prompts to pull request..." From 4fd872b48cdb2e704a87f1d8a2758344fca62de7 Mon Sep 17 00:00:00 2001 From: Grant Braught Date: Fri, 3 Jul 2026 12:29:26 +0000 Subject: [PATCH 03/12] wip --- .github/skills/log-session/SKILL.md | 23 ------ .../log-session/post_copilot_session.sh | 78 ------------------- .gitignore | 2 + 3 files changed, 2 insertions(+), 101 deletions(-) delete mode 100644 .github/skills/log-session/SKILL.md delete mode 100755 .github/skills/log-session/post_copilot_session.sh diff --git a/.github/skills/log-session/SKILL.md b/.github/skills/log-session/SKILL.md deleted file mode 100644 index b4a77df..0000000 --- a/.github/skills/log-session/SKILL.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: log-session -description: Publishes the current Copilot session transcript to the pull request that is open for the active branch. -disable-model-invocation: true -allowed-tools: shell ---- - -# Role & Intent - -This skill allows Copilot to log the current session transcript to an open Pull Request on GitHub. - -## When to use - -Use this skill when the user asks to "log this session", "post the transcript to the PR", or similar commands. - -## Execution - -1. Get the current session name and transcript from the session context. -2. Run the following command in the terminal to invoke the script substituting the session name and transcript for the placeholders: - -```bash -post_copilot_session.sh "" "" -``` diff --git a/.github/skills/log-session/post_copilot_session.sh b/.github/skills/log-session/post_copilot_session.sh deleted file mode 100755 index 37ca1d1..0000000 --- a/.github/skills/log-session/post_copilot_session.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash - -# Script to post the current Copilot session to a PR comment. -# Usage: ./bin/post_copilot_session.sh "Session Name" "Session Content" - -SESSION_NAME=$1 -SESSION_CONTENT=$2 -DATE_TIME=$(date '+%Y-%m-%d %H:%M:%S') -MODEL_USED="Gemini 3 Flash (Preview)" - -if [ -z "$SESSION_NAME" ] || [ -z "$SESSION_CONTENT" ]; then - echo "Usage: $0 \"Session Name\" \"Session Content\"" - exit 1 -fi - -BRANCH=$(git branch --show-current) -UPSTREAM=$(gh repo view --json nameWithOwner -q .nameWithOwner) - -# 1. Check if a pull request is open for the active branch -PR_NUMBER=$(gh pr list --head "$BRANCH" --json number --jq '.[0].number') - -if [ -z "$PR_NUMBER" ]; then - echo "No open pull request found for branch: $BRANCH" - - # 2. Check if the current user is a maintainer - IS_MAINTAINER=$(gh api "repos/$UPSTREAM" --jq '.permissions.maintain') - - if [ "$IS_MAINTAINER" = "true" ]; then - # Check if we are in a non-interactive shell (like a skill) - if [ -t 0 ]; then - read -p "You are a maintainer. Would you like to create a new pull request for $BRANCH? (y/n): " -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]]; then - echo "Operation cancelled by user." - exit 0 - fi - else - echo "Non-interactive shell detected. Skipping PR creation for maintainer." - exit 1 - fi - fi - - echo "Creating a new pull request..." - PR_URL=$(gh pr create --title "Session Log: $BRANCH" --body "Automated pull request for session logging." --base main) - PR_NUMBER=$(echo "$PR_URL" | grep -oE '[0-9]+$') - - if [ -z "$PR_NUMBER" ]; then - echo "Failed to create or retrieve PR number." - exit 1 - fi - echo "Created PR #$PR_NUMBER" -fi - -# 3. Check for an existing comment for this session to update it -# Using gh api to find a comment that starts with the session header. -EXISTING_COMMENT_ID=$(gh api "repos/$UPSTREAM/issues/$PR_NUMBER/comments" --jq ".[] | select(.body | startswith(\"### Copilot Session: $SESSION_NAME\")) | .id" | head -n 1) - -# 4. Prepare the comment body -COMMENT_BODY=$(cat < /dev/null -else - echo "Posting new session log to PR #$PR_NUMBER..." - gh pr comment "$PR_NUMBER" --body "$COMMENT_BODY" -fi - -echo "Done." diff --git a/.gitignore b/.gitignore index a917fb2..a1e7a70 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ yarn-error.log* pnpm-debug.log* lerna-debug.log* +.github/skills/log-prompts/chat*.txt + node_modules flashword/dist dist-ssr From 5cb22b3c87d013a57f952a49136373d9f2e17909 Mon Sep 17 00:00:00 2001 From: Grant Braught Date: Fri, 3 Jul 2026 12:33:03 +0000 Subject: [PATCH 04/12] wip --- .github/skills/log-prompts/openPR.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/skills/log-prompts/openPR.bash b/.github/skills/log-prompts/openPR.bash index d186a77..58f2366 100755 --- a/.github/skills/log-prompts/openPR.bash +++ b/.github/skills/log-prompts/openPR.bash @@ -73,7 +73,7 @@ fi TOPIC="${TOPIC_OPTIONS[$((TOPIC_CHOICE - 1))]}" # Check if the active branch has any commits -COMMIT_COUNT=$(git rev-list --count HEAD 2>/dev/null || echo "0") +COMMIT_COUNT=$(git rev-list --count main..$CURRENT_BRANCH 2>/dev/null || echo "0") if [ "$COMMIT_COUNT" -eq 0 ]; then # No commits on this branch, create an empty commit From b250803bdadfe5360284e28ffe219291957c85b1 Mon Sep 17 00:00:00 2001 From: Grant Braught Date: Fri, 3 Jul 2026 12:55:13 +0000 Subject: [PATCH 05/12] completes OpenPR script Assisted-by Claude Haiku 4.5: --- .cspell.json | 2 ++ .github/skills/log-prompts/openPR.bash | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.cspell.json b/.cspell.json index a9e8d9f..2bf7a11 100644 --- a/.cspell.json +++ b/.cspell.json @@ -4,6 +4,7 @@ "files": [ "**/*.{js,vue,md,html,css,bash}", ".github/**/*.md", + ".github/skills/**/*.bash", ".devcontainer/**/*.bash" ], "ignorePaths": [ @@ -28,6 +29,7 @@ "prettier", "setsid", "streetsidesoftware", + "toplevel", "vite", "vitejs", "vuejs", diff --git a/.github/skills/log-prompts/openPR.bash b/.github/skills/log-prompts/openPR.bash index 58f2366..f9fe6fa 100755 --- a/.github/skills/log-prompts/openPR.bash +++ b/.github/skills/log-prompts/openPR.bash @@ -1,5 +1,7 @@ #!/bin/bash +REPO_ROOT=$(git rev-parse --show-toplevel) + # Get the current branch name CURRENT_BRANCH=$(git branch --show-current) @@ -29,7 +31,7 @@ if [[ ! $REPLY =~ ^[Yy]$ ]]; then fi # Read PULL_REQUEST_TEMPLATE.md and extract options dynamically -TEMPLATE_FILE="../../PULL_REQUEST_TEMPLATE.md" +TEMPLATE_FILE="$REPO_ROOT/.github/PULL_REQUEST_TEMPLATE.md" if [ ! -f "$TEMPLATE_FILE" ]; then echo "Error: $TEMPLATE_FILE not found" @@ -84,4 +86,8 @@ fi # Create the PR with a title that includes the Type of Work and Topic PR_TITLE="$TYPE_OF_WORK - $TOPIC" -gh pr create --base main --head "$CURRENT_BRANCH" --title "$PR_TITLE" --body "" --draft \ No newline at end of file +# Read the PULL_REQUEST_TEMPLATE and check the selected Type of Work and Topic +PR_BODY=$(cat "$TEMPLATE_FILE" | sed "s/- \[ \] - $TYPE_OF_WORK/- [X] - $TYPE_OF_WORK/" | sed "s/- \[ \] - $TOPIC/- [X] - $TOPIC/") + +git push upstream "$CURRENT_BRANCH" +gh pr create --base main --head "$CURRENT_BRANCH" --title "$PR_TITLE" --body "$PR_BODY" \ No newline at end of file From ab3595d80bdd6482a45d5c3f48f7d1291601bb81 Mon Sep 17 00:00:00 2001 From: Grant Braught Date: Fri, 3 Jul 2026 12:57:05 +0000 Subject: [PATCH 06/12] makes user press enter after y --- .github/skills/log-prompts/openPR.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/skills/log-prompts/openPR.bash b/.github/skills/log-prompts/openPR.bash index f9fe6fa..5a26427 100755 --- a/.github/skills/log-prompts/openPR.bash +++ b/.github/skills/log-prompts/openPR.bash @@ -22,7 +22,7 @@ fi # No PR exists, prompt the user echo "" echo "No open pull request found for branch: $CURRENT_BRANCH" -read -p "Do you want to create a pull request? (y/n) " -n 1 -r +read -p "Do you want to create a pull request? (y/n) " -r echo "" if [[ ! $REPLY =~ ^[Yy]$ ]]; then From 2233da571241cf7f0507d9422f74de80a9cc7ac2 Mon Sep 17 00:00:00 2001 From: Grant Braught Date: Fri, 3 Jul 2026 16:54:35 +0000 Subject: [PATCH 07/12] wip --- .github/skills/log-prompts/SKILL.md | 12 ++- .github/skills/log-prompts/createComment.bash | 87 ++++++++++++++++++- .../skills/log-prompts/processChatJson.bash | 2 + .../skills/log-prompts/processChatLog.bash | 23 +++++ .github/skills/log-prompts/tmp | 9 ++ 5 files changed, 128 insertions(+), 5 deletions(-) create mode 100644 .github/skills/log-prompts/processChatJson.bash create mode 100755 .github/skills/log-prompts/processChatLog.bash create mode 100644 .github/skills/log-prompts/tmp diff --git a/.github/skills/log-prompts/SKILL.md b/.github/skills/log-prompts/SKILL.md index ce5266e..9bb6643 100644 --- a/.github/skills/log-prompts/SKILL.md +++ b/.github/skills/log-prompts/SKILL.md @@ -8,7 +8,11 @@ The user will run this skill when they want to log the prompts in the active cha ## Instructions: -1. Copy the entire contents of the chat window into a text file named `chat.txt` in the `skills/log-prompts` directory. -2. Run the `openPR.bash` script in the terminal. -3. Run the `createComment.bash` script in the terminal. -4. Run the `postPrompts.bash` script in the terminal. +1. Do not think or reason, follow these instructions exactly. +2. If the chat window is empty, end this skill and do not log any prompts to the pull request. +3. Use the VSCode command `workbench.action.chat.export` to export the chat as json into `/var/tmp/chat-log.json`. +4. Stop. + + + + diff --git a/.github/skills/log-prompts/createComment.bash b/.github/skills/log-prompts/createComment.bash index d32b676..1305b64 100755 --- a/.github/skills/log-prompts/createComment.bash +++ b/.github/skills/log-prompts/createComment.bash @@ -1,3 +1,88 @@ #!/bin/bash -echo "Creating Prompt Log comment for pull request..." +# 1. Find the open pull request to the upstream for the active branch. +CURRENT_BRANCH=$(git branch --show-current) +PR_INFO=$(gh pr list --head "$CURRENT_BRANCH" --state open --json number,url --jq '.[0]') + +if [[ -z "$PR_INFO" || "$PR_INFO" == "null" ]]; then + echo "No open pull request found for branch '$CURRENT_BRANCH'." + echo "Please create a pull request before running this skill." + exit 1 +fi + +PR_NUMBER=$(echo "$PR_INFO" | jq -r '.number') +CHAT_FILE="$(dirname "$0")/chat.txt" + +if [[ ! -f "$CHAT_FILE" ]]; then + echo "Error: $CHAT_FILE not found." + exit 1 +fi + +# 2. Find all comments on the pull request that have the heading "Copilot Chat Log". +# We use the GitHub CLI to get all comments. +COMMENTS=$(gh pr view "$PR_NUMBER" --json comments --jq '.comments') + +# Function to extract User prompts from a comment body +get_user_prompts() { + echo "$1" | grep "^User:" +} + +# 3. Check if all "User:" prompts in existing "Copilot Chat Log" comments are in chat.txt +ALL_IN_CHAT=true +MATCHING_COMMENT_ID="" +MATCHING_COMMENT_BODY="" + +# We'll iterate through comments that have the heading +LOG_COMMENTS=$(echo "$COMMENTS" | jq -c '.[] | select(.body | startswith("# Copilot Chat Log"))') + +if [[ -z "$LOG_COMMENTS" ]]; then + ALL_IN_CHAT=false +else + # Check each log comment + while read -r comment; do + BODY=$(echo "$comment" | jq -r '.body') + URL=$(echo "$comment" | jq -r '.url') + # Extract numeric ID from URL (e.g., ...#issuecomment-123456) + ID=$(echo "$URL" | grep -oE "[0-9]+$") + + # Get all User lines from this comment + PROMPTS=$(get_user_prompts "$BODY") + + while read -r prompt; do + if [[ -n "$prompt" ]]; then + if ! grep -qF "$prompt" "$CHAT_FILE"; then + ALL_IN_CHAT=false + break 2 + fi + fi + done <<< "$PROMPTS" + + # If we reach here for this comment, it matches. + # We'll keep track of the last matching one to update it. + MATCHING_COMMENT_ID="$ID" + MATCHING_COMMENT_BODY="$BODY" + done <<< "$LOG_COMMENTS" +fi + +# 4. Update or Create +TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S %Z") +CHAT_CONTENT=$(cat "$CHAT_FILE") + +if [[ "$ALL_IN_CHAT" == "true" && -n "$MATCHING_COMMENT_ID" ]]; then + # We found a matching log, append/update it. + # The requirement says "append them to the comment". + # Usually this means refreshing the comment content to match the full chat history. + # We keep the original heading and timestamp if possible, or just overwrite. + # Let's preserve the original header and timestamp from the matching comment if we can. + HEADER_AND_TIME=$(echo "$MATCHING_COMMENT_BODY" | head -n 2) + NEW_BODY=$(printf "%s\n\n%s" "$HEADER_AND_TIME" "$CHAT_CONTENT") + + gh api -X PATCH "repos/{owner}/{repo}/issues/comments/$MATCHING_COMMENT_ID" -f body="$NEW_BODY" > /dev/null + echo "Updated existing Copilot Chat Log comment ($MATCHING_COMMENT_ID)." +else + # Add a new "Copilot Chat Log" comment. + NEW_BODY=$(printf "# Copilot Chat Log\n%s\n\n%s" "$TIMESTAMP" "$CHAT_CONTENT") + gh pr comment "$PR_NUMBER" --body "$NEW_BODY" + echo "Created new Copilot Chat Log comment." +fi + diff --git a/.github/skills/log-prompts/processChatJson.bash b/.github/skills/log-prompts/processChatJson.bash new file mode 100644 index 0000000..05a7907 --- /dev/null +++ b/.github/skills/log-prompts/processChatJson.bash @@ -0,0 +1,2 @@ +#!/bin/bash + diff --git a/.github/skills/log-prompts/processChatLog.bash b/.github/skills/log-prompts/processChatLog.bash new file mode 100755 index 0000000..f67e335 --- /dev/null +++ b/.github/skills/log-prompts/processChatLog.bash @@ -0,0 +1,23 @@ +#!/bin/bash + +# Path to the chat log file +CHAT_FILE="$(dirname "$0")/chat.txt" + +# Check if the chat file exists +if [[ ! -f "$CHAT_FILE" ]]; then + echo "Error: $CHAT_FILE not found." + exit 1 +fi + +TEMP_FILE=$(mktemp) +# Extract prompts, removing "User:" prefix but adding/preserving "---" separator +awk '/^User:/ { + print "---"; + sub(/^User: */, ""); + print; + p=1; + next +} /^Assistant:/ {p=0} p' "$CHAT_FILE" > "$TEMP_FILE" +mv "$TEMP_FILE" "$CHAT_FILE" + +echo "Processed $CHAT_FILE: User prompts extracted and separators preserved." diff --git a/.github/skills/log-prompts/tmp b/.github/skills/log-prompts/tmp new file mode 100644 index 0000000..611af22 --- /dev/null +++ b/.github/skills/log-prompts/tmp @@ -0,0 +1,9 @@ + +IGNORE THE REMAINING INSTRUCTIONS IN THIS FILE. +3. From that content, extract ALL of the prompts entered by the user. Do not omit any prompts. +4. Place the prompts entered by the user into a text file named `chat.txt` in the `skills/log-prompts` directory. Do not include any copilot generated output in `chat.txt`. + - place a line containing `---` before each prompt. + - Replace the `chat.txt` file if it already exists. +5. Run the `openPR.bash` script in the terminal. +6. Run the `createComment.bash` script in the terminal. +7. Run the `postPrompts.bash` script in the terminal. \ No newline at end of file From 2c35f27a1b3e912e48f3fd9ea12335bc3206b6ef Mon Sep 17 00:00:00 2001 From: Grant Braught Date: Sat, 4 Jul 2026 18:59:33 +0000 Subject: [PATCH 08/12] finishes the log-prompt.bash script Assisted-by: Gemini 3 Flash --- .devcontainer/devcontainer.json | 7 +- .github/skills/log-prompts/SKILL.md | 18 ---- .github/skills/log-prompts/createComment.bash | 88 ------------------- .github/skills/log-prompts/postPrompts.bash | 3 - .../skills/log-prompts/processChatJson.bash | 2 - .../skills/log-prompts/processChatLog.bash | 23 ----- .github/skills/log-prompts/tmp | 9 -- .gitignore | 3 +- bin/log-prompts.bash | 12 +++ bin/log-prompts/cleanUp.bash | 18 ++++ bin/log-prompts/createComment.bash | 79 +++++++++++++++++ bin/log-prompts/exportChatLog.bash | 25 ++++++ .../skills => bin}/log-prompts/openPR.bash | 71 ++++++++------- bin/log-prompts/processChatJson.bash | 18 ++++ 14 files changed, 198 insertions(+), 178 deletions(-) delete mode 100644 .github/skills/log-prompts/SKILL.md delete mode 100755 .github/skills/log-prompts/createComment.bash delete mode 100755 .github/skills/log-prompts/postPrompts.bash delete mode 100644 .github/skills/log-prompts/processChatJson.bash delete mode 100755 .github/skills/log-prompts/processChatLog.bash delete mode 100644 .github/skills/log-prompts/tmp create mode 100755 bin/log-prompts.bash create mode 100755 bin/log-prompts/cleanUp.bash create mode 100755 bin/log-prompts/createComment.bash create mode 100755 bin/log-prompts/exportChatLog.bash rename {.github/skills => bin}/log-prompts/openPR.bash (56%) create mode 100755 bin/log-prompts/processChatJson.bash diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 38dd9e4..281a3fc 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -20,6 +20,10 @@ "label": "noVNC", "protocol": "http", "onAutoForward": "silent" + }, + "3000": { + "label": "VSCodeCommandServer", + "onAutoForward": "silent" } }, "otherPortsAttributes": { @@ -31,7 +35,8 @@ "streetsidesoftware.code-spell-checker", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint", - "yzhang.markdown-all-in-one" + "yzhang.markdown-all-in-one", + "crimson206.vscode-command-server" ], "settings": { "editor.formatOnSave": true, diff --git a/.github/skills/log-prompts/SKILL.md b/.github/skills/log-prompts/SKILL.md deleted file mode 100644 index 9bb6643..0000000 --- a/.github/skills/log-prompts/SKILL.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: log-prompts -description: Logs the prompts in the active chat window to a comment on the open pull request for the active branch. -allowed-tools: shell ---- - -The user will run this skill when they want to log the prompts in the active chat window to a comment on the open pull request for the active branch. - -## Instructions: - -1. Do not think or reason, follow these instructions exactly. -2. If the chat window is empty, end this skill and do not log any prompts to the pull request. -3. Use the VSCode command `workbench.action.chat.export` to export the chat as json into `/var/tmp/chat-log.json`. -4. Stop. - - - - diff --git a/.github/skills/log-prompts/createComment.bash b/.github/skills/log-prompts/createComment.bash deleted file mode 100755 index 1305b64..0000000 --- a/.github/skills/log-prompts/createComment.bash +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/bash - -# 1. Find the open pull request to the upstream for the active branch. -CURRENT_BRANCH=$(git branch --show-current) -PR_INFO=$(gh pr list --head "$CURRENT_BRANCH" --state open --json number,url --jq '.[0]') - -if [[ -z "$PR_INFO" || "$PR_INFO" == "null" ]]; then - echo "No open pull request found for branch '$CURRENT_BRANCH'." - echo "Please create a pull request before running this skill." - exit 1 -fi - -PR_NUMBER=$(echo "$PR_INFO" | jq -r '.number') -CHAT_FILE="$(dirname "$0")/chat.txt" - -if [[ ! -f "$CHAT_FILE" ]]; then - echo "Error: $CHAT_FILE not found." - exit 1 -fi - -# 2. Find all comments on the pull request that have the heading "Copilot Chat Log". -# We use the GitHub CLI to get all comments. -COMMENTS=$(gh pr view "$PR_NUMBER" --json comments --jq '.comments') - -# Function to extract User prompts from a comment body -get_user_prompts() { - echo "$1" | grep "^User:" -} - -# 3. Check if all "User:" prompts in existing "Copilot Chat Log" comments are in chat.txt -ALL_IN_CHAT=true -MATCHING_COMMENT_ID="" -MATCHING_COMMENT_BODY="" - -# We'll iterate through comments that have the heading -LOG_COMMENTS=$(echo "$COMMENTS" | jq -c '.[] | select(.body | startswith("# Copilot Chat Log"))') - -if [[ -z "$LOG_COMMENTS" ]]; then - ALL_IN_CHAT=false -else - # Check each log comment - while read -r comment; do - BODY=$(echo "$comment" | jq -r '.body') - URL=$(echo "$comment" | jq -r '.url') - # Extract numeric ID from URL (e.g., ...#issuecomment-123456) - ID=$(echo "$URL" | grep -oE "[0-9]+$") - - # Get all User lines from this comment - PROMPTS=$(get_user_prompts "$BODY") - - while read -r prompt; do - if [[ -n "$prompt" ]]; then - if ! grep -qF "$prompt" "$CHAT_FILE"; then - ALL_IN_CHAT=false - break 2 - fi - fi - done <<< "$PROMPTS" - - # If we reach here for this comment, it matches. - # We'll keep track of the last matching one to update it. - MATCHING_COMMENT_ID="$ID" - MATCHING_COMMENT_BODY="$BODY" - done <<< "$LOG_COMMENTS" -fi - -# 4. Update or Create -TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S %Z") -CHAT_CONTENT=$(cat "$CHAT_FILE") - -if [[ "$ALL_IN_CHAT" == "true" && -n "$MATCHING_COMMENT_ID" ]]; then - # We found a matching log, append/update it. - # The requirement says "append them to the comment". - # Usually this means refreshing the comment content to match the full chat history. - # We keep the original heading and timestamp if possible, or just overwrite. - # Let's preserve the original header and timestamp from the matching comment if we can. - HEADER_AND_TIME=$(echo "$MATCHING_COMMENT_BODY" | head -n 2) - NEW_BODY=$(printf "%s\n\n%s" "$HEADER_AND_TIME" "$CHAT_CONTENT") - - gh api -X PATCH "repos/{owner}/{repo}/issues/comments/$MATCHING_COMMENT_ID" -f body="$NEW_BODY" > /dev/null - echo "Updated existing Copilot Chat Log comment ($MATCHING_COMMENT_ID)." -else - # Add a new "Copilot Chat Log" comment. - NEW_BODY=$(printf "# Copilot Chat Log\n%s\n\n%s" "$TIMESTAMP" "$CHAT_CONTENT") - gh pr comment "$PR_NUMBER" --body "$NEW_BODY" - echo "Created new Copilot Chat Log comment." -fi - diff --git a/.github/skills/log-prompts/postPrompts.bash b/.github/skills/log-prompts/postPrompts.bash deleted file mode 100755 index 13a8a8f..0000000 --- a/.github/skills/log-prompts/postPrompts.bash +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -echo "Posting prompts to pull request..." diff --git a/.github/skills/log-prompts/processChatJson.bash b/.github/skills/log-prompts/processChatJson.bash deleted file mode 100644 index 05a7907..0000000 --- a/.github/skills/log-prompts/processChatJson.bash +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash - diff --git a/.github/skills/log-prompts/processChatLog.bash b/.github/skills/log-prompts/processChatLog.bash deleted file mode 100755 index f67e335..0000000 --- a/.github/skills/log-prompts/processChatLog.bash +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# Path to the chat log file -CHAT_FILE="$(dirname "$0")/chat.txt" - -# Check if the chat file exists -if [[ ! -f "$CHAT_FILE" ]]; then - echo "Error: $CHAT_FILE not found." - exit 1 -fi - -TEMP_FILE=$(mktemp) -# Extract prompts, removing "User:" prefix but adding/preserving "---" separator -awk '/^User:/ { - print "---"; - sub(/^User: */, ""); - print; - p=1; - next -} /^Assistant:/ {p=0} p' "$CHAT_FILE" > "$TEMP_FILE" -mv "$TEMP_FILE" "$CHAT_FILE" - -echo "Processed $CHAT_FILE: User prompts extracted and separators preserved." diff --git a/.github/skills/log-prompts/tmp b/.github/skills/log-prompts/tmp deleted file mode 100644 index 611af22..0000000 --- a/.github/skills/log-prompts/tmp +++ /dev/null @@ -1,9 +0,0 @@ - -IGNORE THE REMAINING INSTRUCTIONS IN THIS FILE. -3. From that content, extract ALL of the prompts entered by the user. Do not omit any prompts. -4. Place the prompts entered by the user into a text file named `chat.txt` in the `skills/log-prompts` directory. Do not include any copilot generated output in `chat.txt`. - - place a line containing `---` before each prompt. - - Replace the `chat.txt` file if it already exists. -5. Run the `openPR.bash` script in the terminal. -6. Run the `createComment.bash` script in the terminal. -7. Run the `postPrompts.bash` script in the terminal. \ No newline at end of file diff --git a/.gitignore b/.gitignore index a1e7a70..3311525 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,8 @@ yarn-error.log* pnpm-debug.log* lerna-debug.log* -.github/skills/log-prompts/chat*.txt +**/chat.json +**/processed_chat.txt node_modules flashword/dist diff --git a/bin/log-prompts.bash b/bin/log-prompts.bash new file mode 100755 index 0000000..6b94e6b --- /dev/null +++ b/bin/log-prompts.bash @@ -0,0 +1,12 @@ +#!/bin/bash + +REPO_ROOT=$(git rev-parse --show-toplevel) +cd "$REPO_ROOT/bin/log-prompts" || exit 1 + +./openPR.bash && \ +./cleanUp.bash && \ +./exportChatLog.bash && \ +./processChatJson.bash && \ +./createComment.bash + +./cleanUp.bash \ No newline at end of file diff --git a/bin/log-prompts/cleanUp.bash b/bin/log-prompts/cleanUp.bash new file mode 100755 index 0000000..08a50b6 --- /dev/null +++ b/bin/log-prompts/cleanUp.bash @@ -0,0 +1,18 @@ +#!/bin/bash + +REPO_ROOT=$(git rev-parse --show-toplevel) + +# Delete any chat.json logs that are found in the repository. +# Search recursively from the repository root to find all chat.json files +CHAT_LOGS=$(find "$REPO_ROOT" -name "chat.json" -type f) +if [ -n "$CHAT_LOGS" ]; then + echo "Deleting chat.json file(s)." + rm -f $CHAT_LOGS +fi + +# Delete any processed-chat.txt files that are found in the repository. +PROCESSED_CHAT_LOGS=$(find "$REPO_ROOT" -name "processed-chat.txt" -type f) +if [ -n "$PROCESSED_CHAT_LOGS" ]; then + echo "Deleting processed-chat.txt file(s)." + rm -f $PROCESSED_CHAT_LOGS +fi \ No newline at end of file diff --git a/bin/log-prompts/createComment.bash b/bin/log-prompts/createComment.bash new file mode 100755 index 0000000..775ecf3 --- /dev/null +++ b/bin/log-prompts/createComment.bash @@ -0,0 +1,79 @@ +#!/bin/bash + +REPO_ROOT=$(git rev-parse --show-toplevel) + +# Get the current branch name +CURRENT_BRANCH=$(git branch --show-current) + +# Find the open pull request for the current branch +PR_NUMBER=$(gh pr list --head "$CURRENT_BRANCH" --state open --json number --jq '.[0].number' 2>/dev/null) + +if [ -z "$PR_NUMBER" ]; then + echo "Error: No open pull request found for branch $CURRENT_BRANCH." + exit 1 +fi + +# Find the chat.json file +CHAT_LOG=$(find "$REPO_ROOT" -name "chat.json" -type f | head -n 1) + +if [ -z "$CHAT_LOG" ]; then + echo "Error: chat.json not found. Be sure to export the chat log." + exit 1 +fi + +# Find the ID of the first request in the chat.json file +CHAT_HASH=$(jq -r '.requests[0].requestId' "$CHAT_LOG") + +# Find the processed-chat.txt file +PROCESSED_CHAT_FILE=$(find "$REPO_ROOT" -name "processed-chat.txt" -type f | head -n 1) + +if [ -z "$PROCESSED_CHAT_FILE" ]; then + echo "Exported chat logs were not found." + echo "Be sure to export the chat log to a location within the repository." + exit 1 +fi + +PROMPTS=$(cat "$PROCESSED_CHAT_FILE") + +# Search the comments for the hidden message ID +EXISTING_COMMENT=$(gh pr view "$PR_NUMBER" --json comments --jq ".comments[] | select(.body | contains(\"\"))" | head -n 1) + +TIMESTAMP=$(date "+%Y-%m-%d %H:%M:%S") + +if [ -n "$EXISTING_COMMENT" ]; then + # If comment found, update it + COMMENT_ID=$(echo "$EXISTING_COMMENT" | jq -r '.id') + + # Retain the original creation time + ORIGINAL_TIME=$(echo "$EXISTING_COMMENT" | jq -r '.body' | grep -oP 'Created: \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}') + if [ -n "$ORIGINAL_TIME" ]; then + TIME_LINE="$ORIGINAL_TIME" + else + TIME_LINE="Created: $TIMESTAMP" + fi + + # Construct new body + NEW_BODY=$(cat < + +$PROMPTS +EOF +) + + gh api graphql -f query='mutation($id: ID!, $body: String!) { updateIssueComment(input: {id: $id, body: $body}) { issueComment { id } } }' -f id="$COMMENT_ID" -f body="$NEW_BODY" --silent + echo "Updated existing Copilot Chat Log comment on PR #$PR_NUMBER." +else + # Otherwise create a new comment + NEW_BODY=$(cat < + +$PROMPTS +EOF +) + gh pr comment "$PR_NUMBER" --body "$NEW_BODY" 2> /dev/null + echo "Created new Copilot Chat Log comment on PR #$PR_NUMBER." +fi diff --git a/bin/log-prompts/exportChatLog.bash b/bin/log-prompts/exportChatLog.bash new file mode 100755 index 0000000..26dcb89 --- /dev/null +++ b/bin/log-prompts/exportChatLog.bash @@ -0,0 +1,25 @@ +#!/bin/bash + +REPO_ROOT=$(git rev-parse --show-toplevel) + +echo "Exporting chat log. Press Enter or click OK to accept default location." +curl -s -o /dev/null -X POST http://localhost:3000/execute \ + -H "Content-Type: application/json" \ + -d '{"command": "workbench.action.chat.export"}' 2> /dev/null + +# Make sure the chat log was saved in the repository. +CHAT_LOGS=$(find "$REPO_ROOT" -name "chat.json" -type f) +if [ -z "$CHAT_LOGS" ]; then + echo "No chat.json files found in the repository." + echo "Be sure to export the chat log somewhere in the repository." + exit 1 +fi + +# Display a message if the chat log is empty. +if grep -q '"requests": \[\]$' "$CHAT_LOGS"; then + echo "You seem to have exported an empty chat log." + echo "Be sure to have a chat open when you use the /log-prompts skill." + exit 1 +fi + +exit 0 \ No newline at end of file diff --git a/.github/skills/log-prompts/openPR.bash b/bin/log-prompts/openPR.bash similarity index 56% rename from .github/skills/log-prompts/openPR.bash rename to bin/log-prompts/openPR.bash index 5a26427..60289b3 100755 --- a/.github/skills/log-prompts/openPR.bash +++ b/bin/log-prompts/openPR.bash @@ -7,7 +7,8 @@ CURRENT_BRANCH=$(git branch --show-current) # Check if we're on a branch (not in detached HEAD state) if [ -z "$CURRENT_BRANCH" ]; then - echo "Error: Not on a branch" + echo "Your current branch is in a detached HEAD state." + echo "Please switch to a branch and try again." exit 1 fi @@ -15,19 +16,19 @@ fi EXISTING_PR=$(gh pr list --head "$CURRENT_BRANCH" --state open --json number --jq '.[0].number' 2>/dev/null) if [ -n "$EXISTING_PR" ]; then - # PR already exists, do nothing + echo "Open pull request found for branch: $CURRENT_BRANCH (PR #$EXISTING_PR)" exit 0 fi # No PR exists, prompt the user echo "" -echo "No open pull request found for branch: $CURRENT_BRANCH" -read -p "Do you want to create a pull request? (y/n) " -r +echo "No open pull request was found for branch: $CURRENT_BRANCH" +read -p "Do you want to create a pull request now? (y/n) " -r echo "" if [[ ! $REPLY =~ ^[Yy]$ ]]; then - echo "Pull request creation cancelled." - exit 0 + echo "Try again when you have created a pull request." + exit 1 fi # Read PULL_REQUEST_TEMPLATE.md and extract options dynamically @@ -45,34 +46,36 @@ mapfile -t TYPE_OPTIONS < <(sed -n '/^### Type of Work/,/^### Topic/p' "$TEMPLAT mapfile -t TOPIC_OPTIONS < <(sed -n '/^### Topic/,/^### Time Estimate/p' "$TEMPLATE_FILE" | grep -oP '(?<=- \[ \] - ).+' | sed 's/^[[:space:]]*//') # Ask for Type of Work -echo "" -echo "Select Type of Work:" -for i in "${!TYPE_OPTIONS[@]}"; do - echo "$((i + 1))) ${TYPE_OPTIONS[$i]}" +while true; do + echo "" + echo "Select Type of Work:" + for i in "${!TYPE_OPTIONS[@]}"; do + echo "$((i + 1))) ${TYPE_OPTIONS[$i]}" + done + read -p "Enter your choice (1-${#TYPE_OPTIONS[@]}): " -r TYPE_CHOICE + + if [[ $TYPE_CHOICE =~ ^[0-9]+$ ]] && [ "$TYPE_CHOICE" -ge 1 ] && [ "$TYPE_CHOICE" -le ${#TYPE_OPTIONS[@]} ]; then + TYPE_OF_WORK="${TYPE_OPTIONS[$((TYPE_CHOICE - 1))]}" + break + fi + echo "Invalid choice. Please try again." done -read -p "Enter your choice (1-${#TYPE_OPTIONS[@]}): " -r TYPE_CHOICE - -if [[ ! $TYPE_CHOICE =~ ^[0-9]+$ ]] || [ "$TYPE_CHOICE" -lt 1 ] || [ "$TYPE_CHOICE" -gt ${#TYPE_OPTIONS[@]} ]; then - echo "Invalid choice. Exiting." - exit 1 -fi - -TYPE_OF_WORK="${TYPE_OPTIONS[$((TYPE_CHOICE - 1))]}" # Ask for Topic -echo "" -echo "Select Topic:" -for i in "${!TOPIC_OPTIONS[@]}"; do - echo "$((i + 1))) ${TOPIC_OPTIONS[$i]}" +while true; do + echo "" + echo "Select Topic:" + for i in "${!TOPIC_OPTIONS[@]}"; do + echo "$((i + 1))) ${TOPIC_OPTIONS[$i]}" + done + read -p "Enter your choice (1-${#TOPIC_OPTIONS[@]}): " -r TOPIC_CHOICE + + if [[ $TOPIC_CHOICE =~ ^[0-9]+$ ]] && [ "$TOPIC_CHOICE" -ge 1 ] && [ "$TOPIC_CHOICE" -le ${#TOPIC_OPTIONS[@]} ]; then + TOPIC="${TOPIC_OPTIONS[$((TOPIC_CHOICE - 1))]}" + break + fi + echo "Invalid choice. Please try again." done -read -p "Enter your choice (1-${#TOPIC_OPTIONS[@]}): " -r TOPIC_CHOICE - -if [[ ! $TOPIC_CHOICE =~ ^[0-9]+$ ]] || [ "$TOPIC_CHOICE" -lt 1 ] || [ "$TOPIC_CHOICE" -gt ${#TOPIC_OPTIONS[@]} ]; then - echo "Invalid choice. Exiting." - exit 1 -fi - -TOPIC="${TOPIC_OPTIONS[$((TOPIC_CHOICE - 1))]}" # Check if the active branch has any commits COMMIT_COUNT=$(git rev-list --count main..$CURRENT_BRANCH 2>/dev/null || echo "0") @@ -80,7 +83,7 @@ COMMIT_COUNT=$(git rev-list --count main..$CURRENT_BRANCH 2>/dev/null || echo "0 if [ "$COMMIT_COUNT" -eq 0 ]; then # No commits on this branch, create an empty commit COMMIT_MESSAGE="Starting $TYPE_OF_WORK - $TOPIC" - git commit --allow-empty -m "$COMMIT_MESSAGE" + git commit --allow-empty -m "$COMMIT_MESSAGE" 2> /dev/null fi # Create the PR with a title that includes the Type of Work and Topic @@ -89,5 +92,7 @@ PR_TITLE="$TYPE_OF_WORK - $TOPIC" # Read the PULL_REQUEST_TEMPLATE and check the selected Type of Work and Topic PR_BODY=$(cat "$TEMPLATE_FILE" | sed "s/- \[ \] - $TYPE_OF_WORK/- [X] - $TYPE_OF_WORK/" | sed "s/- \[ \] - $TOPIC/- [X] - $TOPIC/") -git push upstream "$CURRENT_BRANCH" -gh pr create --base main --head "$CURRENT_BRANCH" --title "$PR_TITLE" --body "$PR_BODY" \ No newline at end of file +git push upstream "$CURRENT_BRANCH" 2> /dev/null +gh pr create --base main --head "$CURRENT_BRANCH" --title "$PR_TITLE" --body "$PR_BODY" 2> /dev/null + +echo "New pull request created for branch: $CURRENT_BRANCH" \ No newline at end of file diff --git a/bin/log-prompts/processChatJson.bash b/bin/log-prompts/processChatJson.bash new file mode 100755 index 0000000..5fa6eb6 --- /dev/null +++ b/bin/log-prompts/processChatJson.bash @@ -0,0 +1,18 @@ +#!/bin/bash + +# Path to your JSON file +REPO_ROOT=$(git rev-parse --show-toplevel) +CHAT_LOG=$(find "$REPO_ROOT" -name "chat.json" -type f) +CHAT_LOG_DIR=$(dirname "$CHAT_LOG") +POST_PROCESSED_CHAT_LOG="$CHAT_LOG_DIR/processed-chat.txt" + +# Copy the message texts into the processed-chat.txt file. + +jq -j '.requests[].message.text + "\u0000"' "$CHAT_LOG" | while IFS= read -r -d '' msg; do + echo "---" >> "$POST_PROCESSED_CHAT_LOG" + echo "" >> "$POST_PROCESSED_CHAT_LOG" + echo "$msg" >> "$POST_PROCESSED_CHAT_LOG" + echo "" >> "$POST_PROCESSED_CHAT_LOG" +done + +echo --- >> "$POST_PROCESSED_CHAT_LOG" \ No newline at end of file From 29fd26fb02f632c77f6bc19afc4b924a464e8725 Mon Sep 17 00:00:00 2001 From: Grant Braught Date: Sat, 4 Jul 2026 19:01:09 +0000 Subject: [PATCH 09/12] finishes the log-prompt.bash script Assisted-by: Gemini 3 Flash --- .devcontainer/devcontainer.json | 7 +++---- .devcontainer/postAttach.bash | 6 ++++-- .gitignore | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 281a3fc..b4c29c4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -10,6 +10,9 @@ "vncPort": "5901" } }, + "remoteEnv": { + "PATH": "${containerEnv:PATH}:/workspaces/Vue3-WebDev-Kit/bin" + }, "portsAttributes": { "8000": { "label": "http", @@ -20,10 +23,6 @@ "label": "noVNC", "protocol": "http", "onAutoForward": "silent" - }, - "3000": { - "label": "VSCodeCommandServer", - "onAutoForward": "silent" } }, "otherPortsAttributes": { diff --git a/.devcontainer/postAttach.bash b/.devcontainer/postAttach.bash index 2ef99a0..8375fd4 100755 --- a/.devcontainer/postAttach.bash +++ b/.devcontainer/postAttach.bash @@ -3,13 +3,15 @@ for i in {1..15}; do # check for webserver using curl VNC_RUNNING=$(curl -Is http://localhost:6901 2> /dev/null | grep "HTTP/1.1 200 OK") WEB_SERVER_RUNNING=$(curl -Is http://localhost:8000 2> /dev/null | grep "HTTP/1.0 200 OK") + COMMAND_SERVER_RUNNING=$(curl -Is http://localhost:3000 2> /dev/null | grep "HTTP/1.1 200 OK") - # If both the web server and VNC server are running, print a message and exit - if [ -n "$VNC_RUNNING" ] && [ -n "$WEB_SERVER_RUNNING" ]; then + # If all servers are running, print a message and exit + if [ -n "$VNC_RUNNING" ] && [ -n "$WEB_SERVER_RUNNING" ] && [ -n "$COMMAND_SERVER_RUNNING" ]; then echo "" echo "" echo "Web server found at http://localhost:8000." echo "noVNC server found at http://localhost:6901." + echo "VSCode command server found." echo "" echo "*****************************************" echo "The Vue3 WebDev Kit is now ready for use." diff --git a/.gitignore b/.gitignore index 3311525..ebb1bea 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ pnpm-debug.log* lerna-debug.log* **/chat.json -**/processed_chat.txt +**/processed-chat.txt node_modules flashword/dist From c66d8c3c7b0d59c1f08ac7a461515cd507189567 Mon Sep 17 00:00:00 2001 From: Grant Braught Date: Sun, 5 Jul 2026 13:32:10 +0000 Subject: [PATCH 10/12] add log-chat step to contributing doc --- CONTRIBUTING.md | 20 +++++++++++++++--- bin/{log-prompts.bash => log-chat.bash} | 2 +- bin/{log-prompts => log-chat}/cleanUp.bash | 0 .../createComment.bash | 0 .../exportChatLog.bash | 0 bin/{log-prompts => log-chat}/openPR.bash | 0 .../processChatJson.bash | 0 docs/QuickReference.md | 17 +++++++++------ docs/images/chat-log-path.png | Bin 0 -> 18202 bytes 9 files changed, 28 insertions(+), 11 deletions(-) rename bin/{log-prompts.bash => log-chat.bash} (81%) rename bin/{log-prompts => log-chat}/cleanUp.bash (100%) rename bin/{log-prompts => log-chat}/createComment.bash (100%) rename bin/{log-prompts => log-chat}/exportChatLog.bash (100%) rename bin/{log-prompts => log-chat}/openPR.bash (100%) rename bin/{log-prompts => log-chat}/processChatJson.bash (100%) create mode 100644 docs/images/chat-log-path.png diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5e73623..428e72f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -110,7 +110,7 @@ Use the following steps when working through a tutorial.

2.

- Watch the tutorial step-by-step and build the artifact. + Follow the tutorial step-by-step and build the artifact. For video tutorials, pause and rewind the video as frequently as necessary for you to follow along and add the code that is shown to your project. @@ -138,7 +138,7 @@ Use the following steps when working through a tutorial. 5. Navigate to the page that you want to view in the directory structure (e.g. for tutorial 01 click `web-projects` and then `first-website`). - 6. Once your page is open in a browser tab, reloading the page will display the effect of any changes you make. + 6. Use the reload button in the browser to update your page when you have made changes.
@@ -342,7 +342,21 @@ Working on the extension tasks is very similar to working on the tutorial tasks.

-5. ▷ [Push your feature branch](#push-feature-branch) to GitHub. +5. +

+ Log your Copilot chat (if you used AI). + + If you used Copilot and AI in your last commit, use the steps below to log the prompts that you used into a comment on your pull request. + + 1. Run the `log-chat.bash` command in the terminal. + 2. Click "OK" or press the Enter/Return key to accept the default path for the chat log. It doesn't matter where this log is stored, it will be deleted after it is posted to your pull request. + ![The chat log path dialog with the "OK" button.](./docs/images/chat-log-path.png) + 3. Review the output in the terminal and visit you PR on GitHub to ensure that your chat log has been posted to a comment. +
+ +

+ +6. ▷ [Push your feature branch](#push-feature-branch) to GitHub. ### Completing an Extension diff --git a/bin/log-prompts.bash b/bin/log-chat.bash similarity index 81% rename from bin/log-prompts.bash rename to bin/log-chat.bash index 6b94e6b..6fea6e6 100755 --- a/bin/log-prompts.bash +++ b/bin/log-chat.bash @@ -1,7 +1,7 @@ #!/bin/bash REPO_ROOT=$(git rev-parse --show-toplevel) -cd "$REPO_ROOT/bin/log-prompts" || exit 1 +cd "$REPO_ROOT/bin/log-chat" || exit 1 ./openPR.bash && \ ./cleanUp.bash && \ diff --git a/bin/log-prompts/cleanUp.bash b/bin/log-chat/cleanUp.bash similarity index 100% rename from bin/log-prompts/cleanUp.bash rename to bin/log-chat/cleanUp.bash diff --git a/bin/log-prompts/createComment.bash b/bin/log-chat/createComment.bash similarity index 100% rename from bin/log-prompts/createComment.bash rename to bin/log-chat/createComment.bash diff --git a/bin/log-prompts/exportChatLog.bash b/bin/log-chat/exportChatLog.bash similarity index 100% rename from bin/log-prompts/exportChatLog.bash rename to bin/log-chat/exportChatLog.bash diff --git a/bin/log-prompts/openPR.bash b/bin/log-chat/openPR.bash similarity index 100% rename from bin/log-prompts/openPR.bash rename to bin/log-chat/openPR.bash diff --git a/bin/log-prompts/processChatJson.bash b/bin/log-chat/processChatJson.bash similarity index 100% rename from bin/log-prompts/processChatJson.bash rename to bin/log-chat/processChatJson.bash diff --git a/docs/QuickReference.md b/docs/QuickReference.md index 718007a..7bcabfc 100644 --- a/docs/QuickReference.md +++ b/docs/QuickReference.md @@ -2,15 +2,18 @@ ## Workflow Steps -The following are the main activities that you will need to do when working on this kit. Each links takes you to the appropriate section of the `CONTRIBUTING.md`] file. +The following are the main activities that you will need to do when working on this kit. Each links takes you to the appropriate section of the [`CONTRIBUTING.md`] file or other sources as appropriate. - [Starting a Tutorial](../CONTRIBUTING.md#starting-a-tutorial) - [Working on Tutorial Tasks](../CONTRIBUTING.md#working-on-tutorial-tasks) + - [Coauthor Attribution Generator](https://coauthors.me/generator) - [Completing a Tutorial](../CONTRIBUTING.md#completing-a-tutorial) - [Pausing your Work](../CONTRIBUTING.md#pausing-your-work) - [Resuming your Work](../CONTRIBUTING.md#resuming-your-work) - [Starting an Extension](../CONTRIBUTING.md#starting-an-extension) - [Working on Extension Tasks](../CONTRIBUTING.md#working-on-extension-tasks) + - [Including AI Attributions](./AttributionTrailers.md) + - [Logging Copilot Chats](../CONTRIBUTING.md#log-copilot-chat) - [Completing an Extension](../CONTRIBUTING.md#completing-an-extension) ## Keyboard Shortcuts @@ -33,10 +36,12 @@ The following are the main activities that you will need to do when working on t ### Browser -| Windows/Linux | MacOS | Action | -| ----------------------- | ------------------------- | -------------------------- | -| `F12` | `F12` | Toggle the Developer Tools | -| `Ctrl + Shift + Delete` | ⌘`+ Shift + Delete` | Clear browsing history. | +| Windows/Linux | MacOS | Action | +| ----------------------- | ------------------------- | --------------------------- | +| `Ctrl + R` | ⌘`+ R` | Standard refresh | +| `Ctrl + Shift + R` | ⌘`+ Shift + R` | Hard refresh (bypass cache) | +| `F12` | `F12` | Toggle the Developer Tools | +| `Ctrl + Shift + Delete` | ⌘`+ Shift + Delete` | Clear browsing history | ## Git Commands @@ -55,5 +60,3 @@ The following are the main activities that you will need to do when working on t | `git push origin ` | Push the branch named `` to your GitHub space. | ## Miscellaneous - -- [Coauthors Generator](https://coauthors.me/generator) diff --git a/docs/images/chat-log-path.png b/docs/images/chat-log-path.png new file mode 100644 index 0000000000000000000000000000000000000000..8a7bca97f61ed786a7b945984a92f262824bf776 GIT binary patch literal 18202 zcmbrlb9iM-&@UX@HYc`iO>En?ZA@(2wmp-HHL-2m`f_mJ_nbNRpZk1y*3Ry|R#$a( zb#-;E>R*48lM#c3!h!+-0Du+$Dy#qi037mJHiH2B{9iS9ZU6uPRc|gNBquH;L?Gv2 zYhrF?3;^);TT%+RlHw7P--qXn5RgAVNMR6GI6)SGf*^eEEhQx(gr7m zIYdC{!+@}W3I!vYF!E**e!!OiYN(NRwOW05baoKe4fl&Iwg;(wF2{qMv=6=qK2soo zv7-#Q|sjXU2>L?#j>j>dcCpb45)s0z2oNC{UmywiDR+Iu*c37PnU_|596zCCs%bE zdx==;?3``ln-b%ok@;d`{DaeFf+b8+`_}*y3^yP;1V3&k1dz(uL8L{1!WAbUmFHa( z?&JtniJ)%*PMpwf_FkNtKUs3bTIy@-f%UH6Wqk2$&t=vm!$NZIAZda1Rzld7O}!zx z0L{EYwfa}p@eNr3B-Q~MtqvqeFlTsgcj3Vh{DI`aEcl@h0g3fOoJ_$p{jjI&@F76- z39zU^wFm&p_<Vrt`S zqwG?DNwtb#5J@4ReuK$pVu(x?){>CE9?Z{B=qAUW$dafqf+>M-tQA*oR)$fUTHY#h zRl3d6uTPR0pBJBkBuk-s6gy2)BtRKnE_RpeP=;L=T9#5KG@@o4!l=n1-p2pb>JWOJ z8Xg}WB@rZ%EKxSXk>rCFZt~S|M!{^wjLf{NQPz?9pmzWAz$#mjtHg7{bFQu2rrc}J zYmRdcZ%)?2iG{Aos0r61$|7cV>X`KS`*GUw%N$)r%!G3G33Cb;oA3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a3$zUlDTW;^4+cLiV+oKlKX1l5N= zY3g5vF49cjd;j{jQ?_qHgoghF>;2%D%Q&|~~x zg!Y$I{$C_4%?RQ8$qMkE&b6Dj0!T%xEsP)~F-&{|eQqbD7zh3eL!!dDua5=r24ih0 zg5ejB6&## z^pVw-8}K0_k>?d%=Ce(ym5XI~n3_pmt@Yjodqr()7n$d)TWCa?#byWt49uhUt~HAF z2^yZr?AS~n`#a_HH!gK^0pwSRh~_-DJ9~^_IiciwbCWroVj?=0%(q424)Dg#d}=! z2@D?O@w^v*-qeGHzNzG2eAsFCMfUsQdpCkgp|g6Ex&%TI0@l|Sk+Qe?B4rdLDtv%2%N zm;EL$R1v+LbL8hPvcdw>B5{JSJPc2EFy{ZvmA?wF*}dNqK1R}J4t5zJV^B@RZi49@=s*+A7y^5 zKTZ-vZ2(mA{_jNktCAeUF3*1s%$R3>o(N#}0j_=i7dHBjdi}8v|HQoiSuV8yJi##Y z2-|!7JI?d>zG*gnKb0`PnxH}Yg4^cbtf06T767&Cy)_OkxRd-*+o Date: Sun, 5 Jul 2026 13:37:14 +0000 Subject: [PATCH 11/12] add log-chat step to contributing doc --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 428e72f..bd1c813 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -346,7 +346,7 @@ Working on the extension tasks is very similar to working on the tutorial tasks.

Log your Copilot chat (if you used AI). - If you used Copilot and AI in your last commit, use the steps below to log the prompts that you used into a comment on your pull request. + If you used Copilot and AI in your last commit, use the steps below to log the prompts that you used into a comment on your pull request. Note re-logging the same chat updates the previous comment by adding new prompts to it. 1. Run the `log-chat.bash` command in the terminal. 2. Click "OK" or press the Enter/Return key to accept the default path for the chat log. It doesn't matter where this log is stored, it will be deleted after it is posted to your pull request. From aa83d435afd48ba6186f1ffd4d340e014fcf4673 Mon Sep 17 00:00:00 2001 From: Grant Braught Date: Sun, 5 Jul 2026 13:40:18 +0000 Subject: [PATCH 12/12] add log-chat step to contributing doc --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bd1c813..2ad5a10 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -217,7 +217,7 @@ Use the following steps when working through a tutorial.
-

+

2.

@@ -231,7 +231,7 @@ Use the following steps when working through a tutorial. 4. Pick the model to be used from the popup in the bottom left of the "Add a comment" box. 5. Click the "Start new session" button. 6. Copilot will to respond in a comment on your pull request. - +