MCPcopy Create free account
hub / github.com/GCWing/BitFun / init

Function init

src/web-ui/src/tools/lsp/hooks/useLsp.ts:85–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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]);

Callers 2

useLspInitFunction · 0.70
runFunction · 0.50

Calls 5

setErrorFunction · 0.85
openWorkspaceMethod · 0.65
tFunction · 0.50
initializeMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected