@lvce-editor/extension-management-worker 4.46.0 → 4.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2756,6 +2756,15 @@ const executeExtensionCommand = async (extensionsState, id, ...args) => {
2756
2756
  };
2757
2757
  };
2758
2758
 
2759
+ const getLanguageServerRootUri = async () => {
2760
+ try {
2761
+ const workspacePath = await invoke$2('Workspace.getPath');
2762
+ return typeof workspacePath === 'string' && workspacePath ? workspacePath : undefined;
2763
+ } catch {
2764
+ return undefined;
2765
+ }
2766
+ };
2767
+
2759
2768
  /* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
2760
2769
  const warn = (...args) => {
2761
2770
  console.warn(...args);
@@ -2824,10 +2833,14 @@ const executeLanguageServerCompletion = async (rpc, extension, textDocument, off
2824
2833
  }
2825
2834
  let result;
2826
2835
  try {
2836
+ const rootUri = await getLanguageServerRootUri();
2827
2837
  result = await invoke$1('LanguageServer.complete', {
2828
2838
  argv: languageServer.argv,
2829
2839
  id: languageServer.id,
2830
2840
  offset,
2841
+ ...(rootUri && {
2842
+ rootUri
2843
+ }),
2831
2844
  textDocument,
2832
2845
  uri: languageServer.uri
2833
2846
  });
@@ -2934,9 +2947,13 @@ const executeLanguageServerDiagnostic = async (rpc, extension, textDocument) =>
2934
2947
  if (!languageServer) {
2935
2948
  return [];
2936
2949
  }
2950
+ const rootUri = await getLanguageServerRootUri();
2937
2951
  const result = await invoke$1('LanguageServer.diagnostic', {
2938
2952
  argv: languageServer.argv,
2939
2953
  id: languageServer.id,
2954
+ ...(rootUri && {
2955
+ rootUri
2956
+ }),
2940
2957
  textDocument,
2941
2958
  uri: languageServer.uri
2942
2959
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-management-worker",
3
- "version": "4.46.0",
3
+ "version": "4.47.0",
4
4
  "description": "Webworker for the Extension Management functionality in Lvce Editor.",
5
5
  "keywords": [
6
6
  "web-worker"