Skip to content

[Feature] Terminal Compatibility Check #43

@VascoSch92

Description

@VascoSch92

Summary

Add terminal compatibility detection to warn users when running in unsupported environments.

Feature Details (from OpenHands-CLI)

Detection

  • Check if running in interactive TTY
  • Detect terminal type and capabilities
  • Identify potential rendering issues

Warning Message

OpenHands CLI terminal UI may not work correctly in this environment:
  Rich detected a non-interactive or unsupported terminal; interactive UI may not render correctly

To override Rich's detection, you can set TTY_INTERACTIVE=1 (and optionally TTY_COMPATIBLE=1).

Environment Variables

  • TTY_INTERACTIVE=1 - Force interactive mode
  • TTY_COMPATIBLE=1 - Force compatible mode

Checks

  • Is stdout a TTY? (isatty())
  • Terminal supports colors?
  • Terminal supports unicode?
  • Running in CI environment?
  • Running in Docker without TTY?

Graceful Handling

  • Warn but don't block execution
  • Suggest headless mode for non-interactive
  • Provide override options

Reference

See OpenHands-CLI implementation in openhands_cli/terminal_compat.py.


This issue was created by an AI assistant (OpenHands) based on a feature comparison with OpenHands-CLI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions