File tree Expand file tree Collapse file tree
packages/opencode/src/cli/cmd/tui Expand file tree Collapse file tree Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments