Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5dd5c760d7 | |||
| 8e4a19b7d8 | |||
|
|
bba60d4527 |
5 changed files with 125 additions and 46 deletions
|
|
@ -1,15 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fe35bb42b8a0bd144a6e5d1d670079ed
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 388758
|
||||
packageName: Low Poly Character Collection 3
|
||||
packageVersion: 1.1
|
||||
assetPath: Assets/Hodaart/HodaartLowPolyCharacterCollection3/Packages/Hodaart Low
|
||||
Poly Character Collection 3 - Built-In.unitypackage
|
||||
uploadId: 946460
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6236278daa4d5c441a8232dab5ebc22d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 388758
|
||||
packageName: Low Poly Character Collection 3
|
||||
packageVersion: 1.1
|
||||
assetPath: Assets/Hodaart/HodaartLowPolyCharacterCollection3/Packages/Hodaart Low
|
||||
Poly Character Collection 3 - HDRP.unitypackage
|
||||
uploadId: 946460
|
||||
|
|
@ -4398,6 +4398,63 @@ Transform:
|
|||
m_CorrespondingSourceObject: {fileID: 400000, guid: 00ba75879d6ef5745a4888259bde7c0a, type: 3}
|
||||
m_PrefabInstance: {fileID: 954444310}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &974200701
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 100000, guid: ae8352c51c6124747aa9e8a7374b86af, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Bath
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400000, guid: ae8352c51c6124747aa9e8a7374b86af, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 6.622743
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400000, guid: ae8352c51c6124747aa9e8a7374b86af, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.10000037
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400000, guid: ae8352c51c6124747aa9e8a7374b86af, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -0.529232
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400000, guid: ae8352c51c6124747aa9e8a7374b86af, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400000, guid: ae8352c51c6124747aa9e8a7374b86af, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400000, guid: ae8352c51c6124747aa9e8a7374b86af, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400000, guid: ae8352c51c6124747aa9e8a7374b86af, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400000, guid: ae8352c51c6124747aa9e8a7374b86af, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400000, guid: ae8352c51c6124747aa9e8a7374b86af, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400000, guid: ae8352c51c6124747aa9e8a7374b86af, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: ae8352c51c6124747aa9e8a7374b86af, type: 3}
|
||||
--- !u!1001 &974860797
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -8696,3 +8753,4 @@ SceneRoots:
|
|||
- {fileID: 850707848}
|
||||
- {fileID: 326006527}
|
||||
- {fileID: 1532509717}
|
||||
- {fileID: 974200701}
|
||||
|
|
|
|||
|
|
@ -68,22 +68,7 @@ MonoBehaviour:
|
|||
- rid: 7808513024541851664
|
||||
- rid: 7808513024541851665
|
||||
m_RuntimeSettings:
|
||||
m_List:
|
||||
- rid: 6852985685364965378
|
||||
- rid: 6852985685364965379
|
||||
- rid: 6852985685364965380
|
||||
- rid: 6852985685364965381
|
||||
- rid: 6852985685364965384
|
||||
- rid: 6852985685364965392
|
||||
- rid: 6852985685364965394
|
||||
- rid: 8712630790384254976
|
||||
- rid: 7808513024541851653
|
||||
- rid: 7808513024541851655
|
||||
- rid: 7808513024541851656
|
||||
- rid: 7808513024541851657
|
||||
- rid: 7808513024541851658
|
||||
- rid: 7808513024541851662
|
||||
- rid: 7808513024541851664
|
||||
m_List: []
|
||||
m_AssetVersion: 10
|
||||
m_ObsoleteDefaultVolumeProfile: {fileID: 0}
|
||||
m_RenderingLayerNames:
|
||||
|
|
|
|||
66
scripts/session-git-check.sh
Normal file
66
scripts/session-git-check.sh
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
#!/usr/bin/env bash
|
||||
# SessionStart digest: fetch remote, report incoming commits + open Forgejo
|
||||
# issues/PRs. Emits a Claude hook JSON blob on stdout (additionalContext) so
|
||||
# Claude can surface anything actionable at the top of the session.
|
||||
# Always exits 0 and always prints valid JSON — must never block a session.
|
||||
|
||||
set -o pipefail
|
||||
cd "$(dirname "$0")/.." 2>/dev/null || exit 0
|
||||
|
||||
digest=""
|
||||
add() { digest+="$1"$'\n'; }
|
||||
|
||||
# --- Remote fetch + incoming/outgoing commit comparison ------------------
|
||||
if git rev-parse --git-dir >/dev/null 2>&1; then
|
||||
git fetch --all --quiet 2>/dev/null
|
||||
upstream=$(git rev-parse --abbrev-ref --symbolic-full-name '@{u}' 2>/dev/null)
|
||||
if [ -n "$upstream" ]; then
|
||||
incoming=$(git log --oneline "HEAD..$upstream" 2>/dev/null)
|
||||
outgoing=$(git log --oneline "$upstream..HEAD" 2>/dev/null)
|
||||
if [ -n "$incoming" ]; then
|
||||
add "INCOMING commits on $upstream (you are behind — pull to get them):"
|
||||
while IFS= read -r l; do add " $l"; done <<< "$incoming"
|
||||
# Flag incoming edits to Unity scene/prefab/asset files — risky to pull
|
||||
# while the Editor is open (it may overwrite them or hold a stale copy).
|
||||
scenefiles=$(git diff --name-only "HEAD..$upstream" 2>/dev/null | grep -Ei '\.(unity|prefab|asset|mat|controller)$')
|
||||
if [ -n "$scenefiles" ]; then
|
||||
add " *** WARNING: incoming commits change Unity scene/asset files:"
|
||||
while IFS= read -r f; do add " $f"; done <<< "$scenefiles"
|
||||
add " *** CLOSE or save the Unity Editor before pulling to avoid clobbering scene state."
|
||||
fi
|
||||
else
|
||||
add "Up to date with $upstream (no incoming commits)."
|
||||
fi
|
||||
[ -n "$outgoing" ] && add "You have $(wc -l <<< "$outgoing") local commit(s) not yet pushed."
|
||||
fi
|
||||
fi
|
||||
|
||||
# --- Forgejo open issues + PRs -------------------------------------------
|
||||
remote_url=$(git remote get-url origin 2>/dev/null)
|
||||
if [[ "$remote_url" =~ ^https?://([^/]+)/([^/]+)/([^/.]+) ]]; then
|
||||
host="${BASH_REMATCH[1]}"; owner="${BASH_REMATCH[2]}"; repo="${BASH_REMATCH[3]}"
|
||||
cred=$(grep -m1 "$host" "$HOME/.git-credentials" 2>/dev/null)
|
||||
tok=$(sed -E 's#https?://([^@]+)@.*#\1#' <<< "$cred")
|
||||
api="https://$host/api/v1/repos/$owner/$repo/issues"
|
||||
parse='import sys,json
|
||||
try: d=json.load(sys.stdin)
|
||||
except: sys.exit(0)
|
||||
for i in d: print(" #%d %s (by %s)"%(i["number"],i["title"],i["user"]["login"]))'
|
||||
if [ -n "$tok" ]; then
|
||||
issues=$(curl -sf --max-time 8 -u "$tok" "$api?state=open&type=issues" 2>/dev/null | python3 -c "$parse" 2>/dev/null)
|
||||
prs=$(curl -sf --max-time 8 -u "$tok" "$api?state=open&type=pulls" 2>/dev/null | python3 -c "$parse" 2>/dev/null)
|
||||
if [ -n "$issues" ]; then add "OPEN ISSUES:"; add "$issues"; else add "No open issues."; fi
|
||||
if [ -n "$prs" ]; then add "OPEN PULL REQUESTS:"; add "$prs"; else add "No open PRs."; fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# --- Emit hook JSON ------------------------------------------------------
|
||||
ctx="[Session start — repo/remote status]
|
||||
$digest
|
||||
If there are INCOMING commits or any open issues/PRs, briefly tell the user at the start of your first reply. If everything is up to date with no open items, do not mention this."
|
||||
|
||||
python3 - "$ctx" <<'PY'
|
||||
import json,sys
|
||||
print(json.dumps({"hookSpecificOutput":{"hookEventName":"SessionStart","additionalContext":sys.argv[1]},"suppressOutput":True}))
|
||||
PY
|
||||
exit 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue