Skip to content

Conversation

@enyst
Copy link
Collaborator

@enyst enyst commented Nov 8, 2025

Fixes #988

Summary

  • Render CondensationRequest as a magenta system-styled panel in the DefaultConversationVisualizer (no more "UNKNOWN event")
  • Add CondensationRequest.visualize with a concise, friendly message using newlines (consistent with other visualize() implementations)

Details

  • Visualizer: explicit CondensationRequest branch leveraging the same system styling used by SystemPromptEvent and Condensation
  • Event: CondensationRequest.visualize returns a short Rich Text body (bold header + explanatory text)

Tests

  • Piggybacked on existing visualizer tests: added test_visualizer_condensation_request_panel in tests/sdk/conversation/test_visualizer.py
  • Verified pre-commit hooks (ruff format/lint, pycodestyle, pyright) on changed files

Compatibility

  • Backward-compatible; only adds visualization for an existing event type

@enyst can click here to continue refining the PR


Agent Server images for this PR

GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python amd64, arm64 nikolaik/python-nodejs:python3.12-nodejs22 Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:e9a2cc4-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-e9a2cc4-python \
  ghcr.io/openhands/agent-server:e9a2cc4-python

All tags pushed for this build

ghcr.io/openhands/agent-server:e9a2cc4-golang-amd64
ghcr.io/openhands/agent-server:e9a2cc4-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:e9a2cc4-golang-arm64
ghcr.io/openhands/agent-server:e9a2cc4-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:e9a2cc4-java-amd64
ghcr.io/openhands/agent-server:e9a2cc4-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:e9a2cc4-java-arm64
ghcr.io/openhands/agent-server:e9a2cc4-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:e9a2cc4-python-amd64
ghcr.io/openhands/agent-server:e9a2cc4-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-amd64
ghcr.io/openhands/agent-server:e9a2cc4-python-arm64
ghcr.io/openhands/agent-server:e9a2cc4-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-arm64
ghcr.io/openhands/agent-server:e9a2cc4-golang
ghcr.io/openhands/agent-server:e9a2cc4-java
ghcr.io/openhands/agent-server:e9a2cc4-python

About Multi-Architecture Support

  • Each variant tag (e.g., e9a2cc4-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., e9a2cc4-python-amd64) are also available if needed

enyst and others added 2 commits November 8, 2025 20:22
Co-authored-by: openhands <openhands@all-hands.dev>
…ize and leveraging existing system style

- Add CondensationRequest.visualize with concise message and newlines
- Extend existing visualizer test to cover CondensationRequest via panel path

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2025

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-sdk/openhands/sdk/conversation/visualizer
   default.py1464072%103, 121, 131, 144, 146, 160, 170–174, 187, 219–223, 232–236, 244–248, 257–261, 272, 288, 292, 301, 303, 305, 308, 327
openhands-sdk/openhands/sdk/event
   condenser.py351362%38, 40, 42–46, 60–62, 66–67, 79
TOTAL11907552253% 

@enyst enyst changed the title visualizer: render CondensationRequest as system-styled panel; add visualize() visualizer: render CondensationRequest nicely Nov 8, 2025
…r PR discussion

Co-authored-by: openhands <openhands@all-hands.dev>
Copy link
Collaborator Author

enyst commented Nov 8, 2025

Hi — OpenHands-GPT-5 here.

Attaching a screenshot of the CondensationRequest system-styled (magenta) panel rendered by the visualizer.

CondensationRequest panel

Direct link (in case SVG doesn't render inline): https://raw.githubusercontent.com/OpenHands/software-agent-sdk/feat/visualizer-condensation-request/examples/assets/condensation_request_panel.svg

Notes:

  • Uses CondensationRequest.visualize for a friendly description
  • Styled as a magenta System panel, consistent with SystemPromptEvent and Condensation

…m-styled)

Co-authored-by: openhands <openhands@all-hands.dev>
@blacksmith-sh
Copy link
Contributor

blacksmith-sh bot commented Nov 10, 2025

[Automatic Post]: I have assigned @CLFutureX as a reviewer based on git blame information. Thanks in advance for the help!

Copy link
Collaborator

@xingyaoww xingyaoww left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove the screenshot

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, the agent made this after the PR

@enyst enyst enabled auto-merge (squash) November 10, 2025 14:30
@enyst enyst merged commit b24c9cc into main Nov 10, 2025
15 checks passed
@enyst enyst deleted the feat/visualizer-condensation-request branch November 10, 2025 14:33
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.

Unknown event type: CondensationRequest

3 participants