fix(tui): remove debug theme toggle (#37359)

This commit is contained in:
James Long 2026-07-16 15:31:42 -04:00 committed by GitHub
parent 4f60bde502
commit 91b4634363
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -50,9 +50,8 @@ function Mcp(props: { context: Plugin.Context }) {
}
function View(props: { context: Plugin.Context }) {
const { themeV2, mode, setMode } = useTheme()
const { themeV2 } = useTheme()
const dimensions = useTerminalDimensions()
const modeLabel = createMemo(() => (mode() === "dark" ? "Light mode" : "Dark mode"))
const mcpWidth = createMemo(() => {
const list = props.context.data.location.mcp.server.list(props.context.location) ?? []
if (list.length === 0) return 0
@ -73,16 +72,10 @@ function View(props: { context: Plugin.Context }) {
>
<Directory
context={props.context}
maxWidth={Math.max(
2,
dimensions().width - 10 - Bun.stringWidth(InstallationVersion) - Bun.stringWidth(modeLabel()) - mcpWidth(),
)}
maxWidth={Math.max(2, dimensions().width - 8 - Bun.stringWidth(InstallationVersion) - mcpWidth())}
/>
<Mcp context={props.context} />
<box flexGrow={1} />
<box flexShrink={0} onMouseUp={() => setMode(mode() === "dark" ? "light" : "dark")}>
<text fg={themeV2.text.action.secondary()}>{modeLabel()}</text>
</box>
<box flexShrink={0}>
<text fg={themeV2.text.subdued()}>{InstallationVersion}</text>
</box>