relayout code structure
This commit is contained in:
parent
928f874157
commit
09db08af78
|
|
@ -1,8 +1,3 @@
|
|||
# 默认忽略的文件
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="jdk" jdkName="Python 3.9 (py39)" jdkType="Python SDK" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/MCPServers" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/ai_test_generator" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/requirements_generator" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/gui_ai_developer" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="$USER_HOME$/opt/anaconda3/envs/py10" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="bootstrap-icons" level="application" />
|
||||
</component>
|
||||
<component name="PyDocumentationSettings">
|
||||
<option name="format" value="PLAIN" />
|
||||
<option name="myDocStringFormat" value="Plain" />
|
||||
</component>
|
||||
</module>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptLibraryMappings">
|
||||
<file url="file://$PROJECT_DIR$" libraries="{bootstrap-icons}" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (py39)" project-jdk-type="Python SDK" />
|
||||
<component name="Black">
|
||||
<option name="sdkName" value="Python 3.9 (py39)" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="$USER_HOME$/opt/anaconda3/envs/py10" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
from mcp.server.fastmcp import FastMCP
|
||||
from mcp.server.transport_security import TransportSecuritySettings
|
||||
|
||||
mcp = FastMCP("requirements",
|
||||
transport_security=TransportSecuritySettings(enable_dns_rebinding_protection=False))
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def generate_requirement_document(project: str, requirements: list, standard: str = "GJB438C"):
|
||||
print(project, requirements, standard)
|
||||
|
||||
if __name__ == "__main__":
|
||||
mcp.settings.host = "0.0.0.0"
|
||||
mcp.settings.port = 7999
|
||||
|
||||
mcp.run(transport="streamable-http")
|
||||
|
|
@ -2,7 +2,7 @@ import json
|
|||
import re
|
||||
import logging
|
||||
from openai import OpenAI
|
||||
from config import config
|
||||
from gui_ai_developer.config import config
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import json
|
|||
import re
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from config import config
|
||||
from gui_ai_developer.config import config
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import time
|
|||
import logging
|
||||
from pathlib import Path
|
||||
from dataclasses import dataclass, field
|
||||
from config import config
|
||||
from gui_ai_developer.config import config
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ from PyQt5.QtWidgets import (
|
|||
QLineEdit, QTextEdit, QPushButton, QMessageBox
|
||||
)
|
||||
from PyQt5.QtCore import Qt
|
||||
from models import Project, Requirement, Module, Document
|
||||
from gui_ai_developer.models import Project, Requirement, Module, Document
|
||||
|
||||
|
||||
class NewProjectDialog(QDialog):
|
||||
|
|
@ -13,8 +13,8 @@ from PyQt5.QtWidgets import QApplication
|
|||
from PyQt5.QtGui import QFont
|
||||
from PyQt5.QtCore import Qt
|
||||
|
||||
from config import DARK_THEME
|
||||
from windows import MainWindow
|
||||
from gui_ai_developer.config import DARK_THEME
|
||||
from gui_ai_developer.windows import MainWindow
|
||||
|
||||
|
||||
def main():
|
||||
|
|
@ -10,9 +10,9 @@ from PyQt5.QtWidgets import (
|
|||
from PyQt5.QtCore import Qt, QTimer, QSize
|
||||
from PyQt5.QtGui import QFont
|
||||
|
||||
from models import Project, Requirement, Module, Document
|
||||
from widgets import PanelWidget, ProjectItemWidget, RequirementItemWidget, ModuleItemWidget
|
||||
from dialogs import NewProjectDialog, CodeViewDialog, ModuleDetailDialog, PipelineDialog
|
||||
from gui_ai_developer.models import Project, Requirement, Module, Document
|
||||
from gui_ai_developer.widgets import PanelWidget, ProjectItemWidget, RequirementItemWidget, ModuleItemWidget
|
||||
from gui_ai_developer.dialogs import NewProjectDialog, CodeViewDialog, ModuleDetailDialog, PipelineDialog
|
||||
|
||||
|
||||
class MainWindow(QMainWindow):
|
||||
|
|
@ -4,7 +4,7 @@ import json
|
|||
from pathlib import Path
|
||||
from typing import List, Optional, Callable
|
||||
|
||||
import config
|
||||
from gui_ai_developer import config
|
||||
from core.llm_client import LLMClient
|
||||
from database.models import FunctionalRequirement, CodeFile
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
# core/llm_client.py - LLM API 调用封装
|
||||
import time
|
||||
import json
|
||||
from typing import Optional
|
||||
|
||||
from openai import OpenAI, APIError, APITimeoutError, RateLimitError
|
||||
|
||||
import config
|
||||
from gui_ai_developer import config
|
||||
|
||||
|
||||
class LLMClient:
|
||||
|
|
@ -17,10 +16,10 @@ class LLMClient:
|
|||
api_base: str = None,
|
||||
model: str = None,
|
||||
):
|
||||
self.model = model or config.LLM_MODEL
|
||||
self.model = model or config.LLM_MODEL
|
||||
self.client = OpenAI(
|
||||
api_key = api_key or config.LLM_API_KEY,
|
||||
base_url = api_base or config.LLM_API_BASE,
|
||||
api_key =api_key or config.LLM_API_KEY,
|
||||
base_url =api_base or config.LLM_API_BASE,
|
||||
timeout = config.LLM_TIMEOUT,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import json
|
||||
from typing import List, Optional, Callable
|
||||
|
||||
import config
|
||||
from gui_ai_developer import config
|
||||
from core.llm_client import LLMClient
|
||||
from database.models import FunctionalRequirement, ChangeHistory
|
||||
from database.db_manager import DBManager
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import List, Optional
|
|||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import sessionmaker, Session
|
||||
|
||||
import config
|
||||
from gui_ai_developer import config
|
||||
from database.models import Base, Project, RawRequirement, FunctionalRequirement, CodeFile, ChangeHistory
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import json
|
|||
from pathlib import Path
|
||||
from typing import Dict, List
|
||||
|
||||
import config
|
||||
from gui_ai_developer import config
|
||||
|
||||
VALID_TYPES = {
|
||||
"integer", "string", "boolean", "float",
|
||||
|
|
|
|||
Loading…
Reference in New Issue