diff --git a/.gitignore b/.gitignore index 6ec3522c..59b57568 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ metadata.json .idea/ .idea .env.debug +tmp/ .pnp.* .yarn/* diff --git a/.vscode/settings.json b/.vscode/settings.json index 70522d1e..433e5f31 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "editor.codeActionsOnSave": { - "source.fixAll": true + "source.fixAll": "explicit" }, "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, @@ -16,5 +16,6 @@ "typescript.tsdk": ".yarn/sdks/typescript/lib", "files.associations": { "*.styl": "scss" - } + }, + "DevChat.PythonForCommands": "/home/guru/.chat/mamba/envs/devchat-commands/bin/python" } diff --git a/README.md b/README.md index f811973b..fefde809 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Development workflow -Currently, it is not recommended to run the studio on its own. Therefore, you must start the Botpress Server, which will provide a couple of required parameters so the studio can work smoothly with the server. +Currently, it is not recommended to run the studio on its own. Therefore, you must start the TheGurúCompany Studio Server, which will provide a couple of required parameters so the studio can work smoothly with the server. We use Yarn v3 in this repository, so if you have errors while trying to build the repository, ensure you have the latest version installed: `npm install -g yarn` @@ -11,7 +11,7 @@ We use Yarn v3 in this repository, so if you have errors while trying to build t Like before, any changes made on the frontend will be available after a simple page refresh. Changes on the backend will require a server restart. -Since this package MUST be started from the Botpress Server, you need to set a special environment variable on the server so it can load the correct files. +Since this package MUST be started from the TheGurúCompany Studio Server, you need to set a special environment variable on the server so it can load the correct files. The variable is named `DEV_STUDIO_PATH` and must point to `packages/studio-be/out`. Watch out, path must be an abs path, env var doesn't support relative path. ## As standalone (NOT RECOMMENDED) @@ -20,7 +20,7 @@ The studio can be executed as a standalone application, but there are still a co When started as a standalone, these environment variables must be set: -- BP_MODULES_PATH: Path to the modules folder of a Botpress installation +- BP_MODULES_PATH: Path to the modules folder of a TheGurúCompany Studio installation - BP_DATA_FOLDER: Path to the data folder (bots/, global/) - BP_SERVER_URL: to determine diff --git a/packages/studio-be/src/common/http.ts b/packages/studio-be/src/common/http.ts index 758d4dd1..2e5a38e7 100644 --- a/packages/studio-be/src/common/http.ts +++ b/packages/studio-be/src/common/http.ts @@ -67,7 +67,7 @@ export const asyncMiddleware = * @constructor * @param message - The error message that will be sent to the end-user * @param statusCode - The HTTP status code - * @param errorCode - Botpress error codes e.g. BP_0001, BP_0002, etc. + * @param errorCode - TheGurúCompany Studio error codes e.g. BP_0001, BP_0002, etc. */ export class ResponseError extends Error { errorCode: string | undefined diff --git a/packages/studio-be/src/core/app/bootstrap.ts b/packages/studio-be/src/core/app/bootstrap.ts index 339a4b0a..1ae58f90 100644 --- a/packages/studio-be/src/core/app/bootstrap.ts +++ b/packages/studio-be/src/core/app/bootstrap.ts @@ -101,7 +101,13 @@ async function start() { process.LOADED_MODULES[loadedModule.entryPoint.definition.name] = loadedModule.moduleLocation } - showBanner({ title: 'Botpress Studio', version: process.STUDIO_VERSION, logScopeLength: 9, bannerWidth: 75, logger }) + showBanner({ + title: 'TheGurúCompany Studio', + version: process.STUDIO_VERSION, + logScopeLength: 9, + bannerWidth: 75, + logger + }) if (!fs.existsSync(process.APP_DATA_PATH)) { try { @@ -128,7 +134,7 @@ This is a fatal error, process will exit.` } await app.botpress.start({ modules: loadedModules.map((m) => m.entryPoint) }).catch((err) => { - logger.attachError(err).error('Error starting Botpress Studio') + logger.attachError(err).error('Error starting TheGurúCompany Studio') if (!process.IS_FAILSAFE) { process.exit(1) diff --git a/packages/studio-be/src/core/app/server.ts b/packages/studio-be/src/core/app/server.ts index ae82a322..3fba9c1a 100644 --- a/packages/studio-be/src/core/app/server.ts +++ b/packages/studio-be/src/core/app/server.ts @@ -200,7 +200,7 @@ export class HTTPServer { return res .status(503) .send( - '
Botpress is loading. Please try again in a minute.' + ' TheGurúCompany Studio is loading. Please try again in a minute.' ) } } @@ -264,7 +264,7 @@ export class HTTPServer { const errorCode = err.errorCode const message = err.message || err || 'Unexpected error' const details = err.details || '' - const docs = err.docs || 'https://botpress.com/docs' + const docs = err.docs || 'https://chtostudio.com/docs' const devOnly = process.IS_PRODUCTION ? {} : { showStackInDev: true, stack: err.stack, full: err.message } res.status(statusCode).json({ diff --git a/packages/studio-be/src/core/config/config-loader.ts b/packages/studio-be/src/core/config/config-loader.ts index 0a56340b..5dcf4877 100644 --- a/packages/studio-be/src/core/config/config-loader.ts +++ b/packages/studio-be/src/core/config/config-loader.ts @@ -133,12 +133,12 @@ export class ConfigProvider { public async getBrandingConfig(appName: 'admin' | 'studio') { const defaultConfig = { admin: { - title: 'Botpress Admin Panel', + title: 'TheGurúCompany Studio Admin Panel', favicon: 'assets/admin/ui/public/favicon.ico', customCss: '' }, studio: { - title: 'Botpress Studio', + title: 'TheGurúCompany Studio', favicon: 'assets/studio/ui/public/img/favicon.png', customCss: '' } diff --git a/packages/studio-be/src/index.ts b/packages/studio-be/src/index.ts index 0601f366..b8b4466f 100644 --- a/packages/studio-be/src/index.ts +++ b/packages/studio-be/src/index.ts @@ -11,7 +11,7 @@ import metadata from './metadata.json' const printPlainError = (err) => { /* eslint-disable no-console */ - console.log('Error starting botpress') + console.log('Error starting TheGurúCompany Studio') console.log(err) console.log(err.message) console.log('---STACK---') @@ -93,11 +93,11 @@ try { require('yargs') .command( ['serve', '$0'], - 'Start your botpress server', + 'Start your TheGurúCompany Studio server', { dataFolder: { alias: ['d', 'data'], - description: 'Starts Botpress in standalone mode on that specific data folder', + description: 'Starts TheGurúCompany Studio in standalone mode on that specific data folder', type: 'string' } }, diff --git a/packages/studio-be/src/sdk/botpress.d.ts b/packages/studio-be/src/sdk/botpress.d.ts index 010e93e8..378859df 100644 --- a/packages/studio-be/src/sdk/botpress.d.ts +++ b/packages/studio-be/src/sdk/botpress.d.ts @@ -51,12 +51,12 @@ declare module 'botpress/sdk' { export type KnexExtended = Knex & KnexExtension /** - * Returns the current version of Botpress + * Returns the current version of TheGurúCompany Studio */ export const version: string /** - * This variable gives you access to the Botpress database via Knex. + * This variable gives you access to the TheGurúCompany Studio database via Knex. * When developing modules, you can use this to create tables and manage data * @example bp.database('srv_channel_users').insert() */ @@ -128,7 +128,7 @@ declare module 'botpress/sdk' { /** * The Module Entry Point is used by the module loader to bootstrap the module. It must be present in the index.js file - * of the module. The path to the module must also be specified in the global botpress config. + * of the module. The path to the module must also be specified in the global TheGurúCompany Studio config. */ export interface ModuleEntryPoint { /** Additional metadata about the module */ @@ -182,7 +182,7 @@ declare module 'botpress/sdk' { name: string /** Gives a short description of your module, which is displayed once the template is selected */ desc: string - /** These are used internally by Botpress when they are registered on startup */ + /** These are used internally by TheGurúCompany Studio when they are registered on startup */ readonly moduleId?: string readonly moduleName?: string } @@ -384,7 +384,7 @@ declare module 'botpress/sdk' { export const SKIP_DIALOG_ENGINE: symbol /** When this flag is active, the QNA module won't intercept this event */ export const SKIP_QNA_PROCESSING: symbol - /** When this flag is active, Botpress Native NLU will not process this event */ + /** When this flag is active, TheGurúCompany Studio Native NLU will not process this event */ export const SKIP_NATIVE_NLU: symbol /** When this flag is active, the Event State is persisted even if the dialog engine is skipped */ export const FORCE_PERSIST_STATE: symbol @@ -410,7 +410,7 @@ declare module 'botpress/sdk' { } /** - * A BotpressEvent is how conversational channels interact with Botpress. Events represent all the interactions + * A TheGurúCompany Studio Event is how conversational channels interact with TheGurúCompany Studio. Events represent all the interactions * that make up a conversation. That means the different message types (text, image, buttons, carousels etc) but also * the navigational events (chat open, user typing) and contextual events (user returned home, order delivered). */ @@ -543,7 +543,7 @@ declare module 'botpress/sdk' { * store and retrieve data for different kind of situations. */ export interface EventState { - /** Data saved as user attributes; retention policies in Botpress global config applies */ + /** Data saved as user attributes; retention policies in TheGurúCompany Studio global config applies */ user: any /** Data is kept for the active session. Timeout configurable in the global config file */ session: CurrentSession @@ -555,7 +555,7 @@ declare module 'botpress/sdk' { * There is a possible race condition since it is loaded each time a messages comes in. Update it wisely */ bot: any - /** Used internally by Botpress to keep the user's current location and upcoming instructions */ + /** Used internally by TheGurúCompany Studio to keep the user's current location and upcoming instructions */ context?: DialogContext /** This variable points to the currently active workflow */ workflow: WorkflowHistory @@ -972,7 +972,7 @@ declare module 'botpress/sdk' { /** * A Content Type describes a grouping of Content Elements @see ContentElement sharing the same properties. * They can describe anything and everything – they most often are domain-specific to your bot. They also - * tells botpress how to display the content on various channels + * tells TheGurúCompany Studio how to display the content on various channels */ export interface ContentType { id: string @@ -1093,7 +1093,7 @@ declare module 'botpress/sdk' { export interface FlowGenerationResult { /** * A partial flow originating from a skill flow generator. Missing pieces will be automatically added - * once the flow is sent to Botpress, the final product will be a Flow. + * once the flow is sent to TheGurúCompany Studio, the final product will be a Flow. */ flow: SkillFlow /** An array of possible transitions for the parent node */ @@ -1319,7 +1319,7 @@ declare module 'botpress/sdk' { inversify: any } - /** These are additional information that Botpress may pass down to migrations (for ex: running bot-specific migration) */ + /** These are additional information that TheGurúCompany Studio may pass down to migrations (for ex: running bot-specific migration) */ export interface MigrationMetadata { botId?: string } @@ -1875,7 +1875,7 @@ declare module 'botpress/sdk' { export function getModuleConfigForBot(moduleId: string, botId: string, ignoreGlobal?: boolean): PromiseTo learn how to define content types,{' '} - + read the docs
diff --git a/packages/studio-ui/src/web/components/Injected/index.jsx b/packages/studio-ui/src/web/components/Injected/index.jsx index d6187f58..f276567e 100644 --- a/packages/studio-ui/src/web/components/Injected/index.jsx +++ b/packages/studio-ui/src/web/components/Injected/index.jsx @@ -28,7 +28,7 @@ export default class InjectedComponent extends Component { {/* TODO Put documentation / help here */}