Skip to content

Commit fe224e6

Browse files
committed
docs: add comments on codeium logic
1 parent 34ef307 commit fe224e6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • packages/web/src/lib/ai-autocomplete

packages/web/src/lib/ai-autocomplete/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ import { type CodiumCompletionResult } from '@srcbook/shared';
55
import languageServerProto from './language-server-proto';
66

77
// NOTE: this EDITOR_API_KEY value was just included as a raw string in
8-
// @codeium/react-code-editor. This seems to not be a secret?
8+
// @codeium/react-code-editor. This seems to not be a secret? See here:
9+
// https://github.com/Exafunction/codeium-react-code-editor/blob/768e1b231c00e078c86bc19c8ede697a1e37ec75/src/components/CodeiumEditor/CompletionProvider.ts#L48
910
const EDITOR_API_KEY = 'd49954eb-cfba-4992-980f-d8fb37f0e942';
1011

12+
// NOTE: The below logic has been adapted from codeium's `@codeium/react-code-editor package. See here:
13+
// https://github.com/Exafunction/codeium-react-code-editor/blob/768e1b231c00e078c86bc19c8ede697a1e37ec75/src/components/CodeiumEditor/CompletionProvider.ts#L147-L159
1114
export async function runCodiumAiAutocomplete(
1215
optionalApiKey: string | null,
1316
source: string,

0 commit comments

Comments
 (0)