diff --git a/src/tools/fs.cpp b/src/tools/fs.cpp index 5d42b13..bb7ad07 100644 --- a/src/tools/fs.cpp +++ b/src/tools/fs.cpp @@ -286,8 +286,8 @@ std::expected check_read_args(ReadArgs a, const util::Bound for (const char* k : {"paths", "files", "file_paths"}) if (auto it = a.raw.find(k); it != a.raw.end() && it->is_array() && it->size() > 1) return std::unexpected(ToolError::invalid_args(std::format( - "read takes one `path`; got {} in `{}`. Make one read call per file " - "(they run in parallel).", it->size(), k))); + "read takes one `path`; got {} in `{}`. Make one read call per file.", + it->size(), k))); // Name the keys that DID arrive: a typo in the key and an argument // object that never arrived look the same otherwise. return std::unexpected(ToolError::invalid_args(std::format( diff --git a/src/tools/util/shell_detour.cpp b/src/tools/util/shell_detour.cpp index 28510f1..dcd0d1f 100644 --- a/src/tools/util/shell_detour.cpp +++ b/src/tools/util/shell_detour.cpp @@ -759,8 +759,7 @@ Detour analyze_detour(std::string_view cmd) { // The steps list names each call. d.param.clear(); d.bound.reset(); - d.reason = "each step is its own native call; make them in one " - "turn and they run in parallel, each with its own card."; + d.reason = "each step is its own native call."; d.tool = "read"; d.intent = Intent::ReadFile; } else if (v.param != d.param) { @@ -804,8 +803,9 @@ std::string bash_tool_suggestion(const Detour& d) { for (std::size_t i = 0; i < d.steps.size() && i < kShow; ++i) tip += (i ? "; " : "") + ("`" + d.steps[i] + "`"); if (d.steps.size() > kShow) tip += "; \u2026"; - tip += " \u2014 make them in one turn and they run in parallel, each " - "with its own card."; + // Which calls, not how to issue them: whether several calls in one + // turn run in parallel, and how they are shown, is the host's to say. + tip += "."; return tip; } if (!d.param.empty()) { diff --git a/tests/bash_validate_test.cpp b/tests/bash_validate_test.cpp index 8faf4ed..4b24985 100644 --- a/tests/bash_validate_test.cpp +++ b/tests/bash_validate_test.cpp @@ -416,6 +416,10 @@ TEST_CASE("bash_validate") { CHECK(t.find("2 native calls") != std::string::npos); CHECK(t.find("`git_log count: 5, oneline: true`") != std::string::npos); CHECK(t.find("`git_status`") != std::string::npos); + // Which calls only: the host decides how they run and are shown. + CHECK(t.ends_with("`git_status`.")); + CHECK(t.find("parallel") == std::string::npos); + CHECK(t.find("card") == std::string::npos); const auto m = tip("sed -n 1,5p a.cpp; grep -n x b.cpp"); CHECK(m.find("`read start_line: 1, end_line: 5`") != std::string::npos); CHECK(m.find("`grep case_sensitive: true`") != std::string::npos);