Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@live-codes/monaco-codeium-provider

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@live-codes/monaco-codeium-provider

AI auto-completion provider for Monaco editor powered by Codeium

latest
npmnpm
Version
0.2.2
Version published
Maintainers
1
Created
Source

Monaco Codeium Provider

AI auto-completion provider for Monaco editor powered by Codeium.

As used in LiveCodes.

Based on https://github.com/Exafunction/codeium-react-code-editor (MIT License)

Installation

npm install @live-codes/monaco-codeium-provider

Usage

import { registerCodeiumProvider } from "@live-codes/monaco-codeium-provider";

const provider = registerCodeiumProvider(
  monaco,
  // optional config
  {
    languageServer: "https://web-backend.codeium.com",
    apiKey: "codeium-api-key",
    onAutocomplete: (acceptedText) => {
      // runs on completion
      console.log(acceptedText);
    },
    getEditors: () => {
      // return an array of other monaco editors that you want their content to be used for AI context
      // e.g. if the current editor is for JS, return HTML and CSS editors
      return [];
    },
  }
);

// to dispose
provider.dispose();

FAQs

Package last updated on 14 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts