We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25c21cb commit aea1d32Copy full SHA for aea1d32
packages/blink/src/react/use-dev-mode.ts
@@ -532,9 +532,6 @@ export default function useDevMode(options: UseDevModeOptions): UseDevMode {
532
setAutoApprove(true);
533
}
534
535
- // Mark this message as handled immediately
536
- setApprovalHandled(needsApproval.id);
537
-
538
const messages = chat.messages;
539
if (messages.length === 0) {
540
return;
@@ -549,6 +546,8 @@ export default function useDevMode(options: UseDevModeOptions): UseDevMode {
549
546
if (!Array.isArray(lastMsg.parts)) {
550
547
551
548
+ // Mark approval handled only if we can update the message
+ setApprovalHandled(needsApproval.id);
552
// Update all pending approval outputs
553
const updatedParts = lastMsg.parts.map((part: any) => {
554
if (
0 commit comments