Skip to content

Commit b54f298

Browse files
authored
Merge branch 'dev' into fix/session-fork-remap-compaction-tail
2 parents b4ef571 + 504ca3d commit b54f298

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

packages/opencode/src/cli/cmd/tui/app.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
301301
renderer.clearSelection()
302302
}
303303
const [terminalTitleEnabled, setTerminalTitleEnabled] = createSignal(kv.get("terminal_title_enabled", true))
304+
const [pasteSummaryEnabled, setPasteSummaryEnabled] = createSignal(
305+
kv.get("paste_summary_enabled", !sync.data.config.experimental?.disable_paste_summary),
306+
)
304307

305308
// Update terminal window title based on current route and session
306309
createEffect(() => {
@@ -736,6 +739,19 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
736739
dialog.clear()
737740
},
738741
},
742+
{
743+
title: pasteSummaryEnabled() ? "Disable paste summary" : "Enable paste summary",
744+
value: "app.toggle.paste_summary",
745+
category: "System",
746+
onSelect: (dialog) => {
747+
setPasteSummaryEnabled((prev) => {
748+
const next = !prev
749+
kv.set("paste_summary_enabled", next)
750+
return next
751+
})
752+
dialog.clear()
753+
},
754+
},
739755
{
740756
title: kv.get("session_directory_filter_enabled", true)
741757
? "Disable session directory filtering"

packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ export function Prompt(props: PromptProps) {
12091209
const lineCount = (pastedContent.match(/\n/g)?.length ?? 0) + 1
12101210
if (
12111211
(lineCount >= 3 || pastedContent.length > 150) &&
1212-
!sync.data.config.experimental?.disable_paste_summary
1212+
kv.get("paste_summary_enabled", !sync.data.config.experimental?.disable_paste_summary)
12131213
) {
12141214
pasteText(pastedContent, `[Pasted ~${lineCount} lines]`)
12151215
return

0 commit comments

Comments
 (0)