diff --git a/server/gx-workflow-ls-format2/src/services/completionService.ts b/server/gx-workflow-ls-format2/src/services/completionService.ts index bc2c53e..fdbbad2 100644 --- a/server/gx-workflow-ls-format2/src/services/completionService.ts +++ b/server/gx-workflow-ls-format2/src/services/completionService.ts @@ -128,7 +128,7 @@ export class GxFormat2CompletionService { return result; } if (schemaNode.name === "tool_id") { - if (currentWord) { + if (currentWord && !currentWord.includes("/")) { const tools = await this.toolshedService.searchToolsById(currentWord); for (const tool of tools) { const item: CompletionItem = this.buildCompletionItemFromTool(tool, overwriteRange); diff --git a/server/gx-workflow-ls-format2/tests/integration/completion.test.ts b/server/gx-workflow-ls-format2/tests/integration/completion.test.ts index 1db1d6d..2f6f1a6 100644 --- a/server/gx-workflow-ls-format2/tests/integration/completion.test.ts +++ b/server/gx-workflow-ls-format2/tests/integration/completion.test.ts @@ -413,4 +413,17 @@ steps: expect(completions?.items).toHaveLength(0); }); + + it("should not suggest toolshed tools when the cursor is inside the `tool_id` property and the current word contains slashes", async () => { + const template = ` +class: GalaxyWorkflow +steps: + my_step: + tool_id: toolshed/owner/repo/tool$`; + const { contents, position } = parseTemplate(template); + + const completions = await getCompletions(contents, position); + + expect(completions?.items).toHaveLength(0); + }); });