Merge pull request #34772 from overleaf/mg-writefull-citations-button

Add a `Check citations` option to writefull ai menu

GitOrigin-RevId: c2204c663474a016085668fa708460b3db9517cb
This commit is contained in:
Malik Glossop
2026-09-17 11:20:09 +00:00
committed by Copybot
parent 84c6a68eae
commit 11b9ff5ac8
4 changed files with 17 additions and 9 deletions
@@ -160,6 +160,7 @@ const en = {
'ai-context-menu.abstract-generator': 'Abstract Generator',
'ai-context-menu.keywords-generator': 'Keywords Generator',
'ai-context-menu.context-options': 'Context Options',
'ai-context-menu.check-citations': 'Check citations',
'ai-context-menu.select-text-tooltip':
'Select text to access these options',
'ai-context-menu.paraphrase': 'Paraphrase',
@@ -696,6 +697,7 @@ const es = {
'ai-context-menu.abstract-generator': 'Generar Abstract',
'ai-context-menu.keywords-generator': 'Generar palabras clave',
'ai-context-menu.context-options': 'Opciones de contexto',
'ai-context-menu.check-citations': 'Comprobar citas',
'ai-context-menu.select-text-tooltip':
'Seleccione texto para acceder a estas opciones',
'ai-context-menu.paraphrase': 'Parafrasear',
@@ -6,18 +6,12 @@ import { useUserFeaturesContext } from '@/shared/context/user-features-context'
import { useEditorAnalytics } from '@/shared/hooks/use-editor-analytics'
import { useTranslation } from 'react-i18next'
import { formatSecondsToHoursAndMinutes } from '@/shared/utils/time'
import getMeta from '@/utils/meta'
import { AiFeatureLocations } from './types/ai'
import { paywallTypeByLocation } from '../utils/ai-features'
const hasUnlimitedAi = getMeta('ol-hasUnlimitedAi')
type AiFeatureLocations = 'errorAssist' | 'workbench'
type PaywallType = 'assistant' | 'workbench'
const paywallTypeByLocation: Record<AiFeatureLocations, PaywallType> = {
workbench: 'workbench',
errorAssist: 'assistant',
}
function AiPaywallNotification({
isActionBelowContent = false,
featureLocation,
@@ -0,0 +1,5 @@
export type AiFeatureLocations =
| 'errorAssist'
| 'workbench'
| 'citationsReviewer'
export type PaywallType = 'assistant' | 'workbench' | 'citations-reviewer'
@@ -0,0 +1,7 @@
import { AiFeatureLocations, PaywallType } from '../components/types/ai'
export const paywallTypeByLocation: Record<AiFeatureLocations, PaywallType> = {
workbench: 'workbench',
errorAssist: 'assistant',
citationsReviewer: 'citations-reviewer',
}