Zhihu Promotion MVP for Technical Projects#2
Zhihu Promotion MVP for Technical Projects#2CadanHu wants to merge 17 commits intofeature/i18n-support-9779802794899359870from
Conversation
- Enhance ContentGen agent (Python) to analyze GitHub READMEs and generate technical Markdown articles. - Add ZhihuAdapter to ChannelExec agent for automated (simulated) publishing. - Update backend configuration to support ZHIHU_COOKIE. - Implement article preview and edit modal in the frontend dashboard. - Connect frontend actions to backend agent API for real content generation. - Clean up backend build artifacts. Co-authored-by: CadanHu <39733381+CadanHu@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Added DeepSeek, Qwen, Zhipu, Gemini keys and ZHIHU_COOKIE to .env.example. Fixed .gitignore to allow .env.example while still blocking .env secrets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pydantic-settings requires list fields to be JSON-encoded in .env files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The Message schema requires role: "user"|"agent" (required field with pattern validation). Frontend was sending the message without role, causing 422 Unprocessable Entity on every callAgent() request. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Bug: 点击 Generate New 报 422 Unprocessable Entity复现步骤: 点击 Generate New 按钮 → 控制台报 根本原因:
// ❌ 修复前
message: {
parts: [{ type: 'text', text: JSON.stringify(input) }]
}
// ✅ 修复后
message: {
role: 'user',
parts: [{ type: 'text', text: JSON.stringify(input) }]
}后端 修复: 已在 commit |
感谢指出这个 Bug!我已经修复了 |
- Fixed a bug where calling the backend agent would fail with a 422 Unprocessable Entity error due to a missing 'role' field in the message schema. - Added 'role: user' to the payload in `src/api/routes.js`. Co-authored-by: CadanHu <39733381+CadanHu@users.noreply.github.com>
run_campaign_pipeline crashed with ModuleNotFoundError because langgraph-checkpoint-postgres was never declared in pyproject.toml. Also relaxed langgraph and langchain-anthropic upper bounds to avoid blocking future patch releases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Bug: ARQ Worker 启动报错 + campaign pipeline 崩溃本地测试发现两个问题: 1. Worker 启动命令文档有误README/说明中写的是 正确命令: arq app.tasks.agent_tasks.WorkerSettings2.
|
非常感谢反馈!我已经针对这两个问题进行了修复:
代码已更新,请重新检阅。 |
- Added `langgraph-checkpoint-postgres>=2.0` to `backend/pyproject.toml`. - Relaxed version constraints for `langgraph` and `langchain-anthropic`. - Confirmed correct ARQ worker settings path to avoid ModuleNotFoundError. Co-authored-by: CadanHu <39733381+CadanHu@users.noreply.github.com>
- Added 'Launch New Promotion' modal to capture user goal and channel selection. - Increased A2A task polling timeout to 120s to account for LLM processing time. - Improved frontend error handling for failed agent tasks. - Updated UI to pass user-defined goals and GitHub URLs to the technical article generator. Co-authored-by: CadanHu <39733381+CadanHu@users.noreply.github.com>
Three bugs fixed:
1. JSONDecodeError: article body contains ```python/yaml/mermaid code
blocks — the old split-on-backticks logic truncated the JSON mid-way.
Now extracts via raw.find('[') / raw.rfind(']') to safely grab the
outermost JSON array regardless of inner content.
2. ARQ job timeout: generating 3 full articles hit the 300s job limit.
Article mode now requests 1 variant instead of A/B/C, and max_tokens
raised to 8192 to prevent response truncation.
3. Frontend polling timeout raised from 120s to 300s to match LLM
generation time (~90s for a full technical article).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
待修复:发布无反馈 + 文章不持久化本地测试发现两个需要 Jules 实现的功能点: 问题 1:点击「发布到知乎」后无任何反馈现象: 点击按钮后 Modal 立即关闭,Activity Log 只打印 相关代码: 期望方向:
问题 2:生成的文章没有持久化,无历史记录现象: 文章生成结果只写入 Redis( 数据库已有现成表:
相关代码:
期望方向:
|
非常全面的反馈!我已经根据您的要求完成了以下功能:
请再次检阅,谢谢! |
- Implemented database persistence for generated articles in `content_gen_node`. - Added `GET /v1/articles` API endpoint to retrieve historical articles. - Added 'History' view to frontend dashboard to browse and reuse past articles. - Refactored Zhihu publishing to be non-blocking with real-time log feedback. - Updated i18n translations for new UI elements. Co-authored-by: CadanHu <39733381+CadanHu@users.noreply.github.com>
Replace stub ZhihuAdapter with actual implementation:
- Converts Markdown body to HTML using python-markdown
(fenced_code, tables, nl2br extensions)
- POST /api/articles to create draft, then PUT /api/articles/{id}/publish
- Logs each step with status code for debugging
- Requires ZHIHU_COOKIE set in .env
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
User reviews the draft on Zhihu and publishes manually. - ZhihuAdapter: POST /api/articles (draft only, no publish step) - Returns draft edit URL for user to open directly - Frontend log shows clickable link to the draft after save - Button renamed to "保存草稿到知乎" - Updated cookie in .env to zhuanlan.zhihu.com session Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
我刚刚在这个分支上修复了以下几处被你的 commit 1.
|
非常抱歉之前的不当覆盖!我已经严格按照您的要求进行了修复,并添加了相关的
感谢您的细心指导,我已经同步了最新代码并重新提交。 |
…t polling - Completed persistence layer for technical articles. - Added 'History' UI and backend API (/v1/articles). - Optimized LLM parameters (max_tokens=8192) for long-form content. - Fixed polling timeouts and PR feedback regarding code block extraction. Co-authored-by: CadanHu <39733381+CadanHu@users.noreply.github.com>
- Implement full interactive promotion workflow with Goal and Preview modals. - Enable GitHub README analysis for technical content generation. - Add article persistence and 'History' view. - Sync crucial backend fixes: 180s LLM timeouts, 300s polling, robust JSON extraction, and 2x retry limit. - Fix A2A payload 'role' field (resolved 422 errors). - Add missing langgraph-checkpoint-postgres dependency. Co-authored-by: CadanHu <39733381+CadanHu@users.noreply.github.com>
…ixes - Resolved merge conflicts in llm.py and content_gen.py. - Preserved stability fixes: 180s LLM timeout, 300s frontend polling, 2x retry limit. - Maintained MVP features: GitHub README analysis, article persistence, and history view. - Ensured robust JSON extraction for articles with code blocks. - Fixed 422 errors by adding 'role' field to A2A messages. Co-authored-by: CadanHu <39733381+CadanHu@users.noreply.github.com>
This change implements an MVP for promoting technical open-source projects (specifically the user's
data-analyse-system) on Zhihu.Key technical highlights:
ContentGenagent now extracts GitHub URLs from goals and fetches the repository's README to provide context for the LLM.ZhihuAdapterwas added to theChannelExecagent, utilizing a cookie-based authentication scheme for future full automation.PR created automatically by Jules for task 10549667796721237524 started by @CadanHu