fix(coding-agent/lsp): exposed LSP server startup errors in session display and logs

- Added error field to LSP server status types throughout the mode context chain.
- Updated /session command to display the actual error message when an LSP server fails to start.
- Added logger.warn call during LSP warmup to log server startup failures to ~/.omp/logs/.
This commit is contained in:
can1357
2026-01-29 23:16:41 +01:00
parent 7d715a92d3
commit 818ebc5d4e
7 changed files with 16 additions and 7 deletions
@@ -265,7 +265,9 @@ export class CommandController {
info += `\n${theme.bold("LSP Servers")}\n`;
for (const server of this.ctx.lspServers) {
const statusColor = server.status === "ready" ? "success" : "error";
info += `${theme.fg("dim", `${server.name}:`)} ${theme.fg(statusColor, server.status)} ${theme.fg("dim", `(${server.fileTypes.join(", ")})`)}\n`;
const statusText =
server.status === "error" && server.error ? `${server.status}: ${server.error}` : server.status;
info += `${theme.fg("dim", `${server.name}:`)} ${theme.fg(statusColor, statusText)} ${theme.fg("dim", `(${server.fileTypes.join(", ")})`)}\n`;
}
}