diff --git a/pilot/commands/command.py b/pilot/commands/command.py index 8b2bb6fb2..84e384347 100644 --- a/pilot/commands/command.py +++ b/pilot/commands/command.py @@ -108,9 +108,8 @@ def execute_command( try: # 删除非定义参数 diff_ags = list(set(arguments.keys()).difference(set(command['args'].keys()))) - for arg_name in arguments.keys(): - if arg_name in diff_ags: - del arguments[arg_name] + for arg_name in diff_ags: + del arguments[arg_name] print(str(arguments)) return command["function"](**arguments) except Exception as e: diff --git a/pilot/prompts/auto_mode_prompt.py b/pilot/prompts/auto_mode_prompt.py index bc133075d..08595f4a9 100644 --- a/pilot/prompts/auto_mode_prompt.py +++ b/pilot/prompts/auto_mode_prompt.py @@ -7,7 +7,7 @@ from pathlib import Path import distro import yaml from pilot.configs.config import Config -from pilot.prompts.prompt import build_default_prompt_generator, DEFAULT_TRIGGERING_PROMPT +from pilot.prompts.prompt import build_default_prompt_generator, DEFAULT_PROMPT_OHTER class AutoModePrompt: @@ -51,6 +51,7 @@ class AutoModePrompt: """ prompt_start = ( + DEFAULT_PROMPT_OHTER ) if prompt_generator is None: prompt_generator = build_default_prompt_generator()