()
| 40 | void loadChangedFiles(); |
| 41 | }, []); |
| 42 | const handleStash = async () => { |
| 43 | setStashing(true); |
| 44 | try { |
| 45 | logForDebugging('Stashing changes before teleport...'); |
| 46 | const success = await stashToCleanState('Teleport auto-stash'); |
| 47 | if (success) { |
| 48 | logForDebugging('Successfully stashed changes'); |
| 49 | onStashAndContinue(); |
| 50 | } else { |
| 51 | setError('Failed to stash changes'); |
| 52 | } |
| 53 | } catch (err_0) { |
| 54 | const errorMessage_0 = err_0 instanceof Error ? err_0.message : String(err_0); |
| 55 | logForDebugging(`Error stashing changes: ${errorMessage_0}`, { |
| 56 | level: 'error' |
| 57 | }); |
| 58 | setError('Failed to stash changes'); |
| 59 | } finally { |
| 60 | setStashing(false); |
| 61 | } |
| 62 | }; |
| 63 | const handleSelectChange = (value: string) => { |
| 64 | if (value === 'stash') { |
| 65 | void handleStash(); |
no test coverage detected