Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins

This commit is contained in:
twwu 2024-11-20 15:31:03 +08:00
commit 77d6dbb3d0
4 changed files with 9 additions and 7 deletions

View File

@ -32,7 +32,7 @@ const PluginList = () => {
type: 'github', type: 'github',
value: { value: {
repo: 'YIXIAO0/test', repo: 'YIXIAO0/test',
release: '1.11.5', version: '1.11.5',
package: 'test.difypkg', package: 'test.difypkg',
github_plugin_unique_identifier: 'yixiao0/test:0.0.1@3592166c87afcf944b4f13f27467a5c8f9e00bd349cb42033a072734a37431b4', github_plugin_unique_identifier: 'yixiao0/test:0.0.1@3592166c87afcf944b4f13f27467a5c8f9e00bd349cb42033a072734a37431b4',
}, },

View File

@ -25,8 +25,8 @@ const Item: FC<Props> = ({
const info = dependency.value const info = dependency.value
const { data, error } = useUploadGitHub({ const { data, error } = useUploadGitHub({
repo: info.repo!, repo: info.repo!,
version: info.release!, version: info.release! || info.version!,
package: info.packages!, package: info.packages! || info.package!,
}) })
const [payload, setPayload] = React.useState<Plugin | null>(null) const [payload, setPayload] = React.useState<Plugin | null>(null)
useEffect(() => { useEffect(() => {

View File

@ -315,8 +315,10 @@ export type GitHubItemAndMarketPlaceDependency = {
type: 'github' | 'marketplace' | 'package' type: 'github' | 'marketplace' | 'package'
value: { value: {
repo?: string repo?: string
release?: string version?: string // from app DSL
packages?: string package?: string // from app DSL
release?: string // from local package. same to the version
packages?: string // from local package. same to the package
github_plugin_unique_identifier?: string github_plugin_unique_identifier?: string
marketplace_plugin_unique_identifier?: string marketplace_plugin_unique_identifier?: string
plugin_unique_identifier?: string plugin_unique_identifier?: string

View File

@ -125,8 +125,8 @@ export const useInstallFromMarketplaceAndGitHub = ({
await post<InstallPackageResponse>('/workspaces/current/plugin/install/github', { await post<InstallPackageResponse>('/workspaces/current/plugin/install/github', {
body: { body: {
repo: data.value.repo!, repo: data.value.repo!,
version: data.value.release!, version: data.value.release! || data.value.version!,
package: data.value.packages!, package: data.value.packages! || data.value.package!,
plugin_unique_identifier: data.value.github_plugin_unique_identifier!, plugin_unique_identifier: data.value.github_plugin_unique_identifier!,
}, },
}) })