v1.2.0
Co-Authored-By: Quentin Torroba <quentin.torroba@mistral.ai> Co-Authored-By: Michel Thomazo <michel.thomazo@mistral.ai> Co-Authored-By: Kracekumar <kracethekingmaker@gmail.com>
This commit is contained in:
parent
661588de0c
commit
d8dbeeb31e
91 changed files with 4521 additions and 873 deletions
|
|
@ -105,7 +105,7 @@ def test_on_text_change_clears_suggestions_when_no_matches() -> None:
|
|||
assert view.reset_count >= 1
|
||||
|
||||
|
||||
def test_on_text_change_limits_the_number_of_results_to_five_and_preserve_insertion_order() -> (
|
||||
def test_on_text_change_limits_the_number_of_results_and_preserves_insertion_order() -> (
|
||||
None
|
||||
):
|
||||
controller, view = make_controller(prefix="/")
|
||||
|
|
@ -113,13 +113,15 @@ def test_on_text_change_limits_the_number_of_results_to_five_and_preserve_insert
|
|||
controller.on_text_changed("/", cursor_index=1)
|
||||
|
||||
suggestions, selected_index = view.suggestion_events[-1]
|
||||
assert len(suggestions) == 5
|
||||
assert len(suggestions) == 7
|
||||
assert [suggestion.alias for suggestion in suggestions] == [
|
||||
"/config",
|
||||
"/compact",
|
||||
"/help",
|
||||
"/summarize",
|
||||
"/logpath",
|
||||
"/exit",
|
||||
"/vim",
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@ async def test_popup_appears_with_matching_suggestions(vibe_app: VibeApp) -> Non
|
|||
chat_input = vibe_app.query_one(ChatInputContainer)
|
||||
popup = vibe_app.query_one(CompletionPopup)
|
||||
|
||||
await pilot.press(*"/sum")
|
||||
await pilot.press(*"/com")
|
||||
|
||||
popup_content = str(popup.render())
|
||||
assert popup.styles.display == "block"
|
||||
assert "/summarize" in popup_content
|
||||
assert "/compact" in popup_content
|
||||
assert "Compact conversation history by summarizing" in popup_content
|
||||
assert chat_input.value == "/sum"
|
||||
assert chat_input.value == "/com"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
@ -88,11 +88,11 @@ async def test_arrow_navigation_updates_selected_suggestion(vibe_app: VibeApp) -
|
|||
|
||||
await pilot.press(*"/c")
|
||||
|
||||
ensure_selected_command(popup, "/cfg")
|
||||
await pilot.press("down")
|
||||
ensure_selected_command(popup, "/config")
|
||||
await pilot.press("down")
|
||||
ensure_selected_command(popup, "/clear")
|
||||
await pilot.press("up")
|
||||
ensure_selected_command(popup, "/cfg")
|
||||
ensure_selected_command(popup, "/config")
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
@ -100,13 +100,13 @@ async def test_arrow_navigation_cycles_through_suggestions(vibe_app: VibeApp) ->
|
|||
async with vibe_app.run_test() as pilot:
|
||||
popup = vibe_app.query_one(CompletionPopup)
|
||||
|
||||
await pilot.press(*"/st")
|
||||
await pilot.press(*"/co")
|
||||
|
||||
ensure_selected_command(popup, "/stats")
|
||||
ensure_selected_command(popup, "/config")
|
||||
await pilot.press("down")
|
||||
ensure_selected_command(popup, "/status")
|
||||
ensure_selected_command(popup, "/compact")
|
||||
await pilot.press("up")
|
||||
ensure_selected_command(popup, "/stats")
|
||||
ensure_selected_command(popup, "/config")
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue