trading_agent.terminal.widgets.diff_view
¶
A unified diff with added lines in green, removed lines in red and hunk headers dimmed, as the web page's DiffView.tsx shows it.
Typical usage example:
view = DiffView() view.show(proposal['difference'])
DiffView
¶
Bases: Static
A coloured unified diff.
Creates an empty view.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**options
|
str
|
Textual's id and classes. |
{}
|
Source code in src/trading_agent/terminal/widgets/diff_view.py
show
¶
Draws a diff.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
difference
|
str
|
The unified diff text. |
required |