From 9c00db7d3bd127177026af8289206080e119614a Mon Sep 17 00:00:00 2001 From: Timothy Carambat <rambat1010@gmail.com> Date: Tue, 23 Apr 2024 09:59:00 -0700 Subject: [PATCH] patch agent invocation rule (#1175) --- server/models/workspaceAgentInvocation.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/models/workspaceAgentInvocation.js b/server/models/workspaceAgentInvocation.js index 376d62731..4ef56e40e 100644 --- a/server/models/workspaceAgentInvocation.js +++ b/server/models/workspaceAgentInvocation.js @@ -3,7 +3,9 @@ const { v4: uuidv4 } = require("uuid"); const WorkspaceAgentInvocation = { // returns array of strings with their @ handle. + // must start with @ parseAgents: function (promptString) { + if (!promptString.startsWith("@")) return []; return promptString.split(/\s+/).filter((v) => v.startsWith("@")); }, -- GitLab