@@ -4,6 +4,8 @@ import React, { useState, useEffect, use, KeyboardEvent, useCallback } from 'rea
44import { getEntity , saveEntity } from '../../../services/entities' ;
55import type { EntityModel , EntityValue } from '../../../services/training' ;
66import { useSnackbar } from '../../../components/Snackbar/SnackbarContext' ;
7+ import { Popover } from 'flowbite-react' ;
8+ import { QuestionMarkCircleIcon } from '@heroicons/react/24/outline' ;
79
810const EntityPage = ( { params } : { params : Promise < { id : string } > } ) => {
911 const { id } = use ( params ) ;
@@ -151,7 +153,36 @@ const EntityPage = ({ params }: { params: Promise<{ id: string }> }) => {
151153
152154 < div className = "border-t border-gray-200 pt-6" >
153155 < div className = "flex items-center justify-between mb-4" >
154- < h2 className = "text-lg font-medium text-gray-800" > Values</ h2 >
156+ < div className = "flex items-center gap-2" >
157+ < h2 className = "text-lg font-medium text-gray-800" > Values</ h2 >
158+ < Popover
159+ content = {
160+ < div className = "max-w-sm space-y-2 p-3 bg-gray-50 rounded-lg" >
161+ < p >
162+ Entity values and their synonyms help identify different ways users refer to the same entity.
163+ </ p >
164+ < p className = "mt-2" >
165+ Example:
166+ </ p >
167+ < div className = "bg-white p-3 rounded-lg border border-gray-200" >
168+ < p className = "font-medium" > Value: "credit_card"</ p >
169+ < p className = "text-sm text-gray-600 mt-1" > Synonyms:</ p >
170+ < ul className = "list-disc pl-5 text-sm text-gray-600" >
171+ < li > card</ li >
172+ < li > credit</ li >
173+ < li > visa</ li >
174+ < li > mastercard</ li >
175+ </ ul >
176+ < p className = "mt-2 text-sm text-gray-600" >
177+ When users mention any of these synonyms, the intent will receive "credit_card" as the entity value.
178+ </ p >
179+ </ div >
180+ </ div >
181+ }
182+ >
183+ < QuestionMarkCircleIcon className = "h-5 w-5 text-gray-400 hover:text-gray-500 cursor-help" />
184+ </ Popover >
185+ </ div >
155186 < button
156187 type = "button"
157188 onClick = { addValue }
@@ -251,4 +282,4 @@ const EntityPage = ({ params }: { params: Promise<{ id: string }> }) => {
251282 ) ;
252283} ;
253284
254- export default EntityPage ;
285+ export default EntityPage ;
0 commit comments