v2.9.5 (#676)
Co-authored-by: Clément Drouin <clement.drouin@mistral.ai> Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> Co-authored-by: Mathias Gesbert <mathias.gesbert@mistral.ai> Co-authored-by: allansimon-mistral <allan.simon@ext.mistral.ai> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
4972dd5694
commit
b23f49e5f4
74 changed files with 2342 additions and 240 deletions
|
|
@ -199,6 +199,28 @@ def test_callable_entries_updates_completions_dynamically() -> None:
|
|||
assert suggestions[0].description == "Summarize the conversation"
|
||||
|
||||
|
||||
def test_tab_on_slash_command_with_args_replaces_only_head() -> None:
|
||||
controller, view = make_controller()
|
||||
text = "/compact some args"
|
||||
controller.on_text_changed(text, cursor_index=len(text))
|
||||
|
||||
result = controller.on_key(key_event("tab"), text=text, cursor_index=len(text))
|
||||
|
||||
assert result is CompletionResult.HANDLED
|
||||
assert view.replacements == [Replacement(0, 8, "/compact")]
|
||||
|
||||
|
||||
def test_enter_on_slash_command_with_args_submits_with_head_only_replacement() -> None:
|
||||
controller, view = make_controller()
|
||||
text = "/compact some args"
|
||||
controller.on_text_changed(text, cursor_index=len(text))
|
||||
|
||||
result = controller.on_key(key_event("enter"), text=text, cursor_index=len(text))
|
||||
|
||||
assert result is CompletionResult.SUBMIT
|
||||
assert view.replacements == [Replacement(0, 8, "/compact")]
|
||||
|
||||
|
||||
def test_callable_entries_reflects_enabled_disabled_skills() -> None:
|
||||
"""Test that skill enable/disable changes are reflected in completions.
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ async def test_popup_hides_when_input_cleared(vibe_app: VibeApp) -> None:
|
|||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_pressing_tab_writes_selected_command_and_hides_popup(
|
||||
async def test_pressing_tab_writes_selected_command_and_leaves_popup_visible(
|
||||
vibe_app: VibeApp,
|
||||
) -> None:
|
||||
async with vibe_app.run_test() as pilot:
|
||||
|
|
@ -53,7 +53,7 @@ async def test_pressing_tab_writes_selected_command_and_hides_popup(
|
|||
await pilot.press("tab")
|
||||
|
||||
assert chat_input.value == "/config"
|
||||
assert popup.styles.display == "none"
|
||||
assert popup.styles.display == "block"
|
||||
|
||||
|
||||
def ensure_selected_command(popup: CompletionPopup, expected_alias: str) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue