mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-27 20:40:13 +03:00
fix(copilot): add exit command warning to prevent session disconnection
Add warnings about 'exit' command in three locations to prevent AI from disconnecting Telnet/SSH sessions during command execution: - Prompt system rules (lab_automation_assistant_prompt.py) - Display tool description (display_tools_nornir.py) - Config tool description (config_tools_nornir.py) The 'exit' command disconnects the session and causes all subsequent commands in the batch to fail. This prevents users from viewing command outputs properly.
This commit is contained in:
parent
c76982b29e
commit
a58089cf48
@ -69,6 +69,7 @@ You have access to the following tools to help users:
|
||||
2. **Topology Awareness**: If topology is in context, DO NOT call reader again
|
||||
3. **Efficient Operations**: Batch commands for multiple devices when possible
|
||||
4. **Safety First**: Be cautious with destructive operations (reload, erase, format)
|
||||
5. **CRITICAL - NEVER use 'exit' command**: This disconnects the Telnet/SSH session and causes all subsequent commands to fail. Never include 'exit' in command lists.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@ -162,6 +162,7 @@ class ExecuteMultipleDeviceConfigCommands(BaseTool):
|
||||
- boot system commands
|
||||
- factory-reset commands
|
||||
- any commands that require user confirmation prompts
|
||||
- NEVER use 'exit' command - this disconnects the session and breaks subsequent commands
|
||||
"""
|
||||
|
||||
def _run(
|
||||
|
||||
@ -146,6 +146,7 @@ class ExecuteMultipleDeviceCommands(BaseTool):
|
||||
**STRICTLY FORBIDDEN:**
|
||||
- NO configuration commands (configure terminal, interface, router, etc.)
|
||||
- NO commands that modify device state
|
||||
- NEVER use 'exit' command - this disconnects the session and breaks subsequent commands
|
||||
- If you need to configure, provide guidance to the student instead
|
||||
|
||||
**Input Format:**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user