-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Codeium AI autocomplete integration #343
Open
1egoman
wants to merge
18
commits into
main
Choose a base branch
from
codeium-integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
abaebbf
feat: add codeium_api_key column to config table
1egoman aa68685
feat: add MVP of codeium oauth process
1egoman 0a191be
feat: add hacked together demo for codium ai autocomplete
1egoman 8b9eb03
feat: use the user provided codeium api key if available when making …
1egoman 2f43f50
fix: address issue in cell autocomplete due to an off by one in the c…
1egoman 1a8a643
feat: relocate codeium api request from server to client
1egoman 4f8b323
feat: add subcommmand to rebuild codeium proto json definitions
1egoman c6d5bb1
fix: run npm run format
1egoman 317398f
refactor: remove dead code
1egoman 4c7d066
feat: ensure that codeium ai autocomplete generates suggestions in th…
1egoman 899b136
feat: slightly clean up the codeium oauth interface on the settings page
1egoman 4c9c265
docs: add comments on codeium logic
1egoman 49890f1
refactor: consolodate codeium types with the codeium request code
1egoman 2ed663a
refactor: reorder imports
1egoman 5afa2b3
feat: make the codeium-callback page look a little better
1egoman 5656ec5
fix: address typo in function name
1egoman d529456
feat: include other cells as context with ai autocomplete
1egoman 11cca95
Merge branch 'main' into codeium-integration
benjreinhart File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE `config` ADD `codeium_api_key` text; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,260 @@ | ||
{ | ||
"version": "6", | ||
"dialect": "sqlite", | ||
"id": "a22c9bdd-1d54-448d-9c4a-5c3b2d7b7d60", | ||
"prevId": "aeb418fb-06df-4fc2-8afc-f18d95014b46", | ||
"tables": { | ||
"apps": { | ||
"name": "apps", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "integer", | ||
"primaryKey": true, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"name": { | ||
"name": "name", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"language": { | ||
"name": "language", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"external_id": { | ||
"name": "external_id", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"created_at": { | ||
"name": "created_at", | ||
"type": "integer", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false, | ||
"default": "(unixepoch())" | ||
}, | ||
"updated_at": { | ||
"name": "updated_at", | ||
"type": "integer", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false, | ||
"default": "(unixepoch())" | ||
} | ||
}, | ||
"indexes": { | ||
"apps_external_id_unique": { | ||
"name": "apps_external_id_unique", | ||
"columns": [ | ||
"external_id" | ||
], | ||
"isUnique": true | ||
} | ||
}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {} | ||
}, | ||
"config": { | ||
"name": "config", | ||
"columns": { | ||
"base_dir": { | ||
"name": "base_dir", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"default_language": { | ||
"name": "default_language", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false, | ||
"default": "'typescript'" | ||
}, | ||
"openai_api_key": { | ||
"name": "openai_api_key", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"anthropic_api_key": { | ||
"name": "anthropic_api_key", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"enabled_analytics": { | ||
"name": "enabled_analytics", | ||
"type": "integer", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false, | ||
"default": true | ||
}, | ||
"srcbook_installation_id": { | ||
"name": "srcbook_installation_id", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false, | ||
"default": "'k9nek54ld4r5881475jtrr5jns'" | ||
}, | ||
"ai_provider": { | ||
"name": "ai_provider", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false, | ||
"default": "'openai'" | ||
}, | ||
"ai_model": { | ||
"name": "ai_model", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false, | ||
"default": "'gpt-4o'" | ||
}, | ||
"ai_base_url": { | ||
"name": "ai_base_url", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"codeium_api_key": { | ||
"name": "codeium_api_key", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"subscription_email": { | ||
"name": "subscription_email", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {} | ||
}, | ||
"secrets": { | ||
"name": "secrets", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "integer", | ||
"primaryKey": true, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"name": { | ||
"name": "name", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"value": { | ||
"name": "value", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
} | ||
}, | ||
"indexes": { | ||
"secrets_name_unique": { | ||
"name": "secrets_name_unique", | ||
"columns": [ | ||
"name" | ||
], | ||
"isUnique": true | ||
} | ||
}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {} | ||
}, | ||
"secrets_to_sessions": { | ||
"name": "secrets_to_sessions", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "integer", | ||
"primaryKey": true, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"session_id": { | ||
"name": "session_id", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"secret_id": { | ||
"name": "secret_id", | ||
"type": "integer", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
} | ||
}, | ||
"indexes": { | ||
"secrets_to_sessions_session_id_secret_id_unique": { | ||
"name": "secrets_to_sessions_session_id_secret_id_unique", | ||
"columns": [ | ||
"session_id", | ||
"secret_id" | ||
], | ||
"isUnique": true | ||
} | ||
}, | ||
"foreignKeys": { | ||
"secrets_to_sessions_secret_id_secrets_id_fk": { | ||
"name": "secrets_to_sessions_secret_id_secrets_id_fk", | ||
"tableFrom": "secrets_to_sessions", | ||
"tableTo": "secrets", | ||
"columnsFrom": [ | ||
"secret_id" | ||
], | ||
"columnsTo": [ | ||
"id" | ||
], | ||
"onDelete": "no action", | ||
"onUpdate": "no action" | ||
} | ||
}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {} | ||
} | ||
}, | ||
"enums": {}, | ||
"_meta": { | ||
"schemas": {}, | ||
"tables": {}, | ||
"columns": {} | ||
}, | ||
"internal": { | ||
"indexes": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this npm task to take the
language_server.proto
file and convert it into the json descriptors data that is required by the client.Note that currently this generated json descriptors file is committed. I could potentially set this up to generate fresh when starting up the dev server / building for release, but as this in practice will rarely / more likely never change, it seemed like setting up more complex build infrastructure here would be less useful than it otherwise would be.