From c23593a985415f63c4da5da5a7675f6bbb23bffb Mon Sep 17 00:00:00 2001 From: Andy963 Date: Tue, 17 Mar 2026 17:40:15 +0800 Subject: [PATCH 1/3] fix(cli): correct help tool names --- src/bub/builtin/tools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bub/builtin/tools.py b/src/bub/builtin/tools.py index 9c821573..62c15060 100644 --- a/src/bub/builtin/tools.py +++ b/src/bub/builtin/tools.py @@ -76,7 +76,7 @@ async def bash( *, context: ToolContext, ) -> str: - """Run a shell command. Use background=true to keep it running and fetch output later via bash_output.""" + """Run a shell command. Use background=true to keep it running and fetch output later via bash.output.""" workspace = context.state.get("_runtime_workspace") target_cwd = cwd or workspace shell = await shell_manager.start(cmd=cmd, cwd=target_cwd) @@ -293,8 +293,8 @@ def show_help() -> str: " ,fs.write path=tmp.txt content='hello'\n" " ,fs.edit path=tmp.txt old=hello new=world\n" " ,bash cmd='sleep 5' background=true\n" - " ,bash_output shell_id=bsh-12345678\n" - " ,kill_bash shell_id=bsh-12345678\n" + " ,bash.output shell_id=bsh-12345678\n" + " ,bash.kill shell_id=bsh-12345678\n" "Any unknown command after ',' is executed as shell via bash." ) From dbac6219dee73f652fe406480ba5c415353a103a Mon Sep 17 00:00:00 2001 From: Andy963 Date: Tue, 17 Mar 2026 17:40:22 +0800 Subject: [PATCH 2/3] test(cli): cover help tool names --- tests/test_cli_help.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/test_cli_help.py diff --git a/tests/test_cli_help.py b/tests/test_cli_help.py new file mode 100644 index 00000000..79732a4b --- /dev/null +++ b/tests/test_cli_help.py @@ -0,0 +1,16 @@ +from __future__ import annotations + +import pytest + +from bub.builtin.tools import show_help + + +@pytest.mark.asyncio +async def test_help_lists_correct_tool_names() -> None: + help_text = await show_help.run() + + assert ",bash.output" in help_text + assert ",bash.kill" in help_text + + assert ",bash_output" not in help_text + assert ",kill_bash" not in help_text From 65a82673562fdda07eb5b48070995a4e27d53b7f Mon Sep 17 00:00:00 2001 From: Frost Ming Date: Tue, 17 Mar 2026 17:55:18 +0800 Subject: [PATCH 3/3] Apply suggestion from @frostming --- src/bub/builtin/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bub/builtin/tools.py b/src/bub/builtin/tools.py index 62c15060..1a673eb3 100644 --- a/src/bub/builtin/tools.py +++ b/src/bub/builtin/tools.py @@ -76,7 +76,7 @@ async def bash( *, context: ToolContext, ) -> str: - """Run a shell command. Use background=true to keep it running and fetch output later via bash.output.""" + """Run a shell command. Use background=true to keep it running and fetch output later via bash_output.""" workspace = context.state.get("_runtime_workspace") target_cwd = cwd or workspace shell = await shell_manager.start(cmd=cmd, cwd=target_cwd)