feat: wire discuss button in briefing RSS cards, cap cards at 3
Adds discussArticle() to BriefingApi and wires it through to the RSS news cards in BriefingScreen so tapping Discuss opens a chat conversation seeded with the article. Also caps RSS cards per message at 3 to avoid overly long briefing threads. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,22 @@ class BriefingApi {
|
||||
}
|
||||
}
|
||||
|
||||
/// POST /api/briefing/articles/{itemId}/discuss body: {"conv_id": convId}
|
||||
/// Injects the article as context and triggers LLM generation.
|
||||
/// Returns the assistant_message_id of the generating placeholder.
|
||||
Future<int> discussArticle(int convId, int itemId) async {
|
||||
try {
|
||||
final response = await _dio.post(
|
||||
'/api/briefing/articles/$itemId/discuss',
|
||||
data: {'conv_id': convId},
|
||||
);
|
||||
final data = response.data as Map<String, dynamic>;
|
||||
return data['assistant_message_id'] as int;
|
||||
} on DioException catch (e) {
|
||||
throw dioToApp(e);
|
||||
}
|
||||
}
|
||||
|
||||
/// DELETE /api/briefing/rss-reactions/{rssItemId}
|
||||
Future<void> deleteRssReaction(int rssItemId) async {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user