From 538a2a144a7075c89574e2c87234ddc86ca80e4d Mon Sep 17 00:00:00 2001 From: Ruben Talstra Date: Wed, 19 Feb 2025 19:33:29 +0100 Subject: [PATCH 1/7] =?UTF-8?q?=F0=9F=94=92=20fix:=202FA=20Encrypt=20TOTP?= =?UTF-8?q?=20Secrets=20&=20Improve=20Docs=20(#5933)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ๐Ÿ”’ fix: Integrate TOTP secret retrieval and encryption in Two-Factor Authentication * ๐Ÿ”’ refactor: Simplify TOTP verification by removing commented-out code --- api/server/controllers/TwoFactorController.js | 24 +++-- .../auth/TwoFactorAuthController.js | 10 +- api/server/services/twoFactorService.js | 91 +++++++++++++------ 3 files changed, 84 insertions(+), 41 deletions(-) diff --git a/api/server/controllers/TwoFactorController.js b/api/server/controllers/TwoFactorController.js index 3e8d38ac12..f145d69d92 100644 --- a/api/server/controllers/TwoFactorController.js +++ b/api/server/controllers/TwoFactorController.js @@ -3,9 +3,11 @@ const { verifyBackupCode, generateTOTPSecret, generateBackupCodes, + getTOTPSecret, } = require('~/server/services/twoFactorService'); const { updateUser, getUserById } = require('~/models'); const { logger } = require('~/config'); +const { encryptV2 } = require('~/server/utils/crypto'); const enable2FAController = async (req, res) => { const safeAppTitle = (process.env.APP_TITLE || 'LibreChat').replace(/\s+/g, ''); @@ -15,7 +17,8 @@ const enable2FAController = async (req, res) => { const secret = generateTOTPSecret(); const { plainCodes, codeObjects } = await generateBackupCodes(); - const user = await updateUser(userId, { totpSecret: secret, backupCodes: codeObjects }); + const encryptedSecret = await encryptV2(secret); + const user = await updateUser(userId, { totpSecret: encryptedSecret, backupCodes: codeObjects }); const otpauthUrl = `otpauth://totp/${safeAppTitle}:${user.email}?secret=${secret}&issuer=${safeAppTitle}`; @@ -38,14 +41,16 @@ const verify2FAController = async (req, res) => { return res.status(400).json({ message: '2FA not initiated' }); } - let verified = false; - if (token && (await verifyTOTP(user.totpSecret, token))) { + // Retrieve the plain TOTP secret using getTOTPSecret. + const secret = await getTOTPSecret(user.totpSecret); + + if (token && (await verifyTOTP(secret, token))) { return res.status(200).json(); } else if (backupCode) { - verified = await verifyBackupCode({ user, backupCode }); - } - if (verified) { - return res.status(200).json(); + const verified = await verifyBackupCode({ user, backupCode }); + if (verified) { + return res.status(200).json(); + } } return res.status(400).json({ message: 'Invalid token.' }); @@ -65,7 +70,10 @@ const confirm2FAController = async (req, res) => { return res.status(400).json({ message: '2FA not initiated' }); } - if (await verifyTOTP(user.totpSecret, token)) { + // Retrieve the plain TOTP secret using getTOTPSecret. + const secret = await getTOTPSecret(user.totpSecret); + + if (await verifyTOTP(secret, token)) { return res.status(200).json(); } diff --git a/api/server/controllers/auth/TwoFactorAuthController.js b/api/server/controllers/auth/TwoFactorAuthController.js index 37a8045829..78c5c0314e 100644 --- a/api/server/controllers/auth/TwoFactorAuthController.js +++ b/api/server/controllers/auth/TwoFactorAuthController.js @@ -1,5 +1,5 @@ const jwt = require('jsonwebtoken'); -const { verifyTOTP, verifyBackupCode } = require('~/server/services/twoFactorService'); +const { verifyTOTP, verifyBackupCode, getTOTPSecret } = require('~/server/services/twoFactorService'); const { setAuthTokens } = require('~/server/services/AuthService'); const { getUserById } = require('~/models/userMethods'); const { logger } = require('~/config'); @@ -24,9 +24,11 @@ const verify2FA = async (req, res) => { return res.status(400).json({ message: '2FA is not enabled for this user' }); } - let verified = false; + // Use the new getTOTPSecret function to retrieve (and decrypt if necessary) the TOTP secret. + const secret = await getTOTPSecret(user.totpSecret); - if (token && (await verifyTOTP(user.totpSecret, token))) { + let verified = false; + if (token && (await verifyTOTP(secret, token))) { verified = true; } else if (backupCode) { verified = await verifyBackupCode({ user, backupCode }); @@ -39,7 +41,7 @@ const verify2FA = async (req, res) => { // Prepare user data for response. // If the user is a plain object (from lean queries), we create a shallow copy. const userData = user.toObject ? user.toObject() : { ...user }; - // Remove sensitive fields + // Remove sensitive fields. delete userData.password; delete userData.__v; delete userData.totpSecret; diff --git a/api/server/services/twoFactorService.js b/api/server/services/twoFactorService.js index ac7247409c..e48b2ac938 100644 --- a/api/server/services/twoFactorService.js +++ b/api/server/services/twoFactorService.js @@ -1,14 +1,15 @@ const { sign } = require('jsonwebtoken'); const { webcrypto } = require('node:crypto'); -const { hashBackupCode } = require('~/server/utils/crypto'); +const { hashBackupCode, decryptV2 } = require('~/server/utils/crypto'); const { updateUser } = require('~/models/userMethods'); const BASE32_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'; /** - * Encodes a Buffer into a Base32 string using RFC 4648 alphabet. + * Encodes a Buffer into a Base32 string using the RFC 4648 alphabet. + * * @param {Buffer} buffer - The buffer to encode. - * @returns {string} - The Base32 encoded string. + * @returns {string} The Base32 encoded string. */ const encodeBase32 = (buffer) => { let bits = 0; @@ -30,8 +31,9 @@ const encodeBase32 = (buffer) => { /** * Decodes a Base32-encoded string back into a Buffer. - * @param {string} base32Str - * @returns {Buffer} + * + * @param {string} base32Str - The Base32-encoded string. + * @returns {Buffer} The decoded buffer. */ const decodeBase32 = (base32Str) => { const cleaned = base32Str.replace(/=+$/, '').toUpperCase(); @@ -54,15 +56,20 @@ const decodeBase32 = (base32Str) => { }; /** - * Generate a temporary token for 2FA verification. - * This token is signed with JWT_SECRET and expires in 5 minutes. + * Generates a temporary token for 2FA verification. + * The token is signed with the JWT_SECRET and expires in 5 minutes. + * + * @param {string} userId - The unique identifier of the user. + * @returns {string} The signed JWT token. */ const generate2FATempToken = (userId) => sign({ userId, twoFAPending: true }, process.env.JWT_SECRET, { expiresIn: '5m' }); /** - * Generate a TOTP secret. - * Generates 10 random bytes using WebCrypto and encodes them into a Base32 string. + * Generates a TOTP secret. + * Creates 10 random bytes using WebCrypto and encodes them into a Base32 string. + * + * @returns {string} A Base32-encoded secret for TOTP. */ const generateTOTPSecret = () => { const randomArray = new Uint8Array(10); @@ -71,12 +78,12 @@ const generateTOTPSecret = () => { }; /** - * Generate a TOTP code based on the secret and current time. - * Uses a 30-second time step and generates a 6-digit code. + * Generates a Time-based One-Time Password (TOTP) based on the provided secret and time. + * This implementation uses a 30-second time step and produces a 6-digit code. * - * @param {string} secret - Base32-encoded secret - * @param {number} [forTime=Date.now()] - Time in milliseconds - * @returns {Promise} - The 6-digit TOTP code. + * @param {string} secret - The Base32-encoded TOTP secret. + * @param {number} [forTime=Date.now()] - The time (in milliseconds) for which to generate the TOTP. + * @returns {Promise} A promise that resolves to the 6-digit TOTP code. */ const generateTOTP = async (secret, forTime = Date.now()) => { const timeStep = 30; // seconds @@ -106,6 +113,7 @@ const generateTOTP = async (secret, forTime = Date.now()) => { const signatureBuffer = await webcrypto.subtle.sign('HMAC', cryptoKey, counterBuffer); const hmac = new Uint8Array(signatureBuffer); + // Dynamic truncation as per RFC 4226 const offset = hmac[hmac.length - 1] & 0xf; const slice = hmac.slice(offset, offset + 4); const view = new DataView(slice.buffer, slice.byteOffset, slice.byteLength); @@ -115,12 +123,12 @@ const generateTOTP = async (secret, forTime = Date.now()) => { }; /** - * Verify a provided TOTP token against the secret. - * Allows for a ยฑ1 time-step window. + * Verifies a provided TOTP token against the secret. + * It allows for a ยฑ1 time-step window to account for slight clock discrepancies. * - * @param {string} secret - * @param {string} token - * @returns {Promise} + * @param {string} secret - The Base32-encoded TOTP secret. + * @param {string} token - The TOTP token provided by the user. + * @returns {Promise} A promise that resolves to true if the token is valid; otherwise, false. */ const verifyTOTP = async (secret, token) => { const timeStepMS = 30 * 1000; @@ -135,12 +143,13 @@ const verifyTOTP = async (secret, token) => { }; /** - * Generate backup codes. - * Generates `count` backup code objects and returns an object with both plain codes - * (for one-time download) and their objects (for secure storage). Uses WebCrypto for randomness and hashing. + * Generates backup codes for two-factor authentication. + * Each backup code is an 8-character hexadecimal string along with its SHA-256 hash. + * The plain codes are returned for one-time download, while the hashed objects are meant for secure storage. * - * @param {number} count - Number of backup codes to generate (default: 10). - * @returns {Promise} - Contains `plainCodes` (array of strings) and `codeObjects` (array of objects). + * @param {number} [count=10] - The number of backup codes to generate. + * @returns {Promise<{ plainCodes: string[], codeObjects: Array<{ codeHash: string, used: boolean, usedAt: Date | null }> }>} + * A promise that resolves to an object containing both plain backup codes and their corresponding code objects. */ const generateBackupCodes = async (count = 10) => { const plainCodes = []; @@ -165,11 +174,12 @@ const generateBackupCodes = async (count = 10) => { }; /** - * Verifies a backup code and updates the user's backup codes if valid - * @param {Object} params - * @param {TUser | undefined} [params.user] - The user object - * @param {string | undefined} [params.backupCode] - The backup code to verify - * @returns {Promise} - Whether the backup code was valid + * Verifies a backup code for a user and updates its status as used if valid. + * + * @param {Object} params - The parameters object. + * @param {TUser | undefined} [params.user] - The user object containing backup codes. + * @param {string | undefined} [params.backupCode] - The backup code to verify. + * @returns {Promise} A promise that resolves to true if the backup code is valid and updated; otherwise, false. */ const verifyBackupCode = async ({ user, backupCode }) => { if (!backupCode || !user || !Array.isArray(user.backupCodes)) { @@ -195,9 +205,32 @@ const verifyBackupCode = async ({ user, backupCode }) => { return false; }; +/** + * Retrieves and, if necessary, decrypts a stored TOTP secret. + * If the secret contains a colon, it is assumed to be in the format "iv:encryptedData" and will be decrypted. + * If the secret is exactly 16 characters long, it is assumed to be a legacy plain secret. + * + * @param {string|null} storedSecret - The stored TOTP secret (which may be encrypted). + * @returns {Promise} A promise that resolves to the plain TOTP secret, or null if none is provided. + */ +const getTOTPSecret = async (storedSecret) => { + if (!storedSecret) { return null; } + // Check for a colon marker (encrypted secrets are stored as "iv:encryptedData") + if (storedSecret.includes(':')) { + return await decryptV2(storedSecret); + } + // If it's exactly 16 characters, assume it's already plain (legacy secret) + if (storedSecret.length === 16) { + return storedSecret; + } + // Fallback in case it doesn't meet our criteria. + return storedSecret; +}; + module.exports = { verifyTOTP, generateTOTP, + getTOTPSecret, verifyBackupCode, generateTOTPSecret, generateBackupCodes, From fdb3cf3f583c63c7bef67c267878d61eeec0553e Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Wed, 19 Feb 2025 14:53:22 -0500 Subject: [PATCH 2/7] =?UTF-8?q?=F0=9F=94=A7=20fix:=20Resizable=20Panel=20U?= =?UTF-8?q?nmount=20Error=20&=20Code=20Env.=20File=20Re-Upload=20(#5947)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ๐Ÿ”ง refactor: handle full path for code env. file re-upload * fix: update react-resizable-panels to version 2.1.7 to resolve error thrown on unmount of artifacts; ref: https://github.com/bvaughn/react-resizable-panels/issues/372 * refactor: replace promptPrefix with systemMessage in GoogleClient for improved clarity, and to prevent saving LibreChat feature-specific instructions to the user's custom instructions --- api/app/clients/GoogleClient.js | 20 +++++++++++--------- api/server/services/Files/Code/process.js | 2 +- api/server/services/Files/Firebase/crud.js | 3 ++- api/server/services/Files/Local/crud.js | 22 +++++++++++++++++++++- client/package.json | 6 +++--- package-lock.json | 20 ++++++++++---------- 6 files changed, 48 insertions(+), 25 deletions(-) diff --git a/api/app/clients/GoogleClient.js b/api/app/clients/GoogleClient.js index 03461a6796..a2ca02558b 100644 --- a/api/app/clients/GoogleClient.js +++ b/api/app/clients/GoogleClient.js @@ -51,7 +51,7 @@ class GoogleClient extends BaseClient { const serviceKey = creds[AuthKeys.GOOGLE_SERVICE_KEY] ?? {}; this.serviceKey = - serviceKey && typeof serviceKey === 'string' ? JSON.parse(serviceKey) : serviceKey ?? {}; + serviceKey && typeof serviceKey === 'string' ? JSON.parse(serviceKey) : (serviceKey ?? {}); /** @type {string | null | undefined} */ this.project_id = this.serviceKey.project_id; this.client_email = this.serviceKey.client_email; @@ -73,6 +73,8 @@ class GoogleClient extends BaseClient { * @type {string} */ this.outputTokensKey = 'output_tokens'; this.visionMode = VisionModes.generative; + /** @type {string} */ + this.systemMessage; if (options.skipSetOptions) { return; } @@ -184,7 +186,7 @@ class GoogleClient extends BaseClient { if (typeof this.options.artifactsPrompt === 'string' && this.options.artifactsPrompt) { promptPrefix = `${promptPrefix ?? ''}\n${this.options.artifactsPrompt}`.trim(); } - this.options.promptPrefix = promptPrefix; + this.systemMessage = promptPrefix; this.initializeClient(); return this; } @@ -314,7 +316,7 @@ class GoogleClient extends BaseClient { } this.augmentedPrompt = await this.contextHandlers.createContext(); - this.options.promptPrefix = this.augmentedPrompt + this.options.promptPrefix; + this.systemMessage = this.augmentedPrompt + this.systemMessage; } } @@ -361,8 +363,8 @@ class GoogleClient extends BaseClient { throw new Error('[GoogleClient] PaLM 2 and Codey models are no longer supported.'); } - if (this.options.promptPrefix) { - const instructionsTokenCount = this.getTokenCount(this.options.promptPrefix); + if (this.systemMessage) { + const instructionsTokenCount = this.getTokenCount(this.systemMessage); this.maxContextTokens = this.maxContextTokens - instructionsTokenCount; if (this.maxContextTokens < 0) { @@ -417,8 +419,8 @@ class GoogleClient extends BaseClient { ], }; - if (this.options.promptPrefix) { - payload.instances[0].context = this.options.promptPrefix; + if (this.systemMessage) { + payload.instances[0].context = this.systemMessage; } logger.debug('[GoogleClient] buildMessages', payload); @@ -464,7 +466,7 @@ class GoogleClient extends BaseClient { identityPrefix = `${identityPrefix}\nYou are ${this.options.modelLabel}`; } - let promptPrefix = (this.options.promptPrefix ?? '').trim(); + let promptPrefix = (this.systemMessage ?? '').trim(); if (identityPrefix) { promptPrefix = `${identityPrefix}${promptPrefix}`; @@ -648,7 +650,7 @@ class GoogleClient extends BaseClient { generationConfig: googleGenConfigSchema.parse(this.modelOptions), }; - const promptPrefix = (this.options.promptPrefix ?? '').trim(); + const promptPrefix = (this.systemMessage ?? '').trim(); if (promptPrefix.length) { requestOptions.systemInstruction = { parts: [ diff --git a/api/server/services/Files/Code/process.js b/api/server/services/Files/Code/process.js index ce8acf4ad3..c92e628589 100644 --- a/api/server/services/Files/Code/process.js +++ b/api/server/services/Files/Code/process.js @@ -209,7 +209,7 @@ const primeFiles = async (options, apiKey) => { const { handleFileUpload: uploadCodeEnvFile } = getStrategyFunctions( FileSources.execute_code, ); - const stream = await getDownloadStream(file.filepath); + const stream = await getDownloadStream(options.req, file.filepath); const fileIdentifier = await uploadCodeEnvFile({ req: options.req, stream, diff --git a/api/server/services/Files/Firebase/crud.js b/api/server/services/Files/Firebase/crud.js index 76a6c1d8d4..8319f908ef 100644 --- a/api/server/services/Files/Firebase/crud.js +++ b/api/server/services/Files/Firebase/crud.js @@ -224,10 +224,11 @@ async function uploadFileToFirebase({ req, file, file_id }) { /** * Retrieves a readable stream for a file from Firebase storage. * + * @param {ServerRequest} _req * @param {string} filepath - The filepath. * @returns {Promise} A readable stream of the file. */ -async function getFirebaseFileStream(filepath) { +async function getFirebaseFileStream(_req, filepath) { try { const storage = getFirebaseStorage(); if (!storage) { diff --git a/api/server/services/Files/Local/crud.js b/api/server/services/Files/Local/crud.js index 97a067d794..c2bb75c125 100644 --- a/api/server/services/Files/Local/crud.js +++ b/api/server/services/Files/Local/crud.js @@ -286,11 +286,31 @@ async function uploadLocalFile({ req, file, file_id }) { /** * Retrieves a readable stream for a file from local storage. * + * @param {ServerRequest} req - The request object from Express * @param {string} filepath - The filepath. * @returns {ReadableStream} A readable stream of the file. */ -function getLocalFileStream(filepath) { +function getLocalFileStream(req, filepath) { try { + if (filepath.includes('/uploads/')) { + const basePath = filepath.split('/uploads/')[1]; + + if (!basePath) { + logger.warn(`Invalid base path: ${filepath}`); + throw new Error(`Invalid file path: ${filepath}`); + } + + const fullPath = path.join(req.app.locals.paths.uploads, basePath); + const uploadsDir = req.app.locals.paths.uploads; + + const rel = path.relative(uploadsDir, fullPath); + if (rel.startsWith('..') || path.isAbsolute(rel) || rel.includes(`..${path.sep}`)) { + logger.warn(`Invalid relative file path: ${filepath}`); + throw new Error(`Invalid file path: ${filepath}`); + } + + return fs.createReadStream(fullPath); + } return fs.createReadStream(filepath); } catch (error) { logger.error('Error getting local file stream:', error); diff --git a/client/package.json b/client/package.json index 917333ce25..df85c2521c 100644 --- a/client/package.json +++ b/client/package.json @@ -66,8 +66,8 @@ "html-to-image": "^1.11.11", "i18next": "^24.2.2", "i18next-browser-languagedetector": "^8.0.3", - "js-cookie": "^3.0.5", "input-otp": "^1.4.2", + "js-cookie": "^3.0.5", "librechat-data-provider": "*", "lodash": "^4.17.21", "lucide-react": "^0.394.0", @@ -86,7 +86,7 @@ "react-i18next": "^15.4.0", "react-lazy-load-image-component": "^1.6.0", "react-markdown": "^9.0.1", - "react-resizable-panels": "^2.1.1", + "react-resizable-panels": "^2.1.7", "react-router-dom": "^6.11.2", "react-speech-recognition": "^3.10.0", "react-textarea-autosize": "^8.4.0", @@ -144,4 +144,4 @@ "vite-plugin-node-polyfills": "^0.17.0", "vite-plugin-pwa": "^0.21.1" } -} \ No newline at end of file +} diff --git a/package-lock.json b/package-lock.json index 802cedd19e..ef573d7010 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1095,7 +1095,7 @@ "react-i18next": "^15.4.0", "react-lazy-load-image-component": "^1.6.0", "react-markdown": "^9.0.1", - "react-resizable-panels": "^2.1.1", + "react-resizable-panels": "^2.1.7", "react-router-dom": "^6.11.2", "react-speech-recognition": "^3.10.0", "react-textarea-autosize": "^8.4.0", @@ -1609,6 +1609,15 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, + "client/node_modules/react-resizable-panels": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/react-resizable-panels/-/react-resizable-panels-2.1.7.tgz", + "integrity": "sha512-JtT6gI+nURzhMYQYsx8DKkx6bSoOGFp7A3CwMrOb8y5jFHFyqwo9m68UhmXRw57fRVJksFn1TSlm3ywEQ9vMgA==", + "peerDependencies": { + "react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc", + "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + } + }, "client/node_modules/rollup": { "version": "4.34.6", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.6.tgz", @@ -31919,15 +31928,6 @@ } } }, - "node_modules/react-resizable-panels": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/react-resizable-panels/-/react-resizable-panels-2.1.1.tgz", - "integrity": "sha512-+cUV/yZBYfiBj+WJtpWDJ3NtR4zgDZfHt3+xtaETKE+FCvp+RK/NJxacDQKxMHgRUTSkfA6AnGljQ5QZNsCQoA==", - "peerDependencies": { - "react": "^16.14.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/react-router": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.0.tgz", From fe7013562b215e574e2ab245c58a6e89ede84017 Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Thu, 20 Feb 2025 22:17:43 +0100 Subject: [PATCH 3/7] =?UTF-8?q?=E2=9C=A8=20style:=20Enhance=20Styling=20&?= =?UTF-8?q?=20Accessibility=20(#5956)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * โœจ feat: Enhance UI Components with Shadows and Accessibility Improvements * ๐Ÿ”ง fix: Correct Category Labels and Values in API Model & Adjust Button Class in Prompt List --- api/models/Categories.js | 36 ++++++++-------- client/src/components/Prompts/Command.tsx | 2 +- client/src/components/Prompts/Description.tsx | 2 +- client/src/components/Prompts/Groups/List.tsx | 2 +- .../src/components/Prompts/PromptEditor.tsx | 3 +- client/src/components/Prompts/PromptForm.tsx | 3 +- .../components/Prompts/PromptVariables.tsx | 4 +- .../SidePanel/Agents/ModelPanel.tsx | 13 +++++- client/src/components/ui/SelectDropDown.tsx | 41 ++++++++++--------- 9 files changed, 59 insertions(+), 47 deletions(-) diff --git a/api/models/Categories.js b/api/models/Categories.js index 605b68d176..6fb88fb995 100644 --- a/api/models/Categories.js +++ b/api/models/Categories.js @@ -3,40 +3,40 @@ const { logger } = require('~/config'); const options = [ { - label: 'idea', - value: 'com_ui_idea', + label: 'com_ui_idea', + value: 'idea', }, { - label: 'travel', - value: 'com_ui_travel', + label: 'com_ui_travel', + value: 'travel', }, { - label: 'teach_or_explain', - value: 'com_ui_teach_or_explain', + label: 'com_ui_teach_or_explain', + value: 'teach_or_explain', }, { - label: 'write', - value: 'com_ui_write', + label: 'com_ui_write', + value: 'write', }, { - label: 'shop', - value: 'com_ui_shop', + label: 'com_ui_shop', + value: 'shop', }, { - label: 'code', - value: 'com_ui_code', + label: 'com_ui_code', + value: 'code', }, { - label: 'misc', - value: 'com_ui_misc', + label: 'com_ui_misc', + value: 'misc', }, { - label: 'roleplay', - value: 'com_ui_roleplay', + label: 'com_ui_roleplay', + value: 'roleplay', }, { - label: 'finance', - value: 'com_ui_finance', + label: 'com_ui_finance', + value: 'finance', }, ]; diff --git a/client/src/components/Prompts/Command.tsx b/client/src/components/Prompts/Command.tsx index f64fee4546..e670410ae8 100644 --- a/client/src/components/Prompts/Command.tsx +++ b/client/src/components/Prompts/Command.tsx @@ -44,7 +44,7 @@ const Command = ({ } return ( -
+