mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-06-09 17:50:23 +08:00
fix(agent): resolve circular import by lazy-importing Command in run_slash_command and list_slash_commands
This commit is contained in:
@@ -6,7 +6,6 @@ from typing import Optional, Type
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from app.agent.tools.base import MoviePilotTool
|
||||
from app.command import Command
|
||||
from app.log import logger
|
||||
|
||||
|
||||
@@ -40,6 +39,8 @@ class ListSlashCommandsTool(MoviePilotTool):
|
||||
logger.info(f"执行工具: {self.name}")
|
||||
|
||||
try:
|
||||
from app.command import Command
|
||||
|
||||
command_obj = Command()
|
||||
all_commands = command_obj.get_commands()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user