From 75173473aec28d6cfd3ad36a89f8004353d3a23a Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Wed, 4 Dec 2024 02:47:57 +0530 Subject: [PATCH 1/3] (feat:bubble) replace emoji with user profile --- frontend/src/assets/user.png | Bin 0 -> 735 bytes frontend/src/components/Avatar.tsx | 2 +- frontend/src/conversation/ConversationBubble.tsx | 13 ++++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 frontend/src/assets/user.png diff --git a/frontend/src/assets/user.png b/frontend/src/assets/user.png new file mode 100644 index 0000000000000000000000000000000000000000..3cc5d2f117820df7cd946dad34624157301c6ca4 GIT binary patch literal 735 zcmV<50wDc~P)fZwpk731 zuto5o2NeWGw4j(sYTG1sv&kmi-{+Cv5QKnrIJqxwkNe8_;Lg~8A9#J{(^)yHrA1p+?kn&GF#IgU%SZf@_y@dNV>F&aQn&>=#Q-|QJJ3=l#+ ztZodN=F|EZLj$Oq5;P10V1z6%Rb^EU(Xdp8fS?YHYP(@^t?@w6MT0gl9KZdf!!Xcc z-DGH2qi&5cIccVWZ5gg)iUz}zMJMmv4O&PsFa0rTlC}(|qGuE-pPSNjomi|4eU)9s z*2`ZhFI}W1qV}**P@X$o%2x;H7-$HZMJlqASkUKQ(y%Pe`Qv>|?F}AGIvm^>fRMu& zgNmxECg-xk>DQAJ-)LCswXtO8&iNOjmA!&wb%5ZY}JKx*aH&(jH#+q)~vF&Iy9(OgvRa09})3vvW{pnxHAxRMXHB}uF z7SjQOYsoMy1H9e7dDq4buR6E-<~jpCvBY%%NtjD~zclYC(Qv zR(TALhHnH^6(*4N?hzXmP-oYzt7h3?7&fnC5acpTvRRvQ$@F2cPC*)Q{ssGoVo4mR RrW^nO002ovPDHLkV1f=vMCAYg literal 0 HcmV?d00001 diff --git a/frontend/src/components/Avatar.tsx b/frontend/src/components/Avatar.tsx index 202be2070..7f8c5a935 100644 --- a/frontend/src/components/Avatar.tsx +++ b/frontend/src/components/Avatar.tsx @@ -5,7 +5,7 @@ export default function Avatar({ size, className, }: { - avatar: string | ReactNode; + avatar: ReactNode; size?: 'SMALL' | 'MEDIUM' | 'LARGE'; className: string; }) { diff --git a/frontend/src/conversation/ConversationBubble.tsx b/frontend/src/conversation/ConversationBubble.tsx index fc0044044..62e943dd0 100644 --- a/frontend/src/conversation/ConversationBubble.tsx +++ b/frontend/src/conversation/ConversationBubble.tsx @@ -16,6 +16,7 @@ import Like from '../assets/like.svg?react'; import Link from '../assets/link.svg'; import Sources from '../assets/sources.svg'; import Edit from '../assets/edit.svg'; +import UserIcon from '../assets/user.png'; import Avatar from '../components/Avatar'; import CopyButton from '../components/CopyButton'; import Sidebar from '../components/Sidebar'; @@ -90,9 +91,15 @@ const ConversationBubble = forwardRef< >
- + + } + /> {!isEditClicked && (
Edit From 4d38280cfaa1655891236c5ba7995630cf1d7e69 Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Wed, 4 Dec 2024 02:49:10 +0530 Subject: [PATCH 2/3] (fix:title) remove dino emoji --- frontend/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/index.html b/frontend/index.html index 5af1721b3..30faadc95 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -5,7 +5,7 @@ - DocsGPT 🦖 + DocsGPT From 0e4bd0679550e09735cada3ad9dc58ce6008cbde Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Thu, 5 Dec 2024 02:49:00 +0530 Subject: [PATCH 3/3] (feat:shared)add meta:og twitter tags --- frontend/package-lock.json | 51 ++++- frontend/package.json | 2 + .../src/conversation/SharedConversation.tsx | 182 ++++++++++-------- 3 files changed, 149 insertions(+), 86 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 253c0c6b7..0a97c542a 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -18,6 +18,7 @@ "react-copy-to-clipboard": "^5.1.0", "react-dom": "^18.3.1", "react-dropzone": "^14.2.3", + "react-helmet": "^6.1.0", "react-i18next": "^15.0.2", "react-markdown": "^9.0.1", "react-redux": "^8.0.5", @@ -30,6 +31,7 @@ "devDependencies": { "@types/react": "^18.0.27", "@types/react-dom": "^18.3.0", + "@types/react-helmet": "^6.1.11", "@types/react-syntax-highlighter": "^15.5.13", "@typescript-eslint/eslint-plugin": "^5.51.0", "@typescript-eslint/parser": "^5.62.0", @@ -1675,7 +1677,17 @@ "version": "18.3.0", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.0.tgz", "integrity": "sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==", - "devOptional": true, + "dev": true, + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/react-helmet": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@types/react-helmet/-/react-helmet-6.1.11.tgz", + "integrity": "sha512-0QcdGLddTERotCXo3VFlUSWO3ztraw8nZ6e3zJSgG7apwV5xt+pJUS8ewPBqT4NYB1optGLprNQzFleIY84u/g==", + "dev": true, + "license": "MIT", "dependencies": { "@types/react": "*" } @@ -2848,10 +2860,11 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -7844,6 +7857,27 @@ "react": ">= 16.8 || 18.0.0" } }, + "node_modules/react-fast-compare": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", + "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==", + "license": "MIT" + }, + "node_modules/react-helmet": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-6.1.0.tgz", + "integrity": "sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==", + "license": "MIT", + "dependencies": { + "object-assign": "^4.1.1", + "prop-types": "^15.7.2", + "react-fast-compare": "^3.1.1", + "react-side-effect": "^2.1.0" + }, + "peerDependencies": { + "react": ">=16.3.0" + } + }, "node_modules/react-i18next": { "version": "15.0.2", "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.0.2.tgz", @@ -7985,6 +8019,15 @@ "react-dom": ">=16.8" } }, + "node_modules/react-side-effect": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz", + "integrity": "sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==", + "license": "MIT", + "peerDependencies": { + "react": "^16.3.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/react-syntax-highlighter": { "version": "15.5.0", "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.5.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index 20da9f4ae..6fffd3844 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -29,6 +29,7 @@ "react-copy-to-clipboard": "^5.1.0", "react-dom": "^18.3.1", "react-dropzone": "^14.2.3", + "react-helmet": "^6.1.0", "react-i18next": "^15.0.2", "react-markdown": "^9.0.1", "react-redux": "^8.0.5", @@ -41,6 +42,7 @@ "devDependencies": { "@types/react": "^18.0.27", "@types/react-dom": "^18.3.0", + "@types/react-helmet": "^6.1.11", "@types/react-syntax-highlighter": "^15.5.13", "@typescript-eslint/eslint-plugin": "^5.51.0", "@typescript-eslint/parser": "^5.62.0", diff --git a/frontend/src/conversation/SharedConversation.tsx b/frontend/src/conversation/SharedConversation.tsx index c4cb17fb6..5ab1d639c 100644 --- a/frontend/src/conversation/SharedConversation.tsx +++ b/frontend/src/conversation/SharedConversation.tsx @@ -26,6 +26,7 @@ import { selectQueries, } from './sharedConversationSlice'; import { useSelector } from 'react-redux'; +import { Helmet } from 'react-helmet'; export const SharedConversation = () => { const navigate = useNavigate(); @@ -176,94 +177,111 @@ export const SharedConversation = () => { }, []); return ( -
-
-
-
-

- {title} -

-

- {t('sharedConv.subtitle')}{' '} - - DocsGPT - -

-

- {date} -

-
-
- {queries?.map((query, index) => { - return ( - - + <> + + {`DocsGPT | ${title}`} + + + + + + + +
+
+
+
+

+ {title} +

+

+ {t('sharedConv.subtitle')}{' '} + + DocsGPT + +

+

+ {date} +

+
+
+ {queries?.map((query, index) => { + return ( + + - {prepResponseView(query, index)} - - ); - })} + {prepResponseView(query, index)} + + ); + })} +
-
-
- {apiKey ? ( -
-
{ - if (e.key === 'Enter' && !e.shiftKey) { - e.preventDefault(); - handleQuestionSubmission(); - } - }} - >
- {status === 'loading' ? ( - - ) : ( -
+
+ {apiKey ? ( +
+
{ + if (e.key === 'Enter' && !e.shiftKey) { + e.preventDefault(); + handleQuestionSubmission(); + } + }} + >
+ {status === 'loading' ? ( -
- )} -
- ) : ( - - )} - - {t('sharedConv.meta')} - + ) : ( +
+ +
+ )} +
+ ) : ( + + )} + + {t('sharedConv.meta')} + +
-
+ ); };