YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix(chat): notify parent only when edited preset is in use (#4143)
Harsh Kumarc5c551140420
diff --git a/apps/screenpipe-app-tauri/components/rewind/ai-presets-selector.tsx b/apps/screenpipe-app-tauri/components/rewind/ai-presets-selector.tsxindex 90ce33269..fafd1c715 100644--- a/apps/screenpipe-app-tauri/components/rewind/ai-presets-selector.tsx+++ b/apps/screenpipe-app-tauri/components/rewind/ai-presets-selector.tsx@@ -1269,12 +1269,16 @@ export const AIPresetsSelector = ({});}- // Notify parent to restart Pi if the saved preset is the active/default one+ // Notify parent to restart Pi only when the edited preset is the one in use.+ // In chat (controlled mode): the selected preset is the one active in chat.+ // In Settings (non-controlled): fall back to checking the app-wide default.if (onPresetSaved) {const savedFull = { ...preset } as AIPreset;- const isDefault = selectedPresetToEdit?.defaultPreset ||- (!selectedPresetToEdit && settings.aiPresets.length === 0);- if (isDefault) {+ const shouldNotify = isControlled+ ? selectedPreset === preset.id+ : selectedPresetToEdit?.defaultPreset ||+ (!selectedPresetToEdit && settings.aiPresets.length === 0);+ if (shouldNotify) {onPresetSaved(savedFull);}}