(script: ProjectScript)
| 227 | }; |
| 228 | |
| 229 | const openEditDialog = (script: ProjectScript) => { |
| 230 | setEditingScriptId(script.id); |
| 231 | setName(script.name); |
| 232 | setCommand(script.command); |
| 233 | setIcon(script.icon); |
| 234 | setIconPickerOpen(false); |
| 235 | setRunOnWorktreeCreate(script.runOnWorktreeCreate); |
| 236 | setKeybinding(keybindingValueForCommand(keybindings, commandForProjectScript(script.id)) ?? ""); |
| 237 | setPreviewUrl(script.previewUrl ?? ""); |
| 238 | setAutoOpenPreview(script.autoOpenPreview ?? false); |
| 239 | setValidationError(null); |
| 240 | setDialogOpen(true); |
| 241 | }; |
| 242 | |
| 243 | const confirmDeleteScript = useCallback(() => { |
| 244 | if (!editingScriptId) return; |
no test coverage detected