Scope git history to current diagram by default
- History panel defaults to "This diagram" / "All" toggle - "This diagram" filters git log to commits that touched only that diagram's JSON file (git log -- diagrams/0001_*.json) - Automatically switches to "All" when no diagram is open - Restore flow still works per-commit, per-file Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -62,7 +62,7 @@ const api = {
|
||||
},
|
||||
git: {
|
||||
status: () => apiFetch("/git/status"),
|
||||
log: () => apiFetch("/git/log"),
|
||||
log: (diagram_id) => apiFetch(diagram_id != null ? `/git/log?diagram_id=${diagram_id}` : "/git/log"),
|
||||
commit: (message, diagram_id) => apiFetch("/git/commit", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ message, diagram_id: diagram_id ?? null }) }),
|
||||
push: () => apiFetch("/git/push", { method: "POST" }),
|
||||
history: (hash) => apiFetch(`/git/history/${hash}`),
|
||||
|
||||
Reference in New Issue
Block a user