From 29965609e13be5e7bf31204e7e4f42730a702bd3 Mon Sep 17 00:00:00 2001 From: kim Date: Sun, 18 Oct 2026 19:35:51 +0900 Subject: [PATCH] =?UTF-8?q?=EB=82=A0=EC=94=A8=20=EB=8F=84=EA=B5=AC=20?= =?UTF-8?q?=EA=B2=8C=EC=9D=B4=ED=8A=B8:=20'=EB=B9=84=EA=B0=80=20=EB=A7=8E?= =?UTF-8?q?=EC=9D=B4=20=EC=99=94=EB=82=98'=C2=B7'=EB=B9=84=20=EC=99=94?= =?UTF-8?q?=EC=96=B4'=20=EA=B0=99=EC=9D=80=20=EA=B3=BC=EA=B1=B0=ED=98=95?= =?UTF-8?q?=20=EB=B9=84=20=EC=A7=88=EB=AC=B8=EB=8F=84=20weather=5Fkma=20?= =?UTF-8?q?=EC=A0=9C=EA=B3=B5(=EC=97=86=EC=96=B4=EC=84=9C=20web=5Fsearch?= =?UTF-8?q?=EB=A1=9C=20=EA=B0=80=EB=8D=98=20=EB=AC=B8=EC=A0=9C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- src/gateway/chat/tool-scope.ts | 2 +- tests/tool-scope.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gateway/chat/tool-scope.ts b/src/gateway/chat/tool-scope.ts index 0657ca2..9a3708e 100644 --- a/src/gateway/chat/tool-scope.ts +++ b/src/gateway/chat/tool-scope.ts @@ -257,7 +257,7 @@ export function buildSkillToolFilter(input: ToolScopeInput): (toolName: string) // 또 빠진다(우박·안개·서리가 실제로 빠져 있었다). 현상 목록 × 물음 형태로 한 번에 잡는다. // "소식" 단독은 절대 넣지 않는다 — 회사 소식·업계 소식·새로운 소식에 다 걸린다. || new RegExp(`(${WEATHER_PHENOMENON})\\s*(소식|예보|전망|상황)`).test(topicText) - || /비가\s*(오|와|내리|올)|비\s*(온다|와요|올까|내려)|소나기|호우|폭우|우산/.test(topicText) + || /비가\s*(오|와|내리|올)|비\s*(온다|와요|올까|내려)|비가?\s*(?:많이|조금|얼마나|좀|꽤|엄청)?\s*(?:왔|내렸|오고|내리고)|소나기|호우|폭우|우산/.test(topicText) || /눈이\s*(오|내리)|눈\s*올/.test(topicText) || /무더위|더위|추위|쌀쌀|습도|풍속|체감\s*온도/.test(topicText); const hasLegalKeyword = /법률|판례|소송|변호사|법원|법조문|조항|계약서|형법|민법|법령|legal|lawsuit|court|statute/i.test(message); diff --git a/tests/tool-scope.test.ts b/tests/tool-scope.test.ts index f5395da..90f358a 100644 --- a/tests/tool-scope.test.ts +++ b/tests/tool-scope.test.ts @@ -90,7 +90,7 @@ describe('키워드 게이트 — 필요할 때 확실히 나타난다', () => { // 실제 사고: "향후 비소식은 없나?"에 날씨 키워드가 하나도 안 걸려 weather_* 가 스키마에서 // 빠졌고, 모델은 web_search로 2019년 기사를 물어와 "예보를 확인할 수 없다"고 답했다. // 이어서 "기상청에 알아봐"라고 명시했는데 그것도 안 걸려 두 번째 턴까지 같은 실패. - for (const msg of ['향후 비소식은 없나?', '오늘 영남지역 비소식 있나?', '기상청에 알아봐', '내일 비 와요?', '주말에 소나기 오나']) { + for (const msg of ['향후 비소식은 없나?', '오늘 영남지역 비소식 있나?', '기상청에 알아봐', '내일 비 와요?', '주말에 소나기 오나', '오늘 서울에 비가 많이 왔나?', '어제 비 왔어?']) { assert.equal(filterFor(msg)('weather_kma'), true, msg); } });