erge branch 'main' into thyeggman/reusable-workflow-hover

This commit is contained in:
Jacob Wallraff
2023-02-15 17:42:51 -08:00
49 changed files with 1072 additions and 234 deletions
+6 -10
View File
@@ -61,7 +61,9 @@ export async function hover(document: TextDocument, position: Position, config?:
const allowedContext = tokenDefinitionInfo.allowedContext || [];
const {namedContexts, functions} = splitAllowedContext(allowedContext);
const template = await convertWorkflowTemplate(result.context, result.value, ErrorPolicy.TryConversion);
const template = await convertWorkflowTemplate(result.context, result.value, undefined, {
errorPolicy: ErrorPolicy.TryConversion
});
const workflowContext = getWorkflowContext(document.uri, template, tokenResult.path);
const context = await getContext(namedContexts, config?.contextProviderConfig, workflowContext, Mode.Completion);
@@ -116,15 +118,9 @@ async function getDescription(
return defaultDescription;
}
const template = await convertWorkflowTemplate(
result.context,
result.value,
ErrorPolicy.TryConversion,
config?.fileProvider,
{
fetchReusableWorkflowDepth: config?.fileProvider ? 1 : 0
}
);
const template = await convertWorkflowTemplate(result.context, result.value, config?.fileProvider, {
errorPolicy: ErrorPolicy.TryConversion
});
const workflowContext = getWorkflowContext(document.uri, template, path);
const description = await config.descriptionProvider.getDescription(workflowContext, token, path, template);
return description || defaultDescription;