Exafunction / codeium-react-code-editor

AI-enabled code editor for React. Unlimited AI autocomplete capabilities with full Typescript support.
MIT License
162 stars 10 forks source link

Enable context from other documents #30

Closed khou22 closed 5 months ago

khou22 commented 5 months ago

Enable otherDocuments property which will allow the user to pass in relevant file context. Example:

Screenshot 2024-02-12 at 10 50 46 PM

Usage

Use the new otherDocs prop. For example:

<CodeiumEditor
  language="javascript"
  otherDocuments={[
    new Document({
      absolutePath: "/index.html",
      relativePath: "index.html",
      text: "the contents of the html file...",
      editorLanguage: "html",
      language: Language.HTML,
    }),
  ]}
/>