feat: make chat the default command
Running 'webber-cli' without arguments now starts chat mode. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -99,7 +99,8 @@ def create_prompt_session(working_dir: str) -> PromptSession:
|
||||
app = typer.Typer(
|
||||
name="webber-cli",
|
||||
help="CLI client for the Webber API",
|
||||
no_args_is_help=True,
|
||||
no_args_is_help=False,
|
||||
invoke_without_command=True,
|
||||
add_completion=False,
|
||||
)
|
||||
|
||||
@@ -141,8 +142,9 @@ def _confirm_auto_accept() -> bool:
|
||||
)
|
||||
|
||||
|
||||
@app.callback()
|
||||
@app.callback(invoke_without_command=True)
|
||||
def main(
|
||||
ctx: typer.Context,
|
||||
version: bool = typer.Option(
|
||||
False,
|
||||
"--version",
|
||||
@@ -153,7 +155,15 @@ def main(
|
||||
),
|
||||
) -> None:
|
||||
"""Webber CLI - Talk to the Webber API."""
|
||||
pass
|
||||
# Default to chat command if no subcommand given
|
||||
if ctx.invoked_subcommand is None:
|
||||
chat(
|
||||
directory=".",
|
||||
api_url=None,
|
||||
mode=None,
|
||||
resume=None,
|
||||
stream=None,
|
||||
)
|
||||
|
||||
|
||||
@app.command()
|
||||
|
||||
Reference in New Issue
Block a user