fix: 작업실/의사 앱 세션이 메인 채팅 사이드바에 노출되던 버그 수정
APP_SESSION_PREFIXES 목록에 ws_(workshop-app.html)와 dr_(doctor-app.html)가 빠져 있어서 두 앱의 전용 채팅 세션이 메인 채팅 세션 목록에 그대로 섞여 보이고 있었음. 실제 8개 앱 HTML의 세션 프리픽스와 대조해서 누락분 추가. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,10 +8,16 @@ import { getConfig } from '../../config/config';
|
||||
// itself (the actual message/tool-execution loop) stays in server-v2.ts —
|
||||
// it's tightly coupled to handleChat, same reasoning as /api/code/round.
|
||||
export function registerChatSessionRoutes(app: express.Application): void {
|
||||
// 'app_' style session IDs (iv_/dt_/lw_/mn_/ac_/wt_/music_/dental_) are created by
|
||||
// 'app_' style session IDs (iv_/dt_/lw_/mn_/ac_/wt_/dr_/ws_/music_/dental_) are created by
|
||||
// dedicated per-app UIs and use the same session store as main-chat sessions
|
||||
// but belong to their own app UI — keep them out of the main chat sidebar.
|
||||
const APP_SESSION_PREFIXES = ['iv_', 'dt_', 'lw_', 'mn_', 'ac_', 'wt_', 'music_', 'dental_'];
|
||||
//
|
||||
// 2026-09-21: dr_(doctor-app.html)와 ws_(workshop-app.html)가 이 목록에서 빠져있어서 두 앱의
|
||||
// 세션이 메인 채팅 사이드바에 그대로 노출되고 있었다(사용자 신고: "작업실 컨텍스트는 메인
|
||||
// 채팅 세션 창에 안 보이게 하자"). 앱별 프리픽스를 늘어놓는 이 방식 자체가 새 앱이 생길 때마다
|
||||
// 똑같이 깜빡할 수 있는 구조라는 게 근본 문제 — 앱 HTML들이 실제로 쓰는 프리픽스와 이 목록을
|
||||
// 대조해서 확인할 것(`grep -rn "Math.random" web-ui/html/*.html | grep sessionId`).
|
||||
const APP_SESSION_PREFIXES = ['iv_', 'dt_', 'lw_', 'mn_', 'ac_', 'wt_', 'dr_', 'ws_', 'music_', 'dental_'];
|
||||
|
||||
// GET /api/chat/sessions — list current user's sessions from disk
|
||||
app.get('/api/chat/sessions', async (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user