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:
@@ -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`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user