refactor(tui): remove code concealment toggle

This commit is contained in:
Dax Raad 2026-07-12 18:12:19 -04:00
commit 09a6cecf23
4 changed files with 4 additions and 28 deletions

View file

@ -142,7 +142,6 @@ export const Definitions = {
messages_copy: keybind("<leader>y", "Copy message"), messages_copy: keybind("<leader>y", "Copy message"),
messages_undo: keybind("<leader>u", "Undo message"), messages_undo: keybind("<leader>u", "Undo message"),
messages_redo: keybind("<leader>r", "Redo message"), messages_redo: keybind("<leader>r", "Redo message"),
messages_toggle_conceal: keybind("<leader>h", "Toggle code block concealment in messages"),
display_thinking: keybind("none", "Toggle thinking blocks visibility"), display_thinking: keybind("none", "Toggle thinking blocks visibility"),
prompt_submit: keybind("none", "Submit prompt"), prompt_submit: keybind("none", "Submit prompt"),
@ -341,7 +340,6 @@ export const CommandMap = {
messages_copy: "messages.copy", messages_copy: "messages.copy",
messages_undo: "session.undo", messages_undo: "session.undo",
messages_redo: "session.redo", messages_redo: "session.redo",
messages_toggle_conceal: "session.toggle.conceal",
display_thinking: "session.toggle.thinking", display_thinking: "session.toggle.thinking",
prompt_submit: "prompt.submit", prompt_submit: "prompt.submit",
prompt_editor_context_clear: "prompt.editor_context.clear", prompt_editor_context_clear: "prompt.editor_context.clear",

View file

@ -25,7 +25,6 @@ type Shortcuts = {
messagesLast: TipShortcut messagesLast: TipShortcut
messagesPageDown: TipShortcut messagesPageDown: TipShortcut
messagesPageUp: TipShortcut messagesPageUp: TipShortcut
messagesToggleConceal: TipShortcut
modelCycleRecent: TipShortcut modelCycleRecent: TipShortcut
modelList: TipShortcut modelList: TipShortcut
sessionExport: TipShortcut sessionExport: TipShortcut
@ -115,7 +114,6 @@ export function Tips(props: { api: TuiPluginApi; connected?: boolean }) {
messagesLast: configShortcut(props.api, "session.last"), messagesLast: configShortcut(props.api, "session.last"),
messagesPageDown: configShortcut(props.api, "session.page.down"), messagesPageDown: configShortcut(props.api, "session.page.down"),
messagesPageUp: configShortcut(props.api, "session.page.up"), messagesPageUp: configShortcut(props.api, "session.page.up"),
messagesToggleConceal: configShortcut(props.api, "session.toggle.conceal"),
modelCycleRecent: useCommandShortcut("model.cycle_recent"), modelCycleRecent: useCommandShortcut("model.cycle_recent"),
modelList: useCommandShortcut("model.list"), modelList: useCommandShortcut("model.list"),
sessionExport: configShortcut(props.api, "session.export"), sessionExport: configShortcut(props.api, "session.export"),
@ -267,7 +265,6 @@ const TIPS: Tip[] = [
"Run {highlight}opencode debug config{/highlight} to troubleshoot configuration", "Run {highlight}opencode debug config{/highlight} to troubleshoot configuration",
"Use {highlight}--print-logs{/highlight} flag to see detailed logs in stderr", "Use {highlight}--print-logs{/highlight} flag to see detailed logs in stderr",
(shortcuts) => `Use ${commandText("/timeline", shortcuts.sessionTimeline())} to jump to specific messages`, (shortcuts) => `Use ${commandText("/timeline", shortcuts.sessionTimeline())} to jump to specific messages`,
(shortcuts) => press(shortcuts.messagesToggleConceal(), "to toggle code block visibility in messages"),
(shortcuts) => `Use ${commandText("/status", shortcuts.statusView())} to see system status info`, (shortcuts) => `Use ${commandText("/status", shortcuts.statusView())} to see system status info`,
"Enable {highlight}scroll.acceleration{/highlight} in {highlight}cli.json{/highlight} for smooth scrolling", "Enable {highlight}scroll.acceleration{/highlight} in {highlight}cli.json{/highlight} for smooth scrolling",
(shortcuts) => (shortcuts) =>

View file

@ -88,7 +88,6 @@ const sessionBindingCommands = [
"session.undo", "session.undo",
"session.redo", "session.redo",
"session.sidebar.toggle", "session.sidebar.toggle",
"session.toggle.conceal",
"session.toggle.thinking", "session.toggle.thinking",
"session.toggle.scrollbar", "session.toggle.scrollbar",
"session.toggle.exploration_grouping", "session.toggle.exploration_grouping",
@ -121,7 +120,6 @@ const sessionGlobalUnfocusedBindingCommands = ["session.first", "session.last"]
const context = createContext<{ const context = createContext<{
width: number width: number
sessionID: string sessionID: string
conceal: () => boolean
thinkingMode: () => ThinkingMode thinkingMode: () => ThinkingMode
showThinking: () => boolean showThinking: () => boolean
groupExploration: () => boolean groupExploration: () => boolean
@ -198,7 +196,6 @@ export function Session() {
const dimensions = useTerminalDimensions() const dimensions = useTerminalDimensions()
const [sidebar, setSidebar] = kv.signal<"auto" | "hide">("sidebar", "auto") const [sidebar, setSidebar] = kv.signal<"auto" | "hide">("sidebar", "auto")
const [sidebarOpen, setSidebarOpen] = createSignal(false) const [sidebarOpen, setSidebarOpen] = createSignal(false)
const [conceal, setConceal] = createSignal(true)
const thinking = useThinkingMode() const thinking = useThinkingMode()
const thinkingMode = thinking.mode const thinkingMode = thinking.mode
const showThinking = createMemo(() => true) const showThinking = createMemo(() => true)
@ -471,15 +468,6 @@ export function Session() {
dialog.clear() dialog.clear()
}, },
}, },
{
title: conceal() ? "Disable code concealment" : "Enable code concealment",
value: "session.toggle.conceal",
category: "Session",
run: () => {
setConceal((prev) => !prev)
dialog.clear()
},
},
{ {
title: (() => { title: (() => {
const next = nextThinkingMode(thinkingMode()) const next = nextThinkingMode(thinkingMode())
@ -507,7 +495,7 @@ export function Session() {
}, },
}, },
{ {
title: groupExploration() ? "Show exploration tools individually" : "Group exploration tools", title: groupExploration() ? "Show tool calls individually" : "Group related tool calls",
value: "session.toggle.exploration_grouping", value: "session.toggle.exploration_grouping",
category: "Session", category: "Session",
run: () => { run: () => {
@ -865,7 +853,6 @@ export function Session() {
return contentWidth() return contentWidth()
}, },
sessionID: route.sessionID, sessionID: route.sessionID,
conceal,
thinkingMode, thinkingMode,
showThinking, showThinking,
groupExploration, groupExploration,
@ -1329,7 +1316,7 @@ function CompactionMessage(props: { message: Extract<SessionMessageInfo, { type:
internalBlockMode="top-level" internalBlockMode="top-level"
content={content()} content={content()}
tableOptions={{ style: "grid" }} tableOptions={{ style: "grid" }}
conceal={ctx.conceal()} conceal={false}
fg={theme.markdownText} fg={theme.markdownText}
bg={theme.background} bg={theme.background}
/> />
@ -1747,7 +1734,7 @@ function ReasoningPart(props: {
streaming={true} streaming={true}
syntaxStyle={syntax()} syntaxStyle={syntax()}
content={summary().body} content={summary().body}
conceal={ctx.conceal()} conceal={false}
fg={theme.textMuted} fg={theme.textMuted}
/> />
</box> </box>
@ -1813,7 +1800,7 @@ function TextPart(props: { last: boolean; part: SessionMessageAssistantText }) {
internalBlockMode="top-level" internalBlockMode="top-level"
content={props.part.text.trim()} content={props.part.text.trim()}
tableOptions={{ style: "grid" }} tableOptions={{ style: "grid" }}
conceal={ctx.conceal()} conceal={false}
fg={theme.markdownText} fg={theme.markdownText}
bg={theme.background} bg={theme.background}
/> />

View file

@ -914,12 +914,6 @@ function getSyntaxRules(theme: Theme) {
foreground: theme.text, foreground: theme.text,
}, },
}, },
{
scope: ["conceal"],
style: {
foreground: theme.textMuted,
},
},
// Additional common highlight groups // Additional common highlight groups
{ {
scope: ["string.special", "string.special.url"], scope: ["string.special", "string.special.url"],