From 79cf487ac5383c7d39885fa3b7cd37b3ea3a7da1 Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Thu, 14 Mar 2024 04:03:17 +0530 Subject: [PATCH] purge unused deps, comments --- extensions/react-widget/package-lock.json | 14 -------------- extensions/react-widget/package.json | 1 - .../react-widget/src/components/DocsGPTWidget.tsx | 5 ++--- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/extensions/react-widget/package-lock.json b/extensions/react-widget/package-lock.json index 928e12e9..4aae1636 100644 --- a/extensions/react-widget/package-lock.json +++ b/extensions/react-widget/package-lock.json @@ -16,7 +16,6 @@ "@parcel/transformer-typescript-tsc": "^2.12.0", "@parcel/validator-typescript": "^2.12.0", "@radix-ui/react-icons": "^1.3.0", - "@sundersb/markdown-mini": "^1.0.1", "@types/react": "^18.2.61", "@types/react-dom": "^18.2.19", "class-variance-authority": "^0.7.0", @@ -5152,19 +5151,6 @@ "react": "^16.x || ^17.x || ^18.x" } }, - "node_modules/@sundersb/markdown-mini": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@sundersb/markdown-mini/-/markdown-mini-1.0.1.tgz", - "integrity": "sha512-uhpAgeTYQl51+Cv5DboJT2TjPFqj1Ezgq9Bv9mfQGEs8QZ3jIGsSZ6qOaYl39FqA17pYySP8X6U2sSm713+wcw==", - "dependencies": { - "@sundersb/parser-mini": "^1.0.0" - } - }, - "node_modules/@sundersb/parser-mini": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@sundersb/parser-mini/-/parser-mini-1.0.1.tgz", - "integrity": "sha512-Ih6muq5bF1prFjW6jIasv+0VnBPUFZVFVADDjxhqz2bWVu3/I7aQHsByfxlCfwF+JcEp9K4gvLzVkA+jZR8DTw==" - }, "node_modules/@svgr/babel-plugin-add-jsx-attribute": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-6.5.1.tgz", diff --git a/extensions/react-widget/package.json b/extensions/react-widget/package.json index b4e308ae..39213482 100644 --- a/extensions/react-widget/package.json +++ b/extensions/react-widget/package.json @@ -33,7 +33,6 @@ "@parcel/transformer-typescript-tsc": "^2.12.0", "@parcel/validator-typescript": "^2.12.0", "@radix-ui/react-icons": "^1.3.0", - "@sundersb/markdown-mini": "^1.0.1", "@types/react": "^18.2.61", "@types/react-dom": "^18.2.19", "class-variance-authority": "^0.7.0", diff --git a/extensions/react-widget/src/components/DocsGPTWidget.tsx b/extensions/react-widget/src/components/DocsGPTWidget.tsx index 74563f5c..26a63303 100644 --- a/extensions/react-widget/src/components/DocsGPTWidget.tsx +++ b/extensions/react-widget/src/components/DocsGPTWidget.tsx @@ -316,12 +316,11 @@ export const DocsGPTWidget = ({ const lastChild = element?.children?.[element.children.length - 1] lastChild && scrollToBottom(lastChild) }; + useEffect(() => { !eventInterrupt && scrollToBottom(endMessageRef.current); }, [queries.length, queries[queries.length - 1]?.response]); - /* useEffect(()=>{ - setEventInterrupt(false) - },[status]) */ + async function stream(question: string) { setStatus('loading') try {