MCPcopy
hub / github.com/Aider-AI/aider / get_announcements

Method get_announcements

aider/coders/base_coder.py:207–295  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

205 return new_coder
206
207 def get_announcements(self):
208 lines = []
209 lines.append(f"Aider v{__version__}")
210
211 # Model
212 main_model = self.main_model
213 weak_model = main_model.weak_model
214
215 if weak_model is not main_model:
216 prefix = "Main model"
217 else:
218 prefix = "Model"
219
220 output = f"{prefix}: {main_model.name} with {self.edit_format} edit format"
221
222 # Check for thinking token budget
223 thinking_tokens = main_model.get_thinking_tokens()
224 if thinking_tokens:
225 output += f", {thinking_tokens} think tokens"
226
227 # Check for reasoning effort
228 reasoning_effort = main_model.get_reasoning_effort()
229 if reasoning_effort:
230 output += f", reasoning {reasoning_effort}"
231
232 if self.add_cache_headers or main_model.caches_by_default:
233 output += ", prompt cache"
234 if main_model.info.get("supports_assistant_prefill"):
235 output += ", infinite output"
236
237 lines.append(output)
238
239 if self.edit_format == "architect":
240 output = (
241 f"Editor model: {main_model.editor_model.name} with"
242 f" {main_model.editor_edit_format} edit format"
243 )
244 lines.append(output)
245
246 if weak_model is not main_model:
247 output = f"Weak model: {weak_model.name}"
248 lines.append(output)
249
250 # Repo
251 if self.repo:
252 rel_repo_dir = self.repo.get_rel_repo_dir()
253 num_files = len(self.repo.get_tracked_files())
254
255 lines.append(f"Git repo: {rel_repo_dir} with {num_files:,} files")
256 if num_files > 1000:
257 lines.append(
258 "Warning: For large repos, consider using --subtree-only and .aiderignore"
259 )
260 lines.append(f"See: {urls.large_repos}")
261 else:
262 lines.append("Git repo: none")
263
264 # Repo-map

Callers 9

show_announcementsMethod · 0.95
cmd_modelMethod · 0.45
cmd_helpMethod · 0.45
cmd_settingsMethod · 0.45
cmd_reportMethod · 0.45
cmd_think_tokensMethod · 0.45
cmd_reasoning_effortMethod · 0.45
get_coderFunction · 0.45
announceMethod · 0.45

Calls 7

get_rel_fnameMethod · 0.95
get_thinking_tokensMethod · 0.80
get_reasoning_effortMethod · 0.80
get_rel_repo_dirMethod · 0.80
get_tracked_filesMethod · 0.80
get_repo_map_tokensMethod · 0.80

Tested by

no test coverage detected