From b6c5b2ec30404c3d8cc36ab3babe5131bc60b80a Mon Sep 17 00:00:00 2001 From: yuwenbinjie Date: Fri, 17 Oct 2025 17:42:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E3=80=81=E6=90=9C=E7=B4=A2=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin-shared/src/components/plugin-panel/index.tsx | 3 ++- .../plugin-shared/src/components/plugin-panel/item.tsx | 6 ++++-- .../community/component/src/card/plugin/index.tsx | 9 +++++---- .../src/search-input/components/recommend-item/index.tsx | 4 +++- .../community/component/src/search-input/config.ts | 5 ++++- .../search-filter/components/plugin-filter/index.tsx | 4 ---- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/frontend/packages/agent-ide/plugin-shared/src/components/plugin-panel/index.tsx b/frontend/packages/agent-ide/plugin-shared/src/components/plugin-panel/index.tsx index 7bcf1cc0f..6f1695466 100644 --- a/frontend/packages/agent-ide/plugin-shared/src/components/plugin-panel/index.tsx +++ b/frontend/packages/agent-ide/plugin-shared/src/components/plugin-panel/index.tsx @@ -266,7 +266,7 @@ export const PluginPanel: React.FC = ({ } if (auth_mode === PluginAuthMode.NeedInstalled) { return ( - + 待开通 @@ -491,6 +491,7 @@ export const PluginPanel: React.FC = ({ data-testid="plugin-panel-item-pluginapi" isAdded={isAdded} pluginApi={api} + productId={productInfo?.id} from={from} auth_mode={auth_mode} workflowNodes={ diff --git a/frontend/packages/agent-ide/plugin-shared/src/components/plugin-panel/item.tsx b/frontend/packages/agent-ide/plugin-shared/src/components/plugin-panel/item.tsx index 06d03ed9a..a84ebeb8e 100644 --- a/frontend/packages/agent-ide/plugin-shared/src/components/plugin-panel/item.tsx +++ b/frontend/packages/agent-ide/plugin-shared/src/components/plugin-panel/item.tsx @@ -60,6 +60,7 @@ export interface PluginItemProps { isLocalPlugin?: boolean; connectors?: string[]; auth_mode?: PluginAuthMode; + productId?: string; } interface OverflowTagItem { @@ -81,8 +82,9 @@ export const PluginItem: React.FC = ({ isLocalPlugin, connectors, auth_mode, + productId, }) => { - const { name, desc, parameters, debug_example, plugin_id } = pluginApi; + const { name, desc, parameters, debug_example } = pluginApi; const { exampleNode, doShowExample } = useViewExample(); const [isMouseIn, { setFalse, setTrue }] = useBoolean(false); @@ -225,7 +227,7 @@ export const PluginItem: React.FC = ({ trigger={isDisabled ? 'hover' : 'custom'} > = props => ( className={cls(styles.plugin, props.className)} shadowMode="default" onClick={() => { - window.open( - `https://www.coze.cn/store/plugin/${props?.meta_info?.id}`, - '_blank', - ); + const url = props?.plugin_extra?.jump_saas_url; + + if (url) { + window.open(url, '_blank'); + } }} >
diff --git a/frontend/packages/community/component/src/search-input/components/recommend-item/index.tsx b/frontend/packages/community/component/src/search-input/components/recommend-item/index.tsx index f8c1ea74c..c98ac4c70 100644 --- a/frontend/packages/community/component/src/search-input/components/recommend-item/index.tsx +++ b/frontend/packages/community/component/src/search-input/components/recommend-item/index.tsx @@ -117,7 +117,7 @@ export const RecommendItem = (props: RecommendItemProps) => { 'store_search_suggestion', ); - window.open(entityUrl); + window.open(entityUrl, '_blank'); }; useItemSelect({ ...{ isSelected, ableKeyPressJump }, @@ -130,9 +130,11 @@ export const RecommendItem = (props: RecommendItemProps) => { search_word: inputValue, action: 'click_results', }); + window.open( // @ts-expect-error -- linter-disable-autofix getEntityUrl(entityType, item?.meta_info?.id), + '_blank', ); }, // @ts-expect-error -- linter-disable-autofix diff --git a/frontend/packages/community/component/src/search-input/config.ts b/frontend/packages/community/component/src/search-input/config.ts index 326fd3f4d..43583013f 100644 --- a/frontend/packages/community/component/src/search-input/config.ts +++ b/frontend/packages/community/component/src/search-input/config.ts @@ -66,7 +66,10 @@ export const getEntityUrl = ( const fromQuery = from ? `?from=${from}` : ''; switch (entityType) { case ProductEntityType.Plugin: - return id ? `/explore/plugin/${id}${fromQuery}` : '/explore/plugin'; + case ProductEntityType.SaasPlugin: + return id + ? `https://www.coze.cn/store/plugin/${id}${fromQuery}` + : '/explore/plugin'; default: return '#'; } diff --git a/frontend/packages/community/explore/src/components/search/search-filter/components/plugin-filter/index.tsx b/frontend/packages/community/explore/src/components/search/search-filter/components/plugin-filter/index.tsx index 265aacdc7..73ca8badc 100644 --- a/frontend/packages/community/explore/src/components/search/search-filter/components/plugin-filter/index.tsx +++ b/frontend/packages/community/explore/src/components/search/search-filter/components/plugin-filter/index.tsx @@ -51,10 +51,6 @@ const getFilterOption = () => { value: PAID_PLUGIN_VALUE, text: I18n.t('only_show_paid_plugins'), }); - options.push({ - value: LOCAL_PLUGIN_VALUE, - text: I18n.t('store_show_service_plugin'), - }); } return options; };