Skip to content

Commit

Permalink
Add configuration to disable autocomplete (#3139)
Browse files Browse the repository at this point in the history
Follow-up to #3114
  • Loading branch information
devinrsmith authored Dec 5, 2022
1 parent 5fcee3e commit 2375f8b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public class ConsoleServiceGrpcImpl extends ConsoleServiceGrpc.ConsoleServiceImp
public static final boolean REMOTE_CONSOLE_DISABLED =
Configuration.getInstance().getBooleanWithDefault("deephaven.console.disable", false);

public static final boolean AUTOCOMPLETE_DISABLED =
Configuration.getInstance().getBooleanWithDefault("deephaven.console.autocomplete.disable", false);

public static final boolean QUIET_AUTOCOMPLETE_ERRORS =
Configuration.getInstance().getBooleanWithDefault("deephaven.console.autocomplete.quiet", true);

Expand Down Expand Up @@ -257,6 +260,9 @@ public void bindTableToVariable(BindTableToVariableRequest request,
public StreamObserver<AutoCompleteRequest> autoCompleteStream(
StreamObserver<AutoCompleteResponse> responseObserver) {
return GrpcUtil.rpcWrapper(log, responseObserver, () -> {
if (AUTOCOMPLETE_DISABLED) {
return new NoopAutoCompleteObserver(responseObserver);
}
final SessionState session = sessionService.getCurrentSession();
if (PythonDeephavenSession.SCRIPT_TYPE.equals(scriptSessionProvider.get().scriptType())) {
PyObject[] settings = new PyObject[1];
Expand Down

0 comments on commit 2375f8b

Please sign in to comment.