refactor: Phase 1 抽出 shared/skills_data 解耦 daily 与 bot

daily 不再通过 sys.path 导入 bot/skills_service,skills feed 数据层上移到 shared/。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-03 14:45:39 +08:00
parent 88d08c0da9
commit f533e31adb
7 changed files with 146 additions and 121 deletions

View File

@@ -3,13 +3,11 @@
from __future__ import annotations
import os
import sys
from pathlib import Path
from dotenv import load_dotenv
ROOT = Path(__file__).resolve().parent.parent
BOT_DIR = ROOT / "bot"
OUTPUT_DIR = ROOT / "output"
LOG_DIR = ROOT / "logs"
CACHE_DIR = ROOT / ".cache"
@@ -49,12 +47,6 @@ load_dotenv(ROOT / ".env")
load_dotenv(ROOT / ".env.local", override=True)
def ensure_bot_on_path() -> None:
bot = str(BOT_DIR)
if bot not in sys.path:
sys.path.insert(0, bot)
def _clean_env_value(raw: str | None) -> str | None:
if raw is None:
return None