Conversation
Feat last frontend
There was a problem hiding this comment.
Pull request overview
This pull request broadens the project’s onboarding/docs and updates both backend chat orchestration (RAG retrieval + fault-tree tool flow) and the frontend fault-tree UX, while also adding GitHub Action/agent prompt scaffolding.
Changes:
- Refactors
ChatUseCaseinto smaller chat services (retrieval/context building/streaming/fault-tree flow) and forces tool-calling in the LLM tool path. - Updates frontend home full-screen section sizing and improves fault-tree workspace node creation and chat-to-tree navigation fallback.
- Adds/updates repo documentation and introduces GitHub Actions demo + speckit agent/prompt configuration.
Reviewed changes
Copilot reviewed 42 out of 43 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_work_order_use_case_unit.py | Updates vector store test stub to include search_by_sources. |
| tests/test_fault_tree_fallback_unit.py | Updates vector store test stub to include search_by_sources. |
| tests/test_chat_post_fault_tree_persistence.py | Updates vector store test stub to include search_by_sources. |
| README.md | Rewrites onboarding docs and environment/setup instructions. |
| frontend/src/features/home/Home.js | Uses a measured viewport height and splits “数据/功能” into separate full-screen sections. |
| frontend/src/features/flow/utils/flowConfig.js | Switches node ID generation to timestamp/random-based IDs to avoid backend ID collisions. |
| frontend/src/features/flow/services/faultTreeApi.js | Adds API call to fetch a fault tree by conversation ID. |
| frontend/src/features/flow/components/tree/FaultTreeWorkspace.js | Improves new-node placement and selection handling; forces Background remount on variant changes. |
| frontend/src/features/flow/components/chat/AiChatPanel.js | Adds fallback loading of fault tree via conversation ID when persisted tree ID is missing. |
| Backend/Infrastructure/llm/LLMService.py | Forces tool-calling in chat_with_tools via tool_choice. |
| Backend/Application/UseCases/ChatUseCase.py | Major refactor to delegate to new chat services and unified response state handling. |
| Backend/Application/Chat/RagRetrievalService.py | New service encapsulating GraphRAG + fallback vector retrieval. |
| Backend/Application/Chat/FaultTreeIntentDetector.py | New intent detector extracted from ChatUseCase. |
| Backend/Application/Chat/FaultTreeChatFlow.py | New fault-tree flow combining streaming answer + async tool execution. |
| Backend/Application/Chat/ChatStreamingService.py | New service for plain streaming chat execution and state updates. |
| Backend/Application/Chat/ChatPrompts.py | Extracts system prompt + tool/stream task prompt builders. |
| Backend/Application/Chat/ChatModels.py | Adds dataclasses for retrieval/context build results and response state. |
| Backend/Application/Chat/ChatConversationService.py | New service for conversation lifecycle events and persistence. |
| Backend/Application/Chat/ChatContextBuilder.py | New service for context-manager integration and message assembly. |
| Backend/Application/Chat/ChatConfig.py | New configuration module for retrieval/fault-tree generation defaults. |
| Backend/Application/Chat/init.py | Initializes Chat application services package. |
| .gitignore | Adjusts ignore rules (notably related to repo tooling artifacts). |
| .github/workflows/.github-actions-demo.yml | Adds a demo GitHub Actions workflow. |
| .github/prompts/speckit.taskstoissues.prompt.md | Adds speckit prompt stub/front-matter for task-to-issues. |
| .github/prompts/speckit.tasks.prompt.md | Adds speckit prompt stub/front-matter for tasks generation. |
| .github/prompts/speckit.specify.prompt.md | Adds speckit prompt stub/front-matter for spec generation. |
| .github/prompts/speckit.plan.prompt.md | Adds speckit prompt stub/front-matter for planning. |
| .github/prompts/speckit.implement.prompt.md | Adds speckit prompt stub/front-matter for implementation. |
| .github/prompts/speckit.constitution.prompt.md | Adds speckit prompt stub/front-matter for constitution updates. |
| .github/prompts/speckit.clarify.prompt.md | Adds speckit prompt stub/front-matter for clarification workflow. |
| .github/prompts/speckit.checklist.prompt.md | Adds speckit prompt stub/front-matter for checklist generation. |
| .github/prompts/speckit.analyze.prompt.md | Adds speckit prompt stub/front-matter for cross-artifact analysis. |
| .github/agents/speckit.taskstoissues.agent.md | Adds speckit agent definition for converting tasks into GitHub issues. |
| .github/agents/speckit.tasks.agent.md | Adds speckit agent definition for tasks.md generation. |
| .github/agents/speckit.specify.agent.md | Adds speckit agent definition for spec.md generation. |
| .github/agents/speckit.plan.agent.md | Adds speckit agent definition for plan.md generation. |
| .github/agents/speckit.implement.agent.md | Adds speckit agent definition for executing tasks.md implementation. |
| .github/agents/speckit.constitution.agent.md | Adds speckit agent definition for constitution maintenance. |
| .github/agents/speckit.clarify.agent.md | Adds speckit agent definition for spec clarification flow. |
| .github/agents/speckit.checklist.agent.md | Adds speckit agent definition for requirements-quality checklists. |
| .github/agents/speckit.analyze.agent.md | Adds speckit agent definition for consistency/quality analysis. |
| .github/agents/copilot-instructions.md | Adds auto-generated Copilot repo instructions/tech context. |
| .env | Adds environment variable file content (currently includes a key). |
Comments suppressed due to low confidence (2)
README.md:200
- The directory structure example shows a
rag/Backend/layout, but the repo usesBackend/andfrontend/at the root. Please align this tree (and related path references likerag/frontend) with the actual repository folders to avoid broken copy/paste instructions.
.github/agents/copilot-instructions.md:24 - The documented project structure/commands here don’t match the repo layout (e.g., shows
backend/but the repo hasBackend/, and suggestscd src; pytesteven though there is nosrc/at repo root). Update these paths/commands to reflect the real directories so the guidance is actionable.
## Project Structure
```text
backend/
frontend/
tests/
Commands
cd src; pytest; ruff check .
</details>
---
💡 <a href="/Morieity/EET/new/main?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
| @@ -1 +1,4 @@ | |||
| DEEPSEEK_API_KEY=sk-9db98b58ba374654beece95ea955fb11 No newline at end of file | |||
| DEEPSEEK_API_KEY=sk-9db98b58ba374654beece95ea955fb11 | |||
Comment on lines
+60
to
+66
| 在项目根目录(`rag/`)执行: | ||
|
|
||
| ```bash | ||
| cd rag | ||
| uv venv --python 3.11 | ||
| # 将在当前目录下创建 .venv 文件夹 | ||
| ``` |
Comment on lines
+9
to
+13
| - N/A(纯前端改动,无新持久化) (feat/dev-frontend) | ||
|
|
||
| - [e.g., Python 3.11, Swift 5.9, Rust 1.75 or NEEDS CLARIFICATION] + [e.g., FastAPI, UIKit, LLVM or NEEDS CLARIFICATION] (001-fault-diagnosis-tree) | ||
|
|
||
| ## Project Structure |
Comment on lines
+1
to
+3
| name: GitHub Actions Demo | ||
| run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 | ||
| on: [push] |
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.
No description provided.