Migrate AI features to backend, add podcast generation
- ClaudeService: replace direct OpenRouter calls with backend endpoints (/v1/marks/enrich, /v1/marks/search, /v1/marks/collections) - ClaudeService: add podcast methods (generate, status, downloadAudio) - SettingsView: replace OpenRouter key field with backend URL + API key - PodcastPlayerView: new sheet — generate → poll → AVPlayer playback - BrowserView: headphones toolbar button triggers podcast for current URL - BookmarksView: "Convert to Podcast" context menu item + sheet Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ struct BookmarksView: View {
|
||||
@State private var showAddBookmark = false
|
||||
@State private var editingBookmark: Bookmark?
|
||||
@State private var browsingBookmark: Bookmark?
|
||||
@State private var podcastBookmark: Bookmark?
|
||||
|
||||
var body: some View {
|
||||
NavigationStack {
|
||||
@@ -59,6 +60,13 @@ struct BookmarksView: View {
|
||||
} label: {
|
||||
Label("Open in Safari", systemImage: "safari")
|
||||
}
|
||||
if viewModel.claude != nil {
|
||||
Button {
|
||||
podcastBookmark = bookmark
|
||||
} label: {
|
||||
Label("Convert to Podcast", systemImage: "headphones")
|
||||
}
|
||||
}
|
||||
Divider()
|
||||
Button {
|
||||
Task { await viewModel.archive(bookmark) }
|
||||
@@ -147,7 +155,12 @@ struct BookmarksView: View {
|
||||
}
|
||||
.sheet(item: $browsingBookmark) { bookmark in
|
||||
if let url = URL(string: bookmark.url) {
|
||||
BrowserView(url: url, title: bookmark.displayTitle)
|
||||
BrowserView(url: url, title: bookmark.displayTitle, claude: viewModel.claude)
|
||||
}
|
||||
}
|
||||
.sheet(item: $podcastBookmark) { bookmark in
|
||||
if let claude = viewModel.claude {
|
||||
PodcastPlayerView(articleUrl: bookmark.url, claude: claude)
|
||||
}
|
||||
}
|
||||
.refreshable {
|
||||
|
||||
Reference in New Issue
Block a user