Root application component for the Agent Chat sidebar.
Installs the Primer ThemeProvider + BaseStyles at the top of the
tree so Primer components that read theme tokens from React context
(e.g. ActionMenu.Overlay rendered into a portal) don't throw
"Cannot read properties of undefined (reading 'theme')". The actual
state/branching logic lives in AppInner (a private function in this
module) so the theme wrappers sit at the very root and are never
unmounted across renders. The colorMode follows the VS Code theme
prop so the chat tracks the editor's light/dark mode.
Root application component for the Agent Chat sidebar.
Installs the Primer
ThemeProvider+BaseStylesat the top of the tree so Primer components that read theme tokens from React context (e.g.ActionMenu.Overlayrendered into a portal) don't throw "Cannot read properties of undefined (reading 'theme')". The actual state/branching logic lives inAppInner(a private function in this module) so the theme wrappers sit at the very root and are never unmounted across renders. ThecolorModefollows the VS Codethemeprop so the chat tracks the editor's light/dark mode.