Add local source ingest and podcasts

This commit is contained in:
Krishna Kumar
2026-07-02 01:11:03 -05:00
parent 4d875e12d6
commit f8693f4be0
18 changed files with 1044 additions and 31 deletions

View File

@@ -37,6 +37,8 @@ final class PodcastGenerationManager {
func enqueue(articleUrl: String,
title: String,
parentBookmarkUrl: String? = nil,
sourceText: String? = nil,
sourceKind: String? = nil,
onReady: ((URL, String) -> Void)? = nil) {
let cached = ClaudeService.cachedPodcastURL(for: articleUrl)
if FileManager.default.fileExists(atPath: cached.path) {
@@ -52,7 +54,12 @@ final class PodcastGenerationManager {
let task = Task { [weak self] in
guard let self else { return }
do {
let jobId = try await claude.generatePodcast(url: articleUrl)
let jobId = try await claude.generatePodcast(
url: articleUrl,
title: title,
sourceText: sourceText,
sourceKind: sourceKind
)
while !Task.isCancelled {
let status = try await claude.podcastStatus(jobId: jobId)
update(articleUrl) {