fix(setup): spell IDA and JADX in interactive completion (#9149)

This commit is contained in:
Beqa authored and GitHub committed 2026-11-07 01:30:06 +08:00
1 parent d1103beb8d
commit 91d537098a
2 files changed
+40 -1

No files matched your search

+8 -1
View File
@@ -275,8 +275,15 @@ const readyAgentClients = (
const readyProviders = (result: SetupResult): readonly string[] =>
result.doctor.availableProviders.map(displayProviderId);
/** Product spellings that title case would distort. Lookup ids stay lowercase. */
const PROVIDER_DISPLAY_NAMES: Readonly<Record<string, string>> = {
ida: "IDA",
jadx: "JADX",
};
const displayProviderId = (id: string): string =>
id.length === 0 ? id : `${id[0]?.toUpperCase() ?? ""}${id.slice(1)}`;
PROVIDER_DISPLAY_NAMES[id] ??
(id.length === 0 ? id : `${id[0]?.toUpperCase() ?? ""}${id.slice(1)}`);
const humanList = (values: readonly string[]): string => {
if (values.length < 2) return values[0] ?? "";
+32
View File
@@ -493,6 +493,38 @@ describe("interactive setup completion", () => {
);
},
);
it("prints IDA and JADX with their product spellings", async () => {
const { stderr } = await execute(
process.execPath,
[
"--input-type=module",
"--eval",
[
'import { renderInteractiveSetupResult } from "./dist/cli/interactiveSetup.js";',
"renderInteractiveSetupResult({",
' status: "ready",',
" plannedActions: [],",
" appliedActions: [],",
" clients: {},",
" doctor: {",
" healthy: true,",
' availableProviders: ["hopper", "ghidra", "ida", "jadx", "kuna"],',
" checks: [],",
" },",
"}, {});",
].join("\n"),
],
{ cwd: process.cwd(), env: { ...process.env, NO_COLOR: "1" } },
);
expect(stderr).toContain(
"Deep analysis: Hopper, Ghidra, IDA, JADX, and Kuna",
);
expect(stderr).not.toContain("Ida");
expect(stderr).not.toContain("Jadx");
});
it("prints retained cleanup resources without relying on paths in remediation", async () => {
const resources = ["/fixture/owned backup", "/fixture/临时目录"];
const result: SetupResult = {