From 9897d9a0fee8b020cb401d3c4a95af2ecf55c6c1 Mon Sep 17 00:00:00 2001 From: Nicholas Charriere Date: Mon, 11 Nov 2024 10:08:00 -0800 Subject: [PATCH] Add support for X AI grok (#438) * Add support for X AI grok * Remove debug logs --- packages/api/ai/config.mts | 11 + packages/api/db/schema.mts | 1 + packages/api/drizzle/0013_add_x_ai.sql | 1 + packages/api/drizzle/meta/0013_snapshot.json | 269 +++++++++++++++++++ packages/api/drizzle/meta/_journal.json | 7 + packages/shared/src/ai.mts | 4 +- packages/web/src/components/use-settings.tsx | 1 + packages/web/src/routes/settings.tsx | 34 +++ packages/web/src/types.ts | 1 + pnpm-lock.yaml | 124 +++++++-- 10 files changed, 424 insertions(+), 29 deletions(-) create mode 100644 packages/api/drizzle/0013_add_x_ai.sql create mode 100644 packages/api/drizzle/meta/0013_snapshot.json diff --git a/packages/api/ai/config.mts b/packages/api/ai/config.mts index 00666fa6..def8f0fc 100644 --- a/packages/api/ai/config.mts +++ b/packages/api/ai/config.mts @@ -30,6 +30,17 @@ export async function getModel(): Promise { const anthropic = createAnthropic({ apiKey: config.anthropicKey }); return anthropic(model); + case 'Xai': + if (!config.xaiKey) { + throw new Error('Xai API key is not set'); + } + const xai = createOpenAI({ + compatibility: 'compatible', + baseURL: 'https://api.x.ai/v1', + apiKey: config.xaiKey, + }); + return xai(model); + case 'custom': if (typeof aiBaseUrl !== 'string') { throw new Error('Local AI base URL is not set'); diff --git a/packages/api/db/schema.mts b/packages/api/db/schema.mts index 1f057c8e..8adc5e82 100644 --- a/packages/api/db/schema.mts +++ b/packages/api/db/schema.mts @@ -8,6 +8,7 @@ export const configs = sqliteTable('config', { defaultLanguage: text('default_language').notNull().default('typescript'), openaiKey: text('openai_api_key'), anthropicKey: text('anthropic_api_key'), + xaiKey: text('xai_api_key'), // TODO: This is deprecated in favor of SRCBOOK_DISABLE_ANALYTICS env variable. Remove this. enabledAnalytics: integer('enabled_analytics', { mode: 'boolean' }).notNull().default(true), // Stable ID for posthog diff --git a/packages/api/drizzle/0013_add_x_ai.sql b/packages/api/drizzle/0013_add_x_ai.sql new file mode 100644 index 00000000..0fdc0a45 --- /dev/null +++ b/packages/api/drizzle/0013_add_x_ai.sql @@ -0,0 +1 @@ +ALTER TABLE `config` ADD `xai_api_key` text; \ No newline at end of file diff --git a/packages/api/drizzle/meta/0013_snapshot.json b/packages/api/drizzle/meta/0013_snapshot.json new file mode 100644 index 00000000..3405277d --- /dev/null +++ b/packages/api/drizzle/meta/0013_snapshot.json @@ -0,0 +1,269 @@ +{ + "version": "6", + "dialect": "sqlite", + "id": "0acbefdc-659a-48ad-a4c1-a44ebca56c08", + "prevId": "0e479af1-dade-4a47-88c8-438284446e01", + "tables": { + "apps": { + "name": "apps", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "history": { + "name": "history", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'[]'" + }, + "history_version": { + "name": "history_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 1 + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(unixepoch())" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(unixepoch())" + } + }, + "indexes": { + "apps_external_id_unique": { + "name": "apps_external_id_unique", + "columns": [ + "external_id" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "config": { + "name": "config", + "columns": { + "base_dir": { + "name": "base_dir", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "default_language": { + "name": "default_language", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'typescript'" + }, + "openai_api_key": { + "name": "openai_api_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "anthropic_api_key": { + "name": "anthropic_api_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "xai_api_key": { + "name": "xai_api_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enabled_analytics": { + "name": "enabled_analytics", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "srcbook_installation_id": { + "name": "srcbook_installation_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'4tgs28j4rn6q9ggpipqllmqvbo'" + }, + "ai_provider": { + "name": "ai_provider", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'openai'" + }, + "ai_model": { + "name": "ai_model", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'gpt-4o'" + }, + "ai_base_url": { + "name": "ai_base_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "subscription_email": { + "name": "subscription_email", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "secrets": { + "name": "secrets", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "secrets_name_unique": { + "name": "secrets_name_unique", + "columns": [ + "name" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "secrets_to_sessions": { + "name": "secrets_to_sessions", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "session_id": { + "name": "session_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "secret_id": { + "name": "secret_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "secrets_to_sessions_session_id_secret_id_unique": { + "name": "secrets_to_sessions_session_id_secret_id_unique", + "columns": [ + "session_id", + "secret_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "secrets_to_sessions_secret_id_secrets_id_fk": { + "name": "secrets_to_sessions_secret_id_secrets_id_fk", + "tableFrom": "secrets_to_sessions", + "tableTo": "secrets", + "columnsFrom": [ + "secret_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "internal": { + "indexes": {} + } +} \ No newline at end of file diff --git a/packages/api/drizzle/meta/_journal.json b/packages/api/drizzle/meta/_journal.json index cadb8dc7..eafa07c0 100644 --- a/packages/api/drizzle/meta/_journal.json +++ b/packages/api/drizzle/meta/_journal.json @@ -92,6 +92,13 @@ "when": 1729193497907, "tag": "0012_add_app_history", "breakpoints": true + }, + { + "idx": 13, + "version": "6", + "when": 1731347691803, + "tag": "0013_add_x_ai", + "breakpoints": true } ] } \ No newline at end of file diff --git a/packages/shared/src/ai.mts b/packages/shared/src/ai.mts index 14289f77..24676e15 100644 --- a/packages/shared/src/ai.mts +++ b/packages/shared/src/ai.mts @@ -1,6 +1,7 @@ export const AiProvider = { OpenAI: 'openai', Anthropic: 'anthropic', + XAI: 'Xai', Custom: 'custom', } as const; @@ -8,8 +9,9 @@ export type AiProviderType = (typeof AiProvider)[keyof typeof AiProvider]; export const defaultModels: Record = { [AiProvider.OpenAI]: 'chatgpt-4o-latest', - [AiProvider.Anthropic]: 'claude-3-5-sonnet-20240620', + [AiProvider.Anthropic]: 'claude-3-5-sonnet-latest', [AiProvider.Custom]: 'mistral-nemo', + [AiProvider.XAI]: 'grok-beta', } as const; export function isValidProvider(provider: string): provider is AiProviderType { diff --git a/packages/web/src/components/use-settings.tsx b/packages/web/src/components/use-settings.tsx index 711838b4..648ce0b7 100644 --- a/packages/web/src/components/use-settings.tsx +++ b/packages/web/src/components/use-settings.tsx @@ -34,6 +34,7 @@ export function SettingsProvider({ config, children }: ProviderPropsType) { const aiEnabled = (config.openaiKey && config.aiProvider === 'openai') || (config.anthropicKey && config.aiProvider === 'anthropic') || + (config.xaiKey && config.aiProvider === 'Xai') || (config.aiProvider === 'custom' && !!config.aiBaseUrl) || false; diff --git a/packages/web/src/routes/settings.tsx b/packages/web/src/routes/settings.tsx index f8c322d2..c552dfb7 100644 --- a/packages/web/src/routes/settings.tsx +++ b/packages/web/src/routes/settings.tsx @@ -144,6 +144,13 @@ function AiInfoBanner() { ); + case 'Xai': + return ( +
+

API key required

+
+ ); + case 'custom': return (
@@ -227,11 +234,13 @@ export function AiSettings({ saveButtonLabel }: AiSettingsProps) { aiBaseUrl, openaiKey: configOpenaiKey, anthropicKey: configAnthropicKey, + xaiKey: configXaiKey, updateConfig: updateConfigContext, } = useSettings(); const [openaiKey, setOpenaiKey] = useState(configOpenaiKey ?? ''); const [anthropicKey, setAnthropicKey] = useState(configAnthropicKey ?? ''); + const [xaiKey, setXaiKey] = useState(configXaiKey ?? ''); const [model, setModel] = useState(aiModel); const [baseUrl, setBaseUrl] = useState(aiBaseUrl || ''); @@ -254,6 +263,11 @@ export function AiSettings({ saveButtonLabel }: AiSettingsProps) { anthropicKey.length > 0) || model !== aiModel; + const xaiKeySaveEnabled = + (typeof configXaiKey === 'string' && xaiKey !== configXaiKey) || + ((configXaiKey === null || configXaiKey === undefined) && xaiKey.length > 0) || + model !== aiModel; + const customModelSaveEnabled = (typeof aiBaseUrl === 'string' && baseUrl !== aiBaseUrl) || ((aiBaseUrl === null || aiBaseUrl === undefined) && baseUrl.length > 0) || @@ -270,6 +284,7 @@ export function AiSettings({ saveButtonLabel }: AiSettingsProps) { openai anthropic + Xai custom @@ -322,6 +337,25 @@ export function AiSettings({ saveButtonLabel }: AiSettingsProps) {
)} + {aiProvider === 'Xai' && ( +
+ setXaiKey(e.target.value)} + /> + +
+ )} + {aiProvider === 'custom' && (

diff --git a/packages/web/src/types.ts b/packages/web/src/types.ts index 7d23392d..c84a55f5 100644 --- a/packages/web/src/types.ts +++ b/packages/web/src/types.ts @@ -12,6 +12,7 @@ export type SettingsType = { defaultLanguage: CodeLanguageType; openaiKey?: string | null; anthropicKey?: string | null; + xaiKey?: string | null; aiProvider: AiProviderType; aiModel: string; aiBaseUrl?: string | null; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 14d0e126..30b9b43e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -579,10 +579,18 @@ packages: resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.25.9': + resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.24.7': resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.25.9': + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} + engines: {node: '>=6.9.0'} + '@babel/highlight@7.24.7': resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} engines: {node: '>=6.9.0'} @@ -592,6 +600,11 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@7.26.2': + resolution: {integrity: sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==} + engines: {node: '>=6.0.0'} + hasBin: true + '@babel/runtime@7.25.6': resolution: {integrity: sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==} engines: {node: '>=6.9.0'} @@ -608,6 +621,10 @@ packages: resolution: {integrity: sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==} engines: {node: '>=6.9.0'} + '@babel/types@7.26.0': + resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} + engines: {node: '>=6.9.0'} + '@braintree/sanitize-url@7.1.0': resolution: {integrity: sha512-o+UlMLt49RvtCASlOMW0AkHnabN9wR9rwCCherxO0yG4Npy34GkvrAqdXQvrhNs+jh+gkK8gB8Lf05qL/O7KWg==} @@ -2119,6 +2136,9 @@ packages: '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + '@types/express-serve-static-core@4.19.5': resolution: {integrity: sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg==} @@ -2140,8 +2160,8 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@18.19.50': - resolution: {integrity: sha512-xonK+NRrMBRtkL1hVCc3G+uXtjh1Al4opBLjqVmipe5ZAaBYWW6cNAiBVZ1BvmkBhep698rP3UM3aRAdSALuhg==} + '@types/node@18.19.64': + resolution: {integrity: sha512-955mDqvO2vFf/oL7V3WiUtiz+BugyX8uVbaT2H8oj3+8dRyH2FLiNdowe7eNqRM7IOIZvzDH76EoAT+gwm6aIQ==} '@types/node@20.14.2': resolution: {integrity: sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==} @@ -2356,6 +2376,11 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true + agentkeepalive@4.5.0: resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} engines: {node: '>= 8.0.0'} @@ -2439,8 +2464,9 @@ packages: aria-query@5.1.3: resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==} - aria-query@5.3.0: - resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} + aria-query@5.3.2: + resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} + engines: {node: '>= 0.4'} array-buffer-byte-length@1.0.1: resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} @@ -3044,10 +3070,6 @@ packages: deps-regex@0.2.0: resolution: {integrity: sha512-PwuBojGMQAYbWkMXOY9Pd/NWCDNHVH12pnS7WHqZkTSeMESe4hwnKKRp0yR87g37113x4JPbo/oIvXY+s/f56Q==} - dequal@2.0.3: - resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} - engines: {node: '>=6'} - destroy@1.2.0: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} @@ -3528,6 +3550,10 @@ packages: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} + form-data@4.0.1: + resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} + engines: {node: '>= 6'} + formdata-node@4.4.1: resolution: {integrity: sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==} engines: {node: '>= 12.20'} @@ -4065,6 +4091,9 @@ packages: magic-string@0.30.11: resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + magic-string@0.30.12: + resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} + marked-react@2.0.0: resolution: {integrity: sha512-Mp5HqfONf/RDqFtA+6xw2EjKkSbA8/xNPwyJ8ewLy/q3v21lRsPA7h+HUndVAW/yEIoebvcyzzSDpbjzL/xjZg==} peerDependencies: @@ -4389,6 +4418,9 @@ packages: picocolors@1.1.0: resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -4462,6 +4494,10 @@ packages: resolution: {integrity: sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==} engines: {node: ^10 || ^12 || >=14} + postcss@8.4.48: + resolution: {integrity: sha512-GCRK8F6+Dl7xYniR5a4FYbpBzU8XnZVeowqsQFYdcXuSbChgiks7qybSkbvnaeqv0G0B+dd9/jJgH8kkLDQeEA==} + engines: {node: ^10 || ^12 || >=14} + posthog-js@1.174.2: resolution: {integrity: sha512-UgS7eRcDVvVz2XSJ09NMX8zBcdpFnPayfiWDNF3xEbJTsIu1GipkkYNrVlsWlq8U1PIrviNm6i0Dyq8daaxssw==} @@ -5554,8 +5590,12 @@ snapshots: '@babel/helper-string-parser@7.24.8': {} + '@babel/helper-string-parser@7.25.9': {} + '@babel/helper-validator-identifier@7.24.7': {} + '@babel/helper-validator-identifier@7.25.9': {} + '@babel/highlight@7.24.7': dependencies: '@babel/helper-validator-identifier': 7.24.7 @@ -5567,6 +5607,10 @@ snapshots: dependencies: '@babel/types': 7.25.6 + '@babel/parser@7.26.2': + dependencies: + '@babel/types': 7.26.0 + '@babel/runtime@7.25.6': dependencies: regenerator-runtime: 0.14.1 @@ -5595,6 +5639,11 @@ snapshots: '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 + '@babel/types@7.26.0': + dependencies: + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@braintree/sanitize-url@7.1.0': {} '@changesets/apply-release-plan@7.0.5': @@ -7057,6 +7106,8 @@ snapshots: '@types/estree@1.0.5': {} + '@types/estree@1.0.6': {} + '@types/express-serve-static-core@4.19.5': dependencies: '@types/node': 22.5.4 @@ -7080,12 +7131,12 @@ snapshots: '@types/node-fetch@2.6.11': dependencies: '@types/node': 22.5.4 - form-data: 4.0.0 + form-data: 4.0.1 optional: true '@types/node@12.20.55': {} - '@types/node@18.19.50': + '@types/node@18.19.64': dependencies: undici-types: 5.26.5 optional: true @@ -7294,7 +7345,7 @@ snapshots: '@vue/compiler-core@3.4.31': dependencies: - '@babel/parser': 7.25.6 + '@babel/parser': 7.26.2 '@vue/shared': 3.4.31 entities: 4.5.0 estree-walker: 2.0.2 @@ -7320,14 +7371,14 @@ snapshots: '@vue/compiler-sfc@3.4.31': dependencies: - '@babel/parser': 7.25.6 + '@babel/parser': 7.26.2 '@vue/compiler-core': 3.4.31 '@vue/compiler-dom': 3.4.31 '@vue/compiler-ssr': 3.4.31 '@vue/shared': 3.4.31 estree-walker: 2.0.2 - magic-string: 0.30.11 - postcss: 8.4.45 + magic-string: 0.30.12 + postcss: 8.4.48 source-map-js: 1.2.1 '@vue/compiler-sfc@3.5.4': @@ -7393,6 +7444,8 @@ snapshots: acorn@8.12.1: {} + acorn@8.14.0: {} + agentkeepalive@4.5.0: dependencies: humanize-ms: 1.2.1 @@ -7490,9 +7543,7 @@ snapshots: dependencies: deep-equal: 2.2.3 - aria-query@5.3.0: - dependencies: - dequal: 2.0.3 + aria-query@5.3.2: {} array-buffer-byte-length@1.0.1: dependencies: @@ -7772,8 +7823,8 @@ snapshots: code-red@1.0.4: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 - '@types/estree': 1.0.5 - acorn: 8.12.1 + '@types/estree': 1.0.6 + acorn: 8.14.0 estree-walker: 3.0.3 periscopic: 3.1.0 @@ -8194,8 +8245,6 @@ snapshots: deps-regex@0.2.0: {} - dequal@2.0.3: {} - destroy@1.2.0: {} detect-file@1.0.0: {} @@ -8774,6 +8823,13 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 + form-data@4.0.1: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + mime-types: 2.1.35 + optional: true + formdata-node@4.4.1: dependencies: node-domexception: 1.0.0 @@ -9080,7 +9136,7 @@ snapshots: is-reference@3.0.2: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 is-regex@1.1.4: dependencies: @@ -9285,6 +9341,10 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 + magic-string@0.30.12: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + marked-react@2.0.0(react@18.3.1): dependencies: marked: 6.0.0 @@ -9484,7 +9544,7 @@ snapshots: openai@4.52.3: dependencies: - '@types/node': 18.19.50 + '@types/node': 18.19.64 '@types/node-fetch': 2.6.11 abort-controller: 3.0.0 agentkeepalive: 4.5.0 @@ -9579,12 +9639,14 @@ snapshots: periscopic@3.1.0: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 estree-walker: 3.0.3 is-reference: 3.0.2 picocolors@1.1.0: {} + picocolors@1.1.1: {} + picomatch@2.3.1: {} pify@2.3.0: {} @@ -9649,6 +9711,12 @@ snapshots: picocolors: 1.1.0 source-map-js: 1.2.1 + postcss@8.4.48: + dependencies: + nanoid: 3.3.7 + picocolors: 1.1.1 + source-map-js: 1.2.1 + posthog-js@1.174.2: dependencies: core-js: 3.38.1 @@ -10246,16 +10314,16 @@ snapshots: '@ampproject/remapping': 2.3.0 '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping': 0.3.25 - '@types/estree': 1.0.5 - acorn: 8.12.1 - aria-query: 5.3.0 + '@types/estree': 1.0.6 + acorn: 8.14.0 + aria-query: 5.3.2 axobject-query: 4.1.0 code-red: 1.0.4 css-tree: 2.3.1 estree-walker: 3.0.3 is-reference: 3.0.2 locate-character: 3.0.0 - magic-string: 0.30.11 + magic-string: 0.30.12 periscopic: 3.1.0 swr@2.2.5(react@18.3.1):