Skip to content

Commit a1f53d1

Browse files
authored
chore(compass-generative-ai): add generative ai package COMPASS-7244 (#4968)
1 parent 66099ac commit a1f53d1

28 files changed

+320
-37
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ Is there anything else you’d like to see in Compass? Let us know by submitting
4747
- [**@mongodb-js/compass-connections**](packages/compass-connections): Manage your MongoDB connections and connect in Compass
4848
- [**@mongodb-js/compass-databases-navigation**](packages/compass-databases-navigation): Databases and collections sidebar navigation tree
4949
- [**@mongodb-js/compass-editor**](packages/compass-editor): Reusable Compass editor component based on ace-editor with MongoDB-specific ace modes, themes, and autocompleters
50+
- [**@mongodb-js/compass-generative-ai**](packages/compass-generative-ai): Shared components and helpers for the generative ai aspects of Compass
5051
- [**@mongodb-js/compass-logging**](packages/compass-logging): Shared helpers for logging in Compass packages
5152
- [**@mongodb-js/compass-maybe-protect-connection-string**](packages/compass-maybe-protect-connection-string): Utility for protecting connection strings if requested
52-
- [**@mongodb-js/compass-settings**](packages/compass-settings): Settings for compass
53+
- [**@mongodb-js/compass-settings**](packages/compass-settings): Settings for Compass
5354
- [**@mongodb-js/compass-utils**](packages/compass-utils): Utilities for MongoDB Compass Development
5455
- [**@mongodb-js/compass-welcome**](packages/compass-welcome): The welcome modal
5556
- [**@mongodb-js/connection-form**](packages/connection-form): A form for specifying information needed to connect to a MongoDB instance

package-lock.json

+125
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compass-aggregations/package.json

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"@mongodb-js/compass-components": "^1.15.0",
4343
"@mongodb-js/compass-crud": "^13.15.1",
4444
"@mongodb-js/compass-editor": "^0.14.1",
45+
"@mongodb-js/compass-generative-ai": "^0.1.0",
4546
"@mongodb-js/compass-logging": "^1.2.2",
4647
"@mongodb-js/compass-user-data": "^0.1.4",
4748
"@mongodb-js/compass-utils": "^0.5.1",
@@ -102,6 +103,7 @@
102103
"@mongodb-js/compass-components": "^1.15.0",
103104
"@mongodb-js/compass-crud": "^13.15.1",
104105
"@mongodb-js/compass-editor": "^0.14.1",
106+
"@mongodb-js/compass-generative-ai": "^0.1.0",
105107
"@mongodb-js/compass-logging": "^1.2.2",
106108
"@mongodb-js/compass-user-data": "^0.1.4",
107109
"@mongodb-js/compass-utils": "^0.5.1",

packages/compass-aggregations/src/components/pipeline-toolbar/pipeline-ai.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, { useRef, useEffect } from 'react';
2-
import { GenerativeAIInput, openToast } from '@mongodb-js/compass-components';
2+
import { openToast } from '@mongodb-js/compass-components';
3+
import { GenerativeAIInput } from '@mongodb-js/compass-generative-ai';
34
import { connect } from 'react-redux';
45
import createLoggerAndTelemetry from '@mongodb-js/compass-logging';
56
import { usePreference } from 'compass-preferences-model';

packages/compass-aggregations/src/components/pipeline-toolbar/pipeline-header/pipeline-actions.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import React from 'react';
22
import { connect } from 'react-redux';
33
import {
4-
AIExperienceEntry,
54
Button,
65
MoreOptionsToggle,
76
PerformanceSignals,
87
SignalPopover,
98
css,
109
spacing,
1110
} from '@mongodb-js/compass-components';
11+
import { AIExperienceEntry } from '@mongodb-js/compass-generative-ai';
1212
import type { RootState } from '../../../modules';
1313
import {
1414
exportAggregationResults,

packages/compass-aggregations/src/components/pipeline-toolbar/pipeline-header/pipeline-stages.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import { connect } from 'react-redux';
33
import {
4-
AIExperienceEntry,
54
Pipeline,
65
Stage,
76
Description,
@@ -11,6 +10,7 @@ import {
1110
Button,
1211
Icon,
1312
} from '@mongodb-js/compass-components';
13+
import { AIExperienceEntry } from '@mongodb-js/compass-generative-ai';
1414
import { useIsAIFeatureEnabled } from 'compass-preferences-model';
1515

1616
import type { RootState } from '../../../modules';

packages/compass-components/src/index.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@ import {
5050
export { DocumentIcon } from './components/icons/document-icon';
5151
export { FavoriteIcon } from './components/icons/favorite-icon';
5252
export { NoSavedItemsIcon } from './components/icons/no-saved-items-icon';
53-
export {
54-
AIExperienceEntry,
55-
GenerativeAIInput,
56-
createAIPlaceholderHTMLPlaceholder,
57-
} from './components/generative-ai';
53+
export { GuideCue as LGGuideCue } from '@leafygreen-ui/guide-cue';
5854
export { Variant as BadgeVariant } from '@leafygreen-ui/badge';
5955
export { Variant as BannerVariant } from '@leafygreen-ui/banner';
6056
export {
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ignores:
2+
- '@mongodb-js/prettier-config-compass'
3+
- '@mongodb-js/tsconfig-compass'
4+
- '@types/chai'
5+
- '@types/sinon-chai'
6+
- 'sinon'
7+
- '@types/chai-dom'
8+
- '@types/react'
9+
- '@types/react-dom'
10+
ignore-patterns:
11+
- 'dist'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.nyc-output
2+
dist
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['@mongodb-js/eslint-config-compass'],
4+
parserOptions: {
5+
tsconfigRootDir: __dirname,
6+
project: ['./tsconfig-lint.json'],
7+
},
8+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('@mongodb-js/mocha-config-compass/compass-plugin');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.nyc_output
2+
dist
3+
coverage
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"@mongodb-js/prettier-config-compass"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"name": "@mongodb-js/compass-generative-ai",
3+
"productName": "compass-generative-ai",
4+
"description": "Generative AI aspects for Compass",
5+
"author": {
6+
"name": "MongoDB Inc",
7+
"email": "[email protected]"
8+
},
9+
"publishConfig": {
10+
"access": "public"
11+
},
12+
"bugs": {
13+
"url": "https://jira.mongodb.org/projects/COMPASS/issues",
14+
"email": "[email protected]"
15+
},
16+
"homepage": "https://github.com/mongodb-js/compass",
17+
"version": "0.1.0",
18+
"repository": {
19+
"type": "git",
20+
"url": "https://github.com/mongodb-js/compass.git"
21+
},
22+
"files": [
23+
"dist"
24+
],
25+
"license": "SSPL",
26+
"main": "dist/index.js",
27+
"compass:main": "src/index.ts",
28+
"exports": {
29+
"browser": "./dist/browser.js",
30+
"require": "./dist/index.js"
31+
},
32+
"compass:exports": {
33+
".": "./src/index.ts"
34+
},
35+
"types": "./dist/src/index.d.ts",
36+
"scripts": {
37+
"bootstrap": "npm run postcompile",
38+
"prepublishOnly": "npm run compile",
39+
"compile": "npm run webpack -- --mode production",
40+
"webpack": "webpack-compass",
41+
"postcompile": "tsc --emitDeclarationOnly",
42+
"start": "npm run webpack serve -- --mode development",
43+
"analyze": "npm run webpack -- --mode production --analyze",
44+
"typecheck": "tsc -p tsconfig-lint.json --noEmit",
45+
"eslint": "eslint",
46+
"prettier": "prettier",
47+
"lint": "npm run eslint . && npm run prettier -- --check .",
48+
"depcheck": "compass-scripts check-peer-deps && depcheck",
49+
"check": "npm run typecheck && npm run lint && npm run depcheck",
50+
"check-ci": "npm run check",
51+
"test": "mocha",
52+
"test-electron": "xvfb-maybe electron-mocha --no-sandbox",
53+
"test-cov": "nyc --compact=false --produce-source-map=false -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test",
54+
"test-watch": "npm run test -- --watch",
55+
"test-ci": "npm run test-cov",
56+
"test-ci-electron": "npm run test-electron",
57+
"reformat": "npm run prettier -- --write . && npm run eslint . --fix"
58+
},
59+
"peerDependencies": {
60+
"@mongodb-js/compass-components": "^1.15.0",
61+
"react": "*"
62+
},
63+
"dependencies": {
64+
"@mongodb-js/compass-components": "^1.15.0"
65+
},
66+
"devDependencies": {
67+
"@mongodb-js/eslint-config-compass": "^1.0.9",
68+
"@mongodb-js/mocha-config-compass": "^1.3.1",
69+
"@mongodb-js/prettier-config-compass": "^1.0.1",
70+
"@mongodb-js/tsconfig-compass": "^1.0.3",
71+
"@mongodb-js/webpack-config-compass": "^1.2.1",
72+
"@testing-library/react": "^12.1.4",
73+
"@testing-library/user-event": "^13.5.0",
74+
"@types/chai": "^4.2.21",
75+
"@types/chai-dom": "^0.0.10",
76+
"@types/mocha": "^9.0.0",
77+
"@types/react": "^17.0.5",
78+
"@types/react-dom": "^17.0.10",
79+
"@types/sinon-chai": "^3.2.5",
80+
"chai": "^4.3.6",
81+
"depcheck": "^1.4.1",
82+
"eslint": "^7.25.0",
83+
"mocha": "^10.2.0",
84+
"nyc": "^15.1.0",
85+
"prettier": "^2.7.1",
86+
"react": "^17.0.2",
87+
"react-dom": "^17.0.2",
88+
"sinon": "^9.2.3",
89+
"xvfb-maybe": "^0.2.1"
90+
}
91+
}

0 commit comments

Comments
 (0)