mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-10 17:00:11 +01:00
patch agent invocation rule (#1175)
This commit is contained in:
parent
2543e8df40
commit
9c00db7d3b
@ -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("@"));
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user