Replace allowPartialContext with a mode enum

This commit is contained in:
Josh Gross
2022-12-09 10:40:19 -05:00
parent eeb39de9d5
commit cb0bee35fe
5 changed files with 38 additions and 38 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ import {File} from "@github/actions-workflow-parser/workflows/file";
import {Position, TextDocument} from "vscode-languageserver-textdocument";
import {CompletionItem, TextEdit, Range} from "vscode-languageserver-types";
import {ContextProviderConfig} from "./context-providers/config";
import {getContext} from "./context-providers/default";
import {getContext, Mode} from "./context-providers/default";
import {getWorkflowContext, WorkflowContext} from "./context/workflow-context";
import {nullTrace} from "./nulltrace";
import {getAllowedContext} from "./utils/allowed-context";
@@ -85,7 +85,7 @@ export async function complete(
const expressionInput = (getExpressionInput(currentInput, relCharPos) || "").trim();
const allowedContext = getAllowedContext(token, parent);
const context = await getContext(allowedContext, contextProviderConfig, workflowContext, true);
const context = await getContext(allowedContext, contextProviderConfig, workflowContext, Mode.Completion);
return completeExpression(expressionInput, context, []);
}