generated from nhcarrigan/template
feat: toast notifications for WorktreeCreate and WorktreeRemove hooks
The backend already parsed and emitted claude:worktree events for these hooks, and the frontend already updated the store and StatusBar badge. Add the missing toast notification so the user is informed in real-time when a worktree is created or removed. Closes #213
This commit is contained in:
@@ -584,6 +584,12 @@ export async function initializeTauriListeners() {
|
||||
event_type === "create" && worktree ? worktree : null
|
||||
);
|
||||
}
|
||||
|
||||
if (event_type === "create" && worktree) {
|
||||
toastStore.addInfo(`Worktree created: ${worktree.branch}`, "🌿");
|
||||
} else if (event_type === "remove") {
|
||||
toastStore.addInfo("Worktree removed", "🌿");
|
||||
}
|
||||
});
|
||||
unlisteners.push(worktreeUnlisten);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user