Skip to content

Commit c8df4a6

Browse files
committed
fix: backward compatibility for the default behavior of AgentSideConnection
Signed-off-by: Frost Ming <me@frostming.com>
1 parent 09717d5 commit c8df4a6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
from acp import (
1111
Client,
12-
ClientSideConnection,
1312
connect_to_agent,
1413
RequestError,
1514
text_block,
1615
PROTOCOL_VERSION,
1716
)
17+
from acp.core import ClientSideConnection
1818
from acp.schema import (
1919
AgentMessageChunk,
2020
AgentPlanUpdate,

src/acp/agent/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def __init__(
5555
to_agent: Callable[[Client], Agent] | Agent,
5656
input_stream: Any,
5757
output_stream: Any,
58-
listening: bool = False,
58+
listening: bool = True,
5959
**connection_kwargs: Any,
6060
) -> None:
6161
agent = to_agent(cast(Client, self)) if callable(to_agent) else to_agent

src/acp/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ async def run_agent(
5050

5151
if input_stream is None and output_stream is None:
5252
output_stream, input_stream = await stdio_streams()
53-
conn = AgentSideConnection(agent, input_stream, output_stream, **connection_kwargs)
53+
conn = AgentSideConnection(agent, input_stream, output_stream, listening=False, **connection_kwargs)
5454
await conn.listen()
5555

5656

0 commit comments

Comments
 (0)