mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
feat: add event tracking for message sending lifecycle
This commit is contained in:
parent
d17f0a9e1f
commit
c1c4193b1d
1 changed files with 3 additions and 0 deletions
|
@ -1186,6 +1186,8 @@ class Coder:
|
|||
return chunks
|
||||
|
||||
def send_message(self, inp):
|
||||
self.event("message_send_starting")
|
||||
|
||||
self.cur_messages += [
|
||||
dict(role="user", content=inp),
|
||||
]
|
||||
|
@ -1265,6 +1267,7 @@ class Coder:
|
|||
lines = traceback.format_exception(type(err), err, err.__traceback__)
|
||||
self.io.tool_warning("".join(lines))
|
||||
self.io.tool_error(str(err))
|
||||
self.event("message_send_exception", exception=str(err))
|
||||
return
|
||||
finally:
|
||||
if self.mdstream:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue