fix(ai): bump roundSinceText cutoff to 30 to prevent panic loops
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user