Uh oh!
There was an error while loading. Please reload this page.
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| const url = `${graphqlClient.endpoint}/search?q=${encodeURIComponent( | ||
| query.sourcegraphQuery | ||
| )}&patternType=literal` |
There was a problem hiding this comment.
I'm a big fan of this idea of encoding the information we need in the URL (and it works!) and then extracting again in items
Uh oh!
There was an error while loading. Please reload this page.
| "scripts": { | ||
| "build": "tsc --build", | ||
| "test": "vitest", | ||
| "bundle": "esbuild --bundle --format=esm --outfile=dist/bundle.js index.ts" |
There was a problem hiding this comment.
I'm not sure if we should ship with this sort of thing, but very useful during development for manual testing to have a bundler. Not sure common patterns for this in the JS world.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This is an initial Sourcegraph search provider which does unauthenticated searches against sourcegraph.com.
keegancsmith
commented
May 17, 2024
@thenamankumar @sqs force pushed a rebase onto the new API. Ready for review. |
keegancsmith
left a comment
There was a problem hiding this comment.
Two other follow-up items for this PR which I'd like to tackle later:
- authentication against non dot-com instances
- unit tests
| const graphqlClient = new SourcegraphGraphQLAPIClient() | ||
| /** Used to prefix context queries to indicate a sourcegraph search */ | ||
| const QUERY_PREFIXES = ['?', 'src:'] |
There was a problem hiding this comment.
This can probably be removed. I will follow-up after more testing when the cody integration is ready.
This is an initial Sourcegraph search provider which does unauthenticated searches against sourcegraph.com.
Test Plan: See tests done in #48