|
@@ -514,8 +514,8 @@ const knowhubPlugin = {
|
|
|
api.on("before_prompt_build", async (event, ctx) => {
|
|
api.on("before_prompt_build", async (event, ctx) => {
|
|
|
try {
|
|
try {
|
|
|
const stripped = stripLeadingInboundMetadata(event.prompt);
|
|
const stripped = stripLeadingInboundMetadata(event.prompt);
|
|
|
- const userPrompt = normalizeStrippedInboundText(stripped);
|
|
|
|
|
- if (!userPrompt || userPrompt.length < 5) {
|
|
|
|
|
|
|
+ const userPrompt = normalizeStrippedInboundText(stripped).trim();
|
|
|
|
|
+ if (!userPrompt || userPrompt.length < 5 || userPrompt.startsWith("/")) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|