From 2e00e23a3b30c1bf6f97f518bdcfff0563499d50 Mon Sep 17 00:00:00 2001 From: owk-owk130 Date: Fri, 10 Apr 2026 09:25:46 +0900 Subject: [PATCH] =?UTF-8?q?fix(chat):=20staff=20=E3=83=AD=E3=83=BC?= =?UTF-8?q?=E3=83=AB=E3=81=AB=E7=AE=A1=E7=90=86=E8=80=85=E5=B0=82=E7=94=A8?= =?UTF-8?q?=E3=82=A8=E3=83=BC=E3=82=B8=E3=82=A7=E3=83=B3=E3=83=88=E3=82=92?= =?UTF-8?q?=E5=89=B2=E3=82=8A=E5=BD=93=E3=81=A6=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- server/src/routes/threads/chat.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/routes/threads/chat.ts b/server/src/routes/threads/chat.ts index 1a7a78e2..6e1cc6d4 100644 --- a/server/src/routes/threads/chat.ts +++ b/server/src/routes/threads/chat.ts @@ -72,6 +72,7 @@ chatRoutes.openapi(chatRoute, async (c) => { const isAdmin = principal.type === "admin"; const adminUser = isAdmin ? requireAdminUser(principal) : undefined; + const useAdminAgents = isAdmin && adminUser?.role !== "staff"; const storage = await getStorage(c.env.DB); @@ -88,7 +89,7 @@ chatRoutes.openapi(chatRoute, async (c) => { logger.info(`[Chat] intent: ${intent}`, { threadId }); const neppChanAgent = createNeppChanAgent({ - isAdmin, + isAdmin: useAdminAgents, modelConfig, }); const mastra = new Mastra({