add_or_show_agent_widget


Description:

public Widget add_or_show_agent_widget (Widget widget, string widget_id)

Adds or shows an agent widget in the tab view.

If the widget already exists in tab_view (by name), it's shown. Otherwise, the widget is added to tab_view (only if not already parented). The widget is made visible and set as the visible child.

Parameters:

widget

The widget to add or show

widget_id

The ID/name for the widget in the ViewStack

Returns:

The widget that should be shown (may be the existing one)