mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
refactor: simplify event method to use main_model attributes
This commit is contained in:
parent
8e098752bd
commit
e4913669d4
1 changed files with 3 additions and 8 deletions
|
@ -119,8 +119,7 @@ class Analytics:
|
|||
return model.name.split("/")[0] + "/REDACTED"
|
||||
return None
|
||||
|
||||
# ai: actually, weak_model and editor_model are attributes of main_model; use them instead!
|
||||
def event(self, event_name, main_model=None, weak_model=None, editor_model=None, **kwargs):
|
||||
def event(self, event_name, main_model=None, **kwargs):
|
||||
if not (self.mp or self.ph) and not self.logfile:
|
||||
return
|
||||
|
||||
|
@ -128,12 +127,8 @@ class Analytics:
|
|||
|
||||
if main_model:
|
||||
properties["main_model"] = self._redact_model_name(main_model)
|
||||
|
||||
if weak_model:
|
||||
properties["weak_model"] = self._redact_model_name(weak_model)
|
||||
|
||||
if editor_model:
|
||||
properties["editor_model"] = self._redact_model_name(editor_model)
|
||||
properties["weak_model"] = self._redact_model_name(main_model.weak_model)
|
||||
properties["editor_model"] = self._redact_model_name(main_model.editor_model)
|
||||
|
||||
properties.update(kwargs)
|
||||
properties.update(self.get_system_info()) # Add system info to all events
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue