mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +08:00
chore: support Zendesk widget (#25517)
This commit is contained in:
@ -27,6 +27,8 @@ import {
|
||||
useEducationStatus,
|
||||
} from '@/service/use-education'
|
||||
import { noop } from 'lodash-es'
|
||||
import { setZendeskConversationFields } from '@/app/components/base/zendesk/utils'
|
||||
import { ZENDESK_FIELD_IDS } from '@/config'
|
||||
|
||||
type ProviderContextState = {
|
||||
modelProviders: ModelProvider[]
|
||||
@ -189,6 +191,17 @@ export const ProviderContextProvider = ({
|
||||
fetchPlan()
|
||||
}, [])
|
||||
|
||||
// #region Zendesk conversation fields
|
||||
useEffect(() => {
|
||||
if (ZENDESK_FIELD_IDS.PLAN && plan.type) {
|
||||
setZendeskConversationFields([{
|
||||
id: ZENDESK_FIELD_IDS.PLAN,
|
||||
value: `${plan.type}-plan`,
|
||||
}])
|
||||
}
|
||||
}, [plan.type])
|
||||
// #endregion Zendesk conversation fields
|
||||
|
||||
const { t } = useTranslation()
|
||||
useEffect(() => {
|
||||
if (localStorage.getItem('anthropic_quota_notice') === 'true')
|
||||
|
||||
Reference in New Issue
Block a user