From 5e41fec7ae43fab749ac3cbe2e368d9b6ee736c4 Mon Sep 17 00:00:00 2001 From: "David R. Myers" Date: Sat, 4 May 2024 21:35:36 -0400 Subject: [PATCH] Add a temporary workaround for #286 --- components/AssistantChatMessage.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/AssistantChatMessage.vue b/components/AssistantChatMessage.vue index 86684853..0b58fd8f 100644 --- a/components/AssistantChatMessage.vue +++ b/components/AssistantChatMessage.vue @@ -4,16 +4,20 @@ import { readonly } from '#root/src/vendor/plugins/readonly' import { useVue } from '#shared/composables' const props = defineProps<{ createdAt: Date, role: string, text: string }>() + const { copy } = useClipboard() const { addToast } = useToasts() const isHuman = computed(() => props.role === 'human') const isAssistant = computed(() => props.role === 'assistant') const name = computed(() => isHuman.value ? 'You' : 'Assistant') const { isMounted } = useVue() + +const isEditable = typeof window !== 'undefined' && window?.navigator.userAgent.match(/firefox/i) + const options = { interface: { attribution: false, - autocomplete: true, + autocomplete: false, images: false, lists: false, readonly: true, @@ -21,7 +25,7 @@ const options = { toolbar: false, }, plugins: [ - ...readonly(), + ...(isEditable ? [] : readonly()), ], readability: false, }