refactor: 重命名 agent_chat 模块为 agent

This commit is contained in:
qzl
2026-03-02 11:13:20 +08:00
parent 2ac56e5084
commit 99d540a18d
57 changed files with 11175 additions and 74 deletions
@@ -4,7 +4,7 @@ from pathlib import Path
import pytest
from core.agent_chat.crewai.template_loader import (
from core.agent.crewai.template_loader import (
load_crewai_template,
load_tools_whitelist,
validate_workflow_stages,
@@ -63,7 +63,7 @@ tools:
def test_load_crewai_template_success_when_all_files_valid(tmp_path: Path) -> None:
static_root = _prepare_static_root(tmp_path / "agent_chat")
static_root = _prepare_static_root(tmp_path / "agent")
template = load_crewai_template(static_root)
@@ -79,7 +79,7 @@ def test_load_crewai_template_success_when_all_files_valid(tmp_path: Path) -> No
def test_load_crewai_template_raises_file_not_found_when_required_file_missing(
tmp_path: Path,
) -> None:
static_root = _prepare_static_root(tmp_path / "agent_chat")
static_root = _prepare_static_root(tmp_path / "agent")
(static_root / "crewai" / "tasks.yaml").unlink()
with pytest.raises(FileNotFoundError):
@@ -89,7 +89,7 @@ def test_load_crewai_template_raises_file_not_found_when_required_file_missing(
def test_load_crewai_template_raises_value_error_when_workflow_stages_invalid(
tmp_path: Path,
) -> None:
static_root = _prepare_static_root(tmp_path / "agent_chat")
static_root = _prepare_static_root(tmp_path / "agent")
_write(
static_root / "crewai" / "workflow.yaml",
"""
@@ -105,7 +105,7 @@ stages:
def test_load_tools_whitelist_from_tools_yaml(tmp_path: Path) -> None:
static_root = _prepare_static_root(tmp_path / "agent_chat")
static_root = _prepare_static_root(tmp_path / "agent")
whitelist = load_tools_whitelist(static_root)
@@ -124,7 +124,7 @@ def test_validate_workflow_stages_rejects_extra_or_missing_stage() -> None:
def test_load_tools_whitelist_rejects_non_string_item(tmp_path: Path) -> None:
static_root = _prepare_static_root(tmp_path / "agent_chat")
static_root = _prepare_static_root(tmp_path / "agent")
_write(
static_root / "tools.yaml",
"""