From 661f65c593a3523e1b42485c0e44c6dd23520fa4 Mon Sep 17 00:00:00 2001 From: Jayway Liu <14022498+bluejayway@user.noreply.gitee.com> Date: Sun, 1 Nov 2026 10:55:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20Copilot=20=E5=A4=9A=E8=BD=AE?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E3=80=81=E5=88=97=E5=AE=9A=E4=B9=89=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E7=A1=AE=E8=AE=A4=E4=B8=8E=E6=9D=A5=E6=BA=90=E6=A0=87?= =?UTF-8?q?=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.tsx | 39 ++- frontend/src/dialogs.tsx | 469 +++++++++++++++++++++++++++++-- frontend/src/style.css | 144 +++++++++- frontend/src/types.ts | 30 ++ tests/e2e/assistant.spec.ts | 266 ++++++++++++++++++ tests/e2e/formula-export.spec.ts | 5 +- 6 files changed, 910 insertions(+), 43 deletions(-) create mode 100644 tests/e2e/assistant.spec.ts diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 5cbc3d4..63bfe41 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -48,6 +48,7 @@ import { labels, roleLabels, type Analysis, + type AssistantReply, type Context, type Dataset, type FormulaColumn, @@ -514,6 +515,9 @@ export function App() { if (!session.user) return ; const user = session.user; const canUpload = user.role !== "viewer" && !user.departments.length; + const canDesign = + (user.role === "admin" || user.role === "analyst") && + !user.departments.length; return (