Skip to content

Commit 267612c

Browse files
committed
Don't print database warnings for agent config if in dev
1 parent 9c9e752 commit 267612c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

common/src/util/agent-template-validation.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,13 @@ export async function validateSpawnableAgents(
4848
// Check if agent exists in database.
4949
const agent = await fetchAgent(agentId, version, publisherId)
5050
if (!agent) {
51-
invalidIds.push(givenAgentId)
52-
validationErrors.push({
53-
filePath: givenAgentId,
54-
message: `Invalid agent ID: ${givenAgentId}. Agent not found in database.`,
55-
})
51+
if (process.env.NODE_ENV !== 'development') {
52+
invalidIds.push(givenAgentId)
53+
validationErrors.push({
54+
filePath: givenAgentId,
55+
message: `Invalid agent ID: ${givenAgentId}. Agent not found in database.`,
56+
})
57+
}
5658
continue
5759
}
5860
availableAgentTypes.push(givenAgentId)

0 commit comments

Comments
 (0)