- Ensure the backend of the service has been set up
- Install VSCode, this app can only be run via VS Code.
- In the
./codex-vscodefolder:- Create a
.envfile under./environments/.env- Fill it with the contents of this secure note
- Install dependencies
npm i
- Create a
- In the root folder, build the css bundle:
npm run build:css - Run the application listening for changes:
npm run watch- This will run both the
codex-webviewandcodex-vscodewatch commands
- Launch the application by navigating to Run > Debug, or hitting F5
GitHub-produced packages
-
To use the GitHub produced packages you'll need a GitHub Personal Access Token
- Export the token into zshenv
echo "export GITHUB_TOKEN=<your-token-here>" >> ~/.zshenv source ~/.zshenv -
The CCL repo produces new packages, tagged with
lateston each merge into itsdevelopmentbranch -
To use the latest package produced by CCL, run the following command:
npm install @usecodex/common-library@latest -
CCL also produces alpha builds based on CI runs of any topic branch
- These are useful to install in your vscode topic branch if you're making changes to both repos at the same time and want to use your CCL changes in vscode as you work
- One place to find the alpha package is to look at the CCL packages page and copy the version number
- Update your local vscode branch using
npm install @usecodex/common-library@1.4.1-alpha-25804fb8.0, for example - 💡 Alpha builds should not be merged into vscode
developmentbranch
- These are useful to install in your vscode topic branch if you're making changes to both repos at the same time and want to use your CCL changes in vscode as you work
-
Codex UI (prompt-ui) produces 2 packages,
@usecodex/prompt-ui-core&@usecodex/prompt-ui-svelte; a newbetarelease is published upon merge to development. These packages are consumed in thecodex-webviewpackage.
- Alternatively, you can link your locally built instance of CCL in your VSCode branch if you don't have a CI-produced package to link to your VSCode branch
- Build the CCL repo
- In VSCode
package.jsonfile, change the@usecodex/common-libraryentry to read something like:@usecodex/common-library: "file:../codex-common-library/build/ccl"npm ito resolve the new package you want
- Alternatively you can do the following:
npm i ../codex-common-library/build/ccl
- You can follow similar steps for the other private packages you may need to consume.
- Ensure you have the following property set up correctly in your
.envfile here:API_URL="https://dev.usecodex.com/api/" - Follow the README instructions in the
codex-apirepo - Your locally running VSCode extension should now be issuing API requests against your locally running API server instance
- Ensure you install the latest CCL package ->
npm update @usecodex/common-library- Double check your package-lock file to ensure this is pointing to a releaseable version (i.e. not
alpha)
- Double check your package-lock file to ensure this is pointing to a releaseable version (i.e. not
- Package vscode:
- Select which environment you want to build for by changing the suffix on the webpack config in the
npm run packagecommand.- Options: dev =
config, staging =stag, production =prod
- Options: dev =
vsce package- You may need to run
npm i -g vsceto install it globally.
- You may need to run
- Hit 'y' a few times
- Select which environment you want to build for by changing the suffix on the webpack config in the
- To install, follow the installation video - https://codexbuild.notion.site/Onboarding-Guide-FAQs-30bb0a79b1e54afa98ea197f6aa95981
README.md&CHANGELOG.mdboth show up in the marketplace- Updating
README.md:- Assets need to be uploaded into our S3 bucket
- Update the
baseImagesUrlargument in thevsce:packagecommand
- Open a second VS Code instance in the
dummy-folder- i.e.
code ./dummy-folder
- i.e.
- Launch the second window like we launch the first, by navigating to Run > Debug, or hitting F5
- in your
.envfile, add the following entry:FORCE_CLIENT_CHECK=true- This will allow you to override the check where we skip the client verification if
NODE_ENVis set todevelopment
- This will allow you to override the check where we skip the client verification if
- Set a version below our currently supported minimum version, like
VERSION=1.3.1in your.envfile - Tip: you may also want to reduce the delay between checks in
clientVersionChecker.helper.ts#ONE_HOUR_IN_MSto something like every second (1000) - Start the debugger
- Reload the application with Cmd+R
- Open the debug console in the development window with Cmd+Shft+P, enter in Codex: Debug