Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# ==========================================
# PaperMind 环境配置示例
# ==========================================
#
#
# 使用说明:
# - 本地开发:复制为 .env(根目录)
# - Docker部署:复制为 .env(根目录)
#
#
# 必须配置项:至少填写一个 LLM API Key
# ==========================================

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/opencode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
env:
ALIBABA_CODING_PLAN_API_KEY: ${{ secrets.ALIBABA_CODING_PLAN_API_KEY }}
with:
model: alibaba-coding-plan-cn/qwen3.5-plus
model: alibaba-coding-plan-cn/qwen3.5-plus
4 changes: 2 additions & 2 deletions .github/workflows/pr-review-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_NUM="${{ steps.pr.outputs.pr_number }}"

BODY='## 🔍 OpenCode PR Review Required

这是一个受保护的分支,merge 前需要进行 code review。
Expand All @@ -50,7 +50,7 @@ jobs:
---

*This is an automated reminder from PR Review Gate.*'

gh pr comment $PR_NUM --body "$BODY"

- name: Set status check to success
Expand Down
9 changes: 2 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,8 @@ repos:
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format

# TypeScript/JavaScript - Prettier
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.4.2
hooks:
- id: prettier
files: \.(ts|tsx|js|jsx|json|css|md)$
exclude: ^frontend/node_modules/
# TypeScript/JavaScript - 通过 npm scripts 格式化 (prettier 在 node_modules 中)
# 运行 npm run format 格式化前端代码

# 通用检查
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,4 +452,4 @@ alembic upgrade head

[![Star](https://img.shields.io/github/stars/Color2333/PaperMind?style=social)](https://github.com/Color2333/PaperMind/stargazers)

</div>
</div>
3 changes: 0 additions & 3 deletions apps/api/routers/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

@router.post("/pipelines/skim/{paper_id}")
def run_skim(paper_id: UUID) -> dict:

tid = f"skim_{paper_id.hex[:8]}"
title = get_paper_title(paper_id) or str(paper_id)[:8]
global_tracker.start(tid, "skim", f"粗读: {title[:30]}", total=1)
Expand All @@ -39,7 +38,6 @@ def run_skim(paper_id: UUID) -> dict:

@router.post("/pipelines/deep/{paper_id}")
def run_deep(paper_id: UUID) -> dict:

tid = f"deep_{paper_id.hex[:8]}"
title = get_paper_title(paper_id) or str(paper_id)[:8]
global_tracker.start(tid, "deep_read", f"精读: {title[:30]}", total=1)
Expand All @@ -54,7 +52,6 @@ def run_deep(paper_id: UUID) -> dict:

@router.post("/pipelines/embed/{paper_id}")
def run_embed(paper_id: UUID) -> dict:

tid = f"embed_{paper_id.hex[:8]}"
title = get_paper_title(paper_id) or str(paper_id)[:8]
global_tracker.start(tid, "embed", f"嵌入: {title[:30]}", total=1)
Expand Down
1 change: 0 additions & 1 deletion apps/desktop/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,3 @@ volumes:
pm_logs:
name: papermind_logs
pm_pip_cache:

6 changes: 3 additions & 3 deletions docs/PaperMind.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# PaperMind - AI 研究工作流平台

**版本:** 2.8
**日期:** 2026-02-19
**作者:** color2333
**版本:** 2.8
**日期:** 2026-02-19
**作者:** color2333
**核心愿景:** 从"搜索论文"进化为"理解领域"。通过自动化 Agent 和 LLM,将海量文献转化为结构化的知识图谱,辅助研究者完成从"每日追踪"到"深度调研"的全过程。

---
Expand Down
10 changes: 5 additions & 5 deletions docs/deployment/DOCKER_DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PaperMind Docker 部署指南 - 端口预留版

> 适用于已有项目占用 3001 和 8001 端口的场景
>
>
> **端口规划**:
> - 现有项目:3001(前端) + 8001(后端)
> - PaperMind:**3002(前端) + 8002(后端)**
Expand Down Expand Up @@ -346,14 +346,14 @@ ufw allow from 192.168.1.0/24 to any port 8002
server {
listen 443 ssl;
server_name your-domain.com;

ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.pem;

location / {
proxy_pass http://localhost:3002;
}

location /api/ {
proxy_pass http://localhost:8002;
}
Expand Down Expand Up @@ -414,7 +414,7 @@ services:
image: prom/prometheus
ports:
- "9090:9090"

grafana:
image: grafana/grafana
ports:
Expand Down
18 changes: 9 additions & 9 deletions docs/deployment/DOCKER_FIXES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PaperMind Docker 部署问题修复报告

> 修复日期:2026-02-26
>
>
> 修复目标:确保 Docker 部署顺利,解决前后端配置问题

---
Expand All @@ -23,11 +23,11 @@
export function resolveApiBase(): string {
if (!isTauri()) {
if (import.meta.env.VITE_API_BASE) return import.meta.env.VITE_API_BASE;

if (import.meta.env.DEV) {
return "http://localhost:8000";
}

// Docker 生产环境使用相对路径
return "/api";
}
Expand Down Expand Up @@ -66,19 +66,19 @@ cors_allow_origins: str = (
location /api/ {
# 去掉 /api 前缀,转发到后端
rewrite ^/api/(.*) /$1 break;

# 后端服务地址(Docker 内部网络)
proxy_pass http://backend:8000;

# WebSocket/SSE 支持
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

# 关闭缓冲(SSE 需要)
proxy_buffering off;
proxy_cache off;

# 超时设置
proxy_read_timeout 120s;
}
Expand Down Expand Up @@ -197,7 +197,7 @@ src/pages/Agent.tsx(346,42): error TS2552
...
```

**影响**:
**影响**:
- ❌ 不影响 Docker 构建(Dockerfile 使用 `npm run build` 会跳过类型检查)
- ⚠️ 建议后续修复这些类型错误

Expand All @@ -221,7 +221,7 @@ result.get("saved_path", "N/A") # Pylance 报错,但运行时正确

**原因**: `result` 可能为 `None`,但实际逻辑中不会为 `None`

**影响**:
**影响**:
- ✅ 不影响运行
- ✅ 不影响 Docker 构建

Expand Down
16 changes: 8 additions & 8 deletions docs/deployment/WIKI_DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PaperMind 部署 Wiki

> 📚 **完整的部署指南** - 从本地开发到生产环境,一站式搞定!
> 📚 **完整的部署指南** - 从本地开发到生产环境,一站式搞定!
> 📅 最后更新:2026-03-02 | 版本:v3.1

---
Expand Down Expand Up @@ -216,7 +216,7 @@ docker compose ps
# 预期输出:
# NAME STATUS PORTS
# papermind-backend Up (healthy) 0.0.0.0:8002->8000/tcp
# papermind-worker Up (healthy)
# papermind-worker Up (healthy)
# papermind-frontend Up (healthy) 0.0.0.0:3002->80/tcp

# 检查服务健康状态
Expand Down Expand Up @@ -255,14 +255,14 @@ services:
reservations:
cpus: '0.5' # 预留 0.5 核
memory: 512M # 预留 512MB

worker:
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G

frontend:
deploy:
resources:
Expand Down Expand Up @@ -819,14 +819,14 @@ ufw allow from 192.168.1.0/24 to any port 8002
server {
listen 443 ssl;
server_name your-domain.com;

ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.pem;

location / {
proxy_pass http://localhost:3002;
}

location /api/ {
proxy_pass http://localhost:8002;
}
Expand Down Expand Up @@ -893,7 +893,7 @@ services:
- "9090:9090"
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml

grafana:
image: grafana/grafana
ports:
Expand Down
8 changes: 4 additions & 4 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="PaperMind - AI 驱动的学术论文研究平台,从搜索论文进化为理解领域" />
<meta name="theme-color" content="#C4663C" />

<!-- Favicon -->
<link rel="icon" type="image/svg+xml" href="/papermind-icon.svg" />
<link rel="apple-touch-icon" href="/papermind-icon.svg" />

<!-- Open Graph -->
<meta property="og:title" content="PaperMind - AI 论文研究平台" />
<meta property="og:description" content="AI 驱动的学术论文研究平台,从搜索论文进化为理解领域" />
<meta property="og:type" content="website" />
<meta property="og:image" content="/papermind-icon.svg" />

<!-- PWA Manifest -->
<link rel="manifest" href="/manifest.json" />

<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet" />
Expand Down
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"lint:fix": "eslint \"src/**/*.{ts,tsx}\" --fix"
},
"dependencies": {
"@tanstack/react-virtual": "^3.13.23",
"@tauri-apps/api": "^2.10.1",
"@tauri-apps/plugin-dialog": "^2.6.0",
"@tauri-apps/plugin-fs": "^2.4.5",
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
"purpose": "any maskable"
}
]
}
}
10 changes: 5 additions & 5 deletions frontend/public/papermind-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions frontend/src/assets/logo-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading