Skip to content

trading_agent.terminal.widgets.request_step_view

A question, plan or permission request the desk made during a turn, with its answer once given.

The request itself is answered in the request dock above the message box; this line records it in the transcript.

Typical usage example:

view = RequestStepView(step) view.show(step)

RequestStepView

RequestStepView(step)

Bases: Static

The request and what became of it.

Creates the view.

Parameters:

Name Type Description Default
step RequestStep

The request step.

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

    Args:
        step (chat_items.RequestStep): The request step.
    """
    super().__init__(self._content(step.request), classes='request-step')

show

show(step)

Updates the view.

Parameters:

Name Type Description Default
step RequestStep

The request step, perhaps now answered.

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

    Args:
        step (chat_items.RequestStep): The request step, perhaps now answered.
    """
    self.update(self._content(step.request))