diff --git a/README.md b/README.md index c1d08c6..de8b3fc 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ - **🧠 灵活的模型接入**: 原生集成 LiteLLM,支持随插随用 OpenAI、DeepSeek、智谱、通义千问 (DashScope)、火山引擎或任何兼容的 LLM 提供商。 - **🛠️ 强大的 Agent 技能拓展**: 基于核心 `nanobot`框架(`OpenClaw`的精简版)构建。支持通过斜杠命令 (`/`) 快速调用自定义工具 (Skills),完美贴合特定业务逻辑。 - **📊 可定制仪表盘 (Dashboard)**: 一键将对话中生成的图表固定到看板,拖拽布局,随时查看核心指标。 +- **📦 智能产物管理 (Artifact)**: 自动提取对话中生成的各种文件(网页报告、PDF、PPT、图片等),提供一键内嵌预览与下载功能,让成果触手可及。 *** @@ -33,6 +34,10 @@

可定制仪表盘

+
+
+

智能产物预览 (Artifact)

+
diff --git a/README_en.md b/README_en.md index 27abea5..5430fed 100644 --- a/README_en.md +++ b/README_en.md @@ -21,6 +21,7 @@ Whether you're querying a massive Supabase/PostgreSQL database or just tossing i - **🧠 Bring Your Own LLM**: Native integration with LiteLLM. Plug in OpenAI, DeepSeek, Zhipu, DashScope, Volcengine, or any compatible provider. - **🛠️ Extensible Agent Skills**: Built on top of the powerful `nanobot` framework (a lightweight version of `OpenClaw`). Add custom tools and slash commands (`/`) to tailor the agent to your specific business logic. - **📊 Customizable Dashboards**: Pin your favorite chat-generated charts to a drag-and-drop dashboard for quick access. +- **📦 Intelligent Artifact Management**: Automatically extracts generated files (HTML reports, PDFs, PPTs, images, etc.) from conversations, providing embedded previews and one-click downloads. *** @@ -33,6 +34,10 @@ Whether you're querying a massive Supabase/PostgreSQL database or just tossing i

Customizable Dashboard

+
+
+

Artifact Preview

+
diff --git a/backend/app/database.py b/backend/app/database.py index 0c1b0e8..0bfc897 100644 --- a/backend/app/database.py +++ b/backend/app/database.py @@ -3,10 +3,10 @@ from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker -# Use absolute path to ensure dataclaw.db is created in the backend root directory, -# preventing nested backend/backend/dataclaw.db issues when starting from different cwd. -BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -DB_PATH = os.path.join(BASE_DIR, "dataclaw.db") +from app.core.data_root import get_data_root + +# Ensure dataclaw.db is created in the global data directory +DB_PATH = get_data_root() / "dataclaw.db" SQLALCHEMY_DATABASE_URL = f"sqlite:///{DB_PATH}" engine = create_engine( diff --git a/examples/artifact.png b/examples/artifact.png new file mode 100644 index 0000000..513c2a7 Binary files /dev/null and b/examples/artifact.png differ