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

View File

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