fix(coding-agent): browser default, patch error path, mcp:// selectors, find timeout/sort, DAP launch races, debugpy diagnostics
- browser tool's existing-tab re-nav defaults to waitUntil: 'load' (matching new-tab path); identical acquireTab() calls no longer hang on dev servers - patch tool error path uses caller-supplied relative path; absolute resolvedPath stays in structured context only ($HOME no longer leaks to TUI) - splitInternalUrlSel keeps mcp:// resource URIs opaque even when they end in ':raw' or '/:1-50' (McpProtocolHandler matches by verbatim URI) - find tool: timeout signal honored by onMatch; partial results sorted by mtime desc; backslash-escaped commas skipped in path-list validation - DAP throwPreferredDapStartError waits up to 50ms for the underlying launch/attach error instead of one microtask - debug tool surfaces 'python missing' and 'pip install debugpy' diagnostics separately when adapter: 'debugpy' is requested
This commit is contained in:
@@ -182,6 +182,22 @@ describe("DAP launch failure handling", () => {
|
||||
process.off("unhandledRejection", onUnhandled);
|
||||
}
|
||||
});
|
||||
|
||||
it("surfaces the adapter name and ENOENT when spawn fails", async () => {
|
||||
const manager = new DapSessionManager();
|
||||
spyOn(DapClient, "spawn").mockRejectedValue(new Error("ENOENT: no such file or directory, spawn 'lldb-dap'"));
|
||||
|
||||
let message = "";
|
||||
try {
|
||||
await manager.launch({ adapter: TEST_ADAPTER, program: "/bin/echo", cwd: process.cwd() });
|
||||
} catch (error) {
|
||||
expect(error).toBeInstanceOf(Error);
|
||||
message = (error as Error).message;
|
||||
}
|
||||
|
||||
expect(message).toContain("ENOENT");
|
||||
expect(message).toContain(TEST_ADAPTER.name);
|
||||
});
|
||||
});
|
||||
|
||||
describe("DebugTool launch validation", () => {
|
||||
|
||||
Reference in New Issue
Block a user