Langfuse view button (#7578)

This commit is contained in:
Charlie.Wei 2024-08-23 16:23:26 +08:00 committed by GitHub
parent 9864b35465
commit df69ad9f0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View File

@ -85,6 +85,7 @@ const ConfigPopup: FC<PopupProps> = ({
<ProviderPanel <ProviderPanel
type={TracingProvider.langSmith} type={TracingProvider.langSmith}
readOnly={readOnly} readOnly={readOnly}
config={langSmithConfig}
hasConfigured={!!langSmithConfig} hasConfigured={!!langSmithConfig}
onConfig={handleOnConfig(TracingProvider.langSmith)} onConfig={handleOnConfig(TracingProvider.langSmith)}
isChosen={chosenProvider === TracingProvider.langSmith} isChosen={chosenProvider === TracingProvider.langSmith}
@ -96,6 +97,7 @@ const ConfigPopup: FC<PopupProps> = ({
<ProviderPanel <ProviderPanel
type={TracingProvider.langfuse} type={TracingProvider.langfuse}
readOnly={readOnly} readOnly={readOnly}
config={langFuseConfig}
hasConfigured={!!langFuseConfig} hasConfigured={!!langFuseConfig}
onConfig={handleOnConfig(TracingProvider.langfuse)} onConfig={handleOnConfig(TracingProvider.langfuse)}
isChosen={chosenProvider === TracingProvider.langfuse} isChosen={chosenProvider === TracingProvider.langfuse}

View File

@ -14,7 +14,7 @@ type Props = {
type: TracingProvider type: TracingProvider
readOnly: boolean readOnly: boolean
isChosen: boolean isChosen: boolean
Config: any config: any
onChoose: () => void onChoose: () => void
hasConfigured: boolean hasConfigured: boolean
onConfig: () => void onConfig: () => void
@ -31,7 +31,7 @@ const ProviderPanel: FC<Props> = ({
type, type,
readOnly, readOnly,
isChosen, isChosen,
Config, config,
onChoose, onChoose,
hasConfigured, hasConfigured,
onConfig, onConfig,
@ -48,9 +48,9 @@ const ProviderPanel: FC<Props> = ({
e.preventDefault() e.preventDefault()
e.stopPropagation() e.stopPropagation()
const url = `${Config?.host}/project/${Config?.project_key}` const url = `${config?.host}/project/${config?.project_key}`
window.open(url, '_blank', 'noopener,noreferrer') window.open(url, '_blank', 'noopener,noreferrer')
}, [Config?.host, Config?.project_key]) }, [])
const handleChosen = useCallback((e: React.MouseEvent) => { const handleChosen = useCallback((e: React.MouseEvent) => {
e.stopPropagation() e.stopPropagation()