diff --git a/honcho-cli/README.md b/honcho-cli/README.md index 9cb8e767..3da2c7ec 100644 --- a/honcho-cli/README.md +++ b/honcho-cli/README.md @@ -79,7 +79,6 @@ Per-command scoping (workspace / peer / session) is handled via `-w` / `-p` / `- |---------|-------------| | `honcho session list` | List sessions in the workspace | | `honcho session inspect ` | Peers, message count, summaries, config | -| `honcho session messages ` | Recent messages | | `honcho session context ` | What an agent would see | | `honcho session summaries ` | Short + long summaries | | `honcho session peers ` / `add-peers` / `remove-peers` | Peer management | diff --git a/honcho-cli/src/honcho_cli/commands/session.py b/honcho-cli/src/honcho_cli/commands/session.py index 6c9e9bb9..754452ab 100644 --- a/honcho-cli/src/honcho_cli/commands/session.py +++ b/honcho-cli/src/honcho_cli/commands/session.py @@ -110,48 +110,6 @@ def inspect( _handle_error(e, "session", sid) -@app.command() -def messages( - session_id: Optional[str] = typer.Argument(None, help="Session ID (uses default if omitted)"), - last: int = typer.Option(20, "--last", help="Number of recent messages"), - reverse: bool = typer.Option(False, "--reverse", help="Reverse order (oldest first)"), - workspace: Optional[str] = typer.Option(None, "--workspace", "-w", help="Override workspace ID"), - session: Optional[str] = typer.Option(None, "--session", "-s", help="Override session ID"), - json_output: bool = typer.Option(False, "--json", help="Force JSON output"), -) -> None: - """List recent messages in a session.""" - from honcho_cli.common import handle_cmd_flags - from honcho_cli.main import get_client - - handle_cmd_flags(json_output=json_output, workspace=workspace, session=session) - sid = _get_session_id(session_id) - client, config = get_client() - sess = client.session(sid) - - try: - # SDK returns most-recent-first. Default case (newest N) only needs - # the first page. --reverse (oldest N) still walks all pages until - # the SDK accepts order=asc on session.messages(). - if not reverse: - msgs = sess.messages().items[:last] - else: - msgs = list(sess.messages())[-last:] - - items = [ - { - "id": m.id, - "peer_id": m.peer_id, - "content": m.content[:300], - "token_count": m.token_count, - "created_at": str(m.created_at), - } - for m in msgs - ] - print_result(items, columns=["id", "peer_id", "content", "created_at"], title=f"Messages ({sid})") - except Exception as e: - _handle_error(e, "session", sid) - - @app.command() def context( session_id: Optional[str] = typer.Argument(None, help="Session ID (uses default if omitted)"), diff --git a/honcho-cli/src/honcho_cli/skills/honcho-debug.md b/honcho-cli/src/honcho_cli/skills/honcho-debug.md index 547d6163..31ce2203 100644 --- a/honcho-cli/src/honcho_cli/skills/honcho-debug.md +++ b/honcho-cli/src/honcho_cli/skills/honcho-debug.md @@ -37,7 +37,7 @@ honcho session context --json honcho session summaries --json # Check message history -honcho session messages --last 50 --json +honcho message list --last 50 --json ``` ### Dialectic giving bad answers? diff --git a/honcho-cli/src/honcho_cli/skills/honcho-inspect.md b/honcho-cli/src/honcho_cli/skills/honcho-inspect.md index dd1fb878..14c0cb94 100644 --- a/honcho-cli/src/honcho_cli/skills/honcho-inspect.md +++ b/honcho-cli/src/honcho_cli/skills/honcho-inspect.md @@ -40,7 +40,7 @@ honcho conclusion search "topic" --observer --json ```bash honcho session inspect --json -honcho session messages --last 20 --json +honcho message list --last 20 --json honcho session context --json honcho session summaries --json ```