@nethru/kit 1.1.11 → 1.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,8 +15,9 @@ function AiChat({
15
15
  mainPageRef: _mainPageRef
16
16
  } = useChatContext();
17
17
  useEffect(() => {
18
+ if (!mainPageRef) return;
18
19
  _mainPageRef.current = mainPageRef.current;
19
- }, [mainPageRef.current]);
20
+ }, [mainPageRef?.current]);
20
21
  return /*#__PURE__*/_jsxs(Stack, {
21
22
  sx: {
22
23
  ...styles.container,
@@ -21,7 +21,6 @@ export default function ToolContent() {
21
21
  trendTools
22
22
  } = useMemo(() => groupTools(hasCompare, tools), [tools]);
23
23
  const toolCount = useMemo(() => summaryTools.length + periodTrendTools.length + trendTools.length + jsonTools.length, [summaryTools, periodTrendTools, trendTools, jsonTools]);
24
- console.log(summaryTools, periodTrendTools, trendTools, jsonTools);
25
24
  return /*#__PURE__*/_jsxs(Stack, {
26
25
  gap: 5,
27
26
  marginBottom: toolCount > 0 ? 5 : 0,
@@ -1,6 +1,6 @@
1
1
  export function isPageAnalysisIntent(userPrompt) {
2
2
  if (!userPrompt || userPrompt.trim() === "") return false;
3
- const analysisKeywords = ["요약", "정리", "분석", "설명", "페이지", "화면", "글", "기사", "문서", "내용", "포스트", "블로그", "뭐야", "뭔가", "무엇", "어떤", "핵심", "주요", "포인트", "요점", "이", "현재", "지금", "여기", "summarize", "summary", "analyze", "analysis", "explain", "this page", "current page", "this article", "this post"];
3
+ const analysisKeywords = ["요약", "정리", "분석", "페이지", "화면", "글", "기사", "문서", "내용", "포스트", "블로그", "뭐야", "뭔가", "무엇", "어떤", "핵심", "주요", "포인트", "요점", "이", "현재", "지금", "여기", "summarize", "summary", "analyze", "analysis", "explain", "this page", "current page", "this article", "this post"];
4
4
  const excludeKeywords = ["http://", "https://", "www.", "날씨", "weather", "뉴스", "news", "코드", "code", "프로그램", "program"];
5
5
  const prompt = userPrompt.toLowerCase();
6
6
 
@@ -16,7 +16,14 @@ export function isPageAnalysisIntent(userPrompt) {
16
16
  if (matchedKeywords.length >= 2) return true;
17
17
 
18
18
  // 단일 키워드지만 강한 패턴
19
- const strongPatterns = ["요약해", "정리해", "분석해", "설명해", "요약 해", "정리 해", "분석 해", "설명 해", "페이지 요약", "페이지 정리", "페이지 분석", "summarize this", "analyze this", "explain this"];
20
- if (strongPatterns.some(p => prompt.includes(p))) return true;
19
+ // const strongPatterns = [
20
+ // "요약해", "정리해", "분석해",
21
+ // "요약 해", "정리 해", "분석 해",
22
+ // "페이지 요약", "페이지 정리", "페이지 분석",
23
+ // "summarize this", "analyze this", "explain this"
24
+ // ];
25
+ //
26
+ // if(strongPatterns.some(p => prompt.includes(p))) return true;
27
+
21
28
  return false;
22
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nethru/kit",
3
- "version": "1.1.11",
3
+ "version": "1.1.13",
4
4
  "description": "A React component library by Nethru",
5
5
  "main": "dist/index.js",
6
6
  "homepage": ".",