Skip to content

Commit 3a69148

Browse files
committed
Add a temporary workaround for #286
1 parent d61ce52 commit 3a69148

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

components/AssistantChatMessage.vue

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,28 @@ import { readonly } from '#root/src/vendor/plugins/readonly'
44
import { useVue } from '#shared/composables'
55
66
const props = defineProps<{ createdAt: Date, role: string, text: string }>()
7+
78
const { copy } = useClipboard()
89
const { addToast } = useToasts()
910
const isHuman = computed(() => props.role === 'human')
1011
const isAssistant = computed(() => props.role === 'assistant')
1112
const name = computed(() => isHuman.value ? 'You' : 'Assistant')
1213
const { isMounted } = useVue()
14+
15+
const isEditable = typeof window !== 'undefined' && window?.navigator.userAgent.match(/firefox/i)
16+
1317
const options = {
1418
interface: {
1519
attribution: false,
16-
autocomplete: true,
20+
autocomplete: false,
1721
images: false,
1822
lists: false,
1923
readonly: true,
2024
spellcheck: false,
2125
toolbar: false,
2226
},
2327
plugins: [
24-
...readonly(),
28+
...(isEditable ? [] : readonly()),
2529
],
2630
readability: false,
2731
}

0 commit comments

Comments
 (0)