Skip to content

Commit c8941c1

Browse files
authored
feat: initial feature-flagged, new autocompleter. Now lazy loaded on first use MONGOSH-2036 (#2462)
* Reapply "feat: initial feature-flagged, new autocompleter MONGOSH-2036" (#2461) This reverts commit 0387cea. * lazy-load the new autocompleter code on first use * fix tests for new autocomplete * leave api-export alone * use the same function that would fail if used to know if we support getting the active connection * remove the check from here, we'll add it to mongodb-ts-autocomplete * use the latest mongodb-ts-autocomplete * mongodb-ts-autocomplete also lives outside of the snapshot
1 parent 642243f commit c8941c1

File tree

15 files changed

+689
-129
lines changed

15 files changed

+689
-129
lines changed

package-lock.json

Lines changed: 230 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/browser-runtime-core/src/open-context-runtime.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export interface InterpreterEnvironment {
2929
*/
3030
export class OpenContextRuntime implements Runtime {
3131
private interpreterEnvironment: InterpreterEnvironment;
32+
// TODO(MONGOSH-2205): we have to also port this to the new autocomplete
3233
private autocompleter: ShellApiAutocompleter | null = null;
3334
private shellEvaluator: ShellEvaluator;
3435
private instanceState: ShellInstanceState;

packages/cli-repl/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"@mongosh/shell-evaluator": "^3.11.0",
7878
"@mongosh/snippet-manager": "^3.11.0",
7979
"@mongosh/types": "3.6.2",
80+
"@mongodb-js/mongodb-ts-autocomplete": "^0.2.4",
8081
"@segment/analytics-node": "^1.3.0",
8182
"ansi-escape-sequences": "^5.1.2",
8283
"askcharacter": "^2.0.4",

0 commit comments

Comments
 (0)