Feat node search (#23685)

Co-authored-by: GuanMu <ballmanjq@gmail.com>
Co-authored-by: zhujiruo <zhujiruo@foxmail.com>
Co-authored-by: Matri Qi <matrixdom@126.com>
Co-authored-by: croatialu <wuli.croatia@foxmail.com>
Co-authored-by: HyaCinth <88471803+HyaCiovo@users.noreply.github.com>
Co-authored-by: lyzno1 <92089059+lyzno1@users.noreply.github.com>
This commit is contained in:
crazywoola
2025-08-10 19:19:52 -07:00
committed by GitHub
parent 36b221b170
commit 7ee170f0a7
41 changed files with 2216 additions and 17 deletions

View File

@@ -1,17 +1,25 @@
import type { AppMode } from '@/types/app'
export const getRedirectionPath = (
isCurrentWorkspaceEditor: boolean,
app: { id: string, mode: AppMode },
) => {
if (!isCurrentWorkspaceEditor) {
return `/app/${app.id}/overview`
}
else {
if (app.mode === 'workflow' || app.mode === 'advanced-chat')
return `/app/${app.id}/workflow`
else
return `/app/${app.id}/configuration`
}
}
export const getRedirection = (
isCurrentWorkspaceEditor: boolean,
app: { id: string, mode: AppMode },
redirectionFunc: (href: string) => void,
) => {
if (!isCurrentWorkspaceEditor) {
redirectionFunc(`/app/${app.id}/overview`)
}
else {
if (app.mode === 'workflow' || app.mode === 'advanced-chat')
redirectionFunc(`/app/${app.id}/workflow`)
else
redirectionFunc(`/app/${app.id}/configuration`)
}
const redirectionPath = getRedirectionPath(isCurrentWorkspaceEditor, app)
redirectionFunc(redirectionPath)
}