mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-02 08:06:38 +08:00
Merge remote-tracking branch 'upstream/main'
# Conflicts: # .dockerignore # package.json # yarn.lock
This commit is contained in:
commit
0b24508e3e
@ -1 +1,100 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Node.js dependencies
|
||||
/node_modules
|
||||
/jspm_packages
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
.env.test
|
||||
|
||||
# local env files
|
||||
.env*.local
|
||||
|
||||
# Next.js build output
|
||||
.next
|
||||
out
|
||||
|
||||
# Nuxt.js build output
|
||||
.nuxt
|
||||
dist
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
public
|
||||
|
||||
# Vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# Temporary folders
|
||||
tmp
|
||||
temp
|
||||
|
||||
# IDE and editor directories
|
||||
.idea
|
||||
.vscode
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
|
||||
# OS generated files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# secret key
|
||||
*.key
|
||||
*.key.pub
|
||||
|
||||
# node
|
||||
node_modules
|
||||
|
@ -216,7 +216,7 @@ If you do not want users to use GPT-4, set this value to 1.
|
||||
|
||||
> Default: Empty
|
||||
|
||||
If you do want users to query balance, set this value to 1, or you should set it to 0.
|
||||
If you do want users to query balance, set this value to 1.
|
||||
|
||||
### `DISABLE_FAST_LINK` (optional)
|
||||
|
||||
|
@ -116,9 +116,27 @@ function escapeDollarNumber(text: string) {
|
||||
return escapedText;
|
||||
}
|
||||
|
||||
function escapeBrackets(text: string) {
|
||||
const pattern =
|
||||
/(```[\s\S]*?```|`.*?`)|\\\[([\s\S]*?[^\\])\\\]|\\\((.*?)\\\)/g;
|
||||
return text.replace(
|
||||
pattern,
|
||||
(match, codeBlock, squareBracket, roundBracket) => {
|
||||
if (codeBlock) {
|
||||
return codeBlock;
|
||||
} else if (squareBracket) {
|
||||
return `$$${squareBracket}$$`;
|
||||
} else if (roundBracket) {
|
||||
return `$${roundBracket}$`;
|
||||
}
|
||||
return match;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
function _MarkDownContent(props: { content: string }) {
|
||||
const escapedContent = useMemo(
|
||||
() => escapeDollarNumber(props.content),
|
||||
() => escapeBrackets(escapeDollarNumber(props.content)),
|
||||
[props.content],
|
||||
);
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
"bcryptjs": "^2.4.3",
|
||||
"cron": "^3.1.6",
|
||||
"echarts": "^5.4.3",
|
||||
"emoji-picker-react": "^4.7.10",
|
||||
"emoji-picker-react": "^4.9.2",
|
||||
"fuse.js": "^7.0.0",
|
||||
"html-to-image": "^1.11.11",
|
||||
"mermaid": "^10.7.0",
|
||||
@ -56,12 +56,12 @@
|
||||
"zustand": "^4.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "^1.5.8",
|
||||
"@tauri-apps/cli": "1.5.11",
|
||||
"@types/node": "^20.11.30",
|
||||
"@types/react": "^18.2.70",
|
||||
"@types/bcryptjs": "^2.4.6",
|
||||
"@types/cookie": "^0.6.0",
|
||||
"@types/node": "^20.11.10",
|
||||
"@types/nodemailer": "^6.4.14",
|
||||
"@types/react": "^18.2.48",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"@types/react-highlight-words": "^0.16.7",
|
||||
"@types/react-katex": "^3.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user