@@ -59,11 +59,13 @@ export function SettingsView() {
5959 createPR,
6060 cursorGlow,
6161 desktopNotifications,
62+ autoConvertLongText,
6263 sendMessagesWith,
6364 setAutoRunTasks,
6465 setCreatePR,
6566 setCursorGlow,
6667 setDesktopNotifications,
68+ setAutoConvertLongText,
6769 setSendMessagesWith,
6870 } = useSettingsStore ( ) ;
6971 const terminalLayoutMode = useTerminalLayoutStore (
@@ -165,6 +167,18 @@ export function SettingsView() {
165167 [ terminalLayoutMode , setTerminalLayout ] ,
166168 ) ;
167169
170+ const handleAutoConvertLongTextChange = useCallback (
171+ ( checked : boolean ) => {
172+ track ( ANALYTICS_EVENTS . SETTING_CHANGED , {
173+ setting_name : "auto_convert_long_text" ,
174+ new_value : checked ,
175+ old_value : autoConvertLongText ,
176+ } ) ;
177+ setAutoConvertLongText ( checked ) ;
178+ } ,
179+ [ autoConvertLongText , setAutoConvertLongText ] ,
180+ ) ;
181+
168182 const handleSendMessagesWithChange = useCallback (
169183 ( value : SendMessagesWith ) => {
170184 track ( ANALYTICS_EVENTS . SETTING_CHANGED , {
@@ -376,6 +390,23 @@ export function SettingsView() {
376390 />
377391 </ Flex >
378392
393+ < Flex align = "center" justify = "between" >
394+ < Flex direction = "column" gap = "1" >
395+ < Text size = "1" weight = "medium" >
396+ Auto-convert long text
397+ </ Text >
398+ < Text size = "1" color = "gray" >
399+ Automatically convert pasted text over 500 characters into
400+ an attachment
401+ </ Text >
402+ </ Flex >
403+ < Switch
404+ checked = { autoConvertLongText }
405+ onCheckedChange = { handleAutoConvertLongTextChange }
406+ size = "1"
407+ />
408+ </ Flex >
409+
379410 < Flex align = "center" justify = "between" >
380411 < Flex direction = "column" gap = "1" >
381412 < Text size = "1" weight = "medium" >
0 commit comments