mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-24 04:23:33 +00:00
refactor(tui): remove code concealment toggle
This commit is contained in:
parent
6e55ddd078
commit
09a6cecf23
4 changed files with 4 additions and 28 deletions
|
|
@ -142,7 +142,6 @@ export const Definitions = {
|
|||
messages_copy: keybind("<leader>y", "Copy message"),
|
||||
messages_undo: keybind("<leader>u", "Undo 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"),
|
||||
|
||||
prompt_submit: keybind("none", "Submit prompt"),
|
||||
|
|
@ -341,7 +340,6 @@ export const CommandMap = {
|
|||
messages_copy: "messages.copy",
|
||||
messages_undo: "session.undo",
|
||||
messages_redo: "session.redo",
|
||||
messages_toggle_conceal: "session.toggle.conceal",
|
||||
display_thinking: "session.toggle.thinking",
|
||||
prompt_submit: "prompt.submit",
|
||||
prompt_editor_context_clear: "prompt.editor_context.clear",
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ type Shortcuts = {
|
|||
messagesLast: TipShortcut
|
||||
messagesPageDown: TipShortcut
|
||||
messagesPageUp: TipShortcut
|
||||
messagesToggleConceal: TipShortcut
|
||||
modelCycleRecent: TipShortcut
|
||||
modelList: TipShortcut
|
||||
sessionExport: TipShortcut
|
||||
|
|
@ -115,7 +114,6 @@ export function Tips(props: { api: TuiPluginApi; connected?: boolean }) {
|
|||
messagesLast: configShortcut(props.api, "session.last"),
|
||||
messagesPageDown: configShortcut(props.api, "session.page.down"),
|
||||
messagesPageUp: configShortcut(props.api, "session.page.up"),
|
||||
messagesToggleConceal: configShortcut(props.api, "session.toggle.conceal"),
|
||||
modelCycleRecent: useCommandShortcut("model.cycle_recent"),
|
||||
modelList: useCommandShortcut("model.list"),
|
||||
sessionExport: configShortcut(props.api, "session.export"),
|
||||
|
|
@ -267,7 +265,6 @@ const TIPS: Tip[] = [
|
|||
"Run {highlight}opencode debug config{/highlight} to troubleshoot configuration",
|
||||
"Use {highlight}--print-logs{/highlight} flag to see detailed logs in stderr",
|
||||
(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`,
|
||||
"Enable {highlight}scroll.acceleration{/highlight} in {highlight}cli.json{/highlight} for smooth scrolling",
|
||||
(shortcuts) =>
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ const sessionBindingCommands = [
|
|||
"session.undo",
|
||||
"session.redo",
|
||||
"session.sidebar.toggle",
|
||||
"session.toggle.conceal",
|
||||
"session.toggle.thinking",
|
||||
"session.toggle.scrollbar",
|
||||
"session.toggle.exploration_grouping",
|
||||
|
|
@ -121,7 +120,6 @@ const sessionGlobalUnfocusedBindingCommands = ["session.first", "session.last"]
|
|||
const context = createContext<{
|
||||
width: number
|
||||
sessionID: string
|
||||
conceal: () => boolean
|
||||
thinkingMode: () => ThinkingMode
|
||||
showThinking: () => boolean
|
||||
groupExploration: () => boolean
|
||||
|
|
@ -198,7 +196,6 @@ export function Session() {
|
|||
const dimensions = useTerminalDimensions()
|
||||
const [sidebar, setSidebar] = kv.signal<"auto" | "hide">("sidebar", "auto")
|
||||
const [sidebarOpen, setSidebarOpen] = createSignal(false)
|
||||
const [conceal, setConceal] = createSignal(true)
|
||||
const thinking = useThinkingMode()
|
||||
const thinkingMode = thinking.mode
|
||||
const showThinking = createMemo(() => true)
|
||||
|
|
@ -471,15 +468,6 @@ export function Session() {
|
|||
dialog.clear()
|
||||
},
|
||||
},
|
||||
{
|
||||
title: conceal() ? "Disable code concealment" : "Enable code concealment",
|
||||
value: "session.toggle.conceal",
|
||||
category: "Session",
|
||||
run: () => {
|
||||
setConceal((prev) => !prev)
|
||||
dialog.clear()
|
||||
},
|
||||
},
|
||||
{
|
||||
title: (() => {
|
||||
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",
|
||||
category: "Session",
|
||||
run: () => {
|
||||
|
|
@ -865,7 +853,6 @@ export function Session() {
|
|||
return contentWidth()
|
||||
},
|
||||
sessionID: route.sessionID,
|
||||
conceal,
|
||||
thinkingMode,
|
||||
showThinking,
|
||||
groupExploration,
|
||||
|
|
@ -1329,7 +1316,7 @@ function CompactionMessage(props: { message: Extract<SessionMessageInfo, { type:
|
|||
internalBlockMode="top-level"
|
||||
content={content()}
|
||||
tableOptions={{ style: "grid" }}
|
||||
conceal={ctx.conceal()}
|
||||
conceal={false}
|
||||
fg={theme.markdownText}
|
||||
bg={theme.background}
|
||||
/>
|
||||
|
|
@ -1747,7 +1734,7 @@ function ReasoningPart(props: {
|
|||
streaming={true}
|
||||
syntaxStyle={syntax()}
|
||||
content={summary().body}
|
||||
conceal={ctx.conceal()}
|
||||
conceal={false}
|
||||
fg={theme.textMuted}
|
||||
/>
|
||||
</box>
|
||||
|
|
@ -1813,7 +1800,7 @@ function TextPart(props: { last: boolean; part: SessionMessageAssistantText }) {
|
|||
internalBlockMode="top-level"
|
||||
content={props.part.text.trim()}
|
||||
tableOptions={{ style: "grid" }}
|
||||
conceal={ctx.conceal()}
|
||||
conceal={false}
|
||||
fg={theme.markdownText}
|
||||
bg={theme.background}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -914,12 +914,6 @@ function getSyntaxRules(theme: Theme) {
|
|||
foreground: theme.text,
|
||||
},
|
||||
},
|
||||
{
|
||||
scope: ["conceal"],
|
||||
style: {
|
||||
foreground: theme.textMuted,
|
||||
},
|
||||
},
|
||||
// Additional common highlight groups
|
||||
{
|
||||
scope: ["string.special", "string.special.url"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue