The example of how to build the Theia-based applications with the ide-ai-assistant.
/********************************************************************************
- Copyright (c) 2023-2024 EclipseSource and others.
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v. 2.0 which is available at
- https://www.eclipse.org/legal/epl-2.0, or the MIT License which is
- available at https://opensource.org/licenses/MIT.
- SPDX-License-Identifier: EPL-2.0 OR MIT ********************************************************************************/
Please install all necessary prerequisites.
To install and build the extensions and apps use the command
yarn
For the Backend to work a API KEY to OpenAI needs to be provided.
This can be done by creating a file backend/secrets.env
as this is ignored by git, then set API_KEY = [YOUR KEY]
.
For the moment there is an API missing in theia needed for the log in in our extenstion, this API should be coming soon! (Ref: issue #13169 and in our repo #55). So to run the application in theia you need to set a personal access token from github in the loginScript.js in the function setupLogin. Insert your PAT here.
this.access_token = "[Your access token]";
There are several ways to start the program.
If you want to run the Theia browser app with the plugins and the backend, we recommend using
yarn start
or
launching with the vscode configuration Theia IDE
and starting the backend workspace separately
Vscode will also automatically launch chrome.
yarn start:browser
or:
cd browser-app
yarn start
or: launch IDE (Backend)
configuration from VS code.
Open http://localhost:3000 in the browser.
yarn build:electron
yarn start:electron
or:
yarn build:electron
cd electron-app
yarn start
or: launch Start Electron Backend
configuration from VS code.
yarn test
or run the tests of a specific package with
cd [workspace you want to test]
yarn test
Start watching all packages, including browser-app
, of your application with
yarn watch
or watch only specific packages with
cd ide-ai-assistant
yarn watch
and the browser example.
cd browser-app
yarn watch
Run the example as described above
Start watching all packages, including electron-app
, of your application with
yarn watch
or watch only specific packages with
cd ide-ai-assistant
yarn watch
and the Electron example.
cd electron-app
yarn watch
Run the example as described above
Create a npm user and login to the npm registry, more on npm publishing.
npm login
Publish packages with lerna to update versions properly across local packages, more on publishing with lerna.
npx lerna publish