|
@@ -82,6 +82,7 @@ class CustomSpeedScroll implements ScrollAcceleration {
|
|
|
const context = createContext<{
|
|
const context = createContext<{
|
|
|
width: number
|
|
width: number
|
|
|
conceal: () => boolean
|
|
conceal: () => boolean
|
|
|
|
|
+ showThinking: () => boolean
|
|
|
}>()
|
|
}>()
|
|
|
|
|
|
|
|
function use() {
|
|
function use() {
|
|
@@ -112,6 +113,7 @@ export function Session() {
|
|
|
const dimensions = useTerminalDimensions()
|
|
const dimensions = useTerminalDimensions()
|
|
|
const [sidebar, setSidebar] = createSignal<"show" | "hide" | "auto">(kv.get("sidebar", "auto"))
|
|
const [sidebar, setSidebar] = createSignal<"show" | "hide" | "auto">(kv.get("sidebar", "auto"))
|
|
|
const [conceal, setConceal] = createSignal(true)
|
|
const [conceal, setConceal] = createSignal(true)
|
|
|
|
|
+ const [showThinking, setShowThinking] = createSignal(true)
|
|
|
|
|
|
|
|
const wide = createMemo(() => dimensions().width > 120)
|
|
const wide = createMemo(() => dimensions().width > 120)
|
|
|
const sidebarVisible = createMemo(() => sidebar() === "show" || (sidebar() === "auto" && wide()))
|
|
const sidebarVisible = createMemo(() => sidebar() === "show" || (sidebar() === "auto" && wide()))
|
|
@@ -385,6 +387,15 @@ export function Session() {
|
|
|
dialog.clear()
|
|
dialog.clear()
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "Toggle thinking blocks",
|
|
|
|
|
+ value: "session.toggle.thinking",
|
|
|
|
|
+ category: "Session",
|
|
|
|
|
+ onSelect: (dialog) => {
|
|
|
|
|
+ setShowThinking((prev) => !prev)
|
|
|
|
|
+ dialog.clear()
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
title: "Page up",
|
|
title: "Page up",
|
|
|
value: "session.page.up",
|
|
value: "session.page.up",
|
|
@@ -674,6 +685,7 @@ export function Session() {
|
|
|
return contentWidth()
|
|
return contentWidth()
|
|
|
},
|
|
},
|
|
|
conceal,
|
|
conceal,
|
|
|
|
|
+ showThinking,
|
|
|
}}
|
|
}}
|
|
|
>
|
|
>
|
|
|
<box flexDirection="row" paddingBottom={1} paddingTop={1} paddingLeft={2} paddingRight={2} gap={2}>
|
|
<box flexDirection="row" paddingBottom={1} paddingTop={1} paddingLeft={2} paddingRight={2} gap={2}>
|
|
@@ -1030,7 +1042,7 @@ function ReasoningPart(props: { last: boolean; part: ReasoningPart; message: Ass
|
|
|
const ctx = use()
|
|
const ctx = use()
|
|
|
const content = createMemo(() => props.part.text.trim())
|
|
const content = createMemo(() => props.part.text.trim())
|
|
|
return (
|
|
return (
|
|
|
- <Show when={content()}>
|
|
|
|
|
|
|
+ <Show when={content() && ctx.showThinking()}>
|
|
|
<box
|
|
<box
|
|
|
id={"text-" + props.part.id}
|
|
id={"text-" + props.part.id}
|
|
|
paddingLeft={2}
|
|
paddingLeft={2}
|