Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"devui",
"gitcode",
"jbolda",
"languagedetector",
"matechat",
"nanoevents",
"rolldown",
Expand Down
7 changes: 6 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.1.3/schema.json",
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
Expand All @@ -23,6 +23,11 @@
"quoteStyle": "double"
}
},
"css": {
"linter": {
"enabled": false
}
},
"assist": {
"enabled": true,
"actions": {
Expand Down
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,38 +52,38 @@
"react-syntax-highlighter": "^15.5.13"
},
"dependencies": {
"@tailwindcss/vite": "^4.1.11",
"@tailwindcss/vite": "^4.1.14",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"nanoevents": "^9.1.0",
"openai": "^5.11.0",
"openai": "^5.23.2",
"react-markdown": "^10.1.0",
"react-syntax-highlighter": "^15.6.1",
"react-syntax-highlighter": "^15.6.6",
"remark-gfm": "^4.0.1",
"remark-math": "^6.0.0",
"tailwind-merge": "^3.3.1"
},
"devDependencies": {
"@biomejs/biome": "^2.1.3",
"@testing-library/jest-dom": "^6.6.4",
"@biomejs/biome": "^2.2.4",
"@testing-library/jest-dom": "^6.9.0",
"@testing-library/react": "^16.3.0",
"@types/node": "^24.2.0",
"@types/react": "^19.1.9",
"@types/react-dom": "^19.1.7",
"@types/node": "^24.6.1",
"@types/react": "^19.1.17",
"@types/react-dom": "^19.1.11",
"@types/react-syntax-highlighter": "^15.5.13",
"@vitejs/plugin-react-swc": "^3.11.0",
"@vitejs/plugin-react": "^5.0.4",
"archons": "^0.2.13",
"chalk": "^5.5.0",
"chalk": "^5.6.2",
"happy-dom": "^18.0.1",
"lucide-react": "^0.536.0",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"shadcn": "2.9.3-canary.0",
"tailwindcss": "^4.1.11",
"tsdown": "^0.13.3",
"tsx": "^4.20.3",
"typescript": "^5.9.2",
"vite": "npm:rolldown-vite@^7.0.12",
"tailwindcss": "^4.1.14",
"tsdown": "^0.13.5",
"tsx": "^4.20.6",
"typescript": "^5.9.3",
"vite": "npm:rolldown-vite@^7.1.14",
"vite-plugin-dts": "^4.5.4",
"vite-plugin-lib-inject-css": "^2.2.2",
"vitest": "^3.2.4"
Expand Down
27 changes: 27 additions & 0 deletions playground/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Trae
.marscode
69 changes: 69 additions & 0 deletions playground/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

```js
export default tseslint.config([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...

// Remove tseslint.configs.recommended and replace with this
...tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
...tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
...tseslint.configs.stylisticTypeChecked,

// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
```

You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:

```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default tseslint.config([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
```
5 changes: 3 additions & 2 deletions playground/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MateChat React Playground</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/index.tsx"></script>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
34 changes: 21 additions & 13 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,32 @@
"type": "module",
"license": "MIT",
"author": {
"email": "fu050409@163.com",
"name": "苏向夜"
"email": "xu060805@gmail.com",
"name": "星弦语"
},
"scripts": {
"build": "vite build",
"dev": "vite"
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "biome check",
"preview": "vite preview"
},
"dependencies": {
"clsx": "^2.1.1"
"@tailwindcss/vite": "^4.1.14",
"clsx": "^2.1.1",
"i18next": "^25.5.3",
"i18next-browser-languagedetector": "^8.2.0",
"react-i18next": "^15.7.4",
"tailwindcss": "^4.1.14"
},
"devDependencies": {
"@tailwindcss/vite": "^4.1.11",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react-swc": "^3.10.2",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"tailwindcss": "^4.1.11",
"vite": "npm:rolldown-vite@^6.3.21"
"@biomejs/biome": "^2.2.4",
"@types/react": "^19.1.17",
"@types/react-dom": "^19.1.11",
"@vitejs/plugin-react": "^5.0.4",
"@vitejs/plugin-react-swc": "^4.1.0",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"typescript": "~5.8.3",
"vite": "npm:rolldown-vite@^7.1.14"
}
}
44 changes: 44 additions & 0 deletions playground/public/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 0 additions & 41 deletions playground/src/Activate.tsx

This file was deleted.

Loading
Loading