()
| 83 | |
| 84 | useEffect(() => { |
| 85 | const init = async () => { |
| 86 | try { |
| 87 | await lspService.initialize(); |
| 88 | |
| 89 | if (workspacePath) { |
| 90 | await lspService.openWorkspace(workspacePath); |
| 91 | } |
| 92 | |
| 93 | setInitialized(true); |
| 94 | } catch (err) { |
| 95 | const errorMessage = err instanceof Error ? err.message : t('lsp.errors.initializeFailed'); |
| 96 | setError(errorMessage); |
| 97 | log.error('Failed to initialize LSP', { workspacePath, error: err }); |
| 98 | } |
| 99 | }; |
| 100 | |
| 101 | init(); |
| 102 | }, [workspacePath, t]); |
no test coverage detected