Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Chakra V3 #752

Draft
wants to merge 32 commits into
base: main
Choose a base branch
from
Draft

Migrate to Chakra V3 #752

wants to merge 32 commits into from

Conversation

fadingNA
Copy link
Collaborator

@humphd @Amnish04 @tarasglek

@humphd
Copy link
Collaborator

humphd commented Nov 22, 2024

CloudFlare build failing:

2024-11-22T15:02:28.924135Z	Cloning repository...
2024-11-22T15:02:29.636546Z	From https://github.com/tarasglek/chatcraft.org
2024-11-22T15:02:29.637009Z	 * branch            b62c8e9e2a4e7a1be3d44ed2a8e9dfa8a58d104f -> FETCH_HEAD
2024-11-22T15:02:29.63717Z	
2024-11-22T15:02:29.682634Z	HEAD is now at b62c8e9 add clipboard to ModelSetting Preference, and Tooltip
2024-11-22T15:02:29.683018Z	
2024-11-22T15:02:29.758749Z	
2024-11-22T15:02:29.759256Z	Using v2 root directory strategy
2024-11-22T15:02:29.779387Z	Success: Finished cloning repository files
2024-11-22T15:02:31.305636Z	Checking for configuration in a wrangler.toml configuration file (BETA)
2024-11-22T15:02:31.306402Z	
2024-11-22T15:02:31.40737Z	No wrangler.toml file found. Continuing.
2024-11-22T15:02:31.49367Z	Restoring from dependencies cache
2024-11-22T15:02:31.510953Z	Restoring from build output cache
2024-11-22T15:02:31.768152Z	Detected the following tools from environment: [email protected], [email protected]
2024-11-22T15:02:31.768893Z	Installing nodejs 20.17.0
2024-11-22T15:02:32.633198Z	Trying to update node-build... ok
2024-11-22T15:02:32.73216Z	To follow progress, use 'tail -f /tmp/node-build.20241122150232.491.log' or pass --verbose
2024-11-22T15:02:32.829667Z	Downloading node-v20.17.0-linux-x64.tar.gz...
2024-11-22T15:02:33.074104Z	-> https://nodejs.org/dist/v20.17.0/node-v20.17.0-linux-x64.tar.gz
2024-11-22T15:02:34.925359Z	
2024-11-22T15:02:34.925636Z	WARNING: node-v20.17.0-linux-x64 is in LTS Maintenance mode and nearing its end of life.
2024-11-22T15:02:34.925779Z	It only receives *critical* security updates, *critical* bug fixes and documentation updates.
2024-11-22T15:02:34.925929Z	
2024-11-22T15:02:34.926042Z	Installing node-v20.17.0-linux-x64...
2024-11-22T15:02:35.311174Z	Installed node-v20.17.0-linux-x64 to /opt/buildhome/.asdf/installs/nodejs/20.17.0
2024-11-22T15:02:35.311394Z	
2024-11-22T15:02:36.610779Z	Preparing [email protected] for immediate activation...
2024-11-22T15:02:38.15548Z	! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing [email protected]+sha512.7c2ea089e1a6af306409c4fc8c4f0897bdac32b772016196c469d9428f1fe2d5a21daf8ad6512762654ac645b5d9136bb210ec9a00afa8dbc4677843ba362ecd.
2024-11-22T15:02:38.155745Z	! For more details about this field, consult the documentation at https://nodejs.org/api/packages.html#packagemanager
2024-11-22T15:02:38.155987Z	
2024-11-22T15:02:38.609736Z	Installing project dependencies: pnpm install
2024-11-22T15:02:39.307511Z	Lockfile is up to date, resolution step is skipped
2024-11-22T15:02:39.411128Z	Progress: resolved 1, reused 0, downloaded 0, added 0
2024-11-22T15:02:39.710716Z	Packages: +1333
2024-11-22T15:02:39.711018Z	++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2024-11-22T15:02:40.412159Z	Progress: resolved 1333, reused 0, downloaded 62, added 62
2024-11-22T15:02:41.417119Z	Progress: resolved 1333, reused 0, downloaded 268, added 266
2024-11-22T15:02:42.417547Z	Progress: resolved 1333, reused 0, downloaded 377, added 365
2024-11-22T15:02:43.417538Z	Progress: resolved 1333, reused 0, downloaded 532, added 529
2024-11-22T15:02:44.417877Z	Progress: resolved 1333, reused 0, downloaded 676, added 674
2024-11-22T15:02:45.417346Z	Progress: resolved 1333, reused 0, downloaded 764, added 755
2024-11-22T15:02:46.418414Z	Progress: resolved 1333, reused 0, downloaded 1069, added 1069
2024-11-22T15:02:47.419041Z	Progress: resolved 1333, reused 0, downloaded 1308, added 1308
2024-11-22T15:02:48.420147Z	Progress: resolved 1333, reused 0, downloaded 1332, added 1332
2024-11-22T15:02:48.585176Z	Progress: resolved 1333, reused 0, downloaded 1333, added 1333, done
2024-11-22T15:02:48.928261Z	.../node_modules/iframe-resizer postinstall$ node bin/post.js
2024-11-22T15:02:48.962637Z	.../[email protected]/node_modules/esbuild postinstall$ node install.js
2024-11-22T15:02:48.963529Z	.../[email protected]/node_modules/esbuild postinstall$ node install.js
2024-11-22T15:02:48.963718Z	.../node_modules/workerd postinstall$ node install.js
2024-11-22T15:02:49.012744Z	.../node_modules/iframe-resizer postinstall: ====================================================================
2024-11-22T15:02:49.013742Z	.../node_modules/iframe-resizer postinstall:                           IFRAME-RESIZER 5                          
2024-11-22T15:02:49.014392Z	.../node_modules/iframe-resizer postinstall:   Iframe-Resizer 5 is now available via the following two packages:
2024-11-22T15:02:49.014519Z	.../node_modules/iframe-resizer postinstall:    * @iframe-resizer/parent
2024-11-22T15:02:49.01496Z	.../node_modules/iframe-resizer postinstall:    * @iframe-resizer/child
2024-11-22T15:02:49.015099Z	.../node_modules/iframe-resizer postinstall:   Additionally their are also new versions of iframe-resizer for
2024-11-22T15:02:49.015247Z	.../node_modules/iframe-resizer postinstall:   React, Vue, and jQuery.
2024-11-22T15:02:49.015414Z	.../node_modules/iframe-resizer postinstall:   Version 5 of iframe-resizer has been extensively rewritten to
2024-11-22T15:02:49.015608Z	.../node_modules/iframe-resizer postinstall:   use modern browser APIs, which has enabled significantly better
2024-11-22T15:02:49.015756Z	.../node_modules/iframe-resizer postinstall:   performance and greater accuracy in the detection of content
2024-11-22T15:02:49.015965Z	.../node_modules/iframe-resizer postinstall:   resizing events.
2024-11-22T15:02:49.016172Z	.../node_modules/iframe-resizer postinstall:   Please see https://iframe-resizer.com/upgrade for more details.
2024-11-22T15:02:49.016322Z	.../node_modules/iframe-resizer postinstall: ====================================================================
2024-11-22T15:02:49.018127Z	.../node_modules/iframe-resizer postinstall: Done
2024-11-22T15:02:49.057466Z	.../[email protected]/node_modules/esbuild postinstall: Done
2024-11-22T15:02:49.073654Z	.../[email protected]/node_modules/esbuild postinstall: Done
2024-11-22T15:02:49.106356Z	.../node_modules/workerd postinstall: Done
2024-11-22T15:02:49.847144Z	
2024-11-22T15:02:49.847451Z	dependencies:
2024-11-22T15:02:49.84759Z	+ @antonz/runno 0.6.1
2024-11-22T15:02:49.847705Z	+ @chakra-ui/react 3.2.0
2024-11-22T15:02:49.848657Z	+ @codemirror/lang-javascript 6.2.2
2024-11-22T15:02:49.849584Z	+ @codemirror/lang-yaml 6.1.1
2024-11-22T15:02:49.84971Z	+ @emotion/react 11.13.5
2024-11-22T15:02:49.849844Z	+ @emotion/styled 11.13.0
2024-11-22T15:02:49.849951Z	+ @eslint/compat 1.2.3
2024-11-22T15:02:49.850042Z	+ @szhsin/react-menu 4.2.2
2024-11-22T15:02:49.85012Z	+ @uiw/react-codemirror 4.23.6
2024-11-22T15:02:49.850215Z	+ browser-image-compression 2.0.2
2024-11-22T15:02:49.850296Z	+ compromise 14.14.2
2024-11-22T15:02:49.850372Z	+ cookie 1.0.1
2024-11-22T15:02:49.85046Z	+ dexie 4.0.10
2024-11-22T15:02:49.850555Z	+ dexie-export-import 4.1.4
2024-11-22T15:02:49.850642Z	+ dexie-react-hooks 1.1.7
2024-11-22T15:02:49.850741Z	+ esbuild-wasm 0.24.0
2024-11-22T15:02:49.850845Z	+ exponential-backoff 3.1.1
2024-11-22T15:02:49.850926Z	+ feed 4.2.2
2024-11-22T15:02:49.851013Z	+ framer-motion 11.11.1
2024-11-22T15:02:49.85109Z	+ get-video-id 4.1.7
2024-11-22T15:02:49.851273Z	+ html2canvas 1.4.1
2024-11-22T15:02:49.851366Z	+ iframe-resizer-react 1.1.1
2024-11-22T15:02:49.851445Z	+ jose 5.9.6
2024-11-22T15:02:49.851538Z	+ katex 0.16.11
2024-11-22T15:02:49.851631Z	+ linkedom 0.18.5
2024-11-22T15:02:49.85171Z	+ lodash-es 4.17.21
2024-11-22T15:02:49.851785Z	+ mammoth 1.8.0
2024-11-22T15:02:49.851889Z	+ mermaid 11.4.0
2024-11-22T15:02:49.851975Z	+ nanoid 5.0.8
2024-11-22T15:02:49.852059Z	+ next-themes 0.4.3
2024-11-22T15:02:49.852149Z	+ nomnoml 1.6.2
2024-11-22T15:02:49.852236Z	+ openai 4.67.1
2024-11-22T15:02:49.852321Z	+ p-limit 6.1.0
2024-11-22T15:02:49.852411Z	+ react 18.3.1
2024-11-22T15:02:49.852487Z	+ react-dom 18.3.1
2024-11-22T15:02:49.852583Z	+ react-dropzone 14.3.5
2024-11-22T15:02:49.852736Z	+ react-icons 5.3.0
2024-11-22T15:02:49.852868Z	+ react-markdown 9.0.1
2024-11-22T15:02:49.852973Z	+ react-router-dom 6.26.2
2024-11-22T15:02:49.853059Z	+ react-syntax-highlighter 15.6.1
2024-11-22T15:02:49.853137Z	+ react-textarea-autosize 8.5.5
2024-11-22T15:02:49.853214Z	+ react-use 17.5.1
2024-11-22T15:02:49.853295Z	+ rehype-external-links 3.0.0
2024-11-22T15:02:49.853372Z	+ rehype-katex 7.0.1
2024-11-22T15:02:49.853449Z	+ rehype-raw 7.0.0
2024-11-22T15:02:49.853547Z	+ rehype-sanitize 6.0.0
2024-11-22T15:02:49.853635Z	+ remark-gfm 4.0.0
2024-11-22T15:02:49.853727Z	+ remark-math 6.0.0
2024-11-22T15:02:49.853837Z	+ remove-markdown 0.5.5
2024-11-22T15:02:49.853919Z	+ tiktoken 1.0.17
2024-11-22T15:02:49.853996Z	+ typescript2openai 1.0.1
2024-11-22T15:02:49.854077Z	+ yaml 2.6.0
2024-11-22T15:02:49.854155Z	+ youtube-captions-scraper 2.0.3
2024-11-22T15:02:49.854231Z	
2024-11-22T15:02:49.854313Z	devDependencies:
2024-11-22T15:02:49.854395Z	+ @cloudflare/workers-types 4.20241112.0
2024-11-22T15:02:49.854473Z	+ @eslint/js 9.14.0
2024-11-22T15:02:49.85456Z	+ @types/lodash-es 4.17.12
2024-11-22T15:02:49.854652Z	+ @types/react 18.3.12
2024-11-22T15:02:49.854757Z	+ @types/react-dom 18.3.1
2024-11-22T15:02:49.854883Z	+ @types/react-syntax-highlighter 15.5.13
2024-11-22T15:02:49.854991Z	+ @types/remove-markdown 0.3.4
2024-11-22T15:02:49.855084Z	+ @typescript-eslint/eslint-plugin 8.14.0
2024-11-22T15:02:49.85519Z	+ @typescript-eslint/parser 8.14.0
2024-11-22T15:02:49.855284Z	+ @vitejs/plugin-react 4.3.3
2024-11-22T15:02:49.855379Z	+ eslint 9.14.0
2024-11-22T15:02:49.855484Z	+ eslint-config-prettier 9.1.0
2024-11-22T15:02:49.855587Z	+ eslint-plugin-import 2.31.0
2024-11-22T15:02:49.855679Z	+ eslint-plugin-jsx-a11y 6.10.2
2024-11-22T15:02:49.855773Z	+ eslint-plugin-prettier 5.2.1
2024-11-22T15:02:49.855891Z	+ eslint-plugin-react 7.37.2
2024-11-22T15:02:49.855976Z	+ eslint-plugin-react-hooks 5.1.0-rc-1460d67c-20241003
2024-11-22T15:02:49.856062Z	+ globals 15.12.0
2024-11-22T15:02:49.856151Z	+ husky 9.1.6
2024-11-22T15:02:49.856237Z	+ lint-staged 15.2.10
2024-11-22T15:02:49.856327Z	+ prettier 3.3.3
2024-11-22T15:02:49.856419Z	+ rollup-plugin-visualizer 5.12.0
2024-11-22T15:02:49.856521Z	+ typescript 5.6.3
2024-11-22T15:02:49.856621Z	+ typescript-eslint 8.14.0
2024-11-22T15:02:49.856716Z	+ vite 5.4.11
2024-11-22T15:02:49.856839Z	+ vite-plugin-node-polyfills 0.22.0
2024-11-22T15:02:49.856945Z	+ vite-plugin-pwa 0.21.0
2024-11-22T15:02:49.857044Z	+ vite-plugin-wasm 3.3.0
2024-11-22T15:02:49.857133Z	+ vite-tsconfig-paths 5.1.3
2024-11-22T15:02:49.857237Z	+ vitest 2.1.5
2024-11-22T15:02:49.857361Z	+ vitest-environment-miniflare 2.14.4
2024-11-22T15:02:49.857458Z	+ workbox-build 7.3.0
2024-11-22T15:02:49.85756Z	+ workbox-window 7.3.0
2024-11-22T15:02:49.85765Z	+ wrangler 3.87.0
2024-11-22T15:02:49.857749Z	
2024-11-22T15:02:49.899639Z	
2024-11-22T15:02:49.899891Z	> [email protected] prepare /opt/buildhome/repo
2024-11-22T15:02:49.899984Z	> husky
2024-11-22T15:02:49.900045Z	
2024-11-22T15:02:50.018598Z	Done in 11.1s
2024-11-22T15:02:50.106044Z	Executing user command: pnpm build
2024-11-22T15:02:50.734363Z	
2024-11-22T15:02:50.734655Z	> [email protected] build /opt/buildhome/repo
2024-11-22T15:02:50.734819Z	> tsc && vite build
2024-11-22T15:02:50.734947Z	
2024-11-22T15:03:08.150563Z	src/Function/FunctionEditor.tsx(1,15): error TS2305: Module '"@chakra-ui/react"' has no exported member 'useColorMode'.
2024-11-22T15:03:08.150899Z	src/Function/index.tsx(12,3): error TS2305: Module '"@chakra-ui/react"' has no exported member 'MenuButton'.
2024-11-22T15:03:08.151057Z	src/Function/index.tsx(13,3): error TS2305: Module '"@chakra-ui/react"' has no exported member 'MenuDivider'.
2024-11-22T15:03:08.151199Z	src/Function/index.tsx(15,3): error TS2305: Module '"@chakra-ui/react"' has no exported member 'MenuList'.
2024-11-22T15:03:08.151314Z	src/Function/index.tsx(44,11): error TS2339: Property 'isOpen' does not exist on type '{ open: boolean; onOpen: () => void; onClose: () => void; onToggle: () => void; }'.
2024-11-22T15:03:08.151547Z	src/Function/index.tsx(45,5): error TS2561: Object literal may only specify known properties, but 'defaultIsOpen' does not exist in type 'UseDisclosureProps'. Did you mean to write 'defaultOpen'?
2024-11-22T15:03:08.151684Z	src/Function/index.tsx(137,14): error TS2604: JSX element type 'Card' does not have any construct or call signatures.
2024-11-22T15:03:08.151831Z	src/Function/index.tsx(137,14): error TS2786: 'Card' cannot be used as a JSX component.
2024-11-22T15:03:08.151947Z	  Its type 'typeof import("/opt/buildhome/repo/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]__react-dom@18_xfq7tbja2woq2eay5usw3lr4ly/node_modules/@chakra-ui/react/dist/types/components/card/namespace")' is not a valid JSX element type.
2024-11-22T15:03:08.15208Z	src/Function/index.tsx(154,61): error TS2322: Type '{ children: string; fontSize: "md"; fontWeight: "bold"; noOfLines: number; }' is not assignable to type 'IntrinsicAttributes & TextProps & RefAttributes<HTMLParagraphElement>'.
2024-11-22T15:03:08.152192Z	  Property 'noOfLines' does not exist on type 'IntrinsicAttributes & TextProps & RefAttributes<HTMLParagraphElement>'.
2024-11-22T15:03:08.152298Z	src/Function/index.tsx(159,22): error TS2604: JSX element type 'Menu' does not have any construct or call signatures.
2024-11-22T15:03:08.152411Z	src/Function/index.tsx(159,22): error TS2786: 'Menu' cannot be used as a JSX component.
2024-11-22T15:03:08.152525Z	  Its type 'typeof import("/opt/buildhome/repo/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]__react-dom@18_xfq7tbja2woq2eay5usw3lr4ly/node_modules/@chakra-ui/react/dist/types/components/menu/namespace")' is not a valid JSX element type.
2024-11-22T15:03:08.152633Z	src/Function/index.tsx(168,27): error TS2322: Type '{ children: string; icon: Element; onClick: () => void; }' is not assignable to type 'IntrinsicAttributes & MenuItemProps & RefAttributes<HTMLDivElement>'.
2024-11-22T15:03:08.152755Z	  Property 'icon' does not exist on type 'IntrinsicAttributes & MenuItemProps & RefAttributes<HTMLDivElement>'. Did you mean '_icon'?
2024-11-22T15:03:08.152882Z	src/Function/index.tsx(174,27): error TS2322: Type '{ children: string; icon: Element; onClick: () => void; }' is not assignable to type 'IntrinsicAttributes & MenuItemProps & RefAttributes<HTMLDivElement>'.
2024-11-22T15:03:08.152983Z	  Property 'icon' does not exist on type 'IntrinsicAttributes & MenuItemProps & RefAttributes<HTMLDivElement>'. Did you mean '_icon'?
2024-11-22T15:03:08.153082Z	src/Function/index.tsx(182,27): error TS2322: Type '{ children: string; icon: Element; color: "red.400"; onClick: () => void; }' is not assignable to type 'IntrinsicAttributes & MenuItemProps & RefAttributes<HTMLDivElement>'.
2024-11-22T15:03:08.153202Z	  Property 'icon' does not exist on type 'IntrinsicAttributes & MenuItemProps & RefAttributes<HTMLDivElement>'. Did you mean '_icon'?
2024-11-22T15:03:08.153291Z	src/Function/index.tsx(201,16): error TS2604: JSX element type 'Card' does not have any construct or call signatures.
2024-11-22T15:03:08.153391Z	src/Function/index.tsx(201,16): error TS2786: 'Card' cannot be used as a JSX component.
2024-11-22T15:03:08.153502Z	  Its type 'typeof import("/opt/buildhome/repo/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]__react-dom@18_xfq7tbja2woq2eay5usw3lr4ly/node_modules/@chakra-ui/react/dist/types/components/card/namespace")' is not a valid JSX element type.
2024-11-22T15:03:08.153764Z	src/components/CodeHeader.tsx(36,11): error TS2339: Property 'onCopy' does not exist on type 'MachineApi<PropTypes>'.
2024-11-22T15:03:08.154049Z	src/components/MermaidPreview.tsx(13,11): error TS2339: Property 'onCopy' does not exist on type 'MachineApi<PropTypes>'.
2024-11-22T15:03:08.154187Z	src/components/MermaidPreview.tsx(13,52): error TS2559: Type '""' has no properties in common with type 'Optional<Omit<UserDefinedContext, "getRootNode">, "id">'.
2024-11-22T15:03:08.154298Z	src/components/Message/AppMessage/Instructions.tsx(155,53): error TS2538: Type 'string[]' cannot be used as an index type.
2024-11-22T15:03:08.154422Z	src/components/Message/AppMessage/index.tsx(16,6): error TS2604: JSX element type 'Avatar' does not have any construct or call signatures.
2024-11-22T15:03:08.154539Z	src/components/Message/AppMessage/index.tsx(16,6): error TS2786: 'Avatar' cannot be used as a JSX component.
2024-11-22T15:03:08.154736Z	  Its type 'typeof import("/opt/buildhome/repo/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]__react-dom@18_xfq7tbja2woq2eay5usw3lr4ly/node_modules/@chakra-ui/react/dist/types/components/avatar/namespace")' is not a valid JSX element type.
2024-11-22T15:03:08.154919Z	src/components/Message/FunctionResultMessage.tsx(21,6): error TS2604: JSX element type 'Avatar' does not have any construct or call signatures.
2024-11-22T15:03:08.155172Z	src/components/Message/FunctionResultMessage.tsx(21,6): error TS2786: 'Avatar' cannot be used as a JSX component.
2024-11-22T15:03:08.155322Z	  Its type 'typeof import("/opt/buildhome/repo/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]__react-dom@18_xfq7tbja2woq2eay5usw3lr4ly/node_modules/@chakra-ui/react/dist/types/components/avatar/namespace")' is not a valid JSX element type.
2024-11-22T15:03:08.155717Z	src/components/Message/FunctionResultMessage.tsx(34,10): error TS2604: JSX element type 'Checkbox' does not have any construct or call signatures.
2024-11-22T15:03:08.15586Z	src/components/Message/FunctionResultMessage.tsx(34,10): error TS2786: 'Checkbox' cannot be used as a JSX component.
2024-11-22T15:03:08.155963Z	  Its type 'typeof import("/opt/buildhome/repo/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]__react-dom@18_xfq7tbja2woq2eay5usw3lr4ly/node_modules/@chakra-ui/react/dist/types/components/checkbox/namespace")' is not a valid JSX element type.
2024-11-22T15:03:08.156063Z	src/components/Message/FunctionResultMessage.tsx(36,22): error TS7006: Parameter 'e' implicitly has an 'any' type.
2024-11-22T15:03:08.156183Z	src/components/Message/MessageBase.tsx(120,11): error TS2339: Property 'onCopy' does not exist on type 'MachineApi<PropTypes>'.
2024-11-22T15:03:08.156279Z	src/components/Message/MessageBase.tsx(120,35): error TS2559: Type 'string' has no properties in common with type 'Optional<Omit<UserDefinedContext, "getRootNode">, "id">'.
2024-11-22T15:03:08.156384Z	src/components/NomnomlPreview.tsx(11,11): error TS2339: Property 'onCopy' does not exist on type 'MachineApi<PropTypes>'.
2024-11-22T15:03:08.156482Z	src/components/NomnomlPreview.tsx(11,52): error TS2559: Type '""' has no properties in common with type 'Optional<Omit<UserDefinedContext, "getRootNode">, "id">'.
2024-11-22T15:03:08.156574Z	src/components/Preferences/DefaultSystemPrompt.tsx(57,18): error TS2322: Type '{ children: Element; hasArrow: true; placement: string; label: string; }' is not assignable to type 'IntrinsicAttributes & TooltipProps & RefAttributes<HTMLDivElement>'.
2024-11-22T15:03:08.156671Z	  Property 'hasArrow' does not exist on type 'IntrinsicAttributes & TooltipProps & RefAttributes<HTMLDivElement>'.
2024-11-22T15:03:08.156868Z	src/hooks/use-alert.tsx(38,7): error TS2349: This expression is not callable.
2024-11-22T15:03:08.157021Z	  Type 'CreateToasterReturn' has no call signatures.
2024-11-22T15:03:08.157125Z	src/hooks/use-alert.tsx(54,50): error TS2339: Property 'close' does not exist on type 'CreateToasterReturn'.
2024-11-22T15:03:08.157239Z	src/hooks/use-alert.tsx(56,26): error TS2349: This expression is not callable.
2024-11-22T15:03:08.157314Z	  Type 'CreateToasterReturn' has no call signatures.
2024-11-22T15:03:08.15742Z	src/hooks/use-alert.tsx(86,7): error TS2349: This expression is not callable.
2024-11-22T15:03:08.157534Z	  Type 'CreateToasterReturn' has no call signatures.
2024-11-22T15:03:08.157645Z	src/hooks/use-alert.tsx(100,7): error TS2349: This expression is not callable.
2024-11-22T15:03:08.157756Z	  Type 'CreateToasterReturn' has no call signatures.
2024-11-22T15:03:08.157877Z	src/hooks/use-alert.tsx(156,19): error TS2339: Property 'isActive' does not exist on type 'CreateToasterReturn'.
2024-11-22T15:03:08.15797Z	src/hooks/use-alert.tsx(160,16): error TS2349: This expression is not callable.
2024-11-22T15:03:08.158063Z	  Type 'CreateToasterReturn' has no call signatures.
2024-11-22T15:03:08.158168Z	src/hooks/use-alert.tsx(171,15): error TS2339: Property 'close' does not exist on type 'CreateToasterReturn'.
2024-11-22T15:03:08.158271Z	src/lib/ai.ts(2,42): error TS2307: Cannot find module 'openai/resources' or its corresponding type declarations.
2024-11-22T15:03:08.158367Z	src/lib/speech-recognition.ts(136,60): error TS2345: Argument of type 'import("/opt/buildhome/repo/node_modules/.pnpm/[email protected][email protected]/node_modules/openai/index").OpenAI' is not assignable to parameter of type 'import("/opt/buildhome/repo/node_modules/.pnpm/[email protected][email protected]/node_modules/openai/index").OpenAI'.
2024-11-22T15:03:08.158474Z	  Types have separate declarations of a private property '_options'.
2024-11-22T15:03:08.158726Z	src/lib/utils.ts(157,11): error TS2339: Property 'createStandaloneToast' does not exist on type 'typeof import("/opt/buildhome/repo/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]__react-dom@18_xfq7tbja2woq2eay5usw3lr4ly/node_modules/@chakra-ui/react/dist/types/index")'.
2024-11-22T15:03:08.198324Z	 ELIFECYCLE  Command failed with exit code 2.
2024-11-22T15:03:08.231104Z	Failed: Error while executing user command. Exited with error code: 2
2024-11-22T15:03:08.240903Z	Failed: build command exited with code: 1
2024-11-22T15:03:09.092463Z	Failed: error occurred while running build command

@fadingNA
Copy link
Collaborator Author

fadingNA commented Nov 22, 2024

Thanks for the log @humphd

let me fix these.

@humphd
Copy link
Collaborator

humphd commented Nov 22, 2024

Use pnpm build locally to reproduce

bump openai version

Migrate Function to use Chakra 3.0

Fixing CodeHeader Style Issue

Migrate Chakra3.0 to Mermaid Preview and Message Components

fixing Modal Setting style | Promptform adjustment aligning | Sidebar content Function Section

Adjust old toaster to use Chakra 3.0 Toaster | Comment ToastProgress Need to fix later
Copy link

cloudflare-workers-and-pages bot commented Nov 22, 2024

Deploying chatcraft-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: d77fe0f
Status: ✅  Deploy successful!
Preview URL: https://0f3830ed.console-overthinker-dev.pages.dev
Branch Preview URL: https://issue-701-v2.console-overthinker-dev.pages.dev

View logs

@fadingNA
Copy link
Collaborator Author

@humphd Preview some function might not be ready yet

Add function for webhandlers and customization

Fix recording microphone logical rendering

toast progress comment out for use a chakra3.0 toast.progress
Logo color change

Fixing Theme on DesktopPrompt
Fixing message themes

Theme | Icons

Fix bug new refresh page | theme icon | add badge

Fixing Prompt Form mobile/dekstop view

adjust theme in progress
@fadingNA
Copy link
Collaborator Author

  • Adding theme in progress

Screenshot 2024-11-22 at 11 49 51 PM

Copy link
Collaborator

@humphd humphd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to keep this PR from affecting so much. You're changing a lot of things beyond the ChakraUI code, and this isn't a great idea, since it means this change becomes a) un-reviewable; b) very hard to test; c) likely to regress.

Can I get a better understanding of why you have to change so much?

@@ -44,8 +44,9 @@
"mammoth": "^1.8.0",
"mermaid": "^11.4.0",
"nanoid": "^5.0.8",
"next-themes": "^0.4.3",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you introducing this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chakra 3.0 is removed 'useColorMode' function so we have to use this one instead as they suggested in the documents.

ref https://www.chakra-ui.com/docs/get-started/migration#removed-features

"nomnoml": "^1.6.2",
"openai": "^4.47.1",
"openai": "^4.73.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unrelated to this change, please don't touch unrelated code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me go back and check why I think might relate tothat we change mode to Bundler instead of Node

@@ -1,6 +1,7 @@
import { lazy, memo, useMemo, type ReactNode } from "react";
import { Card, CardBody, IconButton } from "@chakra-ui/react";
import { CardRoot, CardBody, IconButton } from "@chakra-ui/react";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you switching away from Card?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We either can use object 'Card' and then Card.Root, also the same CardBody equalvalent to Card.Body

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A goal here should be to create the least amount of code churn possible: if you can do things without changing existing code, that's to be preferred.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The components we have been using in prvious version most of them cannot use here.

we have to changed the way to call components to match new version.

the components that create inder component/ui/.. are from new version.

@fadingNA
Copy link
Collaborator Author

Everything we have on Chakra2.8 cannot transfer to Chakra3.0, lots of them are removed, and all of the styling we have most of them need to change to make it align.

In addition, major of the Chakra library is changed from we can call components from the modules, but now they created components for us to use it instead.

'alert'

modal -> dialog

All form removed -> Field

and more

@humphd
Copy link
Collaborator

humphd commented Nov 23, 2024

I get that lots needs to change. But I want to end up with a change we can accept. If you change too much in one go, this is going to be impossible to land.

Anything that can be done in follow-ups, I'd prefer you split out. Use your judgement (I'm not saying you're wrong), but I'm reading this PR and it makes me concerned.

@fadingNA
Copy link
Collaborator Author

Absolutely, Im totally agree with that, this one need big change on our code base.

From what I think we cannot even split to the small PR as well.

@fadingNA
Copy link
Collaborator Author

From what I am thinking, I think how bout we create pr like this

  1. Upgrade to Chakra UI 3.0
    The first pull request will contain only the updates required for upgrading to Chakra UI 3.0.

  2. Remove Deprecated Hooks and Components
    The second pull request will remove the hooks and components used in the older version of Chakra UI, detailing which components are affected.

  3. Introduce ChatBase Component
    The third pull request will include the ChatBase component, consisting of the Header and Sidebar, to ensure the application can run successfully.

  4. Add Core Components
    The fourth pull request will add the Messages component, Prompt form, and Send button.

  5. Styling Adjustments
    The fifth pull request will focus on adjusting the styling of the above components.

  6. Update Settings Modal
    The sixth pull request will include updates for the Settings modal.

  7. Adapt Changes for Mobile Component
    Repeat the above steps to adapt the changes for the Mobile component.

@humphd let me know what you think is a go or need to plan further more.

@humphd
Copy link
Collaborator

humphd commented Nov 28, 2024

@fadingNA I think I want to pause on this work. You've done an awesome job so far, and it's possible that we'll want to end up going this way. But at the moment, we don't have the bandwidth to review and fix regressions in a PR this large.

I think you've shown that the upgrade path to Chakra V3 is significant enough that we can basically consider it a rewrite, and if so, we should evaluate all the options.

I'll leave this open in case we decide to restart the work in the near future.

Thanks for your effort, and I'm sorry that we couldn't accept this right now.

@fadingNA
Copy link
Collaborator Author

@humphd Hi @humphd - Thank you so much for the response. I'm totally understand this is a big change. Let's leave this PR open in case we really want to migrate to 3.0 I think this PR will be a good resource to check for reference as your mentioned . In addition, if we give it a go to migrate chakra ui to 3.0 I'm happy to contribute on that again in the near future.

Non

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants