fix: 修复测试并应用代码格式化#2
Merged
Merged
Conversation
1. 全局改进: - 创建会话时新增AI确认消息 - 新增设置模态框,支持选择LLM提供商 - 新增 /api/v1/settings/llm 接口 2. DAG编辑器优化: - 节点视觉升级为玻璃拟态风格 - 修复中文文字换行问题 - 使用LLM生成结构化研究问题树,解决层级关系错乱问题 3. 新增服务: - ResearchPlanGenerator: 用LLM生成结构化研究问题 - 重构MasterPlanner使用新生成器 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The _resolve_provider method accepts an optional provider parameter,
but the test mocks used lambda without parameters, causing TypeError.
Changed from:
lambda: ("https://example.org", "key", "model")
To:
lambda provider=None: ("https://example.org", "key", "model")
Fixes 3 failing tests in test_writer.py and test_report_review_agent.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Format long lines to comply with ruff line-length=100 - Add uv.lock for reproducible dependency resolution Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add complete styling for the settings modal including: - Modal overlay with backdrop blur - Slide-up animation on open - LLM provider selection cards with hover/selected states - Responsive layout and proper spacing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Backend:
- Add LLMConfigRepository for persistent API key storage
- Support task-type to provider mapping (draft/chat/article)
- Add API endpoints: GET/PUT /settings/llm/providers/{provider}
- Add API endpoints: GET/PUT /settings/llm/task-mapping
- API keys stored with base64 encoding, returned masked for display
Frontend:
- Redesign SettingsModal with modern tab-based UI
- Provider cards with edit form for API key configuration
- Task mapping section to assign providers per task type
- 348 lines of new CSS for polished UI
Features:
- Free API key configuration per provider
- Task-specific provider selection (draft/chat/article)
- Modern, responsive settings interface
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
修复详情
问题:
test_writer.py和test_report_review_agent.py中 mock_resolve_provider的 lambda 无参数,但实际方法签名需要provider参数。修复:
Test plan
uv run pytest tests/ -v全部通过(95 passed)uv run ruff check backend/app/无错误npm run build成功🤖 Generated with Claude Code