Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
||
| The fastest way to migrate is to give your AI coding agent the OpenAPI schema and let it update your code. You can download the schema from `/api-reference` on your Sourcegraph instance (e.g. `https://sourcegraph.example.com/api-reference`) — look for the **Download OpenAPI** button. Then tell your agent to migrate your Deep Search API calls to the new `/api/` equivalents. | ||
|
|
||
| For a real-world example, see [this Amp thread](https://ampcode.com/threads/T-019c9bf7-e5bd-778e-b8c8-0796ce033784) migrating the [raycast-sourcegraph](https://github.com/bobheadxi/raycast-sourcegraph) extension from the old API to the new endpoints. |
There was a problem hiding this comment.
Can you also try with just this prompt? Curious if it works also 😁
Migrate the Deep Search API calls in this project from the deprecated /.api/deepsearch/v1 endpoints to the new Sourcegraph /api/deepsearch.v1.Service/ endpoints.
The main file to update is src/sourcegraph/deep-search/index.ts. Use the attached OpenAPI schema (@sourcesourcegraph-openapi.json) as the specification for the new API.
Also, did you try running the extension to make sure the migrated changes work correctly? happy to pair to try that out
There was a problem hiding this comment.
I just tried this prompt, down to pair later
There was a problem hiding this comment.
Should we tell them to point the agent to this doc page to? Meaning, should we treat this page as one giant migration prompt for humans and agents?
There was a problem hiding this comment.
yeah, though i worry it's a bit large since it includes the old schema
we should also remove the preview status of this page too, since it's currently hidden by default, to make it easier for the agent to access. with the migration guide on top and all the warnings i think it's fine for it to be discoverable
| - `404` - Not Found | ||
| - `500` - Internal Server Error | ||
|
|
||
| ## Migrating to the New Sourcegraph API |
There was a problem hiding this comment.
should we put this at the top?
There was a problem hiding this comment.
I think having this at the very end of the page makes the flow better? I added a new callout at the top; however, let me know if you still want this section at the top.
There was a problem hiding this comment.
I think having the migration at the top sets the expectations right when you land on the page, that we want you to migrate - a link is easy to miss/ignore
|
I tried to run this locally with Should we mention this guide on the top-level API page as well? It's quite hidden right now. |
Co-authored-by: Robert Lin <robert@bobheadxi.dev>
stefanhengl
left a comment
There was a problem hiding this comment.
Left a couple of minor comments, but otherwise the content looks great!
I think it might be the |
Updated migration checklist to recommend generating a new access token.
CLOSE CU-2424
Adds a new guide that walks integrators through migrating to the new Sourcegraph API