v2.14.0 (#743)
Co-authored-by: Alexis Tacnet <alexis@mistral.ai> Co-authored-by: Clément Drouin <clement.drouin@mistral.ai> Co-authored-by: Guillaume LE GOFF <guillaume.lgf@gmail.com> Co-authored-by: Lucas Marandat <31749711+lucasmrdt@users.noreply.github.com> Co-authored-by: Maxime Dolores <maxime.dolores@ext.mistral.ai> Co-authored-by: Pierre Rossinès <pierre.rossines@mistral.ai> Co-authored-by: Quentin <quentin.torroba@mistral.ai> Co-authored-by: Val <102326092+vdeva@users.noreply.github.com> Co-authored-by: Vincent G <10739306+VinceOPS@users.noreply.github.com> Co-authored-by: p.vezia <166131032+le-codeur-rapide@users.noreply.github.com> Co-authored-by: Hiba Chaabnia <Hiba-Chaabnia@users.noreply.github.com> Co-authored-by: Nikhil Bhima <nikhilbhima@users.noreply.github.com> Co-authored-by: Nkipohcs <Nkipohcs@users.noreply.github.com> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
ad0d5c9520
commit
3f8487f761
197 changed files with 10819 additions and 2830 deletions
|
|
@ -246,7 +246,7 @@ class TestConnectorMenuOrdering:
|
|||
)
|
||||
|
||||
ordered = _sort_connector_names_for_menu(
|
||||
registry.get_connector_names(), registry
|
||||
registry.get_connector_names(), registry, set()
|
||||
)
|
||||
|
||||
assert ordered == ["alpha", "beta", "zeta"]
|
||||
|
|
@ -261,11 +261,54 @@ class TestConnectorMenuOrdering:
|
|||
)
|
||||
|
||||
ordered = _sort_connector_names_for_menu(
|
||||
registry.get_connector_names(), registry
|
||||
registry.get_connector_names(), registry, set()
|
||||
)
|
||||
|
||||
assert ordered == ["alpha", "Beta", "Zeta"]
|
||||
|
||||
def test_disabled_connectors_sink_to_bottom(self) -> None:
|
||||
registry = FakeConnectorRegistry(
|
||||
connectors={
|
||||
"alpha": [RemoteTool(name="lookup", description="Lookup")],
|
||||
"beta": [RemoteTool(name="search", description="Search")],
|
||||
"gamma": [],
|
||||
}
|
||||
)
|
||||
|
||||
# alpha is enabled+connected, beta is enabled+connected but disabled in
|
||||
# config, gamma is enabled+disconnected. Expected: enabled-and-connected
|
||||
# first, then enabled-but-disconnected, then disabled at the bottom.
|
||||
ordered = _sort_connector_names_for_menu(
|
||||
registry.get_connector_names(), registry, {"beta"}
|
||||
)
|
||||
|
||||
assert ordered == ["alpha", "gamma", "beta"]
|
||||
|
||||
def test_full_ordering_enabled_then_connected_then_alpha(self) -> None:
|
||||
registry = FakeConnectorRegistry(
|
||||
connectors={
|
||||
"d_disabled_connected": [RemoteTool(name="t", description="t")],
|
||||
"b_enabled_disconnected": [],
|
||||
"a_enabled_connected": [RemoteTool(name="t", description="t")],
|
||||
"c_enabled_connected": [RemoteTool(name="t", description="t")],
|
||||
"e_disabled_disconnected": [],
|
||||
}
|
||||
)
|
||||
|
||||
ordered = _sort_connector_names_for_menu(
|
||||
registry.get_connector_names(),
|
||||
registry,
|
||||
{"d_disabled_connected", "e_disabled_disconnected"},
|
||||
)
|
||||
|
||||
assert ordered == [
|
||||
"a_enabled_connected",
|
||||
"c_enabled_connected",
|
||||
"b_enabled_disconnected",
|
||||
"d_disabled_connected",
|
||||
"e_disabled_disconnected",
|
||||
]
|
||||
|
||||
|
||||
class TestHelpBarChanges:
|
||||
"""The help bar should show 'Enter Authenticate' for disconnected connectors."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue