From 8bd66baa2144edc49af0d7f1021443fe06a50ae0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-JKIE562\\PC" <1013397054@qq.com> Date: Thu, 9 Jul 2026 12:03:57 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat(training-workspace):=20=E5=9F=B9?= =?UTF-8?q?=E8=AE=AD=E8=80=83=E8=AF=95=E5=A2=9E=E5=8A=A0=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E7=AD=94=E5=8D=B7=E5=90=8E=E5=86=8D=E8=BF=9B=E5=85=A5=E7=BB=93?= =?UTF-8?q?=E7=AE=97=E7=BB=93=E6=9E=9C=20feat(training-workspace):=20?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=91=98=E5=B7=A5=E5=9F=B9=E8=AE=AD=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E5=8C=BA=E8=80=83=E8=AF=95=E6=B5=81=E8=BD=AC=E4=B8=8E?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/services/chat/executors/base.py | 1 + .../agents/components/AgentFormModal.vue | 338 +++++++++--------- .../components/TrainingWorkspacePanel.vue | 27 +- .../chat/composables/useTrainingWorkspace.ts | 73 ++-- frontend/src/locales/en/chat.json | 1 + frontend/src/locales/th/chat.json | 1 + frontend/src/locales/zh-CN/chat.json | 1 + frontend/src/locales/zh-TW/chat.json | 1 + 8 files changed, 246 insertions(+), 197 deletions(-) diff --git a/backend/app/services/chat/executors/base.py b/backend/app/services/chat/executors/base.py index 4ebae0f5..48c60277 100644 --- a/backend/app/services/chat/executors/base.py +++ b/backend/app/services/chat/executors/base.py @@ -38,6 +38,7 @@ def build_dify_inputs_for_context(ctx: ChatStreamContext) -> dict[str, Any]: session_id=str(getattr(ctx.session, 'session_id', '') or ''), request_id=ctx.request_id, trigger_source='frontend_chat', + user_role=str(getattr(ctx.user, 'role', '') or '').strip() or None, adapter_hints=ctx.adapter_hints, ) diff --git a/frontend/src/features/admin/modules/agents/components/AgentFormModal.vue b/frontend/src/features/admin/modules/agents/components/AgentFormModal.vue index ce734279..d7696e28 100644 --- a/frontend/src/features/admin/modules/agents/components/AgentFormModal.vue +++ b/frontend/src/features/admin/modules/agents/components/AgentFormModal.vue @@ -531,200 +531,202 @@ const handleTrainingQuestionTypeChange = (form: AgentFormState, index: number) = {{ form.training_workspace_enabled ? t('admin.agent.training.enableHint') : t('admin.agent.training.disabledHint') }}

-
-
- - -

{{ t('admin.agent.training.passScoreHint') }}

-
-
- -