pybao-cli 1.4.15 → 1.4.17
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.
- package/dist/REPL-2HTMFGA5.js +47 -0
- package/dist/{acp-RPMY76QL.js → acp-2LOJ6G5I.js} +29 -29
- package/dist/{agentsValidate-PX32PNPA.js → agentsValidate-JHFP6CBL.js} +7 -7
- package/dist/{ask-P3GOQDEX.js → ask-7S7OPAEK.js} +28 -28
- package/dist/{autoUpdater-R4EXAJ7P.js → autoUpdater-JB2N6XSK.js} +3 -3
- package/dist/{chunk-6RKXEEHI.js → chunk-26DNH5MY.js} +2 -2
- package/dist/{chunk-33NX2JEV.js → chunk-26VECGIJ.js} +5 -3
- package/dist/{chunk-33NX2JEV.js.map → chunk-26VECGIJ.js.map} +2 -2
- package/dist/{chunk-BB7V4QKI.js → chunk-3H7JCOX7.js} +1 -1
- package/dist/{chunk-L3W3K3QU.js → chunk-5IIJ6XQX.js} +27 -26
- package/dist/chunk-5IIJ6XQX.js.map +7 -0
- package/dist/{chunk-PD6OTVLV.js → chunk-5KZB52GW.js} +1 -1
- package/dist/{chunk-C6ZACFHI.js → chunk-7SGVFJWX.js} +1 -1
- package/dist/{chunk-IB6KSWDZ.js → chunk-AHK3NVAX.js} +6 -6
- package/dist/chunk-AHK3NVAX.js.map +7 -0
- package/dist/{chunk-37NXYZZP.js → chunk-AHO6SRRR.js} +3 -3
- package/dist/{chunk-THJLROJB.js → chunk-CDKFT2GF.js} +12 -2
- package/dist/chunk-CDKFT2GF.js.map +7 -0
- package/dist/{chunk-MRMEHFMO.js → chunk-CIUNX2UP.js} +1 -1
- package/dist/{chunk-ELWN7R7M.js → chunk-CZRFLOQG.js} +9 -6
- package/dist/{chunk-ELWN7R7M.js.map → chunk-CZRFLOQG.js.map} +2 -2
- package/dist/{chunk-4YNWFMHH.js → chunk-DXIIHIJG.js} +1 -1
- package/dist/{chunk-3D4D72TA.js → chunk-EHFY3DA7.js} +1 -1
- package/dist/{chunk-LOOXNX5Y.js → chunk-JUVESM6V.js} +4 -4
- package/dist/{chunk-5N64T4FL.js → chunk-K45LL6PV.js} +2 -2
- package/dist/{chunk-UO5X5SXI.js → chunk-KEBVFZAX.js} +1 -1
- package/dist/{chunk-ONPK4QYB.js → chunk-KKILDPBV.js} +2 -2
- package/dist/{chunk-BUEOTCMA.js → chunk-NSID4TSV.js} +3 -3
- package/dist/{chunk-PVPXTCJH.js → chunk-PPTMKZPO.js} +1 -1
- package/dist/{chunk-PVPXTCJH.js.map → chunk-PPTMKZPO.js.map} +1 -1
- package/dist/{chunk-5TAP3RGJ.js → chunk-QKOT6XYY.js} +2 -2
- package/dist/{chunk-EASHVVK6.js → chunk-QSP2L4AM.js} +3 -3
- package/dist/{chunk-2GNIL5UE.js → chunk-RJK6AYKB.js} +3 -3
- package/dist/{chunk-YY4XF7AZ.js → chunk-S4KCBRDZ.js} +54 -43
- package/dist/chunk-S4KCBRDZ.js.map +7 -0
- package/dist/{chunk-2WZY23LE.js → chunk-ULOUEAT2.js} +22 -21
- package/dist/chunk-ULOUEAT2.js.map +7 -0
- package/dist/{chunk-TJOLXDG6.js → chunk-X6LUQUI4.js} +4 -4
- package/dist/{chunk-YV4PKPBH.js → chunk-XM7MBTOO.js} +2 -2
- package/dist/{chunk-ZTVPEF2F.js → chunk-XVZ7ZX2L.js} +1 -1
- package/dist/{chunk-4E4ZHEYH.js → chunk-YJWJ5DGO.js} +2 -2
- package/dist/{chunk-NA7ROPOY.js → chunk-ZHPKJVUT.js} +3 -3
- package/dist/{chunk-2WZXH6PI.js → chunk-ZQ4IZUPH.js} +3 -3
- package/dist/{cli-GPDT2IJU.js → cli-HMY2IU2T.js} +120 -102
- package/dist/cli-HMY2IU2T.js.map +7 -0
- package/dist/commands-AAP4MYTL.js +51 -0
- package/dist/{config-LWY7BZXJ.js → config-A7PN2NDW.js} +4 -4
- package/dist/{context-5AE67GYL.js → context-SXT7XLXT.js} +6 -6
- package/dist/{customCommands-7UNIEUFP.js → customCommands-KXTQJO3S.js} +4 -4
- package/dist/{env-EFQJVSUY.js → env-MACCQLTW.js} +2 -2
- package/dist/{file-VRVRLDK2.js → file-HC4EKI7Z.js} +4 -4
- package/dist/index.js +3 -3
- package/dist/{llm-6BUSXSBZ.js → llm-OTFTXTXY.js} +29 -29
- package/dist/{llmLazy-6WFEDUPC.js → llmLazy-PQ5HCZ4E.js} +1 -1
- package/dist/{loader-HQ56KK4K.js → loader-VHBERR5P.js} +4 -4
- package/dist/{lsp-4GTQX6SE.js → lsp-Y5UUXXVU.js} +6 -6
- package/dist/{lspAnchor-4IEM6SQM.js → lspAnchor-FJ2SXT5X.js} +8 -8
- package/dist/lspAnchor-FJ2SXT5X.js.map +7 -0
- package/dist/{mcp-RFRGVPYG.js → mcp-V3E2FBYM.js} +7 -7
- package/dist/{mentionProcessor-J4U4MFY5.js → mentionProcessor-FCHEM7NU.js} +5 -5
- package/dist/{messages-5JAJG44H.js → messages-UYHRONQS.js} +1 -1
- package/dist/{model-VR6QZCYI.js → model-YPKZ4DQ3.js} +5 -5
- package/dist/{openai-LUD3GHJ5.js → openai-P2TQWQKC.js} +5 -5
- package/dist/{outputStyles-TJM65BMJ.js → outputStyles-CSGYX64E.js} +4 -4
- package/dist/{pluginRuntime-OW54XVUW.js → pluginRuntime-EP4ATLRC.js} +6 -6
- package/dist/{pluginValidation-X2LVT22X.js → pluginValidation-3ZURFUHM.js} +6 -6
- package/dist/prompts-ATUILKIJ.js +53 -0
- package/dist/{pybAgentSessionLoad-YI2EVD6F.js → pybAgentSessionLoad-QZIINLCD.js} +4 -4
- package/dist/{pybAgentSessionResume-VJIKNW7O.js → pybAgentSessionResume-3XND5AZG.js} +4 -4
- package/dist/{pybAgentStreamJsonSession-6DZUR3ME.js → pybAgentStreamJsonSession-JQPASPNN.js} +1 -1
- package/dist/{pybHooks-U24NOHX7.js → pybHooks-J3KPSFJI.js} +4 -4
- package/dist/query-ID3RUBSI.js +55 -0
- package/dist/{registry-2U2WP7ZB.js → registry-HBS4R3GL.js} +5 -5
- package/dist/{ripgrep-EO24IKYT.js → ripgrep-IDPG6V7P.js} +3 -3
- package/dist/{skillMarketplace-CAGSV3Z6.js → skillMarketplace-VA7VL5D5.js} +3 -3
- package/dist/{state-56C2ROYY.js → state-GU2VJXIZ.js} +8 -4
- package/dist/{theme-DYILR2QC.js → theme-GZQWHNWP.js} +5 -5
- package/dist/{toolPermissionSettings-ZPBRNODI.js → toolPermissionSettings-XJ6CKWDG.js} +6 -6
- package/dist/tools-EVR75R24.js +52 -0
- package/dist/{userInput-3A7OKG4S.js → userInput-ABKKAHHH.js} +30 -30
- package/package.json +1 -1
- package/dist/REPL-3X2W4SUH.js +0 -47
- package/dist/chunk-2WZY23LE.js.map +0 -7
- package/dist/chunk-IB6KSWDZ.js.map +0 -7
- package/dist/chunk-L3W3K3QU.js.map +0 -7
- package/dist/chunk-THJLROJB.js.map +0 -7
- package/dist/chunk-YY4XF7AZ.js.map +0 -7
- package/dist/cli-GPDT2IJU.js.map +0 -7
- package/dist/commands-YV373ZFU.js +0 -51
- package/dist/lspAnchor-4IEM6SQM.js.map +0 -7
- package/dist/prompts-KTT5FAYF.js +0 -53
- package/dist/query-PSDZBJSO.js +0 -55
- package/dist/tools-M4GJRWEU.js +0 -52
- /package/dist/{REPL-3X2W4SUH.js.map → REPL-2HTMFGA5.js.map} +0 -0
- /package/dist/{acp-RPMY76QL.js.map → acp-2LOJ6G5I.js.map} +0 -0
- /package/dist/{agentsValidate-PX32PNPA.js.map → agentsValidate-JHFP6CBL.js.map} +0 -0
- /package/dist/{ask-P3GOQDEX.js.map → ask-7S7OPAEK.js.map} +0 -0
- /package/dist/{autoUpdater-R4EXAJ7P.js.map → autoUpdater-JB2N6XSK.js.map} +0 -0
- /package/dist/{chunk-6RKXEEHI.js.map → chunk-26DNH5MY.js.map} +0 -0
- /package/dist/{chunk-BB7V4QKI.js.map → chunk-3H7JCOX7.js.map} +0 -0
- /package/dist/{chunk-PD6OTVLV.js.map → chunk-5KZB52GW.js.map} +0 -0
- /package/dist/{chunk-C6ZACFHI.js.map → chunk-7SGVFJWX.js.map} +0 -0
- /package/dist/{chunk-37NXYZZP.js.map → chunk-AHO6SRRR.js.map} +0 -0
- /package/dist/{chunk-MRMEHFMO.js.map → chunk-CIUNX2UP.js.map} +0 -0
- /package/dist/{chunk-4YNWFMHH.js.map → chunk-DXIIHIJG.js.map} +0 -0
- /package/dist/{chunk-3D4D72TA.js.map → chunk-EHFY3DA7.js.map} +0 -0
- /package/dist/{chunk-LOOXNX5Y.js.map → chunk-JUVESM6V.js.map} +0 -0
- /package/dist/{chunk-5N64T4FL.js.map → chunk-K45LL6PV.js.map} +0 -0
- /package/dist/{chunk-UO5X5SXI.js.map → chunk-KEBVFZAX.js.map} +0 -0
- /package/dist/{chunk-ONPK4QYB.js.map → chunk-KKILDPBV.js.map} +0 -0
- /package/dist/{chunk-BUEOTCMA.js.map → chunk-NSID4TSV.js.map} +0 -0
- /package/dist/{chunk-5TAP3RGJ.js.map → chunk-QKOT6XYY.js.map} +0 -0
- /package/dist/{chunk-EASHVVK6.js.map → chunk-QSP2L4AM.js.map} +0 -0
- /package/dist/{chunk-2GNIL5UE.js.map → chunk-RJK6AYKB.js.map} +0 -0
- /package/dist/{chunk-TJOLXDG6.js.map → chunk-X6LUQUI4.js.map} +0 -0
- /package/dist/{chunk-YV4PKPBH.js.map → chunk-XM7MBTOO.js.map} +0 -0
- /package/dist/{chunk-ZTVPEF2F.js.map → chunk-XVZ7ZX2L.js.map} +0 -0
- /package/dist/{chunk-4E4ZHEYH.js.map → chunk-YJWJ5DGO.js.map} +0 -0
- /package/dist/{chunk-NA7ROPOY.js.map → chunk-ZHPKJVUT.js.map} +0 -0
- /package/dist/{chunk-2WZXH6PI.js.map → chunk-ZQ4IZUPH.js.map} +0 -0
- /package/dist/{commands-YV373ZFU.js.map → commands-AAP4MYTL.js.map} +0 -0
- /package/dist/{config-LWY7BZXJ.js.map → config-A7PN2NDW.js.map} +0 -0
- /package/dist/{context-5AE67GYL.js.map → context-SXT7XLXT.js.map} +0 -0
- /package/dist/{customCommands-7UNIEUFP.js.map → customCommands-KXTQJO3S.js.map} +0 -0
- /package/dist/{env-EFQJVSUY.js.map → env-MACCQLTW.js.map} +0 -0
- /package/dist/{file-VRVRLDK2.js.map → file-HC4EKI7Z.js.map} +0 -0
- /package/dist/{llm-6BUSXSBZ.js.map → llm-OTFTXTXY.js.map} +0 -0
- /package/dist/{llmLazy-6WFEDUPC.js.map → llmLazy-PQ5HCZ4E.js.map} +0 -0
- /package/dist/{loader-HQ56KK4K.js.map → loader-VHBERR5P.js.map} +0 -0
- /package/dist/{lsp-4GTQX6SE.js.map → lsp-Y5UUXXVU.js.map} +0 -0
- /package/dist/{mcp-RFRGVPYG.js.map → mcp-V3E2FBYM.js.map} +0 -0
- /package/dist/{mentionProcessor-J4U4MFY5.js.map → mentionProcessor-FCHEM7NU.js.map} +0 -0
- /package/dist/{messages-5JAJG44H.js.map → messages-UYHRONQS.js.map} +0 -0
- /package/dist/{model-VR6QZCYI.js.map → model-YPKZ4DQ3.js.map} +0 -0
- /package/dist/{openai-LUD3GHJ5.js.map → openai-P2TQWQKC.js.map} +0 -0
- /package/dist/{outputStyles-TJM65BMJ.js.map → outputStyles-CSGYX64E.js.map} +0 -0
- /package/dist/{pluginRuntime-OW54XVUW.js.map → pluginRuntime-EP4ATLRC.js.map} +0 -0
- /package/dist/{pluginValidation-X2LVT22X.js.map → pluginValidation-3ZURFUHM.js.map} +0 -0
- /package/dist/{prompts-KTT5FAYF.js.map → prompts-ATUILKIJ.js.map} +0 -0
- /package/dist/{pybAgentSessionLoad-YI2EVD6F.js.map → pybAgentSessionLoad-QZIINLCD.js.map} +0 -0
- /package/dist/{pybAgentSessionResume-VJIKNW7O.js.map → pybAgentSessionResume-3XND5AZG.js.map} +0 -0
- /package/dist/{pybAgentStreamJsonSession-6DZUR3ME.js.map → pybAgentStreamJsonSession-JQPASPNN.js.map} +0 -0
- /package/dist/{pybHooks-U24NOHX7.js.map → pybHooks-J3KPSFJI.js.map} +0 -0
- /package/dist/{query-PSDZBJSO.js.map → query-ID3RUBSI.js.map} +0 -0
- /package/dist/{registry-2U2WP7ZB.js.map → registry-HBS4R3GL.js.map} +0 -0
- /package/dist/{ripgrep-EO24IKYT.js.map → ripgrep-IDPG6V7P.js.map} +0 -0
- /package/dist/{skillMarketplace-CAGSV3Z6.js.map → skillMarketplace-VA7VL5D5.js.map} +0 -0
- /package/dist/{state-56C2ROYY.js.map → state-GU2VJXIZ.js.map} +0 -0
- /package/dist/{theme-DYILR2QC.js.map → theme-GZQWHNWP.js.map} +0 -0
- /package/dist/{toolPermissionSettings-ZPBRNODI.js.map → toolPermissionSettings-XJ6CKWDG.js.map} +0 -0
- /package/dist/{tools-M4GJRWEU.js.map → tools-EVR75R24.js.map} +0 -0
- /package/dist/{userInput-3A7OKG4S.js.map → userInput-ABKKAHHH.js.map} +0 -0
|
@@ -4,16 +4,17 @@ import {
|
|
|
4
4
|
LspServerRegistry,
|
|
5
5
|
findNearestRoot,
|
|
6
6
|
getInstallNotices
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AHK3NVAX.js";
|
|
8
8
|
import {
|
|
9
9
|
levenshtein
|
|
10
10
|
} from "./chunk-UZ34JEUK.js";
|
|
11
11
|
import {
|
|
12
12
|
debug
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EHFY3DA7.js";
|
|
14
14
|
import {
|
|
15
|
-
getCwd
|
|
16
|
-
|
|
15
|
+
getCwd,
|
|
16
|
+
getSessionRoot
|
|
17
|
+
} from "./chunk-CDKFT2GF.js";
|
|
17
18
|
|
|
18
19
|
// src/lsp/index.ts
|
|
19
20
|
import { extname as extname2 } from "path";
|
|
@@ -529,9 +530,9 @@ var LspClientManager = class _LspClientManager {
|
|
|
529
530
|
if (serverInfo) {
|
|
530
531
|
return this.resolveRootForServer(filePath, serverInfo);
|
|
531
532
|
}
|
|
532
|
-
const
|
|
533
|
-
if (filePath.startsWith(
|
|
534
|
-
return
|
|
533
|
+
const sessionRoot = getSessionRoot();
|
|
534
|
+
if (filePath.startsWith(sessionRoot)) {
|
|
535
|
+
return sessionRoot;
|
|
535
536
|
}
|
|
536
537
|
return dirname(filePath);
|
|
537
538
|
}
|
|
@@ -564,7 +565,7 @@ var LspClientManager = class _LspClientManager {
|
|
|
564
565
|
const safeCwd = /[^\x00-\x7F]/.test(resolvedRoot) ? process.cwd() : resolvedRoot;
|
|
565
566
|
let initOpts = serverInfo.initializationOptions;
|
|
566
567
|
if (serverInfo.id === "pyright" || serverInfo.id === "ty") {
|
|
567
|
-
const { detectPythonVenv } = await import("./registry-
|
|
568
|
+
const { detectPythonVenv } = await import("./registry-HBS4R3GL.js");
|
|
568
569
|
const pythonPath = detectPythonVenv(resolvedRoot);
|
|
569
570
|
if (pythonPath) {
|
|
570
571
|
initOpts = { ...initOpts ?? {}, pythonPath };
|
|
@@ -604,7 +605,7 @@ var LspClientManager = class _LspClientManager {
|
|
|
604
605
|
this.qualitySamples.clear();
|
|
605
606
|
this.fileVersions.clear();
|
|
606
607
|
}
|
|
607
|
-
async workspaceSymbol(query, rootPath =
|
|
608
|
+
async workspaceSymbol(query, rootPath = getSessionRoot(), options) {
|
|
608
609
|
await this.maybeEnsureWorkspaceClients(rootPath);
|
|
609
610
|
if (this.clients.size === 0) {
|
|
610
611
|
await this.ensureWorkspaceClients(rootPath);
|
|
@@ -731,7 +732,7 @@ var LspClientManager = class _LspClientManager {
|
|
|
731
732
|
}
|
|
732
733
|
return filtered;
|
|
733
734
|
}
|
|
734
|
-
async documentSymbol(filePath, rootPath =
|
|
735
|
+
async documentSymbol(filePath, rootPath = getSessionRoot()) {
|
|
735
736
|
try {
|
|
736
737
|
const touched = await this.touchFile(filePath, rootPath, {
|
|
737
738
|
wait: true,
|
|
@@ -751,14 +752,14 @@ var LspClientManager = class _LspClientManager {
|
|
|
751
752
|
return null;
|
|
752
753
|
}
|
|
753
754
|
}
|
|
754
|
-
async getDiagnostics(filePath, rootPath =
|
|
755
|
+
async getDiagnostics(filePath, rootPath = getSessionRoot()) {
|
|
755
756
|
const client = await this.getClient(filePath, rootPath);
|
|
756
757
|
if (!client) {
|
|
757
758
|
return [];
|
|
758
759
|
}
|
|
759
760
|
return client.getDiagnostics(filePath);
|
|
760
761
|
}
|
|
761
|
-
async getAllDiagnostics(filePath, rootPath =
|
|
762
|
+
async getAllDiagnostics(filePath, rootPath = getSessionRoot()) {
|
|
762
763
|
const servers = LspServerRegistry.getInstance().getServersForExtension(extname(filePath));
|
|
763
764
|
debug.info("LSP_DIAGNOSTICS", {
|
|
764
765
|
action: "multi-server",
|
|
@@ -957,8 +958,8 @@ var LspClientManager = class _LspClientManager {
|
|
|
957
958
|
};
|
|
958
959
|
}
|
|
959
960
|
// New helper to expose waitForReadiness to clients who only have a manager
|
|
960
|
-
async waitForReadiness(filePath, rootPath =
|
|
961
|
-
const client = await this.
|
|
961
|
+
async waitForReadiness(filePath, rootPath = getSessionRoot(), timeoutMs = 2e3) {
|
|
962
|
+
const client = await this.getClient(filePath, rootPath);
|
|
962
963
|
if (client) {
|
|
963
964
|
const ready = await client.waitForReadiness(filePath, timeoutMs);
|
|
964
965
|
if (ready) {
|
|
@@ -981,7 +982,7 @@ var LspClientManager = class _LspClientManager {
|
|
|
981
982
|
const serverKey = client.serverKey ?? client.serverId ?? "unknown";
|
|
982
983
|
return `${serverKey}::${filePath}`;
|
|
983
984
|
}
|
|
984
|
-
async touchFile(filePath, rootPath =
|
|
985
|
+
async touchFile(filePath, rootPath = getSessionRoot(), options) {
|
|
985
986
|
const client = await this.getClient(filePath, rootPath);
|
|
986
987
|
if (!client) {
|
|
987
988
|
return false;
|
|
@@ -1012,7 +1013,7 @@ var LspClientManager = class _LspClientManager {
|
|
|
1012
1013
|
matchesServerFilters(filePath, serverInfo) {
|
|
1013
1014
|
const normalizePath = (value) => value.replace(/\\/g, "/");
|
|
1014
1015
|
const normalizedFile = normalizePath(filePath);
|
|
1015
|
-
const relativeToCwd = normalizePath(relative(
|
|
1016
|
+
const relativeToCwd = normalizePath(relative(getSessionRoot(), filePath));
|
|
1016
1017
|
const matches = (patterns) => patterns.some((pattern) => {
|
|
1017
1018
|
if (minimatch(normalizedFile, pattern, { dot: true })) return true;
|
|
1018
1019
|
if (relativeToCwd && !relativeToCwd.startsWith("..")) {
|
|
@@ -1025,7 +1026,7 @@ var LspClientManager = class _LspClientManager {
|
|
|
1025
1026
|
return true;
|
|
1026
1027
|
}
|
|
1027
1028
|
async resolveRootForServer(filePath, serverInfo) {
|
|
1028
|
-
const
|
|
1029
|
+
const sessionRoot = getSessionRoot();
|
|
1029
1030
|
let defaultRoot;
|
|
1030
1031
|
if (serverInfo.rootMarkers.length > 0) {
|
|
1031
1032
|
defaultRoot = await findNearestRoot(dirname(filePath), serverInfo.rootMarkers, {
|
|
@@ -1036,7 +1037,7 @@ var LspClientManager = class _LspClientManager {
|
|
|
1036
1037
|
});
|
|
1037
1038
|
}
|
|
1038
1039
|
if (!defaultRoot) {
|
|
1039
|
-
defaultRoot = filePath.startsWith(
|
|
1040
|
+
defaultRoot = filePath.startsWith(sessionRoot) ? sessionRoot : dirname(filePath);
|
|
1040
1041
|
}
|
|
1041
1042
|
if (serverInfo.resolveRoot) {
|
|
1042
1043
|
const resolved = await serverInfo.resolveRoot(filePath, defaultRoot);
|
|
@@ -3039,7 +3040,7 @@ function serveStatusWithProvider(statusProvider, options) {
|
|
|
3039
3040
|
}
|
|
3040
3041
|
var LspAPI = {
|
|
3041
3042
|
async run(input) {
|
|
3042
|
-
const rootPath = input.rootPath ??
|
|
3043
|
+
const rootPath = input.rootPath ?? getSessionRoot();
|
|
3043
3044
|
const manager = LspClientManager.getInstance();
|
|
3044
3045
|
const client = await manager.getClient(
|
|
3045
3046
|
input.filePath,
|
|
@@ -3422,7 +3423,7 @@ var LspAPI = {
|
|
|
3422
3423
|
return Promise.all(inputs.map((input) => this.run(input)));
|
|
3423
3424
|
},
|
|
3424
3425
|
async touchFile(filePath, options = {}) {
|
|
3425
|
-
const rootPath = options.rootPath ??
|
|
3426
|
+
const rootPath = options.rootPath ?? getSessionRoot();
|
|
3426
3427
|
clearDiagnosticsCache(filePath, rootPath);
|
|
3427
3428
|
return LspClientManager.getInstance().touchFile(filePath, rootPath, {
|
|
3428
3429
|
wait: options.wait,
|
|
@@ -3430,7 +3431,7 @@ var LspAPI = {
|
|
|
3430
3431
|
});
|
|
3431
3432
|
},
|
|
3432
3433
|
async diagnostics(filePath, rootPath) {
|
|
3433
|
-
const resolvedRoot = rootPath ??
|
|
3434
|
+
const resolvedRoot = rootPath ?? getSessionRoot();
|
|
3434
3435
|
const ttlMs = resolveDiagnosticsTtlMs();
|
|
3435
3436
|
if (ttlMs > 0) {
|
|
3436
3437
|
const key = buildDiagnosticsCacheKey(filePath, resolvedRoot);
|
|
@@ -3460,7 +3461,7 @@ var LspAPI = {
|
|
|
3460
3461
|
},
|
|
3461
3462
|
async documentSymbolRaw(filePath, rootPath) {
|
|
3462
3463
|
const manager = LspClientManager.getInstance();
|
|
3463
|
-
const resolvedRoot = rootPath ??
|
|
3464
|
+
const resolvedRoot = rootPath ?? getSessionRoot();
|
|
3464
3465
|
const managerDocumentSymbol = manager.documentSymbol;
|
|
3465
3466
|
if (typeof managerDocumentSymbol === "function") {
|
|
3466
3467
|
return managerDocumentSymbol.call(manager, filePath, resolvedRoot);
|
|
@@ -3479,7 +3480,7 @@ var LspAPI = {
|
|
|
3479
3480
|
async findReferencesRaw(filePath, line, character, rootPath) {
|
|
3480
3481
|
const client = await LspClientManager.getInstance().getClient(
|
|
3481
3482
|
filePath,
|
|
3482
|
-
rootPath ??
|
|
3483
|
+
rootPath ?? getSessionRoot()
|
|
3483
3484
|
);
|
|
3484
3485
|
if (!client) return null;
|
|
3485
3486
|
return await client.findReferences(filePath, line, character);
|
|
@@ -3489,7 +3490,7 @@ var LspAPI = {
|
|
|
3489
3490
|
const { rootPath, ...rest } = options ?? {};
|
|
3490
3491
|
return LspClientManager.getInstance().workspaceSymbol(
|
|
3491
3492
|
query,
|
|
3492
|
-
rootPath ??
|
|
3493
|
+
rootPath ?? getSessionRoot(),
|
|
3493
3494
|
rest
|
|
3494
3495
|
);
|
|
3495
3496
|
},
|
|
@@ -3502,7 +3503,7 @@ var LspAPI = {
|
|
|
3502
3503
|
};
|
|
3503
3504
|
var LspFacade = {
|
|
3504
3505
|
async run(input) {
|
|
3505
|
-
const rootPath = input.rootPath ??
|
|
3506
|
+
const rootPath = input.rootPath ?? getSessionRoot();
|
|
3506
3507
|
if (input.operation === "documentSymbol") {
|
|
3507
3508
|
const flag = String(process.env.PYB_LSP_STRICT_FIRST ?? "").trim().toLowerCase();
|
|
3508
3509
|
const lspFirst = flag === "" ? true : !(flag === "0" || flag === "false" || flag === "off" || flag === "no");
|
|
@@ -3857,7 +3858,7 @@ var LspFacade = {
|
|
|
3857
3858
|
return LspAPI.diagnosticsPretty(filePath, options);
|
|
3858
3859
|
},
|
|
3859
3860
|
async checkFileReferences(filePath) {
|
|
3860
|
-
const rootPath =
|
|
3861
|
+
const rootPath = getSessionRoot();
|
|
3861
3862
|
const fileUri = LspAPI.normalizeUri(filePath);
|
|
3862
3863
|
const symbols = await LspAPI.documentSymbolRaw(filePath, rootPath);
|
|
3863
3864
|
if (symbols === null) {
|