feat(dashboard): add sidebar with Ollama status, trending topics, and article detail panel
Integrate SearXNG news search, Ollama-powered article summarization with follow-up chat, and a dashboard sidebar showing LLM status, trending keywords, and recent search history. Sidebar yields to a split-view article detail panel when a card is selected. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,44 +1,5 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Categories for classifying AI news articles.
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub enum NewsCategory {
|
||||
/// Large language model announcements and updates
|
||||
Llm,
|
||||
/// AI agent frameworks and tooling
|
||||
Agents,
|
||||
/// Data privacy and regulatory compliance
|
||||
Privacy,
|
||||
/// AI infrastructure and deployment
|
||||
Infrastructure,
|
||||
/// Open-source AI project releases
|
||||
OpenSource,
|
||||
}
|
||||
|
||||
impl NewsCategory {
|
||||
/// Returns the display label for a news category.
|
||||
pub fn label(&self) -> &'static str {
|
||||
match self {
|
||||
Self::Llm => "LLM",
|
||||
Self::Agents => "Agents",
|
||||
Self::Privacy => "Privacy",
|
||||
Self::Infrastructure => "Infrastructure",
|
||||
Self::OpenSource => "Open Source",
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the CSS class suffix for styling category badges.
|
||||
pub fn css_class(&self) -> &'static str {
|
||||
match self {
|
||||
Self::Llm => "llm",
|
||||
Self::Agents => "agents",
|
||||
Self::Privacy => "privacy",
|
||||
Self::Infrastructure => "infrastructure",
|
||||
Self::OpenSource => "open-source",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A single news feed card representing an AI-related article.
|
||||
///
|
||||
/// # Fields
|
||||
@@ -46,7 +7,8 @@ impl NewsCategory {
|
||||
/// * `title` - Headline of the article
|
||||
/// * `source` - Publishing outlet or author
|
||||
/// * `summary` - Brief summary text
|
||||
/// * `category` - Classification category
|
||||
/// * `content` - Full content snippet from search results
|
||||
/// * `category` - Display label for the search topic (e.g. "AI", "Finance")
|
||||
/// * `url` - Link to the full article
|
||||
/// * `thumbnail_url` - Optional thumbnail image URL
|
||||
/// * `published_at` - ISO 8601 date string
|
||||
@@ -55,7 +17,8 @@ pub struct NewsCard {
|
||||
pub title: String,
|
||||
pub source: String,
|
||||
pub summary: String,
|
||||
pub category: NewsCategory,
|
||||
pub content: String,
|
||||
pub category: String,
|
||||
pub url: String,
|
||||
pub thumbnail_url: Option<String>,
|
||||
pub published_at: String,
|
||||
|
||||
Reference in New Issue
Block a user