feat(prompts): rename prompt modules for clarity and consistency

Rename base_prompt.py to teaching_assistant_prompt.py and lab_assistant_prompt.py to lab_automation_assistant_prompt.py to better reflect their purposes. Update all imports and references accordingly to maintain consistency across the codebase. This improves code readability and aligns naming with the actual functionality of each prompt module.
This commit is contained in:
YueGuobin 2026-03-06 01:58:54 +08:00
parent dd3b06bd75
commit 77ef87f468
4 changed files with 14 additions and 14 deletions

View File

@ -30,13 +30,13 @@ This package contains system prompts and prompt loading utilities for
the GNS3-Copilot AI agent.
Available prompts:
- base_prompt: Teaching assistant mode (diagnostics only, no configuration)
- lab_assistant_prompt: Lab automation assistant mode (diagnostics + configuration)
- teaching_assistant_prompt: Teaching assistant mode (diagnostics only, no configuration)
- lab_automation_assistant_prompt: Lab automation assistant mode (diagnostics + configuration)
"""
from .base_prompt import SYSTEM_PROMPT
from .lab_assistant_prompt import LAB_ASSISTANT_PROMPT
from .teaching_assistant_prompt import TEACHING_ASSISTANT_PROMPT
from .lab_automation_assistant_prompt import LAB_AUTOMATION_ASSISTANT_PROMPT
from .prompt_loader import load_system_prompt
from .title_prompt import TITLE_PROMPT
@ -53,8 +53,8 @@ __description__ = "AI-powered network automation assistant for GNS3"
__url__ = "https://github.com/yueguobin/gns3-copilot"
__all__ = [
"SYSTEM_PROMPT",
"LAB_ASSISTANT_PROMPT",
"TEACHING_ASSISTANT_PROMPT",
"LAB_AUTOMATION_ASSISTANT_PROMPT",
"TITLE_PROMPT",
"load_system_prompt",
]

View File

@ -33,8 +33,8 @@ operations in GNS3 network labs.
This is the full-featured assistant mode with configuration permissions enabled.
"""
# System prompt for GNS3 Lab Assistant
LAB_ASSISTANT_PROMPT = """
# System prompt for GNS3 Lab Automation Assistant
LAB_AUTOMATION_ASSISTANT_PROMPT = """
# ROLE & MISSION
You are a **GNS3 Network Lab Assistant** - an intelligent automation assistant

View File

@ -37,8 +37,8 @@ Available Modes (controlled by config.copilot_mode in llm_model_configs):
import logging
from .base_prompt import SYSTEM_PROMPT
from .lab_assistant_prompt import LAB_ASSISTANT_PROMPT
from .teaching_assistant_prompt import TEACHING_ASSISTANT_PROMPT
from .lab_automation_assistant_prompt import LAB_AUTOMATION_ASSISTANT_PROMPT
logger = logging.getLogger(__name__)
@ -59,7 +59,7 @@ def load_system_prompt(llm_config: dict | None = None) -> str:
"""
if not llm_config:
logger.info("No LLM config provided, using default TEACHING_ASSISTANT prompt mode")
return SYSTEM_PROMPT
return TEACHING_ASSISTANT_PROMPT
# llm_config is a flattened dict with copilot_mode at the top level
# Example: {"provider": "...", "model": "...", "copilot_mode": "...", ...}
@ -67,7 +67,7 @@ def load_system_prompt(llm_config: dict | None = None) -> str:
if mode == "lab_automation_assistant":
logger.info("Using LAB_AUTOMATION_ASSISTANT prompt mode (diagnostics + configuration)")
return LAB_ASSISTANT_PROMPT
return LAB_AUTOMATION_ASSISTANT_PROMPT
else:
logger.info("Using TEACHING_ASSISTANT prompt mode (diagnostics only)")
return SYSTEM_PROMPT
return TEACHING_ASSISTANT_PROMPT

View File

@ -34,7 +34,7 @@ CRITICAL: This assistant has DIAGNOSIS permissions only, NO configuration permis
"""
# System prompt for LangChain v1.0 agent
SYSTEM_PROMPT = """
TEACHING_ASSISTANT_PROMPT = """
# ROLE & PERMISSIONS
You are a **GNS3 Lab Teaching Assistant**.