chat: fix whitespace problems once and for all (#24624)

* chat: fix whitespace problems once and for all

* Purge trailing spaces from grammar generation

* Revert "Purge trailing spaces from grammar generation"

This reverts commit b0827ecb7d4767f37cefd751b3646f98d5303891.
This commit is contained in:
Piotr Wilkin (ilintar) 2026-06-15 08:27:10 +02:00 committed by GitHub
parent 2a6c391a5e
commit a6dff71270
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 58 additions and 31 deletions

View file

@ -1369,7 +1369,7 @@ static void test_nemotron_tool_format(testing & t) {
// Check argument markers (note: markers retain trailing newlines for proper parsing)
t.assert_equal("arg_name_prefix should be '<parameter='", "<parameter=", analysis.tools.arguments.name_prefix);
t.assert_equal("arg_name_suffix should be '>\\n'", ">\n", analysis.tools.arguments.name_suffix);
t.assert_equal("arg_value_suffix should be '</parameter>\\n'", "</parameter>\n", analysis.tools.arguments.value_suffix);
t.assert_equal("arg_value_suffix should be '\\n</parameter>\\n'", "\n</parameter>\n", analysis.tools.arguments.value_suffix);
// Check format classification
t.assert_true("tool format should be TAG_WITH_TAGGED", analysis.tools.format.mode == tool_format::TAG_WITH_TAGGED);
@ -2030,12 +2030,11 @@ static void test_tagged_args_with_embedded_quotes(testing & t) {
return p.content(p.until("<seed:tool_call>")) + p.optional(tool_section) + p.end();
});
// The exact input from the failing test
std::string input =
"<seed:tool_call>\n"
"<function=edit>\n"
"<parameter=filename>\n"
"foo.cpp\n"
"<parameter=filename>"
"foo.cpp"
"</parameter>\n"
"<parameter=oldString>"
"def foo(arg = \"14\"):\n"