docs: Add HttpContextProvider request shape docs

This commit is contained in:
Andreas Opferkuch 2025-04-14 12:31:31 +02:00
parent 4873f5805f
commit e735997910
No known key found for this signature in database

View file

@ -47,7 +47,17 @@ Continue can retrieve context from a custom HTTP server that you create and serv
Then, create a server that responds to requests as are made from [HttpContextProvider.ts](https://github.com/continuedev/continue/blob/main/core/context/providers/HttpContextProvider.ts). See the `hello` endpoint in [context_provider_server.py](https://github.com/continuedev/continue/blob/main/core/context/providers/context_provider_server.py) for an example that uses FastAPI.
The `"options"` property can be used to send additional parameters to your endpoint, which will be included in the request body.
The `"options"` property can be used to send additional parameters to your endpoint. The full request body has the following shape:
```typescript
{
query: string;
fullInput: string;
options: Record<string, JsonValue>;
workspacePath?: string; // Only provided if the server is local.
}
```
:::info
The following methods for creating custom context providers are deprecated. We recommend using HTTP context providers, [MCP Servers](../context-providers.mdx#model-context-protocol), and [Prompts](../deep-dives/prompts.md) where possible.