Merge branch 'main' into feat/plugins

This commit is contained in:
StyleZhang 2024-11-26 11:08:30 +08:00
commit 102a42d24c
4 changed files with 9 additions and 9 deletions

View File

@ -445,7 +445,7 @@ class TraceTask:
"ls_provider": message_data.model_provider,
"ls_model_name": message_data.model_id,
"status": message_data.status,
"from_end_user_id": message_data.from_account_id,
"from_end_user_id": message_data.from_end_user_id,
"from_account_id": message_data.from_account_id,
"agent_based": message_data.agent_based,
"workflow_run_id": message_data.workflow_run_id,
@ -521,7 +521,7 @@ class TraceTask:
"ls_provider": message_data.model_provider,
"ls_model_name": message_data.model_id,
"status": message_data.status,
"from_end_user_id": message_data.from_account_id,
"from_end_user_id": message_data.from_end_user_id,
"from_account_id": message_data.from_account_id,
"agent_based": message_data.agent_based,
"workflow_run_id": message_data.workflow_run_id,
@ -570,7 +570,7 @@ class TraceTask:
"ls_provider": message_data.model_provider,
"ls_model_name": message_data.model_id,
"status": message_data.status,
"from_end_user_id": message_data.from_account_id,
"from_end_user_id": message_data.from_end_user_id,
"from_account_id": message_data.from_account_id,
"agent_based": message_data.agent_based,
"workflow_run_id": message_data.workflow_run_id,

View File

@ -31,12 +31,12 @@ class AppIconUrlField(fields.Raw):
if obj is None:
return None
from models.model import App, IconType
from models.model import App, IconType, Site
if isinstance(obj, dict) and "app" in obj:
obj = obj["app"]
if isinstance(obj, App) and obj.icon_type == IconType.IMAGE.value:
if isinstance(obj, App | Site) and obj.icon_type == IconType.IMAGE.value:
return file_helpers.get_signed_file_url(obj.icon)
return None

View File

@ -145,7 +145,7 @@ const Apps = ({
if (onSuccess)
onSuccess()
localStorage.setItem(NEED_REFRESH_APP_LIST_KEY, '1')
getRedirection(isCurrentWorkspaceEditor, app, push)
getRedirection(isCurrentWorkspaceEditor, { id: app.app_id }, push)
}
catch (e) {
Toast.notify({ type: 'error', message: t('app.newApp.appCreateFailed') })

View File

@ -4,12 +4,12 @@ export const getRedirection = (
redirectionFunc: (href: string) => void,
) => {
if (!isCurrentWorkspaceEditor) {
redirectionFunc(`/app/${app.app_id}/overview`)
redirectionFunc(`/app/${app.id}/overview`)
}
else {
if (app.mode === 'workflow' || app.mode === 'advanced-chat')
redirectionFunc(`/app/${app.app_id}/workflow`)
redirectionFunc(`/app/${app.id}/workflow`)
else
redirectionFunc(`/app/${app.app_id}/configuration`)
redirectionFunc(`/app/${app.id}/configuration`)
}
}