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(
|
app = typer.Typer(
|
||||||
name="webber-cli",
|
name="webber-cli",
|
||||||
help="CLI client for the Webber API",
|
help="CLI client for the Webber API",
|
||||||
no_args_is_help=True,
|
no_args_is_help=False,
|
||||||
|
invoke_without_command=True,
|
||||||
add_completion=False,
|
add_completion=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -141,8 +142,9 @@ def _confirm_auto_accept() -> bool:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@app.callback()
|
@app.callback(invoke_without_command=True)
|
||||||
def main(
|
def main(
|
||||||
|
ctx: typer.Context,
|
||||||
version: bool = typer.Option(
|
version: bool = typer.Option(
|
||||||
False,
|
False,
|
||||||
"--version",
|
"--version",
|
||||||
@@ -153,7 +155,15 @@ def main(
|
|||||||
),
|
),
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Webber CLI - Talk to the Webber API."""
|
"""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()
|
@app.command()
|
||||||
|
|||||||
Reference in New Issue
Block a user