@trim21/personal-pi-extensions 0.1.531 → 0.1.532

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trim21/personal-pi-extensions",
3
- "version": "0.1.531",
3
+ "version": "0.1.532",
4
4
  "type": "module",
5
5
  "description": "Custom pi coding-agent extensions: bwrap sandbox, workspace guard, opencode edit, and more",
6
6
  "keywords": [
@@ -307,16 +307,17 @@ export function mergeConfig(globalConfig: LspConfig, localConfig: LspConfig): Ls
307
307
  };
308
308
  }
309
309
 
310
- /** 读取全局 + 本地配置,合并并解析为生效配置;未知字段警告经 onWarning 上报。 */
310
+ /**
311
+ * 读取全局 + 本地配置,合并并解析为生效配置;未知字段警告经 onWarning 上报。
312
+ * 顺序读取两份配置,让警告顺序稳定为全局在前、本地在后。
313
+ */
311
314
  export async function loadLspConfig(
312
315
  cwd: string,
313
316
  globalConfigPath: string = join(homedir(), ".pi", "agent", "lsp.json"),
314
317
  onWarning?: (message: string) => void,
315
318
  ): Promise<ResolvedLspConfig> {
316
- const [globalConfig, localConfig] = await Promise.all([
317
- readConfigFile(globalConfigPath, onWarning),
318
- readConfigFile(join(cwd, ".pi", "lsp.json"), onWarning),
319
- ]);
319
+ const globalConfig = await readConfigFile(globalConfigPath, onWarning);
320
+ const localConfig = await readConfigFile(join(cwd, ".pi", "lsp.json"), onWarning);
320
321
  return resolveConfig(mergeConfig(globalConfig, localConfig));
321
322
  }
322
323