mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 04:14:59 +00:00
feat: Show active model metadata in /settings command
This commit is contained in:
parent
4d39b88110
commit
225e01717c
1 changed files with 23 additions and 0 deletions
|
@ -1392,7 +1392,30 @@ class Commands:
|
||||||
"Print out the current settings"
|
"Print out the current settings"
|
||||||
settings = format_settings(self.parser, self.args)
|
settings = format_settings(self.parser, self.args)
|
||||||
announcements = "\n".join(self.coder.get_announcements())
|
announcements = "\n".join(self.coder.get_announcements())
|
||||||
|
|
||||||
|
# Build metadata for the active models (main, editor, weak)
|
||||||
|
model_sections = []
|
||||||
|
active_models = [
|
||||||
|
("Main model", self.coder.main_model),
|
||||||
|
("Editor model", getattr(self.coder.main_model, "editor_model", None)),
|
||||||
|
("Weak model", getattr(self.coder.main_model, "weak_model", None)),
|
||||||
|
]
|
||||||
|
for label, model in active_models:
|
||||||
|
if not model:
|
||||||
|
continue
|
||||||
|
info = getattr(model, "info", {}) or {}
|
||||||
|
if not info:
|
||||||
|
continue
|
||||||
|
model_sections.append(f"{label} ({model.name}):")
|
||||||
|
for k, v in sorted(info.items()):
|
||||||
|
model_sections.append(f" {k}: {v}")
|
||||||
|
model_sections.append("") # blank line between models
|
||||||
|
|
||||||
|
model_metadata = "\n".join(model_sections)
|
||||||
|
|
||||||
output = f"{announcements}\n{settings}"
|
output = f"{announcements}\n{settings}"
|
||||||
|
if model_metadata:
|
||||||
|
output += "\n" + model_metadata
|
||||||
self.io.tool_output(output)
|
self.io.tool_output(output)
|
||||||
|
|
||||||
def completions_raw_load(self, document, complete_event):
|
def completions_raw_load(self, document, complete_event):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue