feat: enhance agent tools with end user credential support

This commit is contained in:
zhsama
2025-11-27 17:44:04 +08:00
parent 1400b9c6e2
commit cb4670cd68
7 changed files with 376 additions and 52 deletions

View File

@@ -13,6 +13,7 @@ export const usePluginAuth = (pluginPayload: PluginPayload, enable?: boolean) =>
const canOAuth = data?.supported_credential_types.includes(CredentialTypeEnum.OAUTH2)
const canApiKey = data?.supported_credential_types.includes(CredentialTypeEnum.API_KEY)
const invalidPluginCredentialInfo = useInvalidPluginCredentialInfoHook(pluginPayload)
const hasOAuthClientConfigured = data?.is_oauth_custom_client_enabled
return {
isAuthorized,
@@ -22,5 +23,6 @@ export const usePluginAuth = (pluginPayload: PluginPayload, enable?: boolean) =>
disabled: !isCurrentWorkspaceManager,
notAllowCustomCredential: data?.allow_custom_token === false,
invalidPluginCredentialInfo,
hasOAuthClientConfigured: !!hasOAuthClientConfigured,
}
}