mirror of
https://github.com/davidkaya/aryx.git
synced 2026-08-26 04:43:56 +02:00
fix: stabilize TypeScript LSP startup
Seed new TypeScript LSP profiles with --stdio, validate that shared profiles keep the required flag, auto-add it for existing profiles in the sidecar runtime, and include recent stderr when a language server dies before completing a request. Add shared and sidecar regression coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Text.Json;
|
||||
using Eryx.AgentHost.Contracts;
|
||||
using Eryx.AgentHost.Services;
|
||||
|
||||
namespace Eryx.AgentHost.Tests;
|
||||
@@ -24,4 +25,32 @@ public sealed class LspToolSessionTests
|
||||
|
||||
Assert.Contains("relativePath", json);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ResolveProcessArguments_AddsStdioForTypeScriptLanguageServer()
|
||||
{
|
||||
RunTurnLspProfileConfigDto profile = new()
|
||||
{
|
||||
Command = "typescript-language-server",
|
||||
Args = [],
|
||||
};
|
||||
|
||||
IReadOnlyList<string> args = LspToolSession.ResolveProcessArguments(profile);
|
||||
|
||||
Assert.Equal(["--stdio"], args);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ResolveProcessArguments_DoesNotDuplicateStdioWhenAlreadyPresent()
|
||||
{
|
||||
RunTurnLspProfileConfigDto profile = new()
|
||||
{
|
||||
Command = "typescript-language-server",
|
||||
Args = ["--stdio"],
|
||||
};
|
||||
|
||||
IReadOnlyList<string> args = LspToolSession.ResolveProcessArguments(profile);
|
||||
|
||||
Assert.Equal(["--stdio"], args);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user