@@ -7,6 +7,7 @@ import { MessageError } from './MessageError'
77import type { Message , Part , MessageWithParts } from '@/api/types'
88import { useSessionStatusForSession } from '@/stores/sessionStatusStore'
99import { useSessionTodos } from '@/stores/sessionTodosStore'
10+ import { useSettings } from '@/hooks/useSettings'
1011import type { components } from '@/api/opencode-types'
1112import type { Todo } from '@/components/message/SessionTodoDisplay'
1213import type { OpenCodeError } from '@/lib/opencode-errors'
@@ -78,6 +79,7 @@ interface MessageRowProps {
7879 handleStartEditUserMessage : ( userMessageId : string , assistantMessageId : string ) => void
7980 handleCancelEdit : ( ) => void
8081 model ?: string
82+ simpleChatMode : boolean
8183}
8284
8385const MessageRow = memo ( function MessageRow ( {
@@ -98,6 +100,7 @@ const MessageRow = memo(function MessageRow({
98100 handleStartEditUserMessage,
99101 handleCancelEdit,
100102 model,
103+ simpleChatMode,
101104} : MessageRowProps ) {
102105 const msg = msgWithParts . info
103106 const parts = msgWithParts . parts
@@ -185,6 +188,12 @@ const MessageRow = memo(function MessageRow({
185188 onClick = { ( ) => handleStartEditUserMessage ( msg . id , nextAssistantMsg . id ) }
186189 isEditable = { false }
187190 />
191+ ) : msg . role === 'user' && simpleChatMode ? (
192+ < ClickableUserMessage
193+ content = { messageTextContent }
194+ onClick = { ( ) => { } }
195+ isEditable = { false }
196+ />
188197 ) : parts . length > 0 ? (
189198 parts . map ( ( part : Part , partIndex : number ) => (
190199 < div key = { `${ msg . id } -${ part . id } -${ partIndex } ` } >
@@ -222,6 +231,8 @@ export const MessageThread = memo(function MessageThread({
222231 const [ editingUserMessageId , setEditingUserMessageId ] = useState < string | null > ( null )
223232 const [ editingForAssistantId , setEditingForAssistantId ] = useState < string | null > ( null )
224233 const sessionStatus = useSessionStatusForSession ( sessionID )
234+ const { preferences } = useSettings ( )
235+ const simpleChatMode = preferences ?. simpleChatMode ?? false
225236
226237 const pendingAssistantId = useMemo ( ( ) => {
227238 if ( ! messages ) return undefined
@@ -316,6 +327,7 @@ export const MessageThread = memo(function MessageThread({
316327 handleStartEditUserMessage = { handleStartEditUserMessage }
317328 handleCancelEdit = { handleCancelEdit }
318329 model = { model }
330+ simpleChatMode = { simpleChatMode }
319331 />
320332 ) ) }
321333 </ div >
0 commit comments