fix(ai): bump roundSinceText cutoff to 30 to prevent panic loops

This commit is contained in:
2026-05-19 15:26:15 -07:00
parent 63b64d5fc2
commit 7c45fdc5cc
2 changed files with 2 additions and 2 deletions

View File

@@ -897,7 +897,7 @@ export async function POST(request: Request) {
(round >= MAX_TOOL_ROUNDS || (round >= MAX_TOOL_ROUNDS ||
!!loopBreakReason || !!loopBreakReason ||
assistantText.trim().length === 0 || assistantText.trim().length === 0 ||
roundsSinceText >= 8 || roundsSinceText >= 30 ||
lastToolResultsHadFailure(messages)); lastToolResultsHadFailure(messages));
if (needsRecovery) { if (needsRecovery) {

View File

@@ -788,7 +788,7 @@ export function ChatPanel({
const [activeThread, setActiveThread] = useState<string | null>(null); const [activeThread, setActiveThread] = useState<string | null>(null);
const [messages, setMessages] = useState<Message[]>([]); const [messages, setMessages] = useState<Message[]>([]);
const [input, setInput] = useState(""); const [input, setInput] = useState("");
const [chatMode, setChatMode] = useState<"collaborate" | "vibe" | "delegate">("collaborate"); const [chatMode, setChatMode] = useState<"collaborate" | "vibe" | "delegate">("vibe");
const [sending, setSending] = useState(false); const [sending, setSending] = useState(false);
const [showThreads, setShowThreads] = useState(false); const [showThreads, setShowThreads] = useState(false);
const [mcpToken, setMcpToken] = useState<string | null>(null); const [mcpToken, setMcpToken] = useState<string | null>(null);