mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
⚡ feat: Self-hosted Artifacts Static Bundler URL (#6827)
* v0.7.791 * feat: configuration via `SANDPACK_STATIC_BUNDLER_URL` env var and update bundlerURL logic in Artifact components * fix: update minimum length requirement for auth fields from 10 to 1 character
This commit is contained in:
parent
e16a6190a5
commit
12f4dbb8c5
7 changed files with 15 additions and 9 deletions
|
|
@ -82,6 +82,7 @@ router.get('/', async function (req, res) {
|
||||||
analyticsGtmId: process.env.ANALYTICS_GTM_ID,
|
analyticsGtmId: process.env.ANALYTICS_GTM_ID,
|
||||||
instanceProjectId: instanceProject._id.toString(),
|
instanceProjectId: instanceProject._id.toString(),
|
||||||
bundlerURL: process.env.SANDPACK_BUNDLER_URL,
|
bundlerURL: process.env.SANDPACK_BUNDLER_URL,
|
||||||
|
staticBundlerURL: process.env.SANDPACK_STATIC_BUNDLER_URL,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (ldap) {
|
if (ldap) {
|
||||||
|
|
|
||||||
|
|
@ -132,9 +132,9 @@ export const ArtifactCodeEditor = memo(function ({
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
...sharedOptions,
|
...sharedOptions,
|
||||||
bundlerURL: config.bundlerURL,
|
bundlerURL: template === 'static' ? config.staticBundlerURL : config.bundlerURL,
|
||||||
};
|
};
|
||||||
}, [config]);
|
}, [config, template]);
|
||||||
|
|
||||||
if (Object.keys(files).length === 0) {
|
if (Object.keys(files).length === 0) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -46,11 +46,15 @@ export const ArtifactPreview = memo(function ({
|
||||||
if (!config) {
|
if (!config) {
|
||||||
return sharedOptions;
|
return sharedOptions;
|
||||||
}
|
}
|
||||||
return {
|
const _options: typeof sharedOptions = {
|
||||||
...sharedOptions,
|
...sharedOptions,
|
||||||
bundlerURL: config.bundlerURL,
|
bundlerURL: template === 'static' ? config.staticBundlerURL : config.bundlerURL,
|
||||||
};
|
};
|
||||||
}, [config]);
|
|
||||||
|
return _options;
|
||||||
|
}, [config, template]);
|
||||||
|
|
||||||
|
console.log(options);
|
||||||
|
|
||||||
if (Object.keys(artifactFiles).length === 0) {
|
if (Object.keys(artifactFiles).length === 0) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,8 @@ function PluginAuthForm({ plugin, onSubmit, isEntityTool }: TPluginAuthFormProps
|
||||||
{...register(authField, {
|
{...register(authField, {
|
||||||
required: `${config.label} is required.`,
|
required: `${config.label} is required.`,
|
||||||
minLength: {
|
minLength: {
|
||||||
value: 10,
|
value: 1,
|
||||||
message: `${config.label} must be at least 10 characters long`,
|
message: `${config.label} must be at least 1 character long`,
|
||||||
},
|
},
|
||||||
})}
|
})}
|
||||||
className="flex h-10 max-h-10 w-full resize-none rounded-md border border-gray-200 bg-transparent px-3 py-2 text-sm text-gray-700 shadow-[0_0_10px_rgba(0,0,0,0.05)] outline-none placeholder:text-gray-400 focus:border-gray-400 focus:bg-gray-50 focus:outline-none focus:ring-0 focus:ring-gray-400 focus:ring-opacity-0 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-500 dark:bg-gray-700 dark:text-gray-50 dark:shadow-[0_0_15px_rgba(0,0,0,0.10)] dark:focus:border-gray-400 focus:dark:bg-gray-600 dark:focus:outline-none dark:focus:ring-0 dark:focus:ring-gray-400 dark:focus:ring-offset-0"
|
className="flex h-10 max-h-10 w-full resize-none rounded-md border border-gray-200 bg-transparent px-3 py-2 text-sm text-gray-700 shadow-[0_0_10px_rgba(0,0,0,0.05)] outline-none placeholder:text-gray-400 focus:border-gray-400 focus:bg-gray-50 focus:outline-none focus:ring-0 focus:ring-gray-400 focus:ring-opacity-0 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-500 dark:bg-gray-700 dark:text-gray-50 dark:shadow-[0_0_15px_rgba(0,0,0,0.10)] dark:focus:border-gray-400 focus:dark:bg-gray-600 dark:focus:outline-none dark:focus:ring-0 dark:focus:ring-gray-400 dark:focus:ring-offset-0"
|
||||||
|
|
|
||||||
2
package-lock.json
generated
2
package-lock.json
generated
|
|
@ -43309,7 +43309,7 @@
|
||||||
},
|
},
|
||||||
"packages/data-provider": {
|
"packages/data-provider": {
|
||||||
"name": "librechat-data-provider",
|
"name": "librechat-data-provider",
|
||||||
"version": "0.7.790",
|
"version": "0.7.791",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.8.2",
|
"axios": "^1.8.2",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "librechat-data-provider",
|
"name": "librechat-data-provider",
|
||||||
"version": "0.7.790",
|
"version": "0.7.791",
|
||||||
"description": "data services for librechat apps",
|
"description": "data services for librechat apps",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"module": "dist/index.es.js",
|
"module": "dist/index.es.js",
|
||||||
|
|
|
||||||
|
|
@ -541,6 +541,7 @@ export type TStartupConfig = {
|
||||||
analyticsGtmId?: string;
|
analyticsGtmId?: string;
|
||||||
instanceProjectId: string;
|
instanceProjectId: string;
|
||||||
bundlerURL?: string;
|
bundlerURL?: string;
|
||||||
|
staticBundlerURL?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export enum OCRStrategy {
|
export enum OCRStrategy {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue