fix: relax conversational guard on long/detailed messages over 60 chars to allow prompt tool execution

This commit is contained in:
2026-06-02 12:26:04 -07:00
parent dae91cbf00
commit f382ef0369

View File

@@ -763,6 +763,7 @@ export async function POST(request: Request) {
// This is more reliable than a prompt rule against a "do-er" model.
function isConversational(msg: string): boolean {
const m = msg.trim();
if (m.length > 60) return false; // Long/detailed messages are action statements or bug reports, not simple chit-chat
if (m.length < 3) return true; // single word / emoji
if (m.endsWith("?")) return true; // explicit question
// Short phrases that are status checks or greetings