fix(model-servers): autorise les espaces dans le champ Arguments supplémentaires llama.cpp
Le champ contrôlé de ModelServersPanel/FirstRunWizard perdait les espaces saisis dans les arguments llama.cpp (trim/split prématuré sur chaque frappe au lieu de la seule sérialisation finale) (#113). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -83,6 +83,30 @@ describe("FirstRunWizard (with MockProfileGateway)", () => {
|
||||
expect(cmd.value).toBe("codex-2");
|
||||
});
|
||||
|
||||
it("keeps args spaces while typing and parses them on blur", async () => {
|
||||
const { profile } = renderWizard();
|
||||
await waitForLoaded();
|
||||
await waitFor(() =>
|
||||
expect(
|
||||
(screen.getByLabelText("use Claude Code") as HTMLInputElement).checked,
|
||||
).toBe(true),
|
||||
);
|
||||
|
||||
const args = screen.getByLabelText("Claude Code args") as HTMLInputElement;
|
||||
fireEvent.change(args, {
|
||||
target: { value: "--model claude-sonnet-4-5 --verbose " },
|
||||
});
|
||||
expect(args.value).toBe("--model claude-sonnet-4-5 --verbose ");
|
||||
|
||||
fireEvent.blur(args);
|
||||
fireEvent.click(screen.getByRole("button", { name: "Save and continue" }));
|
||||
|
||||
await waitFor(async () => {
|
||||
const [saved] = await profile.listProfiles();
|
||||
expect(saved.args).toEqual(["--model", "claude-sonnet-4-5", "--verbose"]);
|
||||
});
|
||||
});
|
||||
|
||||
it("detection shows ✓ for claude and ✗ for the rest", async () => {
|
||||
renderWizard();
|
||||
await waitForLoaded();
|
||||
|
||||
Reference in New Issue
Block a user