v2.10.0 (#697)
Co-authored-by: Clément Drouin <clement.drouin@mistral.ai> Co-authored-by: Corentin André <corentin.andre@mistral.ai> Co-authored-by: Guillaume LE GOFF <guillaume.lgf@gmail.com> Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> Co-authored-by: Maxime Dolores <maxime.dolores@ext.mistral.ai> Co-authored-by: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Co-authored-by: Peter Evers <pevers90@gmail.com> Co-authored-by: Pierre Rossinès <pierre.rossines@mistral.ai> Co-authored-by: Quentin <quentin.torroba@mistral.ai> Co-authored-by: Vincent G <10739306+VinceOPS@users.noreply.github.com> Co-authored-by: MichisGitIsKing <MichisGitIsKing@users.noreply.github.com> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
626f905186
commit
228f3c65a9
158 changed files with 7235 additions and 916 deletions
|
|
@ -5,6 +5,7 @@ from pathlib import Path
|
|||
from vibe.core.paths._local_config_walk import (
|
||||
_MAX_DIRS,
|
||||
WALK_MAX_DEPTH,
|
||||
ConfigWalkResult,
|
||||
walk_local_config_dirs,
|
||||
)
|
||||
|
||||
|
|
@ -166,3 +167,29 @@ class TestWalkConfigDirs:
|
|||
assert resolved / ".vibe" in result.config_dirs
|
||||
assert resolved / ".agents" in result.config_dirs
|
||||
assert resolved / "sub" / ".vibe" in result.config_dirs
|
||||
|
||||
|
||||
class TestConfigWalkResultOr:
|
||||
def test_or_concatenates_each_field(self) -> None:
|
||||
a = ConfigWalkResult(
|
||||
config_dirs=(Path("/a/.vibe"),),
|
||||
tools=(Path("/a/.vibe/tools"),),
|
||||
skills=(Path("/a/.vibe/skills"),),
|
||||
agents=(Path("/a/.vibe/agents"),),
|
||||
)
|
||||
b = ConfigWalkResult(
|
||||
config_dirs=(Path("/b/.vibe"),),
|
||||
tools=(Path("/b/.vibe/tools"),),
|
||||
skills=(Path("/b/.vibe/skills"),),
|
||||
agents=(Path("/b/.vibe/agents"),),
|
||||
)
|
||||
merged = a | b
|
||||
assert merged.config_dirs == (Path("/a/.vibe"), Path("/b/.vibe"))
|
||||
assert merged.tools == (Path("/a/.vibe/tools"), Path("/b/.vibe/tools"))
|
||||
assert merged.skills == (Path("/a/.vibe/skills"), Path("/b/.vibe/skills"))
|
||||
assert merged.agents == (Path("/a/.vibe/agents"), Path("/b/.vibe/agents"))
|
||||
|
||||
def test_or_with_empty_is_identity(self) -> None:
|
||||
a = ConfigWalkResult(tools=(Path("/a/.vibe/tools"),))
|
||||
assert (a | ConfigWalkResult()) == a
|
||||
assert (ConfigWalkResult() | a) == a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue