Commit 4fcff47
authored
fix: drain pending stream output after interrupt in ClaudeCodeSdk (#11)
- keep reading ReceiveResponseAsync during cancellation to flush buffered messages
- trigger InterruptAsync from cancellation callback instead of aborting the reader token
- stop disposing the client inside ClaudeSdkClient.InterruptAsync so buffered output is not lost to the next query
(cherry picked from commit 2f1d4ec9a0cc27ce5741a10d6ff6afd3ae277485)
Signed-off-by: zxyao145 <[email protected]>1 parent 7dee948 commit 4fcff47
2 files changed
Lines changed: 28 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | 103 | | |
109 | 104 | | |
110 | 105 | | |
| |||
150 | 145 | | |
151 | 146 | | |
152 | 147 | | |
153 | | - | |
| 148 | + | |
154 | 149 | | |
155 | 150 | | |
156 | 151 | | |
| |||
160 | 155 | | |
161 | 156 | | |
162 | 157 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | 158 | | |
169 | 159 | | |
170 | 160 | | |
| |||
203 | 193 | | |
204 | 194 | | |
205 | 195 | | |
206 | | - | |
| 196 | + | |
207 | 197 | | |
208 | 198 | | |
209 | 199 | | |
210 | | - | |
| 200 | + | |
211 | 201 | | |
212 | | - | |
| 202 | + | |
213 | 203 | | |
214 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
215 | 227 | | |
216 | 228 | | |
217 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
0 commit comments