refactor(podcasts): drop chat podcast polling state

This commit is contained in:
CREDO23 2026-06-11 10:04:51 +02:00
parent 1f9fd61c9e
commit ccd8209d12
2 changed files with 0 additions and 105 deletions

View file

@ -77,11 +77,6 @@ import {
convertToThreadMessage,
reconcileInterruptedAssistantMessages,
} from "@/lib/chat/message-utils";
import {
isPodcastGenerating,
looksLikePodcastRequest,
setActivePodcastTaskId,
} from "@/lib/chat/podcast-state";
import { createStreamFlushHelpers } from "@/lib/chat/stream-flush";
import { consumeSseEvents, processSharedStreamEvent } from "@/lib/chat/stream-pipeline";
import {
@ -954,11 +949,6 @@ export default function NewChatPage() {
if (!userQuery.trim() && userImages.length === 0) return;
if (userQuery.trim() && isPodcastGenerating() && looksLikePodcastRequest(userQuery)) {
toast.warning("A podcast is already being generated.");
return;
}
const token = getBearerToken();
if (!token) {
toast.error("Not authenticated. Please log in again.");
@ -1218,17 +1208,6 @@ export default function NewChatPage() {
recentCancelRequestedAtRef.current = Date.now();
}
},
onToolOutputAvailable: (event, sharedCtx) => {
if (event.output?.status === "pending" && event.output?.podcast_id) {
const idx = sharedCtx.toolCallIndices.get(event.toolCallId);
if (idx !== undefined) {
const part = sharedCtx.contentPartsState.contentParts[idx];
if (part?.type === "tool-call" && part.toolName === "generate_podcast") {
setActivePodcastTaskId(String(event.output.podcast_id));
}
}
}
},
})
) {
return;
@ -2187,17 +2166,6 @@ export default function NewChatPage() {
recentCancelRequestedAtRef.current = Date.now();
}
},
onToolOutputAvailable: (event, sharedCtx) => {
if (event.output?.status === "pending" && event.output?.podcast_id) {
const idx = sharedCtx.toolCallIndices.get(event.toolCallId);
if (idx !== undefined) {
const part = sharedCtx.contentPartsState.contentParts[idx];
if (part?.type === "tool-call" && part.toolName === "generate_podcast") {
setActivePodcastTaskId(String(event.output.podcast_id));
}
}
}
},
})
) {
return;