{{
- $t('globals.messages.typeAtLeastDigitsToSearchTickets', {
- count: MIN_REFERENCE_QUERY_LENGTH
+ $t('search.minQueryLength', {
+ length: MIN_REFERENCE_QUERY_LENGTH
})
}}
diff --git a/frontend/apps/main/src/components/editor/editorExtensions.js b/frontend/apps/main/src/components/editor/editorExtensions.js
index 6b4c024b..9cff04d8 100644
--- a/frontend/apps/main/src/components/editor/editorExtensions.js
+++ b/frontend/apps/main/src/components/editor/editorExtensions.js
@@ -137,9 +137,7 @@ const sharedExtensions = ({
CustomLink
]
-export function buildConversationExtensions({
- getPlaceholder
-}) {
+export function buildConversationExtensions({ getPlaceholder }) {
return [
...sharedExtensions({ getPlaceholder }),
CustomMention.configure({
diff --git a/frontend/apps/main/src/components/editor/editorStyles.scss b/frontend/apps/main/src/components/editor/editorStyles.scss
index d8513336..bb54614c 100644
--- a/frontend/apps/main/src/components/editor/editorStyles.scss
+++ b/frontend/apps/main/src/components/editor/editorStyles.scss
@@ -55,7 +55,8 @@
}
}
- .ld-mention {
+ .ld-mention,
+ .ld-ticket-reference {
background-color: hsl(var(--primary) / 0.1);
border-radius: 0.25rem;
padding: 0 0.25rem;
diff --git a/frontend/apps/main/src/components/editor/mentionSuggestion.js b/frontend/apps/main/src/components/editor/mentionSuggestion.js
index 2b6bffdc..b0e93750 100644
--- a/frontend/apps/main/src/components/editor/mentionSuggestion.js
+++ b/frontend/apps/main/src/components/editor/mentionSuggestion.js
@@ -1,111 +1,10 @@
-import { VueRenderer } from '@tiptap/vue-3'
import MentionList from './MentionList.vue'
+import { createSuggestionRenderer } from './suggestionRenderer'
export default {
char: '@',
allowSpaces: true,
-
- allow: ({ editor }) => {
- const enableMentions = editor.options.editorProps?.enableMentions
- return enableMentions ? enableMentions() : false
- },
-
- items: async ({ query, editor }) => {
- // Get the suggestion handler from editor options
- const getSuggestions = editor.options.editorProps?.getSuggestions
- if (!getSuggestions) return []
-
- const items = await getSuggestions(query)
- return items
- },
-
- render: () => {
- let component
- let popup
-
- return {
- onStart: (props) => {
- component = new VueRenderer(MentionList, {
- props: {
- ...props,
- query: props.query
- },
- editor: props.editor
- })
-
- if (!props.clientRect) {
- return
- }
-
- // Create popup container with CSS positioning
- popup = document.createElement('div')
- popup.style.position = 'fixed'
- popup.style.zIndex = '9999'
- if (component.element) {
- popup.appendChild(component.element)
- }
- document.body.appendChild(popup)
-
- // Position the popup
- updatePosition(popup, props.clientRect)
- },
-
- onUpdate: (props) => {
- component.updateProps({
- ...props,
- query: props.query
- })
-
- if (!props.clientRect || !popup) {
- return
- }
-
- updatePosition(popup, props.clientRect)
- },
-
- onKeyDown: (props) => {
- if (props.event.key === 'Escape') {
- if (popup) {
- popup.style.display = 'none'
- }
- return true
- }
-
- return component.ref?.onKeyDown(props)
- },
-
- onExit: () => {
- if (popup && popup.parentNode) {
- popup.parentNode.removeChild(popup)
- }
- component.destroy()
- }
- }
- }
-}
-
-function updatePosition(popup, clientRect) {
- const rect = clientRect()
- if (!rect) return
-
- // Position below the cursor
- popup.style.left = `${rect.left}px`
- popup.style.top = `${rect.bottom + 4}px`
-
- // Ensure popup doesn't go off-screen to the right
- requestAnimationFrame(() => {
- const popupRect = popup.getBoundingClientRect()
- const viewportWidth = window.innerWidth
- const viewportHeight = window.innerHeight
-
- // Adjust horizontal position if needed
- if (popupRect.right > viewportWidth) {
- popup.style.left = `${viewportWidth - popupRect.width - 8}px`
- }
-
- // If popup goes below viewport, show above cursor
- if (popupRect.bottom > viewportHeight) {
- popup.style.top = `${rect.top - popupRect.height - 4}px`
- }
- })
+ allow: ({ editor }) => editor.options.editorProps?.enableMentions?.() ?? false,
+ items: ({ query, editor }) => editor.options.editorProps?.getSuggestions?.(query) ?? [],
+ render: () => createSuggestionRenderer(MentionList)
}
diff --git a/frontend/apps/main/src/components/editor/suggestionRenderer.js b/frontend/apps/main/src/components/editor/suggestionRenderer.js
new file mode 100644
index 00000000..e0db90dd
--- /dev/null
+++ b/frontend/apps/main/src/components/editor/suggestionRenderer.js
@@ -0,0 +1,64 @@
+import { VueRenderer } from '@tiptap/vue-3'
+
+export function createSuggestionRenderer(ListComponent) {
+ let component
+ let popup
+ let dismissed = false
+
+ return {
+ onStart: (props) => {
+ dismissed = false
+ component = new VueRenderer(ListComponent, {
+ props: { ...props, query: props.query },
+ editor: props.editor
+ })
+ if (!props.clientRect) return
+
+ popup = document.createElement('div')
+ popup.style.position = 'fixed'
+ popup.style.zIndex = '9999'
+ if (component.element) popup.appendChild(component.element)
+ document.body.appendChild(popup)
+ updatePosition(popup, props.clientRect)
+ },
+
+ onUpdate: (props) => {
+ component.updateProps({ ...props, query: props.query })
+ if (!props.clientRect || !popup) return
+ updatePosition(popup, props.clientRect)
+ },
+
+ onKeyDown: (props) => {
+ if (dismissed) return false
+ if (props.event.key === 'Escape') {
+ dismissed = true
+ if (popup) popup.style.display = 'none'
+ return true
+ }
+ return component.ref?.onKeyDown(props)
+ },
+
+ onExit: () => {
+ popup?.remove()
+ component.destroy()
+ }
+ }
+}
+
+function updatePosition(popup, clientRect) {
+ const rect = clientRect()
+ if (!rect) return
+
+ popup.style.left = `${rect.left}px`
+ popup.style.top = `${rect.bottom + 4}px`
+
+ requestAnimationFrame(() => {
+ const popupRect = popup.getBoundingClientRect()
+ if (popupRect.right > window.innerWidth) {
+ popup.style.left = `${window.innerWidth - popupRect.width - 8}px`
+ }
+ if (popupRect.bottom > window.innerHeight) {
+ popup.style.top = `${rect.top - popupRect.height - 4}px`
+ }
+ })
+}
diff --git a/frontend/apps/main/src/components/editor/ticketReference.js b/frontend/apps/main/src/components/editor/ticketReference.js
index c963fd7c..b5f05986 100644
--- a/frontend/apps/main/src/components/editor/ticketReference.js
+++ b/frontend/apps/main/src/components/editor/ticketReference.js
@@ -1,23 +1,17 @@
import api from '@main/api'
export const MIN_REFERENCE_QUERY_LENGTH = 3
-
-export const conversationReferenceHref = (uuid) => {
- const path = `/inboxes/all/conversation/${uuid}`
- const origin = typeof window !== 'undefined' ? window.location.origin : ''
- return origin ? `${origin}${path}` : path
-}
+const SUGGESTION_LIMIT = 10
export const getTicketSuggestions = async (query, search = api.searchConversations) => {
const reference = query.trim()
if (reference.length < MIN_REFERENCE_QUERY_LENGTH) return []
const response = await search({ query: reference })
- return (response.data?.data || []).map((conversation) => ({
+ return (response.data?.data || []).slice(0, SUGGESTION_LIMIT).map((conversation) => ({
id: conversation.uuid,
label: conversation.reference_number,
subject: conversation.subject,
- status: conversation.status,
- href: conversationReferenceHref(conversation.uuid)
+ status: conversation.status
}))
}
diff --git a/frontend/apps/main/src/components/editor/ticketReference.test.js b/frontend/apps/main/src/components/editor/ticketReference.test.js
index 216bdf67..85e967c4 100644
--- a/frontend/apps/main/src/components/editor/ticketReference.test.js
+++ b/frontend/apps/main/src/components/editor/ticketReference.test.js
@@ -1,5 +1,5 @@
import { describe, expect, it, vi } from 'vitest'
-import { conversationReferenceHref, getTicketSuggestions } from './ticketReference'
+import { getTicketSuggestions } from './ticketReference'
describe('ticket reference suggestions', () => {
it('does not search until three characters are entered', async () => {
@@ -8,33 +8,27 @@ describe('ticket reference suggestions', () => {
expect(search).not.toHaveBeenCalled()
})
- it('maps a conversation result to a link suggestion', async () => {
- const search = vi
- .fn()
- .mockResolvedValue({
- data: {
- data: [
- {
- uuid: 'conversation-uuid',
- reference_number: '108',
- subject: 'Payment failed',
- status: 'Open'
- }
- ]
- }
- })
- await expect(getTicketSuggestions('108', search)).resolves.toEqual([
- {
- id: 'conversation-uuid',
- label: '108',
- subject: 'Payment failed',
- status: 'Open',
- href: '/inboxes/all/conversation/conversation-uuid'
+ it('maps a conversation result to a suggestion', async () => {
+ const search = vi.fn().mockResolvedValue({
+ data: {
+ data: [
+ {
+ uuid: 'conversation-uuid',
+ reference_number: '108',
+ subject: 'Payment failed',
+ status: 'Open'
+ }
+ ]
}
+ })
+ await expect(getTicketSuggestions('108', search)).resolves.toEqual([
+ { id: 'conversation-uuid', label: '108', subject: 'Payment failed', status: 'Open' }
])
})
- it('builds a stable conversation link', () => {
- expect(conversationReferenceHref('abc')).toBe('/inboxes/all/conversation/abc')
+ it('caps the suggestion list', async () => {
+ const rows = Array.from({ length: 30 }, (_, i) => ({ uuid: `u${i}`, reference_number: `${i}` }))
+ const search = vi.fn().mockResolvedValue({ data: { data: rows } })
+ await expect(getTicketSuggestions('108', search)).resolves.toHaveLength(10)
})
})
diff --git a/frontend/apps/main/src/components/editor/ticketReferenceExtension.js b/frontend/apps/main/src/components/editor/ticketReferenceExtension.js
index 61da9249..afa45203 100644
--- a/frontend/apps/main/src/components/editor/ticketReferenceExtension.js
+++ b/frontend/apps/main/src/components/editor/ticketReferenceExtension.js
@@ -1,48 +1,18 @@
import Mention from '@tiptap/extension-mention'
-const conversationPath = /^\/inboxes\/all\/conversation\/[^/?#]+$/
-
-export const isSafeTicketReferenceHref = (href) => {
- if (!href || href.startsWith('//')) return false
-
- try {
- const url = new URL(href, window.location.origin)
- return (
- (url.protocol === 'http:' || url.protocol === 'https:') &&
- url.origin === window.location.origin &&
- conversationPath.test(url.pathname)
- )
- } catch {
- return false
- }
-}
+export const conversationReferenceHref = (uuid) =>
+ `/inboxes/all/conversation/${encodeURIComponent(uuid)}`
export const TicketReference = Mention.extend({
name: 'ticketReference',
- addAttributes() {
- return {
- ...this.parent?.(),
- href: {
- default: null,
- parseHTML: (element) => {
- const href = element.getAttribute('href')
- return isSafeTicketReferenceHref(href) ? href : null
- }
- },
- type: {
- default: 'ticket-reference',
- parseHTML: (element) => element.getAttribute('data-type') || 'ticket-reference',
- renderHTML: (attributes) => ({ 'data-type': attributes.type })
- }
- }
- },
- parseHTML: () => [{ tag: 'a.ld-ticket-reference' }],
+ // Link's a[href] mark rule is registered first at the default priority and would swallow the anchor.
+ parseHTML: () => [{ tag: 'a.ld-ticket-reference', priority: 51 }],
renderText: ({ node }) => `#${node.attrs.label}`,
renderHTML: ({ node, HTMLAttributes }) => [
'a',
{
...HTMLAttributes,
- href: node.attrs.href,
+ href: conversationReferenceHref(node.attrs.id),
class: [HTMLAttributes.class, 'ld-ticket-reference'].filter(Boolean).join(' ')
},
`#${node.attrs.label}`
diff --git a/frontend/apps/main/src/components/editor/ticketReferenceExtension.test.js b/frontend/apps/main/src/components/editor/ticketReferenceExtension.test.js
index f24706d8..93458a05 100644
--- a/frontend/apps/main/src/components/editor/ticketReferenceExtension.test.js
+++ b/frontend/apps/main/src/components/editor/ticketReferenceExtension.test.js
@@ -1,36 +1,39 @@
// @vitest-environment jsdom
import { describe, expect, it } from 'vitest'
-import StarterKit from '@tiptap/starter-kit'
import { Editor } from '@tiptap/vue-3'
-import { isSafeTicketReferenceHref, TicketReference } from './ticketReferenceExtension'
+import { buildConversationExtensions } from './editorExtensions'
+import { conversationReferenceHref } from './ticketReferenceExtension'
describe('ticket reference editor extension', () => {
- it.each([
- ['/inboxes/all/conversation/conversation-uuid', true],
- ['http://localhost:3000/inboxes/all/conversation/conversation-uuid', true],
- ['https://evil.example/inboxes/all/conversation/conversation-uuid', false],
- ['//evil.example/inboxes/all/conversation/conversation-uuid', false],
- ['javascript:alert(1)', false],
- ['data:text/html,', false]
- ])('validates ticket reference href %s', (href, expected) => {
- expect(isSafeTicketReferenceHref(href)).toBe(expected)
+ it('builds a root-relative conversation link', () => {
+ expect(conversationReferenceHref('abc')).toBe('/inboxes/all/conversation/abc')
})
- it('round-trips a ticket reference through HTML', () => {
+ it('round-trips a ticket reference through HTML in the conversation editor', () => {
const content =
- '
#108
'
- const editor = new Editor({ extensions: [StarterKit, TicketReference], content })
+ '
#108
'
+ const editor = new Editor({
+ extensions: buildConversationExtensions({ getPlaceholder: () => '' }),
+ content
+ })
expect(editor.getJSON().content[0].content[0]).toMatchObject({
type: 'ticketReference',
- attrs: {
- id: 'conversation-uuid',
- label: '108',
- href: '/inboxes/all/conversation/conversation-uuid',
- type: 'ticket-reference'
- }
+ attrs: { id: 'conversation-uuid', label: '108' }
})
expect(editor.getHTML()).toContain('href="/inboxes/all/conversation/conversation-uuid"')
editor.destroy()
})
+
+ it('derives the link from the conversation id, ignoring a stored href', () => {
+ const content =
+ '
#108
'
+ const editor = new Editor({
+ extensions: buildConversationExtensions({ getPlaceholder: () => '' }),
+ content
+ })
+ expect(editor.getHTML()).toContain('href="/inboxes/all/conversation/conversation-uuid"')
+ expect(editor.getHTML()).not.toContain('evil.example')
+ editor.destroy()
+ })
})
diff --git a/frontend/apps/main/src/components/editor/ticketReferenceSuggestion.js b/frontend/apps/main/src/components/editor/ticketReferenceSuggestion.js
index 11bcb612..33bcaad8 100644
--- a/frontend/apps/main/src/components/editor/ticketReferenceSuggestion.js
+++ b/frontend/apps/main/src/components/editor/ticketReferenceSuggestion.js
@@ -1,51 +1,10 @@
-import { VueRenderer } from '@tiptap/vue-3'
import TicketReferenceList from './TicketReferenceList.vue'
+import { createSuggestionRenderer } from './suggestionRenderer'
export default {
char: '#',
allowSpaces: false,
allow: ({ editor }) => editor.options.editorProps?.ticketReferencesEnabled?.() ?? false,
- items: async ({ query, editor }) =>
- editor.options.editorProps?.getTicketSuggestions?.(query) || [],
- render: () => {
- let component
- let popup
- const position = (rect) => {
- if (!rect || !popup) return
- const bounds = rect()
- if (!bounds) return
- popup.style.left = `${bounds.left}px`
- popup.style.top = `${bounds.bottom + 4}px`
- }
- return {
- onStart: (props) => {
- component = new VueRenderer(TicketReferenceList, {
- props: { ...props, query: props.query },
- editor: props.editor
- })
- if (!props.clientRect) return
- popup = document.createElement('div')
- popup.style.position = 'fixed'
- popup.style.zIndex = '9999'
- popup.appendChild(component.element)
- document.body.appendChild(popup)
- position(props.clientRect)
- },
- onUpdate: (props) => {
- component?.updateProps({ ...props, query: props.query })
- position(props.clientRect)
- },
- onKeyDown: (props) => {
- if (props.event.key === 'Escape') {
- if (popup) popup.style.display = 'none'
- return true
- }
- return component?.ref?.onKeyDown(props)
- },
- onExit: () => {
- popup?.remove()
- component?.destroy()
- }
- }
- }
+ items: ({ query, editor }) => editor.options.editorProps?.getTicketSuggestions?.(query) ?? [],
+ render: () => createSuggestionRenderer(TicketReferenceList)
}
diff --git a/frontend/apps/main/src/components/editor/useTextEditor.js b/frontend/apps/main/src/components/editor/useTextEditor.js
index 0c282c85..f12b0da4 100644
--- a/frontend/apps/main/src/components/editor/useTextEditor.js
+++ b/frontend/apps/main/src/components/editor/useTextEditor.js
@@ -1,7 +1,6 @@
import { ref, watch, onUnmounted } from 'vue'
import { useEditor } from '@tiptap/vue-3'
import { useInlineImageUpload } from '@main/composables/useInlineImageUpload'
-import { isSafeTicketReferenceHref } from './ticketReferenceExtension'
export function useTextEditor({
extensions,
@@ -57,20 +56,6 @@ export function useTextEditor({
enableMentions,
getTicketSuggestions,
ticketReferencesEnabled,
- handleDOMEvents: {
- click: (_view, event) => {
- const target =
- event.target instanceof HTMLElement
- ? event.target.closest('a.ld-ticket-reference')
- : null
- if (!target) return false
- event.preventDefault()
- if (isSafeTicketReferenceHref(target.getAttribute('href'))) {
- window.open(target.href, '_blank', 'noopener,noreferrer')
- }
- return true
- }
- },
handlePaste,
handleDrop,
handleKeyDown: (view, event) => {
diff --git a/frontend/apps/main/src/features/conversation/ReplyBoxContent.vue b/frontend/apps/main/src/features/conversation/ReplyBoxContent.vue
index e7b1a86f..54eff9b0 100644
--- a/frontend/apps/main/src/features/conversation/ReplyBoxContent.vue
+++ b/frontend/apps/main/src/features/conversation/ReplyBoxContent.vue
@@ -168,10 +168,10 @@ import { useI18n } from 'vue-i18n'
import { validateEmail } from '@shared-ui/utils/string'
import { useMacroStore } from '@main/stores/macro'
import api from '@main/api'
+import { getTicketSuggestions as fetchTicketSuggestions } from '@main/components/editor/ticketReference'
const MENTION_LIMIT = 10
const MENTION_DEBOUNCE_MS = 250
-import { getTicketSuggestions as fetchTicketSuggestions } from '@main/components/editor/ticketReference'
const messageType = defineModel('messageType', { default: 'reply' })
const to = defineModel('to', { default: '' })
@@ -217,10 +217,12 @@ const getSuggestions = async (query) => {
return (await debouncedFetchSuggestions(query)) || []
}
+const debouncedFetchTicketSuggestions = useDebounceFn(fetchTicketSuggestions, MENTION_DEBOUNCE_MS)
+
const getTicketSuggestions = async (query) => {
if (messageType.value !== 'private_note') return []
const messageTypeAtRequest = messageType.value
- const suggestions = await fetchTicketSuggestions(query)
+ const suggestions = (await debouncedFetchTicketSuggestions(query)) || []
return messageType.value === messageTypeAtRequest ? suggestions : []
}
diff --git a/frontend/apps/main/src/features/conversation/message/MessageBubble.vue b/frontend/apps/main/src/features/conversation/message/MessageBubble.vue
index 9c24f949..a7e44151 100644
--- a/frontend/apps/main/src/features/conversation/message/MessageBubble.vue
+++ b/frontend/apps/main/src/features/conversation/message/MessageBubble.vue
@@ -108,7 +108,8 @@
{
return firstName.toUpperCase().substring(0, 2)
})
+const allowedSchemas = ['cid', 'https', 'http', 'mailto']
+
+// vue-letter skips its own href schema check once a rewrite hook is set.
+const rewriteMessageLink = (href) => {
+ if (href.startsWith('/') && !href.startsWith('//')) return `${window.location.origin}${href}`
+ return allowedSchemas.includes(href.toLowerCase().split(':')[0]) ? href : ''
+}
+
const sanitizedContent = computed(() => {
if (props.message.meta?.is_csat) {
return t('globals.messages.pleaseRateConversation')
diff --git a/frontend/shared-ui/assets/styles/main.scss b/frontend/shared-ui/assets/styles/main.scss
index ec35c79f..5ddc10b6 100644
--- a/frontend/shared-ui/assets/styles/main.scss
+++ b/frontend/shared-ui/assets/styles/main.scss
@@ -121,7 +121,9 @@
// Mention styling — vue-letter scopes classes as msg_XXX_ld-mention
[class$="_ld-mention"],
- .ld-mention {
+ [class$="_ld-ticket-reference"],
+ .ld-mention,
+ .ld-ticket-reference {
background-color: hsl(var(--primary) / 0.1);
border-radius: 0.25rem;
padding: 0 0.25rem;
diff --git a/i18n/en-US.json b/i18n/en-US.json
index 8367c95d..b84e00bf 100644
--- a/i18n/en-US.json
+++ b/i18n/en-US.json
@@ -859,7 +859,6 @@
"globals.messages.noInternetConnection": "No internet connection",
"globals.messages.noMessagesYet": "No messages yet",
"globals.messages.noResultsFound": "No results found",
- "globals.messages.typeAtLeastDigitsToSearchTickets": "Type at least {count} digits to search tickets",
"globals.messages.notAllowed": "Not allowed",
"globals.messages.notFound": "Not found",
"globals.messages.options": "Options",
From e1c87195803e010d28a23c53f009d2722ae66c22 Mon Sep 17 00:00:00 2001
From: Abhinav Raut
Date: Thu, 3 Sep 2026 11:15:38 +0530
Subject: [PATCH 28/56] rename ticket references to conversation references
---
.../src/components/editor/ConversationEditor.vue | 8 ++++----
...ferenceList.vue => ConversationReferenceList.vue} | 12 ++++++------
.../{ticketReference.js => conversationReference.js} | 2 +-
...ference.test.js => conversationReference.test.js} | 10 +++++-----
...xtension.js => conversationReferenceExtension.js} | 8 ++++----
...est.js => conversationReferenceExtension.test.js} | 12 ++++++------
.../editor/conversationReferenceSuggestion.js | 10 ++++++++++
.../main/src/components/editor/editorExtensions.js | 6 +++---
.../main/src/components/editor/editorStyles.scss | 2 +-
.../components/editor/ticketReferenceSuggestion.js | 10 ----------
.../apps/main/src/components/editor/useTextEditor.js | 8 ++++----
.../src/features/conversation/ReplyBoxContent.vue | 12 ++++++------
frontend/shared-ui/assets/styles/main.scss | 4 ++--
13 files changed, 52 insertions(+), 52 deletions(-)
rename frontend/apps/main/src/components/editor/{TicketReferenceList.vue => ConversationReferenceList.vue} (78%)
rename frontend/apps/main/src/components/editor/{ticketReference.js => conversationReference.js} (83%)
rename frontend/apps/main/src/components/editor/{ticketReference.test.js => conversationReference.test.js} (70%)
rename frontend/apps/main/src/components/editor/{ticketReferenceExtension.js => conversationReferenceExtension.js} (66%)
rename frontend/apps/main/src/components/editor/{ticketReferenceExtension.test.js => conversationReferenceExtension.test.js} (74%)
create mode 100644 frontend/apps/main/src/components/editor/conversationReferenceSuggestion.js
delete mode 100644 frontend/apps/main/src/components/editor/ticketReferenceSuggestion.js
diff --git a/frontend/apps/main/src/components/editor/ConversationEditor.vue b/frontend/apps/main/src/components/editor/ConversationEditor.vue
index 56077080..a439a2ec 100644
--- a/frontend/apps/main/src/components/editor/ConversationEditor.vue
+++ b/frontend/apps/main/src/components/editor/ConversationEditor.vue
@@ -45,8 +45,8 @@ const props = defineProps({
disabled: { type: Boolean, default: false },
enableMentions: { type: Boolean, default: false },
getSuggestions: { type: Function, default: null },
- enableTicketReferences: { type: Boolean, default: false },
- getTicketSuggestions: { type: Function, default: null },
+ enableConversationReferences: { type: Boolean, default: false },
+ getConversationSuggestions: { type: Function, default: null },
enableInlineImages: { type: Boolean, default: false },
linkedModel: { type: String, default: 'messages' }
})
@@ -87,8 +87,8 @@ const { editor, extractMentions, focus } = useTextEditor({
linkedModel: props.linkedModel,
getSuggestions: props.getSuggestions,
enableMentions: () => props.enableMentions,
- getTicketSuggestions: props.getTicketSuggestions,
- ticketReferencesEnabled: () => props.enableTicketReferences,
+ getConversationSuggestions: props.getConversationSuggestions,
+ conversationReferencesEnabled: () => props.enableConversationReferences,
onSend: () => {
emit('send')
stopTyping()
diff --git a/frontend/apps/main/src/components/editor/TicketReferenceList.vue b/frontend/apps/main/src/components/editor/ConversationReferenceList.vue
similarity index 78%
rename from frontend/apps/main/src/components/editor/TicketReferenceList.vue
rename to frontend/apps/main/src/components/editor/ConversationReferenceList.vue
index fb168578..dc4ed428 100644
--- a/frontend/apps/main/src/components/editor/TicketReferenceList.vue
+++ b/frontend/apps/main/src/components/editor/ConversationReferenceList.vue
@@ -1,12 +1,12 @@
-
+
{{
$t('search.minQueryLength', {
@@ -35,7 +35,7 @@