Watch
0
0
Fork
You've already forked hyperhive
0

swarm ui: show thinking is a toggle of its own, apart from the developer details

This commit is contained in:
iris 2026-11-16 20:35:03 +01:00 • committed by mara
commit 857b175a74

View file

@ -0,0 +1,24 @@
// Settings-menu row: "show thinking". A `<SettingsMenu>` child, like
// `HideDebugSetting`, and apart from it: thinking shows or hides on this row
// alone, whatever "hide developer details" says. `../terminal/Row.tsx` follows
// the preference as it changes.
import { useState } from "preact/hooks";
import { getShowThinkingPref, setShowThinkingPref } from "../prefs.js";
export function ShowThinkingSetting() {
const [show, setShow] = useState(() => getShowThinkingPref());
return (
<label class="settings-menu-row">
<span>show thinking</span>
<input
type="checkbox"
checked={show}
onChange={(e) => {
const v = (e.target as HTMLInputElement).checked;
setShowThinkingPref(v);
setShow(v);
}}
/>
</label>
);
}