genesis-ai-dev / codex-editor

Codex Translation Editor and Translator's Copilot
https://codex-editor.gitbook.io/
MIT License
9 stars 7 forks source link
ai bible codex-scripture-editor nlp translation vscode-extension

Codex Translation Editor Extension

The Codex Translation Editor Extension is a powerful Visual Studio Code extension designed to enhance the experience of working with scripture translation projects. It provides support for .codex notebooks, .bible source files, and .scripture raw scripture files, integrating seamlessly with Translator's Copilot Language Server for scripture drafting, checking diagnostics, and offering advanced features to streamline the translation process.

Note: this extension is in active development and may have bugs or incomplete features. Please report any issues or suggestions on the GitHub repository.

Read more about Codex Translation Editor Extension in the documentation.

Features

Getting Started

  1. Installation: Install the extension from the Visual Studio Code Marketplace.
  2. Setup a Project: Use the "Start a new Project" command to initialize your translation project. If you open the Scripture Explorer panel, you will see a button to create a new project as well.
  3. Explore the Features: Navigate through the custom views like the Genesis Translator, Parallel Passages, and Resource Explorer to access the tools and resources you need.
  4. Edit and Translate: Open .codex or .scripture files, or navigate to a chapter of a biblical book in the Scripture Explorer and start translating with the help of syntax highlighting and language support. You can also use the Translator's Copilot Language Server to get advanced drafting and diagnostics.

You can also use the "Create Codex Notebook" command to generate a new Codex Notebook for your project.

Note: If you are using the Translator's Copilot AI chat or the LLM-powered drafting suggestions, you will need to configure the server endpoint and API keys in the extension settings. By default, the extension uses the local server spun up by LM Studio, but you can also use the OpenAI API by providing your API key.

Key Commands

Custom Views

Configuration

Customize the Codex Translation Editor Extension to fit your needs with configurable settings for the Translator's Copilot, server setup, client configuration, and more. Adjust settings like the language server endpoint, API keys, and document selectors to optimize your translation workflow.

Contributing

We welcome contributions and suggestions! Please visit our GitHub repository to contribute or report issues.

License

This extension is licensed under the MIT License. See the LICENSE file in the GitHub repository for more information.


This extension is part of Project Accelerate, aiming to accelerate scripture translation through innovative technology solutions. Join us in our mission to make scripture accessible to every language and people.

Developers: Running this extension locally in VS Code

First you need to clone the repository and install the dependencies. If you have pnpm installed, you can use it to install the dependencies. If you don't have pnpm installed, you can install it by running npm install -g pnpm. pnpm is a package manager that is faster and more efficient than npm and yarn, but you can just use npm if you prefer.

git clone https://github.com/genesis-ai-dev/codex-editor.git
cd codex-editor

Note: Before running the extension, you need to install the dependencies for **both** the extension itself, and any children webviews, such as the `ChatSideBar`. To do this, open a terminal and run the following command:

```bash
# First let's install the dependencies for the extension
pnpm i # if you're using pnpm, or npm install if you're using npm

# Next, let's install the dependencies for the webview
#FIXME: we can just add this step to a setup script
## build the codex-webviews
codex-editor % cd webviews/codex-webviews
codex-webviews % pnpm i
codex-webviews % pnpm run build:all

## build the editable-react-table
#FIXME: if you get this error -
#         you may have to do:
#           `pnpm add @types/react`
#           `pnpm add @types/react-dom`
#         and then run build command again
dictionary-side-panel % cd ../editable-react-table
editable-react-table % pnpm i
editable-react-table % pnpm run build

# Now, let's go back to the root of the project and start the extension
ChatSideBar % cd ../..
codex-editor % code . # this opens the project in VS Code, but you can also open it manually by opening VS Code and opening the extension folder you cloned

Now that you have the extension open in VS Code, you can run the extension by pressing F5. This will open a new VS Code window with the extension running. You can then open a new untitled file and run the "Create Codex Notebook" command to create a new untitled notebook of this type.

With the extension project open in VS Code, do the following:

  1. Hit F5 to build+debug
  2. Run the command "Create Codex Notebook"
  3. Add and edit cells, and click the run button to invoke the controller

Run tests

Translator's Copilot Server

This server is running in the background. See the README under the servers folder on the GitHub repository for more information.