mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-21 05:32:53 +00:00
24 lines
789 B
TypeScript
24 lines
789 B
TypeScript
import type { OpenClawConfig } from "../config/config.js";
|
|
import type { BundleLspServerConfig } from "../plugins/bundle-lsp.js";
|
|
import { loadEnabledBundleLspConfig } from "../plugins/bundle-lsp.js";
|
|
|
|
export type EmbeddedPiLspConfig = {
|
|
lspServers: Record<string, BundleLspServerConfig>;
|
|
diagnostics: Array<{ pluginId: string; message: string }>;
|
|
};
|
|
|
|
export function loadEmbeddedPiLspConfig(params: {
|
|
workspaceDir: string;
|
|
cfg?: OpenClawConfig;
|
|
}): EmbeddedPiLspConfig {
|
|
const bundleLsp = loadEnabledBundleLspConfig({
|
|
workspaceDir: params.workspaceDir,
|
|
cfg: params.cfg,
|
|
});
|
|
// User-configured LSP servers could override bundle defaults here in the future.
|
|
return {
|
|
lspServers: { ...bundleLsp.config.lspServers },
|
|
diagnostics: bundleLsp.diagnostics,
|
|
};
|
|
}
|