Skip to content

Remove rich, merge display into orchestrator, drop execute_batch - #2

Open
codexceed wants to merge 12 commits into
mainfrom
slim-display
Open

codexceed wants to merge 12 commits into
mainfrom
slim-display

Conversation

@codexceed

Copy link
Copy Markdown
Owner

Summary

  • Deleted display.py — inlined all display logic into orchestrator.py as plain print/sys.stdout.write
  • Merged chat.py into orchestrator.py (same as Merge chat.py into orchestrator, genericize system prompt #1, also included here for independence)
  • Removed rich dependency (and its transitive deps markdown-it-py, mdurl)
  • Removed unused execute_batch() from ToolExecutor and its test
  • Genericized system prompt (no hard-coded tool names)
  • Net: -153 lines, 1 fewer dependency, 2 fewer source files

Test plan

  • make check passes — ruff, pyright, pylint all clean, 20/20 tests pass
  • Manual smoke test: make run and verify streaming + tool calling still works

🤖 Generated with Claude Code

Sarthak Joshi and others added 2 commits April 10, 2026 22:41
…_batch

Replace rich-styled output with plain print/stdout.write, eliminating
the display.py module and the rich dependency entirely. Inline the
ChatClient from chat.py. Remove unused execute_batch() and its test.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rich is only used for Live/Spinner during tool execution — all other
output stays as plain print/stdout.write.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codexceed codexceed self-assigned this Apr 10, 2026
Sarthak Joshi and others added 10 commits April 11, 2026 09:02
Merge main.py and models.py into orchestrator.py and tools.py,
replacing Pydantic models with plain dicts and tenacity retry with
a simple loop. Removes 3 dependencies (pydantic, pydantic-settings,
tenacity). Updates tests and docs to match the new interface.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Keep slim-display's 2-module layout (no pydantic/tenacity/display).
Pull in from main: generic LLM_API_KEY/LLM_BASE_URL config and the
research empty-response fix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Roll back history to a pre-turn snapshot when _stream_response returns
None, so an LLM/API failure after the user message (or after partial
tool-call/result pairs) doesn't leave dangling entries that would poison
the next turn. The Ctrl+C-with-partial-content path is unchanged — that
reflects user intent, not infra failure.

Also update DISCOVERIES.md to match the post-pydantic/tenacity code:
_format_weather shape detection, plain-dict tool results, _race_with_cancel
/ _wait_or_cancel, and RuntimeError for exhausted throttle retries.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pull DISCOVERIES.md changes from main (removes the Application-Level
Issues section). Keep slim-display's architecture untouched: flat async
functions in orchestrator.py, no models.py, no display/main modules.
The stale-reference fixes already on slim-display are preserved because
they describe code that only exists on this branch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts:
#	src/cli_chat/orchestrator.py
Inline the two history.append loops in _process_turn and default
_tool_result's error flag to False so success sites drop the positional
bool. Net fewer lines and clearer call sites.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two cherry-picks from main, adapted to slim-display's architecture:

- Bump REQUEST_TIMEOUT from 15s to 20s so the research API's 15s slow
  path always finishes server-side (DISCOVERIES.md), instead of racing
  our httpx.ReadTimeout — which can wrap an empty asyncio.TimeoutError
  and surface as a cryptic "Request failed: " error.
- Wrap the catch-all httpx exception handler to include the exception
  class name when str(exc) is empty, so future empty-message exceptions
  remain diagnosable.
- Reword README "Requirements" to list env vars as the primary
  interface, noting that .env is one option (picked up automatically
  by uv run). Old wording implied keys had to live in .env.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CLAUDE.md still framed .env as the required key store; README now
treats env vars as the primary interface with .env as one option
(picked up by uv run). Update CLAUDE.md to match.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant