Co-authored-by: Guillaume LE GOFF <guillaume.lgf@gmail.com>
Co-authored-by: Michel Thomazo <51709227+michelTho@users.noreply.github.com>
Co-authored-by: Pierre Rossinès <pierre.rossines@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: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Clément Drouin 2026-05-20 11:39:59 +02:00 committed by GitHub
parent 228f3c65a9
commit f71bfd3b8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 2950 additions and 402 deletions

View file

@ -81,9 +81,7 @@ def acp_search_replace_tool(
monkeypatch.chdir(tmp_path)
config = SearchReplaceConfig()
state = AcpSearchReplaceState.model_construct(
client=mock_client,
session_id="test_session_123",
tool_call_id="test_tool_call_456",
client=mock_client, session_id="test_session_123"
)
return SearchReplace(config_getter=lambda: config, state=state)
@ -116,7 +114,6 @@ class TestAcpSearchReplaceExecution:
assert result.blocks_applied == 1
assert mock_client._read_text_file_called
assert mock_client._write_text_file_called
assert mock_client._session_update_called
# Verify read_text_file was called correctly
read_params = mock_client._last_read_params
@ -141,7 +138,7 @@ class TestAcpSearchReplaceExecution:
tool = SearchReplace(
config_getter=lambda: config,
state=AcpSearchReplaceState.model_construct(
client=mock_client, session_id="test_session", tool_call_id="test_call"
client=mock_client, session_id="test_session"
),
)
@ -171,7 +168,7 @@ class TestAcpSearchReplaceExecution:
tool = SearchReplace(
config_getter=lambda: SearchReplaceConfig(),
state=AcpSearchReplaceState.model_construct(
client=mock_client, session_id="test_session", tool_call_id="test_call"
client=mock_client, session_id="test_session"
),
)
@ -202,7 +199,7 @@ class TestAcpSearchReplaceExecution:
tool = SearchReplace(
config_getter=lambda: SearchReplaceConfig(),
state=AcpSearchReplaceState.model_construct(
client=mock_client, session_id="test_session", tool_call_id="test_call"
client=mock_client, session_id="test_session"
),
)
@ -245,7 +242,7 @@ class TestAcpSearchReplaceExecution:
tool = SearchReplace(
config_getter=lambda: SearchReplaceConfig(),
state=AcpSearchReplaceState.model_construct(
client=client, session_id=session_id, tool_call_id="test_call"
client=client, session_id=session_id
),
)