Skip to content

trading_agent.terminal.widgets.steering_view

A message the user sent while a turn was running, shown inside that turn.

Typical usage example:

view = SteeringView(step) view.show(step)

SteeringView

SteeringView(step)

Bases: Static

The steering message and whether it reached the running turn.

Creates the view.

Parameters:

Name Type Description Default
step SteeringStep

The steering step.

required
Source code in src/trading_agent/terminal/widgets/steering_view.py
def __init__(self, step: chat_items.SteeringStep):
    """Creates the view.

    Args:
        step (chat_items.SteeringStep): The steering step.
    """
    super().__init__(self._content(step), classes='steering')

show

show(step)

Updates the view.

Parameters:

Name Type Description Default
step SteeringStep

The steering step, perhaps with a new outcome.

required
Source code in src/trading_agent/terminal/widgets/steering_view.py
def show(self, step: chat_items.SteeringStep) -> None:
    """Updates the view.

    Args:
        step (chat_items.SteeringStep): The steering step, perhaps with a new outcome.
    """
    self.update(self._content(step))