Skip to content

v0.7.2 — Terminal Display, Execution Timeout & Streaming Token Usage

Choose a tag to compare

@acodercat acodercat released this 07 Apr 10:08
· 34 commits to master since this release
f67a485

What's New

Terminal Display (Claude Code-style UI)

  • Rich-based terminal rendering with display=True (default)
  • ● prefix for code execution, ⎿ for output, live Markdown streaming
  • Token usage summary on completion (done 6.5s · 983 tokens)
  • Works with both run() and stream_events()

Execution Timeout

  • max_exec_timeout parameter to limit code execution time
  • Thread-based timeout handles sync-blocking code (network, DB, time.sleep)
  • IPyKernelRuntime sends SIGINT for real interruption
  • LLM receives timeout feedback and adjusts strategy
  • System prompt auto-guides LLM to use timeout params in network/DB calls

Streaming Token Usage

  • StreamResponse abstraction tracks token usage during streaming
  • stream_options: include_usage for OpenAI-compatible endpoints
  • Token counts displayed in terminal summary

Other Changes

  • Removed Logger, replaced by display system
  • system-reminder injects current datetime per request
  • dill.dumps(recurse=True) fixes serialization with Rich globals
  • _extract_token_usage deduplicated to Model base class
  • requires-python bumped to >=3.12 (IPython 9 requirement)
  • 9 new timeout unit tests (mock-based, no LLM needed)