Skip to content

Commit fe87ab4

Browse files
committed
images in package approach
1 parent eefa4cc commit fe87ab4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+326
-52
lines changed

frontend/nextjs/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "gpt-researcher-ui",
33
"description": "GPT Researcher frontend as a React component",
4-
"version": "0.1.59",
4+
"version": "0.1.61",
55
"main": "dist/index.js",
66
"module": "dist/index.esm.js",
77
"types": "dist/index.d.ts",
@@ -10,8 +10,7 @@
1010
"styles/*",
1111
"app/globals.css",
1212
"components/Settings/App.css",
13-
"public/*",
14-
"src/utils/injectFavicons.ts"
13+
"src/assets/**/*"
1514
],
1615
"private": false,
1716
"scripts": {
@@ -59,6 +58,7 @@
5958
"@rollup/plugin-node-resolve": "^16.0.0",
6059
"@rollup/plugin-replace": "^6.0.2",
6160
"@rollup/plugin-typescript": "^12.1.2",
61+
"@rollup/plugin-url": "^8.0.2",
6262
"@types/jsdom": "^21.1.6",
6363
"@types/node": "^20",
6464
"@types/react": "^18",
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

frontend/nextjs/rollup.config.js

+7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import json from '@rollup/plugin-json';
77
import postcss from 'rollup-plugin-postcss';
88
import tailwindcss from 'tailwindcss';
99
import autoprefixer from 'autoprefixer';
10+
import url from '@rollup/plugin-url';
1011

1112
const removeUseClientPlugin = {
1213
name: 'remove-use-client',
@@ -46,6 +47,12 @@ export default {
4647
// { find: '@', replacement: path.resolve(__dirname, 'src') }
4748
// ]
4849
// }),
50+
url({
51+
// by default, rollup-plugin-url will include files up to 14kb
52+
limit: 14336, // Optional: Customize the file size limit (in bytes)
53+
include: ['**/*.svg', '**/*.png', '**/*.jpg', '**/*.jpeg', '**/*.gif', '**/*.ico'],
54+
publicPath: 'assets/'
55+
}),
4956
resolve({
5057
extensions: ['.js', '.jsx', '.ts', '.tsx'],
5158
browser: true, // Ensures it only includes browser-compatible modules

frontend/nextjs/src/GPTResearcher.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import Footer from "../components/Footer";
1414
import InputArea from "../components/ResearchBlocks/elements/InputArea";
1515
import HumanFeedback from "../components/HumanFeedback";
1616
import LoadingDots from "../components/LoadingDots";
17+
import { injectFavicons } from './utils/injectFavicons';
1718

1819
export interface GPTResearcherProps {
1920
apiUrl?: string;
@@ -51,6 +52,10 @@ export const GPTResearcher = ({
5152
const [showScrollButton, setShowScrollButton] = useState(false);
5253
const mainContentRef = useRef<HTMLDivElement>(null);
5354

55+
useEffect(() => {
56+
injectFavicons();
57+
}, []);
58+
5459
// Update callback when results change
5560
useEffect(() => {
5661
if (onResultsChange && orderedData.length > 0) {
70.4 KB
Binary file not shown.

frontend/nextjs/src/assets/img/F.svg

+9
Loading
+14
Loading

frontend/nextjs/src/assets/img/W.svg

+9
Loading
Loading
Loading

frontend/nextjs/src/assets/img/browser.svg

+7
Loading

frontend/nextjs/src/assets/img/chat-check.svg

+7
Loading

frontend/nextjs/src/assets/img/chat.svg

+9
Loading
Loading
+10
Loading

0 commit comments

Comments
 (0)