diff --git a/.gitignore b/.gitignore index 4c91ea5..06b7103 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ !README.md !.gitignore -!luxx/**/*.py +!*.py !asserts/**/*.md # Dashboard diff --git a/asserts/ARCHITECTURE.md b/asserts/ARCHITECTURE.md index e9dfc60..eeffd90 100644 --- a/asserts/ARCHITECTURE.md +++ b/asserts/ARCHITECTURE.md @@ -5,9 +5,13 @@ - **框架**: FastAPI 0.109+ - **数据库**: SQLAlchemy 2.0+ - **认证**: JWT (PyJWT) -- **HTTP客户端**: httpx +- **HTTP客户端**: httpx, requests - **配置**: YAML (PyYAML) - **代码执行**: Python 原生执行 +- **网页爬虫**: + - `httpx` - HTTP 客户端 + - `beautifulsoup4` - HTML 解析 + - `lxml` - XML/HTML 解析器 ## 目录结构 @@ -36,6 +40,7 @@ luxx/ │ ├── crawler.py # 网页爬虫 │ ├── data.py # 数据处理 │ └── weather.py # 天气查询 +│ └── services.py # 工具服务层 └── utils/ # 工具函数 └── helpers.py ``` @@ -205,7 +210,9 @@ classDiagram |------|------|------| | `python_execute` | 执行 Python 代码 | 支持 print 输出、变量访问 | | `python_eval` | 计算表达式 | 快速求值 | -| `web_crawl` | 网页抓取 | BeautifulSoup + httpx | +| `web_search` | DuckDuckGo HTML | DuckDuckGo HTML 搜索 | +| `web_fetch` | 网页抓取 | httpx + BeautifulSoup,支持 text/links/structured | +| `batch_fetch` | 批量抓取 | 并发获取多个页面 | | `get_weather` | 天气查询 | 支持城市名查询 | | `process_data` | 数据处理 | JSON 转换、格式化等 | diff --git a/config.yaml b/config.yaml index f13c4e2..b83a005 100644 --- a/config.yaml +++ b/config.yaml @@ -7,7 +7,7 @@ app: database: type: sqlite - url: sqlite:///../chat.db + url: sqlite:///./chat.db llm: provider: deepseek diff --git a/dashboard/src/components/MessageBubble.vue b/dashboard/src/components/MessageBubble.vue index 34addad..95880fc 100644 --- a/dashboard/src/components/MessageBubble.vue +++ b/dashboard/src/components/MessageBubble.vue @@ -66,7 +66,9 @@ const renderedContent = computed(() => { function formatTime(time) { if (!time) return '' - return new Date(time).toLocaleTimeString('zh-CN', { hour: '2-digit', minute: '2-digit' }) + const date = new Date(time) + // 使用本地时区显示 + return date.toLocaleTimeString('zh-CN', { hour: '2-digit', minute: '2-digit' }) } function copyContent() { diff --git a/dashboard/src/components/ProcessBlock.vue b/dashboard/src/components/ProcessBlock.vue index 4be9abd..e345c74 100644 --- a/dashboard/src/components/ProcessBlock.vue +++ b/dashboard/src/components/ProcessBlock.vue @@ -9,10 +9,11 @@ 思考中 {{ item.brief || '正在思考...' }} ... + 已截断
{{ item.fullResult || item.resultSummary }}
{{ item.displayResult }}