Skip to content

Commit 9e726bc

Browse files
committed
fix(devins-lang): improve error message for duplicate agent calls #101
The error message for duplicate agent calls has been enhanced to provide more context and a clear recommendation to the user. Previously, it only indicated "Duplicate agent calling", which was not very descriptive. Now, the message includes a suggestion to remove the duplicate calls and emphasizes the importance of making only one call per agent.
1 parent d2df012 commit 9e726bc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/lints/DevInsDuplicateAgentInspection.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ class DevInsDuplicateAgentInspection : LocalInspectionTool() {
2222
o.firstChild.let { next ->
2323
if (next.nextSibling.elementType == DevInTypes.AGENT_ID) {
2424
if (agentIds.contains(next.text)) {
25-
holder.registerProblem(next, "Duplicate agent calling")
25+
holder.registerProblem(
26+
o,
27+
"Duplicate agent calls detected. It is recommended to make only one call per agent. Please remove any duplicate agent calls."
28+
)
2629
} else {
2730
agentIds.add(next.text)
2831
}

0 commit comments

Comments
 (0)