]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
pr2wt : symlink .pi (#22386)
authorGeorgi Gerganov <redacted>
Sun, 26 Apr 2026 16:49:26 +0000 (19:49 +0300)
committerGitHub <redacted>
Sun, 26 Apr 2026 16:49:26 +0000 (19:49 +0300)
scripts/pr2wt.sh

index e028814c43154453631efef3f40caa8c2b4b2ea3..ae03a888cb64ce70406068afe8c066dd4a2034dc 100755 (executable)
@@ -68,11 +68,19 @@ dir=$(basename $(pwd))
 git branch -D pr/$PR 2> /dev/null
 git worktree add -b pr/$PR ../$dir-pr-$PR pr/$PR/$head_ref 2> /dev/null
 
+og_path=$(pwd)
 wt_path=$(cd ../$dir-pr-$PR && pwd)
 
 echo "git worktree created in $wt_path"
 
 cd $wt_path
+
+# pi agent setup in the worktree
+if [[ -f "$og_path/.pi/SYSTEM.md" && ! -f ".pi/SYSTEM.md" ]]; then
+    mkdir -p .pi
+    ln -sfn "$og_path/.pi/SYSTEM.md" .pi/SYSTEM.md
+fi
+
 git branch --set-upstream-to=pr/$PR/$head_ref
 git pull   --ff-only || {
     echo "error: failed to pull pr/$PR"