diff --git a/web/app/(commonLayout)/plugins/test/card/actions.ts b/web/app/(commonLayout)/plugins/test/card/actions.ts deleted file mode 100644 index 799d6ee8db..0000000000 --- a/web/app/(commonLayout)/plugins/test/card/actions.ts +++ /dev/null @@ -1,14 +0,0 @@ -'use server' - -import { revalidatePath } from 'next/cache' - -// Server Actions -export async function handleDelete() { - // revalidatePath only invalidates the cache when the included path is next visited. - revalidatePath('/') -} - -export async function fetchPluginDetail(org: string, name: string) { - // Fetch plugin detail TODO - return { org, name } -} diff --git a/web/app/(commonLayout)/plugins/test/card/page.tsx b/web/app/(commonLayout)/plugins/test/card/page.tsx deleted file mode 100644 index 86e0da56bf..0000000000 --- a/web/app/(commonLayout)/plugins/test/card/page.tsx +++ /dev/null @@ -1,118 +0,0 @@ -'use client' -import Card from '@/app/components/plugins/card' -import { customTool, extensionDallE, modelGPT4, toolNotion } from '@/app/components/plugins/card/card-mock' -// import PluginItem from '@/app/components/plugins/plugin-item' -import CardMoreInfo from '@/app/components/plugins/card/card-more-info' -// import ProviderCard from '@/app/components/plugins/provider-card' -import Badge from '@/app/components/base/badge' -import InstallBundle from '@/app/components/plugins/install-plugin/install-bundle' -import { useBoolean } from 'ahooks' -import LoadingError from '@/app/components/plugins/install-plugin/base/loading-error' - -const PluginList = () => { - const pluginList = [toolNotion, extensionDallE, modelGPT4, customTool] - const [isShow, { - setFalse: hide, - }] = useBoolean(true) - - return ( -
- - {isShow && ( - - ) - } -
- {/*

Dify Plugin list

*/} - {/*
- {pluginList.map((plugin, index) => ( - - ))} -
*/} - -

Install Plugin / Package under bundle

-
- - } - /> -
- {/*

Installed

-
- -
*/} - - {/*

Install model provide

-
- {pluginList.map((plugin, index) => ( - - ))} -
*/} - -
-

Marketplace Plugin list

-
- {pluginList.map((plugin, index) => ( - - } - /> - ))} -
-
-
- ) -} - -// export const metadata = { -// title: 'Plugins - Card', -// } - -export default PluginList diff --git a/web/app/(commonLayout)/plugins/test/tools-picker/page.tsx b/web/app/(commonLayout)/plugins/test/tools-picker/page.tsx deleted file mode 100644 index 0b6242a42e..0000000000 --- a/web/app/(commonLayout)/plugins/test/tools-picker/page.tsx +++ /dev/null @@ -1,22 +0,0 @@ -'use client' -import React from 'react' -import ToolPicker from '@/app/components/workflow/block-selector/tool-picker' - -const ToolsPicker = () => { - const [show, setShow] = React.useState(true) - return ( -
- Click me
} - isShow={show} - onShowChange={setShow} - disabled={false} - supportAddCustomTool={true} - onSelect={() => { }} - /> - - - ) -} - -export default ToolsPicker diff --git a/web/app/(commonLayout)/plugins/test/update/page.tsx b/web/app/(commonLayout)/plugins/test/update/page.tsx deleted file mode 100644 index 9d78b45979..0000000000 --- a/web/app/(commonLayout)/plugins/test/update/page.tsx +++ /dev/null @@ -1,67 +0,0 @@ -'use client' -import { toolNeko } from '@/app/components/plugins/card/card-mock' -import { PluginSource } from '@/app/components/plugins/types' -import { useModalContext } from '@/context/modal-context' -import React from 'react' - -const UpdatePlugin = () => { - const { setShowUpdatePluginModal } = useModalContext() - const handleUpdateFromMarketPlace = () => { - setShowUpdatePluginModal({ - payload: { - type: PluginSource.marketplace, - marketPlace: { - originalPackageInfo: { - id: 'langgenius/neko:0.0.1@9e57d693739287c0efdc96847d7ed959ca93f70aa704471f2eb7ed3313821824', - payload: toolNeko as any, - }, - targetPackageInfo: { - id: 'target_xxx', - version: '1.2.3', - }, - }, - }, - onCancelCallback: () => { - console.log('canceled') - }, - onSaveCallback: () => { - console.log('saved') - }, - }) - } - const handleUpdateFromGithub = () => { - setShowUpdatePluginModal({ - payload: { - type: PluginSource.github, - github: { - originalPackageInfo: { - id: '111', - repo: 'aaa/bbb', - version: 'xxx', - url: 'aaa/bbb', - currVersion: '1.2.3', - currPackage: 'pack1', - } as any, - }, - }, - onCancelCallback: () => { - console.log('canceled') - }, - onSaveCallback: () => { - console.log('saved') - }, - }) - } - - return ( -
-
更新组件
-
-
从 Marketplace
-
从 GitHub
-
-
- ) -} - -export default React.memo(UpdatePlugin)