File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,13 @@ function MyComponent({ domain }) {
3333 body: {
3434 fp: ' anonymous' ,
3535 retrievalPageSize: 5 ,
36+ context: [
37+ {
38+ type: ' code' ,
39+ value: ' const example = "code snippet";' ,
40+ elementId: ' code-block-1' ,
41+ },
42+ ],
3643 },
3744 streamProtocol: ' data' ,
3845 sendExtraMessageFields: true ,
@@ -61,6 +68,12 @@ function MyComponent({ domain }) {
6168- ` body.fp ` - Fingerprint identifier (use 'anonymous' or a user identifier).
6269- ` body.retrievalPageSize ` - Number of search results to use (recommended: 5).
6370
71+ ** Optional configuration:**
72+ - ` body.context ` - Array of contextual information to provide to the assistant. Each context object contains:
73+ - ` type ` - Either ` 'code' ` or ` 'textSelection' ` .
74+ - ` value ` - The code snippet or selected text content.
75+ - ` elementId ` (optional) - Identifier for the UI element containing the context.
76+
6477</Step >
6578</Steps >
6679
You can’t perform that action at this time.
0 commit comments