Skip to content

Commit b6c30eb

Browse files
committed
Merge remote-tracking branch 'origin/VSCODE-528-mongodb-copilot' into VSCODE-574-export-to-playground
# Conflicts: # src/participant/participant.ts # src/test/suite/participant/participant.test.ts
2 parents 5d873df + 7eef0e7 commit b6c30eb

21 files changed

+1626
-592
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"test": "npm run test-webview && npm run test-extension",
5555
"test-extension": "cross-env NODE_OPTIONS=--no-force-async-hooks-checks xvfb-maybe node ./out/test/runTest.js",
5656
"test-webview": "mocha -r ts-node/register --file ./src/test/setup-webview.ts src/test/suite/views/webview-app/**/*.test.tsx",
57-
"ai-accuracy-tests": "mocha -r ts-node/register --file ./src/test/ai-accuracy-tests/test-setup.ts ./src/test/ai-accuracy-tests/ai-accuracy-tests.ts",
57+
"ai-accuracy-tests": "env TS_NODE_FILES=true mocha -r ts-node/register --file ./src/test/ai-accuracy-tests/test-setup.ts ./src/test/ai-accuracy-tests/ai-accuracy-tests.ts",
5858
"analyze-bundle": "webpack --mode production --analyze",
5959
"vscode:prepublish": "npm run clean && npm run compile:constants && npm run compile:resources && webpack --mode production",
6060
"check": "npm run lint && npm run depcheck",

src/participant/constants.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@ export type ParticipantResponseType =
1414
| 'askToConnect'
1515
| 'askForNamespace';
1616

17+
export const codeBlockIdentifier = {
18+
start: '```javascript',
19+
end: '```',
20+
};
21+
1722
interface Metadata {
18-
intent: Exclude<ParticipantResponseType, 'askForNamespace'>;
23+
intent: Exclude<ParticipantResponseType, 'askForNamespace' | 'docs'>;
1924
chatId: string;
20-
docsChatbotMessageId?: string;
2125
}
2226

2327
interface AskForNamespaceMetadata {
@@ -27,8 +31,14 @@ interface AskForNamespaceMetadata {
2731
collectionName?: string | undefined;
2832
}
2933

34+
interface DocsRequestMetadata {
35+
intent: 'docs';
36+
chatId: string;
37+
docsChatbotMessageId?: string;
38+
}
39+
3040
export interface ChatResult extends vscode.ChatResult {
31-
readonly metadata: Metadata | AskForNamespaceMetadata;
41+
readonly metadata: Metadata | AskForNamespaceMetadata | DocsRequestMetadata;
3242
}
3343

3444
export function namespaceRequestChatResult({

0 commit comments

Comments
 (0)