agent_ui: Only create ThreadHistory if agent supports it (#51759)

Rather than always having a ThreadHistory with an internal option,
changed it to be an Option<ThreadHistory> so we can better distingiuish
between an empty list and unsupported

Release Notes:

- N/A
ef40f2144dBen Brandt committed on 3/17/2026, 1:58:11 PM· committed by GitHubparent95c96ad
12 files changedLine totals unavailable