Removes the entire RSS feature surface — feeds, items, embeddings, reactions, discussion-note flow, briefing news context, settings, env-vars, and DB tables. Keeps the URL-generic article-reader (the read_article LLM tool) under a clean module so the LLM can still fetch arbitrary article content from URLs the user provides. Backend: - New services/article_fetcher.py — single source of trafilatura URL→text - New services/tools/article.py — read_article tool (was nested under tools/rss) - Delete services/rss.py, rss_classifier.py, rss_filtering.py, article_context.py - Delete services/tools/rss.py - Delete models/rss_feed.py (RssFeed, RssItem), models/rss_item_embedding.py - services/embeddings.py: drop upsert/semantic_search/backfill RSS helpers - services/llm.py: remove _build_briefing_article_context, briefing-conv branch, ARTICLE_DISCUSS_SEED skip-RAG branch; drop get_rss_items / add_rss_feed from the actions list - services/generation_task.py: drop _maybe_save_article_discussion_note + caller - routes/chat.py: drop /api/chat/from-article/<id> endpoint - routes/journal.py: re-import via web.py refactor (article_fetcher path) - services/tools/__init__.py: register `article`, drop `rss` - services/tools/_registry.py: drop the requires=='rss' check - app.py: drop backfill_rss_item_embeddings + backfill_rss_article_content tasks - config.py: prose-only edit (no env var change — RSS env vars were never first-class) Frontend: - stores/settings.ts: drop rssEnabled - SettingsView.vue: drop the RSS-classification mention - api/client.ts: drop openArticleInChat (the from-article endpoint is gone) Tests: - Delete tests/test_rss_service.py, test_news_api.py, test_article_reading.py Migration: - 0042_drop_rss: DROP TABLE rss_item_embeddings, rss_item_reactions, rss_items, rss_feeds; DELETE settings rows for rss_enabled / briefing_*_topics Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
52 lines
2.4 KiB
Python
52 lines
2.4 KiB
Python
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine
|
|
from sqlalchemy.orm import DeclarativeBase
|
|
|
|
from fabledassistant.config import Config
|
|
|
|
engine = create_async_engine(
|
|
Config.DATABASE_URL,
|
|
echo=False,
|
|
pool_pre_ping=True,
|
|
pool_recycle=1800,
|
|
)
|
|
async_session = async_sessionmaker(engine, class_=AsyncSession, expire_on_commit=False)
|
|
|
|
|
|
class Base(DeclarativeBase):
|
|
pass
|
|
|
|
|
|
from fabledassistant.models.base import CreatedAtMixin, TimestampMixin # noqa: E402, F401
|
|
|
|
|
|
from fabledassistant.models.note import Note, TaskPriority, TaskStatus # noqa: E402, F401
|
|
from fabledassistant.models.conversation import Conversation, Message # noqa: E402, F401
|
|
from fabledassistant.models.setting import Setting # noqa: E402, F401
|
|
from fabledassistant.models.user import User # noqa: E402, F401
|
|
from fabledassistant.models.app_log import AppLog # noqa: E402, F401
|
|
from fabledassistant.models.password_reset import PasswordResetToken # noqa: E402, F401
|
|
from fabledassistant.models.invitation import InvitationToken # noqa: E402, F401
|
|
from fabledassistant.models.embedding import NoteEmbedding # noqa: E402, F401
|
|
from fabledassistant.models.image_cache import ImageCache # noqa: E402, F401
|
|
from fabledassistant.models.project import Project # noqa: E402, F401
|
|
from fabledassistant.models.push_subscription import PushSubscription # noqa: E402, F401
|
|
from fabledassistant.models.event import Event # noqa: E402, F401
|
|
from fabledassistant.models.milestone import Milestone # noqa: E402, F401
|
|
from fabledassistant.models.task_log import TaskLog # noqa: E402, F401
|
|
from fabledassistant.models.note_draft import NoteDraft # noqa: E402, F401
|
|
from fabledassistant.models.note_version import NoteVersion # noqa: E402, F401
|
|
from fabledassistant.models.group import Group, GroupMembership # noqa: E402, F401
|
|
from fabledassistant.models.share import NoteShare, ProjectShare # noqa: E402, F401
|
|
from fabledassistant.models.notification import Notification # noqa: E402, F401
|
|
from fabledassistant.models.weather_cache import WeatherCache # noqa: E402, F401
|
|
from fabledassistant.models.api_key import ApiKey # noqa: E402, F401
|
|
from fabledassistant.models.user_profile import UserProfile # noqa: E402, F401
|
|
from fabledassistant.models.moment import ( # noqa: E402, F401
|
|
Moment,
|
|
MomentEmbedding,
|
|
moment_people,
|
|
moment_places,
|
|
moment_tasks,
|
|
moment_notes,
|
|
)
|