Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
chore: Replace hard coded message ID with unique one
Daniel Avilac85602b93b0d
diff --git a/client/package-lock.json b/client/package-lock.jsonindex a5be4e97dc..5d4b6b7b9c 100644--- a/client/package-lock.json+++ b/client/package-lock.json@@ -39,7 +39,8 @@"swr": "^2.0.3","tailwind-merge": "^1.9.1","tailwindcss-animate": "^1.0.5",- "url": "^0.11.0"+ "url": "^0.11.0",+ "uuidv4": "^6.2.13"},"devDependencies": {"@babel/cli": "^7.20.7",@@ -3266,6 +3267,11 @@"resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz","integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA=="},+ "node_modules/@types/uuid": {+ "version": "8.3.4",+ "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz",+ "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw=="+ },"node_modules/@types/ws": {"version": "8.5.4","resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz",@@ -12573,11 +12579,19 @@"version": "8.3.2","resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz","integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",- "dev": true,"bin": {"uuid": "dist/bin/uuid"}},+ "node_modules/uuidv4": {+ "version": "6.2.13",+ "resolved": "https://registry.npmjs.org/uuidv4/-/uuidv4-6.2.13.tgz",+ "integrity": "sha512-AXyzMjazYB3ovL3q051VLH06Ixj//Knx7QnUSi1T//Ie3io6CpsPu9nVMOx5MoLWh6xV0B9J0hIaxungxXUbPQ==",+ "dependencies": {+ "@types/uuid": "8.3.4",+ "uuid": "8.3.2"+ }+ },"node_modules/uvu": {"version": "0.5.6","resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz",@@ -15295,6 +15309,11 @@"resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz","integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA=="},+ "@types/uuid": {+ "version": "8.3.4",+ "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz",+ "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw=="+ },"@types/ws": {"version": "8.5.4","resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz",@@ -21929,8 +21948,16 @@"uuid": {"version": "8.3.2","resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",- "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",- "dev": true+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="+ },+ "uuidv4": {+ "version": "6.2.13",+ "resolved": "https://registry.npmjs.org/uuidv4/-/uuidv4-6.2.13.tgz",+ "integrity": "sha512-AXyzMjazYB3ovL3q051VLH06Ixj//Knx7QnUSi1T//Ie3io6CpsPu9nVMOx5MoLWh6xV0B9J0hIaxungxXUbPQ==",+ "requires": {+ "@types/uuid": "8.3.4",+ "uuid": "8.3.2"+ }},"uvu": {"version": "0.5.6",diff --git a/client/package.json b/client/package.jsonindex 59db175599..43aafea595 100644--- a/client/package.json+++ b/client/package.json@@ -49,7 +49,8 @@"swr": "^2.0.3","tailwind-merge": "^1.9.1","tailwindcss-animate": "^1.0.5",- "url": "^0.11.0"+ "url": "^0.11.0",+ "uuidv4": "^6.2.13"},"devDependencies": {"@babel/cli": "^7.20.7",diff --git a/client/src/utils/handleSubmit.js b/client/src/utils/handleSubmit.jsindex 32a7d54ea5..897e94d6c4 100644--- a/client/src/utils/handleSubmit.js+++ b/client/src/utils/handleSubmit.js@@ -6,6 +6,7 @@ import { setMessages } from '~/store/messageSlice';import { setSubmitState, setSubmission } from '~/store/submitSlice';import { setText } from '~/store/textSlice';import { setError } from '~/store/convoSlice';+import {v4} from 'uuid';const useMessageHandler = () => {const dispatch = useDispatch();@@ -27,7 +28,7 @@ const useMessageHandler = () => {// this is not a real messageId, it is used as placeholder before real messageId returnedtext = text.trim();- const fakeMessageId = '11111111-1111-1111-1111-111111111111';+ const fakeMessageId = v4();const isCustomModel = model === 'chatgptCustom' || !initial[model];const sender = model === 'chatgptCustom' ? chatGptLabel : model;parentMessageId = parentMessageId || latestMessage?.messageId || '00000000-0000-0000-0000-000000000000';