mirror of
https://github.com/Aider-AI/aider
synced 2026-04-26 01:25:17 +02:00
Compare commits
298 Commits
v0.76.2.de
...
v0.77.2.de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97a3bfca4e | ||
|
|
cf58133e06 | ||
|
|
0d1811a4ae | ||
|
|
2a8bb715f0 | ||
|
|
cf93869d3f | ||
|
|
77976a5253 | ||
|
|
5af46aaa2e | ||
|
|
4f4b10fd86 | ||
|
|
26789115b6 | ||
|
|
87a28dcb9f | ||
|
|
1ad99f39e2 | ||
|
|
dfbeec199e | ||
|
|
41a99ec29d | ||
|
|
7cee3aa1f1 | ||
|
|
b86d8099f1 | ||
|
|
9c4a0043dd | ||
|
|
5cde755976 | ||
|
|
51aab7b656 | ||
|
|
791dc213fa | ||
|
|
8404165db3 | ||
|
|
aee52c01a3 | ||
|
|
58e16b0c48 | ||
|
|
3225ac88c0 | ||
|
|
38b8b85ec2 | ||
|
|
278f748c1c | ||
|
|
874df40303 | ||
|
|
0465d8ce80 | ||
|
|
e9b3f5fd43 | ||
|
|
c49bc2418b | ||
|
|
fd21f5195d | ||
|
|
a1aa63fa06 | ||
|
|
b0a619c714 | ||
|
|
ec648f2c6f | ||
|
|
7ac7c72e03 | ||
|
|
f1d00dbd7f | ||
|
|
f644aba7a8 | ||
|
|
ed75287c8c | ||
|
|
a035c73c41 | ||
|
|
781a619262 | ||
|
|
e08b63cc9f | ||
|
|
97ed57a252 | ||
|
|
71f1779c8c | ||
|
|
116f44cade | ||
|
|
2ebdd689ab | ||
|
|
beecc1a718 | ||
|
|
557ba2adc1 | ||
|
|
89780c1283 | ||
|
|
411e7f86c1 | ||
|
|
610fce67e1 | ||
|
|
d9350cd3ed | ||
|
|
54d6643a1f | ||
|
|
f664420628 | ||
|
|
d4d4c6de68 | ||
|
|
b4313599f8 | ||
|
|
6866f8f0a9 | ||
|
|
3cb478214b | ||
|
|
8d7b4d6446 | ||
|
|
cc6b0bcd72 | ||
|
|
831564cf48 | ||
|
|
4e59b62026 | ||
|
|
f345b9b0ff | ||
|
|
d4fb88a8c4 | ||
|
|
2cb1b6be46 | ||
|
|
feda315c2b | ||
|
|
41219a7d85 | ||
|
|
813a201b6a | ||
|
|
1bc40d48fe | ||
|
|
ddb4e51938 | ||
|
|
9ee67c343d | ||
|
|
bb816eae83 | ||
|
|
92bd446d09 | ||
|
|
a7526fa9c4 | ||
|
|
9b6ff487da | ||
|
|
9d61490743 | ||
|
|
9cce6e41fa | ||
|
|
a56dbdf502 | ||
|
|
7d5f27fa34 | ||
|
|
a61ba0db22 | ||
|
|
7f02a889e2 | ||
|
|
88d388a574 | ||
|
|
4d5a659e1e | ||
|
|
ecfcf1071d | ||
|
|
ec385d45e9 | ||
|
|
985107bb4b | ||
|
|
eb340c74ac | ||
|
|
9a16b33f00 | ||
|
|
0acebc5916 | ||
|
|
8442d9fe5f | ||
|
|
5318dd1a80 | ||
|
|
d916180ec8 | ||
|
|
6e5aa08ee0 | ||
|
|
83e115cde5 | ||
|
|
a3a92cd5dd | ||
|
|
16fc10fb0f | ||
|
|
6bba8b57d4 | ||
|
|
f45c75a137 | ||
|
|
3348df0652 | ||
|
|
3b6a01b63d | ||
|
|
a3554a95c5 | ||
|
|
6fa9af20c0 | ||
|
|
e23437dfa4 | ||
|
|
dcf9eaad77 | ||
|
|
768df05692 | ||
|
|
e0d5d35e32 | ||
|
|
a718a05414 | ||
|
|
953391d9d0 | ||
|
|
4ca229fd42 | ||
|
|
693a43efc8 | ||
|
|
f3d4c931f5 | ||
|
|
ece21315b1 | ||
|
|
318cc57ffe | ||
|
|
ba17924174 | ||
|
|
6bc9daa6ee | ||
|
|
2d8bc95bae | ||
|
|
520eb4a932 | ||
|
|
03733516cc | ||
|
|
e561130336 | ||
|
|
169fa2e7b7 | ||
|
|
6d6db996fb | ||
|
|
f8642bfd94 | ||
|
|
dfdd6bf533 | ||
|
|
91cef71048 | ||
|
|
3daf632384 | ||
|
|
dba5fb9dfa | ||
|
|
70d10a0bb2 | ||
|
|
97291b806a | ||
|
|
c583f008e9 | ||
|
|
b182eba56f | ||
|
|
de5da0e7ce | ||
|
|
f2a893c0d4 | ||
|
|
371a03c794 | ||
|
|
88e3d48be5 | ||
|
|
e8a8681a75 | ||
|
|
b541eec3b8 | ||
|
|
ce3f732645 | ||
|
|
1b3cae1ed5 | ||
|
|
024b9130a0 | ||
|
|
61a8b6020f | ||
|
|
d25877aace | ||
|
|
c3c2d4dc22 | ||
|
|
7454154599 | ||
|
|
04ecea614b | ||
|
|
084a14b640 | ||
|
|
a477759a49 | ||
|
|
d4df207612 | ||
|
|
57d492d4b8 | ||
|
|
fb7413436c | ||
|
|
2cc8105e68 | ||
|
|
a83d5ff123 | ||
|
|
a709d650df | ||
|
|
570e8eae31 | ||
|
|
22f1703bee | ||
|
|
14037eaeb8 | ||
|
|
189d64dc3d | ||
|
|
315f8093c6 | ||
|
|
a776d70e0d | ||
|
|
1ab6c70ac7 | ||
|
|
73eb8701dd | ||
|
|
a503f291e7 | ||
|
|
b54d800024 | ||
|
|
d74068464d | ||
|
|
86a5e8dbe1 | ||
|
|
24d2b683c8 | ||
|
|
9451f0abe4 | ||
|
|
544d58ddbd | ||
|
|
7c1d2d75e0 | ||
|
|
0b949f47d9 | ||
|
|
393b45dd21 | ||
|
|
6bb43555dc | ||
|
|
ba03b07602 | ||
|
|
0ac4c0b97d | ||
|
|
41e93a4d94 | ||
|
|
a0b5b19d38 | ||
|
|
65fad5ae30 | ||
|
|
a689f2116c | ||
|
|
68b5c90d95 | ||
|
|
44eb9af7bc | ||
|
|
9e824e6070 | ||
|
|
ba6bb527a7 | ||
|
|
3525eeae54 | ||
|
|
e535e01e83 | ||
|
|
3b1c81e50e | ||
|
|
89406e5b7d | ||
|
|
d5cc855c0f | ||
|
|
2ed61eaf92 | ||
|
|
865f71e2cc | ||
|
|
08a75808df | ||
|
|
c9dd37db8e | ||
|
|
7e86c8a90c | ||
|
|
b87a5496e9 | ||
|
|
9a88363437 | ||
|
|
c0b9665cfc | ||
|
|
70284ce1c2 | ||
|
|
48621dadaa | ||
|
|
e69bad57e4 | ||
|
|
f55099e969 | ||
|
|
76994facec | ||
|
|
2d843f6e79 | ||
|
|
e15518dd29 | ||
|
|
011e0fd109 | ||
|
|
5f125c1812 | ||
|
|
a6ebed8d16 | ||
|
|
849e02cbfb | ||
|
|
1ab5238405 | ||
|
|
ae6192111d | ||
|
|
59af4114dd | ||
|
|
4491b88763 | ||
|
|
92377fc390 | ||
|
|
79b8e50412 | ||
|
|
b5cd39cc50 | ||
|
|
63c2a98f3c | ||
|
|
c168f78a13 | ||
|
|
42d45b4037 | ||
|
|
c41df63629 | ||
|
|
330bb81206 | ||
|
|
d84c755ee8 | ||
|
|
a24ff28031 | ||
|
|
3a837c472e | ||
|
|
f4880e2ef3 | ||
|
|
a2e4022e31 | ||
|
|
5668b41daa | ||
|
|
c052270048 | ||
|
|
70547171ca | ||
|
|
881868bf17 | ||
|
|
e90eb39a9b | ||
|
|
9513d307a1 | ||
|
|
533e5ec03f | ||
|
|
55f63395c7 | ||
|
|
4253d98a73 | ||
|
|
0c4af58866 | ||
|
|
a5919bd27d | ||
|
|
5e40974fdd | ||
|
|
a27f4d0e04 | ||
|
|
1bb3041298 | ||
|
|
dc6040adda | ||
|
|
864725ff3d | ||
|
|
0fcbea03e5 | ||
|
|
2ce63e6ad3 | ||
|
|
d45af94cee | ||
|
|
1f874b654d | ||
|
|
a7a21757bc | ||
|
|
1bed4e8972 | ||
|
|
efcda12dda | ||
|
|
d7b4079ab5 | ||
|
|
2eb1513612 | ||
|
|
87bcbe0420 | ||
|
|
26b0c6e6da | ||
|
|
8cfbc9b827 | ||
|
|
46eee9e642 | ||
|
|
7d902d2f3e | ||
|
|
3d05007024 | ||
|
|
a2bf2e2910 | ||
|
|
9cf4286cee | ||
|
|
c9ddca3a16 | ||
|
|
06370cb096 | ||
|
|
342586519d | ||
|
|
89174bb524 | ||
|
|
1fa3bc4018 | ||
|
|
d68e2b33fb | ||
|
|
1313cd8216 | ||
|
|
7afc8c760c | ||
|
|
79f714ab16 | ||
|
|
e21bab2d17 | ||
|
|
4288cf2a39 | ||
|
|
9d570a9cb1 | ||
|
|
333ddfb37a | ||
|
|
10a5250527 | ||
|
|
fd57eccdca | ||
|
|
1432be9be6 | ||
|
|
1773bbf759 | ||
|
|
5c94624186 | ||
|
|
dc06c2fab3 | ||
|
|
f37799b39c | ||
|
|
cc84f590fe | ||
|
|
afcf3e77b5 | ||
|
|
0406dda2a6 | ||
|
|
935227f7e7 | ||
|
|
67ebb2566d | ||
|
|
1c736161c5 | ||
|
|
a348c2d013 | ||
|
|
444a95bc6c | ||
|
|
c38cdef220 | ||
|
|
5608db0892 | ||
|
|
98b3722a02 | ||
|
|
2d623ff196 | ||
|
|
703e124277 | ||
|
|
68c27f885f | ||
|
|
58cd190ca9 | ||
|
|
2c5c2b2f67 | ||
|
|
e10fe50c6f | ||
|
|
b8ad0b15e8 | ||
|
|
1b81fb0fdf | ||
|
|
703cb8849d | ||
|
|
55f856b23c | ||
|
|
93c284a67d | ||
|
|
38fd715247 | ||
|
|
987d024847 | ||
|
|
a3c0d628a1 |
29
HISTORY.md
29
HISTORY.md
@@ -1,5 +1,34 @@
|
||||
# Release history
|
||||
|
||||
### main branch
|
||||
|
||||
- Bumped dependencies to pickup litellm fix for Ollama.
|
||||
- Added support for `openrouter/google/gemma-3-27b-it` model.
|
||||
- Aider wrote 96% of the code in this release.
|
||||
|
||||
### Aider v0.77.0
|
||||
|
||||
- Big upgrade in [programming languages supported](https://aider.chat/docs/languages.html) by adopting [tree-sitter-language-pack](https://github.com/Goldziher/tree-sitter-language-pack/).
|
||||
- 130 new languages with linter support.
|
||||
- 20 new languages with repo-map support.
|
||||
- Added `/think-tokens` command to set thinking token budget with support for human-readable formats (8k, 10.5k, 0.5M).
|
||||
- Added `/reasoning-effort` command to control model reasoning level.
|
||||
- The `/think-tokens` and `/reasoning-effort` commands display current settings when called without arguments.
|
||||
- Display of thinking token budget and reasoning effort in model information.
|
||||
- Changed `--thinking-tokens` argument to accept string values with human-readable formats.
|
||||
- Added `--auto-accept-architect` flag (default: true) to automatically accept changes from architect coder format without confirmation.
|
||||
- Added support for `cohere_chat/command-a-03-2025` and `gemini/gemma-3-27b-it`
|
||||
- The bare `/drop` command now preserves original read-only files provided via args.read.
|
||||
- Fixed a bug where default model would be set by deprecated `--shortcut` switches even when already specified in the command line.
|
||||
- Improved AutoCompleter to require 3 characters for autocompletion to reduce noise.
|
||||
- Aider wrote 72% of the code in this release.
|
||||
|
||||
### Aider v0.76.2
|
||||
|
||||
- Fixed handling of JSONDecodeError when loading model cache file.
|
||||
- Fixed handling of GitCommandError when retrieving git user configuration.
|
||||
- Aider wrote 75% of the code in this release.
|
||||
|
||||
### Aider v0.76.1
|
||||
|
||||
- Added ignore_permission_denied option to file watcher to prevent errors when accessing restricted files, by Yutaka Matsubara.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from packaging import version
|
||||
|
||||
__version__ = "0.76.2.dev"
|
||||
__version__ = "0.77.2.dev"
|
||||
safe_version = __version__
|
||||
|
||||
try:
|
||||
|
||||
@@ -119,7 +119,7 @@ def get_parser(default_config_files, git_root):
|
||||
)
|
||||
group.add_argument(
|
||||
"--thinking-tokens",
|
||||
type=int,
|
||||
type=str,
|
||||
help="Set the thinking token budget for models that support it (default: not set)",
|
||||
)
|
||||
group.add_argument(
|
||||
@@ -148,6 +148,12 @@ def get_parser(default_config_files, git_root):
|
||||
const="architect",
|
||||
help="Use architect edit format for the main chat",
|
||||
)
|
||||
group.add_argument(
|
||||
"--auto-accept-architect",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
default=True,
|
||||
help="Enable/disable automatic acceptance of architect changes (default: True)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--weak-model",
|
||||
metavar="WEAK_MODEL",
|
||||
|
||||
@@ -6,6 +6,7 @@ from .base_coder import Coder
|
||||
class ArchitectCoder(AskCoder):
|
||||
edit_format = "architect"
|
||||
gpt_prompts = ArchitectPrompts()
|
||||
auto_accept_architect = False
|
||||
|
||||
def reply_completed(self):
|
||||
content = self.partial_response_content
|
||||
@@ -13,7 +14,7 @@ class ArchitectCoder(AskCoder):
|
||||
if not content or not content.strip():
|
||||
return
|
||||
|
||||
if not self.io.confirm_ask("Edit the files?"):
|
||||
if not self.auto_accept_architect and not self.io.confirm_ask("Edit the files?"):
|
||||
return
|
||||
|
||||
kwargs = dict()
|
||||
|
||||
@@ -207,10 +207,22 @@ class Coder:
|
||||
prefix = "Model"
|
||||
|
||||
output = f"{prefix}: {main_model.name} with {self.edit_format} edit format"
|
||||
|
||||
# Check for thinking token budget
|
||||
thinking_tokens = main_model.get_thinking_tokens(main_model)
|
||||
if thinking_tokens:
|
||||
output += f", {thinking_tokens} think tokens"
|
||||
|
||||
# Check for reasoning effort
|
||||
reasoning_effort = main_model.get_reasoning_effort(main_model)
|
||||
if reasoning_effort:
|
||||
output += f", reasoning {reasoning_effort}"
|
||||
|
||||
if self.add_cache_headers or main_model.caches_by_default:
|
||||
output += ", prompt cache"
|
||||
if main_model.info.get("supports_assistant_prefill"):
|
||||
output += ", infinite output"
|
||||
|
||||
lines.append(output)
|
||||
|
||||
if self.edit_format == "architect":
|
||||
@@ -310,6 +322,7 @@ class Coder:
|
||||
ignore_mentions=None,
|
||||
file_watcher=None,
|
||||
auto_copy_context=False,
|
||||
auto_accept_architect=True,
|
||||
):
|
||||
# Fill in a dummy Analytics if needed, but it is never .enable()'d
|
||||
self.analytics = analytics if analytics is not None else Analytics()
|
||||
@@ -322,6 +335,7 @@ class Coder:
|
||||
self.abs_root_path_cache = {}
|
||||
|
||||
self.auto_copy_context = auto_copy_context
|
||||
self.auto_accept_architect = auto_accept_architect
|
||||
|
||||
self.ignore_mentions = ignore_mentions
|
||||
if not self.ignore_mentions:
|
||||
|
||||
@@ -59,6 +59,7 @@ class Commands:
|
||||
parser=None,
|
||||
verbose=False,
|
||||
editor=None,
|
||||
original_read_only_fnames=None,
|
||||
):
|
||||
self.io = io
|
||||
self.coder = coder
|
||||
@@ -77,6 +78,9 @@ class Commands:
|
||||
self.help = None
|
||||
self.editor = editor
|
||||
|
||||
# Store the original read-only filenames provided via args.read
|
||||
self.original_read_only_fnames = set(original_read_only_fnames or [])
|
||||
|
||||
def cmd_model(self, args):
|
||||
"Switch to a new LLM"
|
||||
|
||||
@@ -355,7 +359,21 @@ class Commands:
|
||||
|
||||
def _drop_all_files(self):
|
||||
self.coder.abs_fnames = set()
|
||||
self.coder.abs_read_only_fnames = set()
|
||||
|
||||
# When dropping all files, keep those that were originally provided via args.read
|
||||
if self.original_read_only_fnames:
|
||||
# Keep only the original read-only files
|
||||
to_keep = set()
|
||||
for abs_fname in self.coder.abs_read_only_fnames:
|
||||
rel_fname = self.coder.get_rel_fname(abs_fname)
|
||||
if (
|
||||
abs_fname in self.original_read_only_fnames
|
||||
or rel_fname in self.original_read_only_fnames
|
||||
):
|
||||
to_keep.add(abs_fname)
|
||||
self.coder.abs_read_only_fnames = to_keep
|
||||
else:
|
||||
self.coder.abs_read_only_fnames = set()
|
||||
|
||||
def _clear_chat_history(self):
|
||||
self.coder.done_messages = []
|
||||
@@ -822,7 +840,12 @@ class Commands:
|
||||
"Remove files from the chat session to free up context space"
|
||||
|
||||
if not args.strip():
|
||||
self.io.tool_output("Dropping all files from the chat session.")
|
||||
if self.original_read_only_fnames:
|
||||
self.io.tool_output(
|
||||
"Dropping all files from the chat session except originally read-only files."
|
||||
)
|
||||
else:
|
||||
self.io.tool_output("Dropping all files from the chat session.")
|
||||
self._drop_all_files()
|
||||
return
|
||||
|
||||
@@ -1411,6 +1434,58 @@ class Commands:
|
||||
if user_input.strip():
|
||||
self.io.set_placeholder(user_input.rstrip())
|
||||
|
||||
def cmd_think_tokens(self, args):
|
||||
"Set the thinking token budget (supports formats like 8096, 8k, 10.5k, 0.5M)"
|
||||
model = self.coder.main_model
|
||||
|
||||
if not args.strip():
|
||||
# Display current value if no args are provided
|
||||
formatted_budget = model.get_thinking_tokens(model)
|
||||
if formatted_budget is None:
|
||||
self.io.tool_output("Thinking tokens are not currently set.")
|
||||
else:
|
||||
budget = model.extra_params["thinking"].get("budget_tokens")
|
||||
self.io.tool_output(
|
||||
f"Current thinking token budget: {budget:,} tokens ({formatted_budget})."
|
||||
)
|
||||
return
|
||||
|
||||
value = args.strip()
|
||||
model.set_thinking_tokens(value)
|
||||
|
||||
formatted_budget = model.get_thinking_tokens(model)
|
||||
budget = model.extra_params["thinking"].get("budget_tokens")
|
||||
|
||||
self.io.tool_output(f"Set thinking token budget to {budget:,} tokens ({formatted_budget}).")
|
||||
self.io.tool_output()
|
||||
|
||||
# Output announcements
|
||||
announcements = "\n".join(self.coder.get_announcements())
|
||||
self.io.tool_output(announcements)
|
||||
|
||||
def cmd_reasoning_effort(self, args):
|
||||
"Set the reasoning effort level (values: number or low/medium/high depending on model)"
|
||||
model = self.coder.main_model
|
||||
|
||||
if not args.strip():
|
||||
# Display current value if no args are provided
|
||||
reasoning_value = model.get_reasoning_effort(model)
|
||||
if reasoning_value is None:
|
||||
self.io.tool_output("Reasoning effort is not currently set.")
|
||||
else:
|
||||
self.io.tool_output(f"Current reasoning effort: {reasoning_value}")
|
||||
return
|
||||
|
||||
value = args.strip()
|
||||
model.set_reasoning_effort(value)
|
||||
reasoning_value = model.get_reasoning_effort(model)
|
||||
self.io.tool_output(f"Set reasoning effort to {reasoning_value}")
|
||||
self.io.tool_output()
|
||||
|
||||
# Output announcements
|
||||
announcements = "\n".join(self.coder.get_announcements())
|
||||
self.io.tool_output(announcements)
|
||||
|
||||
def cmd_copy_context(self, args=None):
|
||||
"""Copy the current chat context as markdown, suitable to paste into a web UI"""
|
||||
|
||||
|
||||
@@ -121,5 +121,6 @@ def handle_deprecated_model_args(args, io):
|
||||
)
|
||||
|
||||
# Set the model
|
||||
args.model = model_name
|
||||
if not args.model:
|
||||
args.model = model_name
|
||||
break
|
||||
|
||||
@@ -10,4 +10,10 @@ exclude_website_pats = [
|
||||
"docs/unified-diffs.md",
|
||||
"docs/leaderboards/index.md",
|
||||
"assets/**",
|
||||
".jekyll-metadata",
|
||||
"Gemfile.lock",
|
||||
"Gemfile",
|
||||
"_config.yml",
|
||||
"**/OLD/**",
|
||||
"OLD/**",
|
||||
]
|
||||
|
||||
@@ -194,6 +194,11 @@ class AutoCompleter(Completer):
|
||||
candidates = [word if type(word) is tuple else (word, word) for word in candidates]
|
||||
|
||||
last_word = words[-1]
|
||||
|
||||
# Only provide completions if the user has typed at least 3 characters
|
||||
if len(last_word) < 3:
|
||||
return
|
||||
|
||||
completions = []
|
||||
for word_match, word_insert in candidates:
|
||||
if word_match.lower().startswith(last_word.lower()):
|
||||
|
||||
@@ -126,8 +126,15 @@ def setup_git(git_root, io):
|
||||
if not repo:
|
||||
return
|
||||
|
||||
user_name = repo.git.config("--default", "", "--get", "user.name") or None
|
||||
user_email = repo.git.config("--default", "", "--get", "user.email") or None
|
||||
try:
|
||||
user_name = repo.git.config("--get", "user.name") or None
|
||||
except git.exc.GitCommandError:
|
||||
user_name = None
|
||||
|
||||
try:
|
||||
user_email = repo.git.config("--get", "user.email") or None
|
||||
except git.exc.GitCommandError:
|
||||
user_email = None
|
||||
|
||||
if user_name and user_email:
|
||||
return repo.working_tree_dir
|
||||
@@ -771,6 +778,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
weak_model=args.weak_model,
|
||||
editor_model=args.editor_model,
|
||||
editor_edit_format=args.editor_edit_format,
|
||||
verbose=args.verbose,
|
||||
)
|
||||
|
||||
# Check if deprecated remove_reasoning is set
|
||||
@@ -859,6 +867,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
parser=parser,
|
||||
verbose=args.verbose,
|
||||
editor=args.editor,
|
||||
original_read_only_fnames=read_only_fnames,
|
||||
)
|
||||
|
||||
summarizer = ChatSummary(
|
||||
@@ -913,6 +922,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||
chat_language=args.chat_language,
|
||||
detect_urls=args.detect_urls,
|
||||
auto_copy_context=args.copy_paste,
|
||||
auto_accept_architect=args.auto_accept_architect,
|
||||
)
|
||||
except UnknownEditFormat as err:
|
||||
io.tool_error(str(err))
|
||||
|
||||
@@ -153,7 +153,11 @@ class ModelInfoManager:
|
||||
if self.cache_file.exists():
|
||||
cache_age = time.time() - self.cache_file.stat().st_mtime
|
||||
if cache_age < self.CACHE_TTL:
|
||||
self.content = json.loads(self.cache_file.read_text())
|
||||
try:
|
||||
self.content = json.loads(self.cache_file.read_text())
|
||||
except json.JSONDecodeError:
|
||||
# If the cache file is corrupted, treat it as missing
|
||||
self.content = None
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
@@ -226,11 +230,14 @@ model_info_manager = ModelInfoManager()
|
||||
|
||||
|
||||
class Model(ModelSettings):
|
||||
def __init__(self, model, weak_model=None, editor_model=None, editor_edit_format=None):
|
||||
def __init__(
|
||||
self, model, weak_model=None, editor_model=None, editor_edit_format=None, verbose=False
|
||||
):
|
||||
# Map any alias to its canonical name
|
||||
model = MODEL_ALIASES.get(model, model)
|
||||
|
||||
self.name = model
|
||||
self.verbose = verbose
|
||||
|
||||
self.max_chat_history_tokens = 1024
|
||||
self.weak_model = None
|
||||
@@ -598,13 +605,81 @@ class Model(ModelSettings):
|
||||
self.extra_params["extra_body"] = {}
|
||||
self.extra_params["extra_body"]["reasoning_effort"] = effort
|
||||
|
||||
def set_thinking_tokens(self, num):
|
||||
"""Set the thinking token budget for models that support it"""
|
||||
if num is not None:
|
||||
def parse_token_value(self, value):
|
||||
"""
|
||||
Parse a token value string into an integer.
|
||||
Accepts formats: 8096, "8k", "10.5k", "0.5M", "10K", etc.
|
||||
|
||||
Args:
|
||||
value: String or int token value
|
||||
|
||||
Returns:
|
||||
Integer token value
|
||||
"""
|
||||
if isinstance(value, int):
|
||||
return value
|
||||
|
||||
if not isinstance(value, str):
|
||||
return int(value) # Try to convert to int
|
||||
|
||||
value = value.strip().upper()
|
||||
|
||||
if value.endswith("K"):
|
||||
multiplier = 1024
|
||||
value = value[:-1]
|
||||
elif value.endswith("M"):
|
||||
multiplier = 1024 * 1024
|
||||
value = value[:-1]
|
||||
else:
|
||||
multiplier = 1
|
||||
|
||||
# Convert to float first to handle decimal values like "10.5k"
|
||||
return int(float(value) * multiplier)
|
||||
|
||||
def set_thinking_tokens(self, value):
|
||||
"""
|
||||
Set the thinking token budget for models that support it.
|
||||
Accepts formats: 8096, "8k", "10.5k", "0.5M", "10K", etc.
|
||||
"""
|
||||
if value is not None:
|
||||
num_tokens = self.parse_token_value(value)
|
||||
self.use_temperature = False
|
||||
if not self.extra_params:
|
||||
self.extra_params = {}
|
||||
self.extra_params["thinking"] = {"type": "enabled", "budget_tokens": num}
|
||||
self.extra_params["thinking"] = {"type": "enabled", "budget_tokens": num_tokens}
|
||||
|
||||
def get_thinking_tokens(self, model):
|
||||
"""Get formatted thinking token budget if available"""
|
||||
if (
|
||||
model.extra_params
|
||||
and "thinking" in model.extra_params
|
||||
and "budget_tokens" in model.extra_params["thinking"]
|
||||
):
|
||||
budget = model.extra_params["thinking"]["budget_tokens"]
|
||||
# Format as xx.yK for thousands, xx.yM for millions
|
||||
if budget >= 1024 * 1024:
|
||||
value = budget / (1024 * 1024)
|
||||
if value == int(value):
|
||||
return f"{int(value)}M"
|
||||
else:
|
||||
return f"{value:.1f}M"
|
||||
else:
|
||||
value = budget / 1024
|
||||
if value == int(value):
|
||||
return f"{int(value)}k"
|
||||
else:
|
||||
return f"{value:.1f}k"
|
||||
return None
|
||||
|
||||
def get_reasoning_effort(self, model):
|
||||
"""Get reasoning effort value if available"""
|
||||
if (
|
||||
model.extra_params
|
||||
and "extra_body" in model.extra_params
|
||||
and "reasoning_effort" in model.extra_params["extra_body"]
|
||||
):
|
||||
return model.extra_params["extra_body"]["reasoning_effort"]
|
||||
return None
|
||||
|
||||
def is_deepseek_r1(self):
|
||||
name = self.name.lower()
|
||||
@@ -653,6 +728,8 @@ class Model(ModelSettings):
|
||||
hash_object = hashlib.sha1(key)
|
||||
if "timeout" not in kwargs:
|
||||
kwargs["timeout"] = request_timeout
|
||||
if self.verbose:
|
||||
dump(kwargs)
|
||||
res = litellm.completion(**kwargs)
|
||||
return hash_object, res
|
||||
|
||||
|
||||
7
aider/queries/tree-sitter-language-pack/README.md
Normal file
7
aider/queries/tree-sitter-language-pack/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
These scm files are all adapted from the github repositories listed here:
|
||||
|
||||
https://github.com/Goldziher/tree-sitter-language-pack/blob/main/sources/language_definitions.json
|
||||
|
||||
See this URL for information on the licenses of each repo:
|
||||
|
||||
https://github.com/Goldziher/tree-sitter-language-pack/
|
||||
5
aider/queries/tree-sitter-language-pack/arduino-tags.scm
Normal file
5
aider/queries/tree-sitter-language-pack/arduino-tags.scm
Normal file
@@ -0,0 +1,5 @@
|
||||
(function_declarator
|
||||
declarator: (identifier) @name.definition.function) @definition.function
|
||||
|
||||
(call_expression
|
||||
function: (identifier) @name.reference.call) @reference.call
|
||||
9
aider/queries/tree-sitter-language-pack/c-tags.scm
Normal file
9
aider/queries/tree-sitter-language-pack/c-tags.scm
Normal file
@@ -0,0 +1,9 @@
|
||||
(struct_specifier name: (type_identifier) @name.definition.class body:(_)) @definition.class
|
||||
|
||||
(declaration type: (union_specifier name: (type_identifier) @name.definition.class)) @definition.class
|
||||
|
||||
(function_declarator declarator: (identifier) @name.definition.function) @definition.function
|
||||
|
||||
(type_definition declarator: (type_identifier) @name.definition.type) @definition.type
|
||||
|
||||
(enum_specifier name: (type_identifier) @name.definition.type) @definition.type
|
||||
16
aider/queries/tree-sitter-language-pack/chatito-tags.scm
Normal file
16
aider/queries/tree-sitter-language-pack/chatito-tags.scm
Normal file
@@ -0,0 +1,16 @@
|
||||
; Definitions
|
||||
(intent_def
|
||||
(intent) @name.definition.intent) @definition.intent
|
||||
|
||||
(slot_def
|
||||
(slot) @name.definition.slot) @definition.slot
|
||||
|
||||
(alias_def
|
||||
(alias) @name.definition.alias) @definition.alias
|
||||
|
||||
; References
|
||||
(slot_ref
|
||||
(slot) @name.reference.slot) @reference.slot
|
||||
|
||||
(alias_ref
|
||||
(alias) @name.reference.alias) @reference.alias
|
||||
122
aider/queries/tree-sitter-language-pack/commonlisp-tags.scm
Normal file
122
aider/queries/tree-sitter-language-pack/commonlisp-tags.scm
Normal file
@@ -0,0 +1,122 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; Function Definitions ;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defun_header
|
||||
function_name: (sym_lit) @name.definition.function) @definition.function
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; Function Calls ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;
|
||||
;;; Basically, we consider every list literal with symbol as the
|
||||
;;; first element to be a call to a function named by that element.
|
||||
;;; But we must exclude some cases. Note, tree-sitter @ignore
|
||||
;;; cases only work if they are declared before the cases
|
||||
;;; we want to include.
|
||||
|
||||
;; Exclude lambda lists for function definitions
|
||||
;; For example:
|
||||
;;
|
||||
;; (defun my-func (arg1 arg2) ...)
|
||||
;;
|
||||
;; do not treat (arg1 arg2) as a call of function arg1
|
||||
;;
|
||||
(defun_header
|
||||
lambda_list: (list_lit . [(sym_lit) (package_lit)] @ignore))
|
||||
|
||||
;; Similar to the above, but for
|
||||
;;
|
||||
;; (defmethod m ((type1 param1) (type2 param2)) ...)
|
||||
;;
|
||||
;; where list literals having symbol as their first element
|
||||
;; are nested inside the lambda list.
|
||||
(defun_header
|
||||
lambda_list: (list_lit (list_lit . [(sym_lit) (package_lit)] @ignore)))
|
||||
|
||||
;;
|
||||
;; (let ((var ...) (var2 ...)) ...)
|
||||
;;
|
||||
;; - exclude var, var2
|
||||
;; - the same for let*, flet, labels, macrolet, symbol-macrolet
|
||||
(list_lit . [(sym_lit) (package_lit)] @name.reference.call
|
||||
. (list_lit (list_lit . [(sym_lit) (package_lit)] @ignore))
|
||||
(#match? @name.reference.call
|
||||
"(?i)^(cl:)?(let|let\\*|flet|labels|macrolet|symbol-macrolet)$")
|
||||
)
|
||||
|
||||
;; TODO:
|
||||
;; - exclude also:
|
||||
;; - (defclass name (parent parent2)
|
||||
;; ((slot1 ...)
|
||||
;; (slot2 ...))
|
||||
;; exclude the parent, slot1, slot2
|
||||
;; - (flet ((func-1 (param1 param2))) ...)
|
||||
;; - we already exclude func-1, but param1 is still recognized
|
||||
;; as a function call - exclude it too
|
||||
;; - the same for labels
|
||||
;; - the same macrolet
|
||||
;; - what else?
|
||||
;; (that's a non-goal to completely support all macros
|
||||
;; and special operators, but every one we support
|
||||
;; makes the solution a little bit better)
|
||||
;; - (flet ((func-1 (param1 param2))) ...)
|
||||
;; - instead of simply excluding it, as we do today,
|
||||
;; tag func-1 as @local.definition.function (I suppose)
|
||||
;; - the same for labels, macrolet
|
||||
;; - @local.scope for let, let*, flet, labels, macrolet
|
||||
;; - I guess the whole span of the scope text,
|
||||
;; till the closing paren, should be tagged as @local.scope;
|
||||
;; Hopefully, combined with @local.definition.function
|
||||
;; within the scope, the usual @reference.call within
|
||||
;; that scope will refer to the local definition,
|
||||
;; and there will be no need to use @local.reference.call
|
||||
;; (which is more difficult to implement).
|
||||
;; - When implementing, remember the scope rules differences
|
||||
;; of let vs let*, flet vs labels.
|
||||
|
||||
|
||||
;; Include all other cases - list literal with symbol as the
|
||||
;; first element
|
||||
(list_lit . [(sym_lit) (package_lit)] @name.reference.call) @reference.call
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; classes
|
||||
|
||||
(list_lit . [(sym_lit) (package_lit)] @ignore
|
||||
. [(sym_lit) (package_lit)] @name.definition.class
|
||||
(#match? @ignore "(?i)^(cl:)?defclass$")
|
||||
) @definition.class
|
||||
|
||||
(list_lit . [(sym_lit) (package_lit)] @ignore
|
||||
. (quoting_lit [(sym_lit) (package_lit)] @name.reference.class)
|
||||
(#match? @ignore "(?i)^(cl:)?make-instance$")
|
||||
) @reference.class
|
||||
|
||||
;;; TODO:
|
||||
;; - @reference.class for base classes
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; TODO:
|
||||
;; - Symbols referenced in defpackage
|
||||
;;
|
||||
;; (defpackage ...
|
||||
;; (:export (symbol-a :symbol-b #:symbol-c "SYMBOL-D")))
|
||||
;;
|
||||
;; The goal is to allow quick navigation from the API
|
||||
;; overview in the form of defpackage, to the definition
|
||||
;; where user can read parameters, docstring, etc.
|
||||
;; - The @name must not include the colon, or sharpsign colon, quotes,
|
||||
;; just symbol-a, symbol-b, symbol-c, sybmol-d
|
||||
;; - Downcase the names specified as string literals?
|
||||
;; ("SYMBOL-D" -> symbol-d)
|
||||
;; - We don't know if the exported symbol is a function, variable,
|
||||
;; class or something else. The official doc
|
||||
;; (https://tree-sitter.github.io/tree-sitter/code-navigation-systems)
|
||||
;; does not even suggest a tag for variable reference.
|
||||
;; (Although in practice, the `tree-sitter tags` command
|
||||
;; allows any @reference.* and @definition.* tags)
|
||||
;; Probably it's better to just use @reference.call for all
|
||||
;; the symbols in the :export clause.
|
||||
;;
|
||||
;; - The same for the export function call:
|
||||
;;
|
||||
;; (export '(symbol-a :symbol-b #:symbol-c "SYMBOL-D"))
|
||||
15
aider/queries/tree-sitter-language-pack/cpp-tags.scm
Normal file
15
aider/queries/tree-sitter-language-pack/cpp-tags.scm
Normal file
@@ -0,0 +1,15 @@
|
||||
(struct_specifier name: (type_identifier) @name.definition.class body:(_)) @definition.class
|
||||
|
||||
(declaration type: (union_specifier name: (type_identifier) @name.definition.class)) @definition.class
|
||||
|
||||
(function_declarator declarator: (identifier) @name.definition.function) @definition.function
|
||||
|
||||
(function_declarator declarator: (field_identifier) @name.definition.function) @definition.function
|
||||
|
||||
(function_declarator declarator: (qualified_identifier scope: (namespace_identifier) @local.scope name: (identifier) @name.definition.method)) @definition.method
|
||||
|
||||
(type_definition declarator: (type_identifier) @name.definition.type) @definition.type
|
||||
|
||||
(enum_specifier name: (type_identifier) @name.definition.type) @definition.type
|
||||
|
||||
(class_specifier name: (type_identifier) @name.definition.class) @definition.class
|
||||
26
aider/queries/tree-sitter-language-pack/d-tags.scm
Normal file
26
aider/queries/tree-sitter-language-pack/d-tags.scm
Normal file
@@ -0,0 +1,26 @@
|
||||
(module_def (module_declaration (module_fqn) @name.definition.module)) @definition.module
|
||||
|
||||
(struct_declaration (struct) . (identifier) @name.definition.class) @definition.class
|
||||
(interface_declaration (interface) . (identifier) @name.definition.interface) @definition.interface
|
||||
(enum_declaration (enum) . (identifier) @name.definition.type) @definition.type
|
||||
|
||||
(class_declaration (class) . (identifier) @name.definition.class) @definition.class
|
||||
(constructor (this) @name.definition.method) @definition.method
|
||||
(destructor (this) @name.definition.method) @definition.method
|
||||
(postblit (this) @name.definition.method) @definition.method
|
||||
|
||||
(manifest_declarator . (identifier) @name.definition.type) @definition.type
|
||||
|
||||
(function_declaration (identifier) @name.definition.function) @definition.function
|
||||
|
||||
(union_declaration (union) . (identifier) @name.definition.type) @definition.type
|
||||
|
||||
(anonymous_enum_declaration (enum_member . (identifier) @name.definition.constant)) @definition.constant
|
||||
|
||||
(enum_declaration (enum_member . (identifier) @name.definition.constant)) @definition.constant
|
||||
|
||||
(call_expression (identifier) @name.reference.call) @reference.call
|
||||
(call_expression (type (template_instance (identifier) @name.reference.call))) @reference.call
|
||||
(parameter (type (identifier) @name.reference.class) @reference.class (identifier))
|
||||
|
||||
(variable_declaration (type (identifier) @name.reference.class) @reference.class (declarator))
|
||||
92
aider/queries/tree-sitter-language-pack/dart-tags.scm
Normal file
92
aider/queries/tree-sitter-language-pack/dart-tags.scm
Normal file
@@ -0,0 +1,92 @@
|
||||
|
||||
(class_definition
|
||||
name: (identifier) @name.definition.class) @definition.class
|
||||
|
||||
(method_signature
|
||||
(function_signature)) @definition.method
|
||||
|
||||
(type_alias
|
||||
(type_identifier) @name.definition.type) @definition.type
|
||||
|
||||
(method_signature
|
||||
(getter_signature
|
||||
name: (identifier) @name.definition.method)) @definition.method
|
||||
|
||||
(method_signature
|
||||
(setter_signature
|
||||
name: (identifier) @name.definition.method)) @definition.method
|
||||
|
||||
(method_signature
|
||||
(function_signature
|
||||
name: (identifier) @name.definition.method)) @definition.method
|
||||
|
||||
(method_signature
|
||||
(factory_constructor_signature
|
||||
(identifier) @name.definition.method)) @definition.method
|
||||
|
||||
(method_signature
|
||||
(constructor_signature
|
||||
name: (identifier) @name.definition.method)) @definition.method
|
||||
|
||||
(method_signature
|
||||
(operator_signature)) @definition.method
|
||||
|
||||
(method_signature) @definition.method
|
||||
|
||||
(mixin_declaration
|
||||
(mixin)
|
||||
(identifier) @name.definition.mixin) @definition.mixin
|
||||
|
||||
(extension_declaration
|
||||
name: (identifier) @name.definition.extension) @definition.extension
|
||||
|
||||
|
||||
(new_expression
|
||||
(type_identifier) @name.reference.class) @reference.class
|
||||
|
||||
(enum_declaration
|
||||
name: (identifier) @name.definition.enum) @definition.enum
|
||||
|
||||
(function_signature
|
||||
name: (identifier) @name.definition.function) @definition.function
|
||||
|
||||
(initialized_variable_definition
|
||||
name: (identifier)
|
||||
value: (identifier) @name.reference.class
|
||||
value: (selector
|
||||
"!"?
|
||||
(argument_part
|
||||
(arguments
|
||||
(argument)*))?)?) @reference.class
|
||||
|
||||
(assignment_expression
|
||||
left: (assignable_expression
|
||||
(identifier)
|
||||
(unconditional_assignable_selector
|
||||
"."
|
||||
(identifier) @name.reference.send))) @reference.call
|
||||
|
||||
(assignment_expression
|
||||
left: (assignable_expression
|
||||
(identifier)
|
||||
(conditional_assignable_selector
|
||||
"?."
|
||||
(identifier) @name.reference.send))) @reference.call
|
||||
|
||||
((identifier) @name.reference.send
|
||||
(selector
|
||||
"!"?
|
||||
(conditional_assignable_selector
|
||||
"?." (identifier) @name.reference.send)?
|
||||
(unconditional_assignable_selector
|
||||
"."? (identifier) @name.reference.send)?
|
||||
(argument_part
|
||||
(arguments
|
||||
(argument)*))?)*
|
||||
(cascade_section
|
||||
(cascade_selector
|
||||
(identifier)) @name.reference.send
|
||||
(argument_part
|
||||
(arguments
|
||||
(argument)*))?)?) @reference.call
|
||||
|
||||
5
aider/queries/tree-sitter-language-pack/elisp-tags.scm
Normal file
5
aider/queries/tree-sitter-language-pack/elisp-tags.scm
Normal file
@@ -0,0 +1,5 @@
|
||||
;; defun/defsubst
|
||||
(function_definition name: (symbol) @name.definition.function) @definition.function
|
||||
|
||||
;; Treat macros as function definitions for the sake of TAGS.
|
||||
(macro_definition name: (symbol) @name.definition.function) @definition.function
|
||||
54
aider/queries/tree-sitter-language-pack/elixir-tags.scm
Normal file
54
aider/queries/tree-sitter-language-pack/elixir-tags.scm
Normal file
@@ -0,0 +1,54 @@
|
||||
; Definitions
|
||||
|
||||
; * modules and protocols
|
||||
(call
|
||||
target: (identifier) @ignore
|
||||
(arguments (alias) @name.definition.module)
|
||||
(#any-of? @ignore "defmodule" "defprotocol")) @definition.module
|
||||
|
||||
; * functions/macros
|
||||
(call
|
||||
target: (identifier) @ignore
|
||||
(arguments
|
||||
[
|
||||
; zero-arity functions with no parentheses
|
||||
(identifier) @name.definition.function
|
||||
; regular function clause
|
||||
(call target: (identifier) @name.definition.function)
|
||||
; function clause with a guard clause
|
||||
(binary_operator
|
||||
left: (call target: (identifier) @name.definition.function)
|
||||
operator: "when")
|
||||
])
|
||||
(#any-of? @ignore "def" "defp" "defdelegate" "defguard" "defguardp" "defmacro" "defmacrop" "defn" "defnp")) @definition.function
|
||||
|
||||
; References
|
||||
|
||||
; ignore calls to kernel/special-forms keywords
|
||||
(call
|
||||
target: (identifier) @ignore
|
||||
(#any-of? @ignore "def" "defp" "defdelegate" "defguard" "defguardp" "defmacro" "defmacrop" "defn" "defnp" "defmodule" "defprotocol" "defimpl" "defstruct" "defexception" "defoverridable" "alias" "case" "cond" "else" "for" "if" "import" "quote" "raise" "receive" "require" "reraise" "super" "throw" "try" "unless" "unquote" "unquote_splicing" "use" "with"))
|
||||
|
||||
; ignore module attributes
|
||||
(unary_operator
|
||||
operator: "@"
|
||||
operand: (call
|
||||
target: (identifier) @ignore))
|
||||
|
||||
; * function call
|
||||
(call
|
||||
target: [
|
||||
; local
|
||||
(identifier) @name.reference.call
|
||||
; remote
|
||||
(dot
|
||||
right: (identifier) @name.reference.call)
|
||||
]) @reference.call
|
||||
|
||||
; * pipe into function call
|
||||
(binary_operator
|
||||
operator: "|>"
|
||||
right: (identifier) @name.reference.call) @reference.call
|
||||
|
||||
; * modules
|
||||
(alias) @name.reference.module @reference.module
|
||||
19
aider/queries/tree-sitter-language-pack/elm-tags.scm
Normal file
19
aider/queries/tree-sitter-language-pack/elm-tags.scm
Normal file
@@ -0,0 +1,19 @@
|
||||
(value_declaration (function_declaration_left (lower_case_identifier) @name.definition.function)) @definition.function
|
||||
|
||||
(function_call_expr (value_expr (value_qid) @name.reference.function)) @reference.function
|
||||
(exposed_value (lower_case_identifier) @name.reference.function) @reference.function
|
||||
(type_annotation ((lower_case_identifier) @name.reference.function) (colon)) @reference.function
|
||||
|
||||
(type_declaration ((upper_case_identifier) @name.definition.type) ) @definition.type
|
||||
|
||||
(type_ref (upper_case_qid (upper_case_identifier) @name.reference.type)) @reference.type
|
||||
(exposed_type (upper_case_identifier) @name.reference.type) @reference.type
|
||||
|
||||
(type_declaration (union_variant (upper_case_identifier) @name.definition.union)) @definition.union
|
||||
|
||||
(value_expr (upper_case_qid (upper_case_identifier) @name.reference.union)) @reference.union
|
||||
|
||||
|
||||
(module_declaration
|
||||
(upper_case_qid (upper_case_identifier)) @name.definition.module
|
||||
) @definition.module
|
||||
41
aider/queries/tree-sitter-language-pack/gleam-tags.scm
Normal file
41
aider/queries/tree-sitter-language-pack/gleam-tags.scm
Normal file
@@ -0,0 +1,41 @@
|
||||
; Modules
|
||||
(module) @name.reference.module @reference.module
|
||||
(import alias: (identifier) @name.reference.module) @reference.module
|
||||
(remote_type_identifier
|
||||
module: (identifier) @name.reference.module) @reference.module
|
||||
((field_access
|
||||
record: (identifier) @name.reference.module)
|
||||
(#is-not? local)) @reference.module
|
||||
|
||||
; Functions
|
||||
(function
|
||||
name: (identifier) @name.definition.function) @definition.function
|
||||
(external_function
|
||||
name: (identifier) @name.definition.function) @definition.function
|
||||
(unqualified_import (identifier) @name.reference.function) @reference.function
|
||||
((function_call
|
||||
function: (identifier) @name.reference.function) @reference.function
|
||||
(#is-not? local))
|
||||
((field_access
|
||||
record: (identifier) @ignore
|
||||
field: (label) @name.reference.function)
|
||||
(#is-not? local)) @reference.function
|
||||
((binary_expression
|
||||
operator: "|>"
|
||||
right: (identifier) @name.reference.function)
|
||||
(#is-not? local)) @reference.function
|
||||
|
||||
; Types
|
||||
(type_definition
|
||||
(type_name
|
||||
name: (type_identifier) @name.definition.type)) @definition.type
|
||||
(type_definition
|
||||
(data_constructors
|
||||
(data_constructor
|
||||
name: (constructor_name) @name.definition.constructor))) @definition.constructor
|
||||
(external_type
|
||||
(type_name
|
||||
name: (type_identifier) @name.definition.type)) @definition.type
|
||||
|
||||
(type_identifier) @name.reference.type @reference.type
|
||||
(constructor_name) @name.reference.constructor @reference.constructor
|
||||
42
aider/queries/tree-sitter-language-pack/go-tags.scm
Normal file
42
aider/queries/tree-sitter-language-pack/go-tags.scm
Normal file
@@ -0,0 +1,42 @@
|
||||
(
|
||||
(comment)* @doc
|
||||
.
|
||||
(function_declaration
|
||||
name: (identifier) @name.definition.function) @definition.function
|
||||
(#strip! @doc "^//\\s*")
|
||||
(#set-adjacent! @doc @definition.function)
|
||||
)
|
||||
|
||||
(
|
||||
(comment)* @doc
|
||||
.
|
||||
(method_declaration
|
||||
name: (field_identifier) @name.definition.method) @definition.method
|
||||
(#strip! @doc "^//\\s*")
|
||||
(#set-adjacent! @doc @definition.method)
|
||||
)
|
||||
|
||||
(call_expression
|
||||
function: [
|
||||
(identifier) @name.reference.call
|
||||
(parenthesized_expression (identifier) @name.reference.call)
|
||||
(selector_expression field: (field_identifier) @name.reference.call)
|
||||
(parenthesized_expression (selector_expression field: (field_identifier) @name.reference.call))
|
||||
]) @reference.call
|
||||
|
||||
(type_spec
|
||||
name: (type_identifier) @name.definition.type) @definition.type
|
||||
|
||||
(type_identifier) @name.reference.type @reference.type
|
||||
|
||||
(package_clause "package" (package_identifier) @name.definition.module)
|
||||
|
||||
(type_declaration (type_spec name: (type_identifier) @name.definition.interface type: (interface_type)))
|
||||
|
||||
(type_declaration (type_spec name: (type_identifier) @name.definition.class type: (struct_type)))
|
||||
|
||||
(import_declaration (import_spec) @name.reference.module)
|
||||
|
||||
(var_declaration (var_spec name: (identifier) @name.definition.variable))
|
||||
|
||||
(const_declaration (const_spec name: (identifier) @name.definition.constant))
|
||||
20
aider/queries/tree-sitter-language-pack/java-tags.scm
Normal file
20
aider/queries/tree-sitter-language-pack/java-tags.scm
Normal file
@@ -0,0 +1,20 @@
|
||||
(class_declaration
|
||||
name: (identifier) @name.definition.class) @definition.class
|
||||
|
||||
(method_declaration
|
||||
name: (identifier) @name.definition.method) @definition.method
|
||||
|
||||
(method_invocation
|
||||
name: (identifier) @name.reference.method
|
||||
arguments: (argument_list) @reference.call)
|
||||
|
||||
(interface_declaration
|
||||
name: (identifier) @name.definition.interface) @definition.interface
|
||||
|
||||
(type_list
|
||||
(type_identifier) @name.reference.interface) @reference.implementation
|
||||
|
||||
(object_creation_expression
|
||||
type: (type_identifier) @name.reference.class) @reference.class
|
||||
|
||||
(superclass (type_identifier) @name.reference.class) @reference.class
|
||||
34
aider/queries/tree-sitter-language-pack/lua-tags.scm
Normal file
34
aider/queries/tree-sitter-language-pack/lua-tags.scm
Normal file
@@ -0,0 +1,34 @@
|
||||
(function_declaration
|
||||
name: [
|
||||
(identifier) @name.definition.function
|
||||
(dot_index_expression
|
||||
field: (identifier) @name.definition.function)
|
||||
]) @definition.function
|
||||
|
||||
(function_declaration
|
||||
name: (method_index_expression
|
||||
method: (identifier) @name.definition.method)) @definition.method
|
||||
|
||||
(assignment_statement
|
||||
(variable_list .
|
||||
name: [
|
||||
(identifier) @name.definition.function
|
||||
(dot_index_expression
|
||||
field: (identifier) @name.definition.function)
|
||||
])
|
||||
(expression_list .
|
||||
value: (function_definition))) @definition.function
|
||||
|
||||
(table_constructor
|
||||
(field
|
||||
name: (identifier) @name.definition.function
|
||||
value: (function_definition))) @definition.function
|
||||
|
||||
(function_call
|
||||
name: [
|
||||
(identifier) @name.reference.call
|
||||
(dot_index_expression
|
||||
field: (identifier) @name.reference.call)
|
||||
(method_index_expression
|
||||
method: (identifier) @name.reference.method)
|
||||
]) @reference.call
|
||||
39
aider/queries/tree-sitter-language-pack/pony-tags.scm
Normal file
39
aider/queries/tree-sitter-language-pack/pony-tags.scm
Normal file
@@ -0,0 +1,39 @@
|
||||
;Class definitions @definition.class
|
||||
;Function definitions @definition.function
|
||||
;Interface definitions @definition.interface
|
||||
;Method definitions @definition.method
|
||||
;Module definitions @definition.module
|
||||
;Function/method calls @reference.call
|
||||
;Class reference @reference.class
|
||||
;Interface implementation @reference.implementation
|
||||
(
|
||||
(identifier) @reference.class
|
||||
(#match? @reference.class "^_*[A-Z][a-zA-Z0-9_]*$")
|
||||
)
|
||||
|
||||
(class_definition (identifier) @name.definition.class) @definition.class
|
||||
(actor_definition (identifier) @name.definition.class) @definition.class
|
||||
(primitive_definition (identifier) @name.definition.class) @definition.class
|
||||
(struct_definition (identifier) @name.definition.class) @definition.class
|
||||
(type_alias (identifier) @name.definition.class) @definition.class
|
||||
|
||||
(trait_definition (identifier) @name.definition.interface) @definition.interface
|
||||
(interface_definition (identifier) @name.definition.interface) @definition.interface
|
||||
|
||||
(constructor (identifier) @name.definition.method) @definition.method
|
||||
(method (identifier) @name.definition.method) @definition.method
|
||||
(behavior (identifier) @name.definition.method) @definition.method
|
||||
|
||||
(class_definition (type) @name.reference.implementation) @reference.implementation
|
||||
(actor_definition (type) @name.reference.implementation) @reference.implementation
|
||||
(primitive_definition (type) @name.reference.implementation) @reference.implementation
|
||||
(struct_definition (type) @name.reference.implementation) @reference.implementation
|
||||
(type_alias (type) @name.reference.implementation) @reference.implementation
|
||||
|
||||
; calls - not catching all possible call cases of callees for capturing the method name
|
||||
(call_expression callee: [(identifier) (ffi_identifier)] @name.reference.call) @reference.call
|
||||
(call_expression callee: (generic_expression [(identifier) (ffi_identifier)] @name.reference.call)) @reference.call
|
||||
(call_expression callee: (member_expression (identifier) @name.reference.call .)) @reference.call
|
||||
(call_expression callee: (member_expression (generic_expression [(identifier) (ffi_identifier)] @name.reference.call) .)) @reference.call
|
||||
; TODO: add more possible callee expressions
|
||||
(call_expression) @reference.call
|
||||
@@ -0,0 +1,5 @@
|
||||
(property
|
||||
(key) @name.definition.property) @definition.property
|
||||
|
||||
(substitution
|
||||
(key) @name.reference.property) @reference.property
|
||||
14
aider/queries/tree-sitter-language-pack/python-tags.scm
Normal file
14
aider/queries/tree-sitter-language-pack/python-tags.scm
Normal file
@@ -0,0 +1,14 @@
|
||||
(module (expression_statement (assignment left: (identifier) @name.definition.constant) @definition.constant))
|
||||
|
||||
(class_definition
|
||||
name: (identifier) @name.definition.class) @definition.class
|
||||
|
||||
(function_definition
|
||||
name: (identifier) @name.definition.function) @definition.function
|
||||
|
||||
(call
|
||||
function: [
|
||||
(identifier) @name.reference.call
|
||||
(attribute
|
||||
attribute: (identifier) @name.reference.call)
|
||||
]) @reference.call
|
||||
21
aider/queries/tree-sitter-language-pack/r-tags.scm
Normal file
21
aider/queries/tree-sitter-language-pack/r-tags.scm
Normal file
@@ -0,0 +1,21 @@
|
||||
(binary_operator
|
||||
lhs: (identifier) @name.definition.function
|
||||
operator: "<-"
|
||||
rhs: (function_definition)
|
||||
) @definition.function
|
||||
|
||||
(binary_operator
|
||||
lhs: (identifier) @name.definition.function
|
||||
operator: "="
|
||||
rhs: (function_definition)
|
||||
) @definition.function
|
||||
|
||||
(call
|
||||
function: (identifier) @name.reference.call
|
||||
) @reference.call
|
||||
|
||||
(call
|
||||
function: (namespace_operator
|
||||
rhs: (identifier) @name.reference.call
|
||||
)
|
||||
) @reference.call
|
||||
12
aider/queries/tree-sitter-language-pack/racket-tags.scm
Normal file
12
aider/queries/tree-sitter-language-pack/racket-tags.scm
Normal file
@@ -0,0 +1,12 @@
|
||||
(list
|
||||
.
|
||||
(symbol) @reference._define
|
||||
(#match? @reference._define "^(define|define/contract)$")
|
||||
.
|
||||
(list
|
||||
.
|
||||
(symbol) @name.definition.function) @definition.function)
|
||||
|
||||
(list
|
||||
.
|
||||
(symbol) @name.reference.call)
|
||||
64
aider/queries/tree-sitter-language-pack/ruby-tags.scm
Normal file
64
aider/queries/tree-sitter-language-pack/ruby-tags.scm
Normal file
@@ -0,0 +1,64 @@
|
||||
; Method definitions
|
||||
|
||||
(
|
||||
(comment)* @doc
|
||||
.
|
||||
[
|
||||
(method
|
||||
name: (_) @name.definition.method) @definition.method
|
||||
(singleton_method
|
||||
name: (_) @name.definition.method) @definition.method
|
||||
]
|
||||
(#strip! @doc "^#\\s*")
|
||||
(#select-adjacent! @doc @definition.method)
|
||||
)
|
||||
|
||||
(alias
|
||||
name: (_) @name.definition.method) @definition.method
|
||||
|
||||
(setter
|
||||
(identifier) @ignore)
|
||||
|
||||
; Class definitions
|
||||
|
||||
(
|
||||
(comment)* @doc
|
||||
.
|
||||
[
|
||||
(class
|
||||
name: [
|
||||
(constant) @name.definition.class
|
||||
(scope_resolution
|
||||
name: (_) @name.definition.class)
|
||||
]) @definition.class
|
||||
(singleton_class
|
||||
value: [
|
||||
(constant) @name.definition.class
|
||||
(scope_resolution
|
||||
name: (_) @name.definition.class)
|
||||
]) @definition.class
|
||||
]
|
||||
(#strip! @doc "^#\\s*")
|
||||
(#select-adjacent! @doc @definition.class)
|
||||
)
|
||||
|
||||
; Module definitions
|
||||
|
||||
(
|
||||
(module
|
||||
name: [
|
||||
(constant) @name.definition.module
|
||||
(scope_resolution
|
||||
name: (_) @name.definition.module)
|
||||
]) @definition.module
|
||||
)
|
||||
|
||||
; Calls
|
||||
|
||||
(call method: (identifier) @name.reference.call) @reference.call
|
||||
|
||||
(
|
||||
[(identifier) (constant)] @name.reference.call @reference.call
|
||||
(#is-not? local)
|
||||
(#not-match? @name.reference.call "^(lambda|load|require|require_relative|__FILE__|__LINE__)$")
|
||||
)
|
||||
60
aider/queries/tree-sitter-language-pack/rust-tags.scm
Normal file
60
aider/queries/tree-sitter-language-pack/rust-tags.scm
Normal file
@@ -0,0 +1,60 @@
|
||||
; ADT definitions
|
||||
|
||||
(struct_item
|
||||
name: (type_identifier) @name.definition.class) @definition.class
|
||||
|
||||
(enum_item
|
||||
name: (type_identifier) @name.definition.class) @definition.class
|
||||
|
||||
(union_item
|
||||
name: (type_identifier) @name.definition.class) @definition.class
|
||||
|
||||
; type aliases
|
||||
|
||||
(type_item
|
||||
name: (type_identifier) @name.definition.class) @definition.class
|
||||
|
||||
; method definitions
|
||||
|
||||
(declaration_list
|
||||
(function_item
|
||||
name: (identifier) @name.definition.method) @definition.method)
|
||||
|
||||
; function definitions
|
||||
|
||||
(function_item
|
||||
name: (identifier) @name.definition.function) @definition.function
|
||||
|
||||
; trait definitions
|
||||
(trait_item
|
||||
name: (type_identifier) @name.definition.interface) @definition.interface
|
||||
|
||||
; module definitions
|
||||
(mod_item
|
||||
name: (identifier) @name.definition.module) @definition.module
|
||||
|
||||
; macro definitions
|
||||
|
||||
(macro_definition
|
||||
name: (identifier) @name.definition.macro) @definition.macro
|
||||
|
||||
; references
|
||||
|
||||
(call_expression
|
||||
function: (identifier) @name.reference.call) @reference.call
|
||||
|
||||
(call_expression
|
||||
function: (field_expression
|
||||
field: (field_identifier) @name.reference.call)) @reference.call
|
||||
|
||||
(macro_invocation
|
||||
macro: (identifier) @name.reference.call) @reference.call
|
||||
|
||||
; implementations
|
||||
|
||||
(impl_item
|
||||
trait: (type_identifier) @name.reference.implementation) @reference.implementation
|
||||
|
||||
(impl_item
|
||||
type: (type_identifier) @name.reference.implementation
|
||||
!trait) @reference.implementation
|
||||
43
aider/queries/tree-sitter-language-pack/solidity-tags.scm
Normal file
43
aider/queries/tree-sitter-language-pack/solidity-tags.scm
Normal file
@@ -0,0 +1,43 @@
|
||||
;; Method and Function declarations
|
||||
(contract_declaration (_
|
||||
(function_definition
|
||||
name: (identifier) @name.definition.function) @definition.method))
|
||||
|
||||
(source_file
|
||||
(function_definition
|
||||
name: (identifier) @name.definition.function) @definition.function)
|
||||
|
||||
;; Contract, struct, enum and interface declarations
|
||||
(contract_declaration
|
||||
name: (identifier) @name.definition.class) @definition.class
|
||||
|
||||
(interface_declaration
|
||||
name: (identifier) @name.definition.interface) @definition.interface
|
||||
|
||||
(library_declaration
|
||||
name: (identifier) @name.definition.class) @definition.interface
|
||||
|
||||
(struct_declaration name: (identifier) @name.definition.class) @definition.class
|
||||
(enum_declaration name: (identifier) @name.definition.class) @definition.class
|
||||
(event_definition name: (identifier) @name.definition.class) @definition.class
|
||||
|
||||
;; Function calls
|
||||
(call_expression (expression (identifier)) @name.reference.call ) @reference.call
|
||||
|
||||
(call_expression
|
||||
(expression (member_expression
|
||||
property: (_) @name.reference.method ))) @reference.call
|
||||
|
||||
;; Log emit
|
||||
(emit_statement name: (_) @name.reference.class) @reference.class
|
||||
|
||||
|
||||
;; Inheritance
|
||||
|
||||
(inheritance_specifier
|
||||
ancestor: (user_defined_type (_) @name.reference.class . )) @reference.class
|
||||
|
||||
|
||||
;; Imports ( note that unknown is not standardised )
|
||||
(import_directive
|
||||
import_name: (_) @name.reference.module ) @reference.unknown
|
||||
51
aider/queries/tree-sitter-language-pack/swift-tags.scm
Normal file
51
aider/queries/tree-sitter-language-pack/swift-tags.scm
Normal file
@@ -0,0 +1,51 @@
|
||||
(class_declaration
|
||||
name: (type_identifier) @name.definition.class) @definition.class
|
||||
|
||||
(protocol_declaration
|
||||
name: (type_identifier) @name.definition.interface) @definition.interface
|
||||
|
||||
(class_declaration
|
||||
(class_body
|
||||
[
|
||||
(function_declaration
|
||||
name: (simple_identifier) @name.definition.method
|
||||
)
|
||||
(subscript_declaration
|
||||
(parameter (simple_identifier) @name.definition.method)
|
||||
)
|
||||
(init_declaration "init" @name.definition.method)
|
||||
(deinit_declaration "deinit" @name.definition.method)
|
||||
]
|
||||
)
|
||||
) @definition.method
|
||||
|
||||
(protocol_declaration
|
||||
(protocol_body
|
||||
[
|
||||
(protocol_function_declaration
|
||||
name: (simple_identifier) @name.definition.method
|
||||
)
|
||||
(subscript_declaration
|
||||
(parameter (simple_identifier) @name.definition.method)
|
||||
)
|
||||
(init_declaration "init" @name.definition.method)
|
||||
]
|
||||
)
|
||||
) @definition.method
|
||||
|
||||
(class_declaration
|
||||
(class_body
|
||||
[
|
||||
(property_declaration
|
||||
(pattern (simple_identifier) @name.definition.property)
|
||||
)
|
||||
]
|
||||
)
|
||||
) @definition.property
|
||||
|
||||
(property_declaration
|
||||
(pattern (simple_identifier) @name.definition.property)
|
||||
) @definition.property
|
||||
|
||||
(function_declaration
|
||||
name: (simple_identifier) @name.definition.function) @definition.function
|
||||
20
aider/queries/tree-sitter-language-pack/udev-tags.scm
Normal file
20
aider/queries/tree-sitter-language-pack/udev-tags.scm
Normal file
@@ -0,0 +1,20 @@
|
||||
(assignment
|
||||
key: "LABEL"
|
||||
(value
|
||||
(content) @name.definition.label)) @definition.label
|
||||
|
||||
(assignment
|
||||
key: "GOTO"
|
||||
(value
|
||||
(content) @name.reference.label)) @reference.label
|
||||
|
||||
(assignment
|
||||
key: "ENV"
|
||||
(env_var) @name.definition.variable) @definition.variable
|
||||
|
||||
(match
|
||||
key: "ENV"
|
||||
(env_var) @name.reference.variable) @reference.variable
|
||||
|
||||
(var_sub
|
||||
(env_var) @name.reference.variable) @reference.variable
|
||||
@@ -883,3 +883,18 @@
|
||||
max_tokens: 128000
|
||||
top_p: 0.95
|
||||
|
||||
- name: cohere_chat/command-a-03-2025
|
||||
examples_as_sys_msg: true
|
||||
|
||||
- name: openrouter/cohere/command-a-03-2025
|
||||
examples_as_sys_msg: true
|
||||
|
||||
- name: gemini/gemma-3-27b-it
|
||||
use_system_prompt: false
|
||||
|
||||
- name: openrouter/google/gemma-3-27b-it:free
|
||||
use_system_prompt: false
|
||||
|
||||
- name: openrouter/google/gemma-3-27b-it
|
||||
use_system_prompt: false
|
||||
|
||||
@@ -23,6 +23,35 @@ cog.out(text)
|
||||
]]]-->
|
||||
|
||||
|
||||
### main branch
|
||||
|
||||
- Bumped dependencies to pickup litellm fix for Ollama.
|
||||
- Added support for `openrouter/google/gemma-3-27b-it` model.
|
||||
- Aider wrote 96% of the code in this release.
|
||||
|
||||
### Aider v0.77.0
|
||||
|
||||
- Big upgrade in [programming languages supported](https://aider.chat/docs/languages.html) by adopting [tree-sitter-language-pack](https://github.com/Goldziher/tree-sitter-language-pack/).
|
||||
- 130 new languages with linter support.
|
||||
- 20 new languages with repo-map support.
|
||||
- Added `/think-tokens` command to set thinking token budget with support for human-readable formats (8k, 10.5k, 0.5M).
|
||||
- Added `/reasoning-effort` command to control model reasoning level.
|
||||
- The `/think-tokens` and `/reasoning-effort` commands display current settings when called without arguments.
|
||||
- Display of thinking token budget and reasoning effort in model information.
|
||||
- Changed `--thinking-tokens` argument to accept string values with human-readable formats.
|
||||
- Added `--auto-accept-architect` flag (default: true) to automatically accept changes from architect coder format without confirmation.
|
||||
- Added support for `cohere_chat/command-a-03-2025` and `gemini/gemma-3-27b-it`
|
||||
- The bare `/drop` command now preserves original read-only files provided via args.read.
|
||||
- Fixed a bug where default model would be set by deprecated `--shortcut` switches even when already specified in the command line.
|
||||
- Improved AutoCompleter to require 3 characters for autocompletion to reduce noise.
|
||||
- Aider wrote 72% of the code in this release.
|
||||
|
||||
### Aider v0.76.2
|
||||
|
||||
- Fixed handling of JSONDecodeError when loading model cache file.
|
||||
- Fixed handling of GitCommandError when retrieving git user configuration.
|
||||
- Aider wrote 75% of the code in this release.
|
||||
|
||||
### Aider v0.76.1
|
||||
|
||||
- Added ignore_permission_denied option to file watcher to prevent errors when accessing restricted files, by Yutaka Matsubara.
|
||||
|
||||
@@ -4017,3 +4017,161 @@
|
||||
gmoz22: 4
|
||||
start_tag: v0.75.0
|
||||
total_lines: 1875
|
||||
- aider_percentage: 71.93
|
||||
aider_total: 1399
|
||||
end_date: '2025-03-13'
|
||||
end_tag: v0.77.0
|
||||
file_counts:
|
||||
aider/__init__.py:
|
||||
Paul Gauthier: 1
|
||||
aider/args.py:
|
||||
Paul Gauthier (aider): 5
|
||||
aider/coders/architect_coder.py:
|
||||
Paul Gauthier (aider): 2
|
||||
aider/coders/base_coder.py:
|
||||
Paul Gauthier (aider): 14
|
||||
aider/commands.py:
|
||||
Paul Gauthier: 4
|
||||
Paul Gauthier (aider): 71
|
||||
aider/deprecated.py:
|
||||
Paul Gauthier: 2
|
||||
aider/io.py:
|
||||
Paul Gauthier (aider): 5
|
||||
aider/main.py:
|
||||
Paul Gauthier (aider): 12
|
||||
aider/models.py:
|
||||
Paul Gauthier (aider): 83
|
||||
aider/queries/tree-sitter-language-pack/arduino-tags.scm:
|
||||
Paul Gauthier: 3
|
||||
Paul Gauthier (aider): 2
|
||||
aider/queries/tree-sitter-language-pack/c-tags.scm:
|
||||
Paul Gauthier: 4
|
||||
Paul Gauthier (aider): 5
|
||||
aider/queries/tree-sitter-language-pack/chatito-tags.scm:
|
||||
Paul Gauthier: 11
|
||||
Paul Gauthier (aider): 5
|
||||
aider/queries/tree-sitter-language-pack/commonlisp-tags.scm:
|
||||
Paul Gauthier: 116
|
||||
Paul Gauthier (aider): 6
|
||||
aider/queries/tree-sitter-language-pack/cpp-tags.scm:
|
||||
Paul Gauthier: 7
|
||||
Paul Gauthier (aider): 8
|
||||
aider/queries/tree-sitter-language-pack/d-tags.scm:
|
||||
Paul Gauthier: 9
|
||||
Paul Gauthier (aider): 17
|
||||
aider/queries/tree-sitter-language-pack/dart-tags.scm:
|
||||
Paul Gauthier: 42
|
||||
Paul Gauthier (aider): 19
|
||||
aider/queries/tree-sitter-language-pack/elisp-tags.scm:
|
||||
Paul Gauthier: 1
|
||||
Paul Gauthier (aider): 2
|
||||
aider/queries/tree-sitter-language-pack/elixir-tags.scm:
|
||||
Paul Gauthier: 10
|
||||
Paul Gauthier (aider): 8
|
||||
aider/queries/tree-sitter-language-pack/elm-tags.scm:
|
||||
Paul Gauthier: 8
|
||||
Paul Gauthier (aider): 11
|
||||
aider/queries/tree-sitter-language-pack/gleam-tags.scm:
|
||||
Paul Gauthier: 26
|
||||
Paul Gauthier (aider): 15
|
||||
aider/queries/tree-sitter-language-pack/go-tags.scm:
|
||||
Paul Gauthier: 14
|
||||
Paul Gauthier (aider): 14
|
||||
aider/queries/tree-sitter-language-pack/java-tags.scm:
|
||||
Paul Gauthier: 10
|
||||
Paul Gauthier (aider): 7
|
||||
aider/queries/tree-sitter-language-pack/lua-tags.scm:
|
||||
Paul Gauthier: 25
|
||||
Paul Gauthier (aider): 9
|
||||
aider/queries/tree-sitter-language-pack/pony-tags.scm:
|
||||
Paul Gauthier: 20
|
||||
Paul Gauthier (aider): 19
|
||||
aider/queries/tree-sitter-language-pack/properties-tags.scm:
|
||||
Paul Gauthier: 3
|
||||
Paul Gauthier (aider): 2
|
||||
aider/queries/tree-sitter-language-pack/python-tags.scm:
|
||||
Paul Gauthier: 9
|
||||
Paul Gauthier (aider): 5
|
||||
aider/queries/tree-sitter-language-pack/r-tags.scm:
|
||||
Paul Gauthier: 17
|
||||
Paul Gauthier (aider): 4
|
||||
aider/queries/tree-sitter-language-pack/racket-tags.scm:
|
||||
Paul Gauthier: 10
|
||||
Paul Gauthier (aider): 2
|
||||
aider/queries/tree-sitter-language-pack/ruby-tags.scm:
|
||||
Paul Gauthier: 23
|
||||
Paul Gauthier (aider): 12
|
||||
aider/queries/tree-sitter-language-pack/rust-tags.scm:
|
||||
Paul Gauthier: 41
|
||||
Paul Gauthier (aider): 14
|
||||
aider/queries/tree-sitter-language-pack/solidity-tags.scm:
|
||||
Paul Gauthier: 30
|
||||
Paul Gauthier (aider): 13
|
||||
aider/queries/tree-sitter-language-pack/swift-tags.scm:
|
||||
Paul Gauthier: 39
|
||||
Paul Gauthier (aider): 12
|
||||
aider/queries/tree-sitter-language-pack/udev-tags.scm:
|
||||
Paul Gauthier: 15
|
||||
Paul Gauthier (aider): 5
|
||||
aider/resources/model-settings.yml:
|
||||
Paul Gauthier: 9
|
||||
aider/watch.py:
|
||||
Yutaka Matsubara: 4
|
||||
aider/website/docs/leaderboards/index.md:
|
||||
Paul Gauthier: 3
|
||||
Paul Gauthier (aider): 8
|
||||
scripts/redact-cast.py:
|
||||
Paul Gauthier: 27
|
||||
Paul Gauthier (aider): 98
|
||||
scripts/tsl_pack_langs.py:
|
||||
Paul Gauthier (aider): 145
|
||||
scripts/versionbump.py:
|
||||
Paul Gauthier (aider): 1
|
||||
tests/basic/test_coder.py:
|
||||
Paul Gauthier (aider): 104
|
||||
tests/basic/test_commands.py:
|
||||
Paul Gauthier: 2
|
||||
Paul Gauthier (aider): 190
|
||||
tests/basic/test_models.py:
|
||||
Paul Gauthier (aider): 44
|
||||
tests/basic/test_repomap.py:
|
||||
Paul Gauthier: 1
|
||||
Paul Gauthier (aider): 125
|
||||
tests/fixtures/languages/arduino/test.ino:
|
||||
Paul Gauthier (aider): 21
|
||||
tests/fixtures/languages/c/test.c:
|
||||
Paul Gauthier (aider): 12
|
||||
tests/fixtures/languages/chatito/test.chatito:
|
||||
Paul Gauthier (aider): 20
|
||||
tests/fixtures/languages/commonlisp/test.lisp:
|
||||
Paul Gauthier (aider): 17
|
||||
tests/fixtures/languages/d/test.d:
|
||||
Paul Gauthier (aider): 26
|
||||
tests/fixtures/languages/dart/test.dart:
|
||||
Paul Gauthier (aider): 21
|
||||
tests/fixtures/languages/elm/test.elm:
|
||||
Paul Gauthier (aider): 16
|
||||
tests/fixtures/languages/gleam/test.gleam:
|
||||
Paul Gauthier (aider): 10
|
||||
tests/fixtures/languages/lua/test.lua:
|
||||
Paul Gauthier (aider): 25
|
||||
tests/fixtures/languages/pony/test.pony:
|
||||
Paul Gauthier (aider): 8
|
||||
tests/fixtures/languages/properties/test.properties:
|
||||
Paul Gauthier (aider): 14
|
||||
tests/fixtures/languages/r/test.r:
|
||||
Paul Gauthier (aider): 17
|
||||
tests/fixtures/languages/racket/test.rkt:
|
||||
Paul Gauthier (aider): 8
|
||||
tests/fixtures/languages/solidity/test.sol:
|
||||
Paul Gauthier (aider): 21
|
||||
tests/fixtures/languages/swift/test.swift:
|
||||
Paul Gauthier (aider): 18
|
||||
tests/fixtures/languages/udev/test.rules:
|
||||
Paul Gauthier (aider): 22
|
||||
grand_total:
|
||||
Paul Gauthier: 542
|
||||
Paul Gauthier (aider): 1399
|
||||
Yutaka Matsubara: 4
|
||||
start_tag: v0.76.0
|
||||
total_lines: 1945
|
||||
|
||||
@@ -256,4 +256,4 @@
|
||||
date: 2024-12-22
|
||||
versions: 0.69.2.dev
|
||||
seconds_per_case: 12.2
|
||||
total_cost: 0.0000
|
||||
total_cost: 0.0000
|
||||
|
||||
@@ -727,4 +727,56 @@
|
||||
date: 2025-03-07
|
||||
versions: 0.75.3.dev
|
||||
seconds_per_case: 137.4
|
||||
total_cost: 0
|
||||
total_cost: 0
|
||||
|
||||
- dirname: 2025-03-14-23-40-00--cmda-quality-whole2
|
||||
test_cases: 225
|
||||
model: command-a-03-2025-quality
|
||||
edit_format: whole
|
||||
commit_hash: a1aa63f
|
||||
pass_rate_1: 2.2
|
||||
pass_rate_2: 12.0
|
||||
pass_num_1: 5
|
||||
pass_num_2: 27
|
||||
percent_cases_well_formed: 99.6
|
||||
error_outputs: 2
|
||||
num_malformed_responses: 1
|
||||
num_with_malformed_responses: 1
|
||||
user_asks: 215
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 1
|
||||
test_timeouts: 4
|
||||
total_tests: 225
|
||||
command: OPENAI_API_BASE=https://api.cohere.ai/compatibility/v1 aider --model openai/command-a-03-2025-quality
|
||||
date: 2025-03-14
|
||||
versions: 0.77.1.dev
|
||||
seconds_per_case: 85.1
|
||||
total_cost: 0.0000
|
||||
|
||||
- dirname: 2025-03-15-01-21-24--gemma3-27b-or
|
||||
test_cases: 225
|
||||
model: gemma-3-27b-it
|
||||
edit_format: whole
|
||||
commit_hash: fd21f51-dirty
|
||||
pass_rate_1: 1.8
|
||||
pass_rate_2: 4.9
|
||||
pass_num_1: 4
|
||||
pass_num_2: 11
|
||||
percent_cases_well_formed: 100.0
|
||||
error_outputs: 3
|
||||
num_malformed_responses: 0
|
||||
num_with_malformed_responses: 0
|
||||
user_asks: 181
|
||||
lazy_comments: 0
|
||||
syntax_errors: 0
|
||||
indentation_errors: 0
|
||||
exhausted_context_windows: 1
|
||||
test_timeouts: 3
|
||||
total_tests: 225
|
||||
command: aider --model openrouter/google/gemma-3-27b-it
|
||||
date: 2025-03-15
|
||||
versions: 0.77.1.dev
|
||||
seconds_per_case: 79.7
|
||||
total_cost: 0.0000
|
||||
183
aider/website/_includes/recording.css
Normal file
183
aider/website/_includes/recording.css
Normal file
@@ -0,0 +1,183 @@
|
||||
/* Terminal header styling */
|
||||
.terminal-header {
|
||||
background-color: #e0e0e0;
|
||||
border-top-left-radius: 6px;
|
||||
border-top-right-radius: 6px;
|
||||
padding: 4px 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #c0c0c0;
|
||||
}
|
||||
|
||||
.terminal-buttons {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.terminal-button {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.terminal-close {
|
||||
background-color: #ff5f56;
|
||||
border: 1px solid #e0443e;
|
||||
}
|
||||
|
||||
.terminal-minimize {
|
||||
background-color: #ffbd2e;
|
||||
border: 1px solid #dea123;
|
||||
}
|
||||
|
||||
.terminal-expand {
|
||||
background-color: #27c93f;
|
||||
border: 1px solid #1aab29;
|
||||
}
|
||||
|
||||
.terminal-title {
|
||||
flex-grow: 1;
|
||||
text-align: center;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
font-size: 11px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* Toast notification styling */
|
||||
.toast-container {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 9999;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.toast-notification {
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
color: white;
|
||||
padding: 12px 25px;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 10px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
min-width: 200px;
|
||||
max-width: 90%;
|
||||
}
|
||||
|
||||
/* Page container styling */
|
||||
.page-container {
|
||||
max-width: 900px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.terminal-container {
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Timestamp link styling */
|
||||
.timestamp-link {
|
||||
color: #0366d6;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.timestamp-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Active timestamp styling */
|
||||
.timestamp-active {
|
||||
background-color: #f0f8ff; /* Light blue background */
|
||||
border-radius: 3px;
|
||||
padding: 2px 4px;
|
||||
margin: -2px -4px;
|
||||
}
|
||||
|
||||
/* Highlight the list item containing the active timestamp */
|
||||
li.active-marker {
|
||||
background-color: #f6f8fa;
|
||||
border-radius: 4px;
|
||||
padding: 4px 8px;
|
||||
margin-left: -8px;
|
||||
}
|
||||
|
||||
/* Make list items clickable */
|
||||
.transcript-item {
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s ease;
|
||||
padding: 4px 8px;
|
||||
margin-left: -8px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.transcript-item:hover {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
/* Keyboard shortcuts styling */
|
||||
.keyboard-shortcuts {
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* Hide keyboard shortcuts on devices likely without physical keyboards */
|
||||
.no-physical-keyboard .keyboard-shortcuts {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.keyboard-shortcuts kbd {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 1px 0 rgba(0,0,0,0.2);
|
||||
color: #333;
|
||||
display: inline-block;
|
||||
font-family: monospace;
|
||||
line-height: 1;
|
||||
margin: 0 2px;
|
||||
padding: 3px 5px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.asciinema-player-theme-aider {
|
||||
/* Foreground (default text) color */
|
||||
--term-color-foreground: #444444; /* colour238 */
|
||||
|
||||
/* Background color */
|
||||
--term-color-background: #dadada; /* colour253 */
|
||||
|
||||
/* Palette of 16 standard ANSI colors */
|
||||
--term-color-0: #21222c;
|
||||
--term-color-1: #ff5555;
|
||||
--term-color-2: #50fa7b;
|
||||
--term-color-3: #f1fa8c;
|
||||
--term-color-4: #bd93f9;
|
||||
--term-color-5: #ff79c6;
|
||||
--term-color-6: #8be9fd;
|
||||
--term-color-7: #f8f8f2;
|
||||
--term-color-8: #6272a4;
|
||||
--term-color-9: #ff6e6e;
|
||||
--term-color-10: #69ff94;
|
||||
--term-color-11: #ffffa5;
|
||||
--term-color-12: #d6acff;
|
||||
--term-color-13: #ff92df;
|
||||
--term-color-14: #a4ffff;
|
||||
--term-color-15: #ffffff;
|
||||
}
|
||||
349
aider/website/_includes/recording.js
Normal file
349
aider/website/_includes/recording.js
Normal file
@@ -0,0 +1,349 @@
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
let player; // Store player reference to make it accessible to click handlers
|
||||
let globalAudio; // Global audio element to be reused
|
||||
|
||||
// Detect if device likely has no physical keyboard
|
||||
function detectNoKeyboard() {
|
||||
// Check if it's a touch device (most mobile devices)
|
||||
const isTouchDevice = ('ontouchstart' in window) ||
|
||||
(navigator.maxTouchPoints > 0) ||
|
||||
(navigator.msMaxTouchPoints > 0);
|
||||
|
||||
// Check common mobile user agents as additional signal
|
||||
const isMobileUA = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
|
||||
// If it's a touch device and has a mobile user agent, likely has no physical keyboard
|
||||
if (isTouchDevice && isMobileUA) {
|
||||
document.body.classList.add('no-physical-keyboard');
|
||||
}
|
||||
}
|
||||
|
||||
// Run detection
|
||||
detectNoKeyboard();
|
||||
|
||||
// Parse the transcript section to create markers and convert timestamps to links
|
||||
function parseTranscript() {
|
||||
const markers = [];
|
||||
// Find the Commentary heading
|
||||
const transcriptHeading = Array.from(document.querySelectorAll('h2')).find(el => el.textContent.trim() === 'Commentary');
|
||||
|
||||
if (transcriptHeading) {
|
||||
// Get all list items after the transcript heading
|
||||
let currentElement = transcriptHeading.nextElementSibling;
|
||||
|
||||
while (currentElement && currentElement.tagName === 'UL') {
|
||||
const listItems = currentElement.querySelectorAll('li');
|
||||
|
||||
listItems.forEach(item => {
|
||||
const text = item.textContent.trim();
|
||||
const match = text.match(/(\d+):(\d+)\s+(.*)/);
|
||||
|
||||
if (match) {
|
||||
const minutes = parseInt(match[1], 10);
|
||||
const seconds = parseInt(match[2], 10);
|
||||
const timeInSeconds = minutes * 60 + seconds;
|
||||
const formattedTime = `${minutes}:${seconds.toString().padStart(2, '0')}`;
|
||||
const message = match[3].trim();
|
||||
|
||||
// Create link for the timestamp
|
||||
const timeLink = document.createElement('a');
|
||||
timeLink.href = '#';
|
||||
timeLink.textContent = formattedTime;
|
||||
timeLink.className = 'timestamp-link';
|
||||
timeLink.dataset.time = timeInSeconds;
|
||||
timeLink.dataset.message = message;
|
||||
|
||||
// Add click event to seek the player
|
||||
timeLink.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
if (player && typeof player.seek === 'function') {
|
||||
player.seek(timeInSeconds);
|
||||
player.play();
|
||||
|
||||
// Also trigger toast and speech
|
||||
showToast(message);
|
||||
speakText(message, timeInSeconds);
|
||||
|
||||
// Highlight this timestamp
|
||||
highlightTimestamp(timeInSeconds);
|
||||
}
|
||||
});
|
||||
|
||||
// Replace text with the link + message
|
||||
item.textContent = '';
|
||||
item.appendChild(timeLink);
|
||||
item.appendChild(document.createTextNode(' ' + message));
|
||||
|
||||
// Add class and click handler to the entire list item
|
||||
item.classList.add('transcript-item');
|
||||
item.dataset.time = timeInSeconds;
|
||||
item.dataset.message = message;
|
||||
|
||||
item.addEventListener('click', function(e) {
|
||||
// Prevent click event if the user clicked directly on the timestamp link
|
||||
// This prevents double-firing of the event
|
||||
if (e.target !== timeLink) {
|
||||
e.preventDefault();
|
||||
if (player && typeof player.seek === 'function') {
|
||||
player.seek(timeInSeconds);
|
||||
player.play();
|
||||
|
||||
// Also trigger toast and speech
|
||||
showToast(message);
|
||||
speakText(message, timeInSeconds);
|
||||
|
||||
// Highlight this timestamp
|
||||
highlightTimestamp(timeInSeconds);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
markers.push([timeInSeconds, message]);
|
||||
}
|
||||
});
|
||||
|
||||
currentElement = currentElement.nextElementSibling;
|
||||
}
|
||||
}
|
||||
|
||||
return markers;
|
||||
}
|
||||
|
||||
// Parse transcript and create markers
|
||||
const markers = parseTranscript();
|
||||
|
||||
// Create player with a single call
|
||||
player = AsciinemaPlayer.create(
|
||||
recording_url,
|
||||
document.getElementById('demo'),
|
||||
{
|
||||
speed: 1.25,
|
||||
idleTimeLimit: 1,
|
||||
theme: "aider",
|
||||
poster: "npt:0:01",
|
||||
markers: markers
|
||||
}
|
||||
);
|
||||
|
||||
// Focus on the player element so keyboard shortcuts work immediately
|
||||
setTimeout(() => {
|
||||
// Use setTimeout to ensure the player is fully initialized
|
||||
if (player && typeof player.focus === 'function') {
|
||||
player.focus();
|
||||
} else {
|
||||
// If player doesn't have a focus method, try to find and focus the terminal element
|
||||
const playerElement = document.querySelector('.asciinema-terminal');
|
||||
if (playerElement) {
|
||||
playerElement.focus();
|
||||
} else {
|
||||
// Last resort - try to find element with tabindex
|
||||
const tabbableElement = document.querySelector('[tabindex]');
|
||||
if (tabbableElement) {
|
||||
tabbableElement.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 100);
|
||||
|
||||
// Function to display toast notification
|
||||
function showToast(text) {
|
||||
// Get the appropriate container based on fullscreen state
|
||||
let container = document.getElementById('toast-container');
|
||||
const isFullscreen = document.fullscreenElement ||
|
||||
document.webkitFullscreenElement ||
|
||||
document.mozFullScreenElement ||
|
||||
document.msFullscreenElement;
|
||||
|
||||
// If in fullscreen, check if we need to create a fullscreen toast container
|
||||
if (isFullscreen) {
|
||||
// Target the fullscreen element as the container parent
|
||||
const fullscreenElement = document.fullscreenElement ||
|
||||
document.webkitFullscreenElement ||
|
||||
document.mozFullScreenElement ||
|
||||
document.msFullscreenElement;
|
||||
|
||||
// Look for an existing fullscreen toast container
|
||||
let fsContainer = fullscreenElement.querySelector('.fs-toast-container');
|
||||
|
||||
if (!fsContainer) {
|
||||
// Create a new container for fullscreen mode
|
||||
fsContainer = document.createElement('div');
|
||||
fsContainer.className = 'toast-container fs-toast-container';
|
||||
fsContainer.id = 'fs-toast-container';
|
||||
fullscreenElement.appendChild(fsContainer);
|
||||
}
|
||||
|
||||
container = fsContainer;
|
||||
}
|
||||
|
||||
// Create toast element
|
||||
const toast = document.createElement('div');
|
||||
toast.className = 'toast-notification';
|
||||
toast.textContent = text;
|
||||
|
||||
// Add to container
|
||||
container.appendChild(toast);
|
||||
|
||||
// Trigger animation
|
||||
setTimeout(() => {
|
||||
toast.style.opacity = '1';
|
||||
}, 10);
|
||||
|
||||
// Remove after 3 seconds
|
||||
setTimeout(() => {
|
||||
toast.style.opacity = '0';
|
||||
setTimeout(() => {
|
||||
if (container && container.contains(toast)) {
|
||||
container.removeChild(toast);
|
||||
}
|
||||
}, 300); // Wait for fade out animation
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
// Improved browser TTS function
|
||||
function useBrowserTTS(text) {
|
||||
if ('speechSynthesis' in window) {
|
||||
console.log('Using browser TTS fallback');
|
||||
|
||||
// Cancel any ongoing speech
|
||||
window.speechSynthesis.cancel();
|
||||
|
||||
const utterance = new SpeechSynthesisUtterance(text);
|
||||
utterance.rate = 1.0;
|
||||
utterance.pitch = 1.0;
|
||||
utterance.volume = 1.0;
|
||||
|
||||
// For iOS, use a shorter utterance if possible
|
||||
if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {
|
||||
utterance.text = text.length > 100 ? text.substring(0, 100) + '...' : text;
|
||||
}
|
||||
|
||||
utterance.onstart = () => console.log('Speech started');
|
||||
utterance.onend = () => console.log('Speech ended');
|
||||
utterance.onerror = (e) => console.warn('Speech error:', e);
|
||||
|
||||
window.speechSynthesis.speak(utterance);
|
||||
return true;
|
||||
}
|
||||
console.warn('SpeechSynthesis not supported');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Function to play pre-generated TTS audio files
|
||||
function speakText(text, timeInSeconds) {
|
||||
// Format time for filename (MM-SS)
|
||||
const minutes = Math.floor(timeInSeconds / 60);
|
||||
const seconds = timeInSeconds % 60;
|
||||
const formattedTime = `${minutes.toString().padStart(2, '0')}-${seconds.toString().padStart(2, '0')}`;
|
||||
|
||||
// Get recording_id from the page or use default from the URL
|
||||
const recordingId = typeof recording_id !== 'undefined' ? recording_id :
|
||||
window.location.pathname.split('/').pop().replace('.html', '');
|
||||
|
||||
// Construct audio file path
|
||||
const audioPath = `/assets/audio/${recordingId}/${formattedTime}.mp3`;
|
||||
|
||||
// Log for debugging
|
||||
console.log(`Attempting to play audio: ${audioPath}`);
|
||||
|
||||
// Detect iOS
|
||||
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
||||
console.log(`Device is iOS: ${isIOS}`);
|
||||
|
||||
try {
|
||||
// Create or reuse audio element
|
||||
if (!globalAudio) {
|
||||
globalAudio = new Audio();
|
||||
console.log("Created new global Audio element");
|
||||
}
|
||||
|
||||
// Set up event handlers
|
||||
globalAudio.onerror = (e) => {
|
||||
console.warn(`Audio error: ${e.type}`, e);
|
||||
useBrowserTTS(text);
|
||||
};
|
||||
|
||||
// For iOS, preload might help with subsequent plays
|
||||
if (isIOS) {
|
||||
globalAudio.preload = "auto";
|
||||
}
|
||||
|
||||
// Set the new source
|
||||
globalAudio.src = audioPath;
|
||||
|
||||
// Play with proper error handling
|
||||
const playPromise = globalAudio.play();
|
||||
|
||||
if (playPromise !== undefined) {
|
||||
playPromise.catch(error => {
|
||||
console.warn(`Play error: ${error.message}`);
|
||||
|
||||
// On iOS, a user gesture might be required
|
||||
if (isIOS) {
|
||||
console.log("iOS playback failed, trying SpeechSynthesis");
|
||||
}
|
||||
|
||||
useBrowserTTS(text);
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(`Exception in audio playback: ${e.message}`);
|
||||
useBrowserTTS(text);
|
||||
}
|
||||
}
|
||||
|
||||
// Function to highlight the active timestamp in the transcript
|
||||
function highlightTimestamp(timeInSeconds) {
|
||||
// Remove previous highlights
|
||||
document.querySelectorAll('.timestamp-active').forEach(el => {
|
||||
el.classList.remove('timestamp-active');
|
||||
});
|
||||
|
||||
document.querySelectorAll('.active-marker').forEach(el => {
|
||||
el.classList.remove('active-marker');
|
||||
});
|
||||
|
||||
// Find the timestamp link with matching time
|
||||
const timestampLinks = document.querySelectorAll('.timestamp-link');
|
||||
let activeLink = null;
|
||||
|
||||
for (const link of timestampLinks) {
|
||||
if (parseInt(link.dataset.time) === timeInSeconds) {
|
||||
activeLink = link;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (activeLink) {
|
||||
// Add highlight class to the link
|
||||
activeLink.classList.add('timestamp-active');
|
||||
|
||||
// Also highlight the parent list item
|
||||
const listItem = activeLink.closest('li');
|
||||
if (listItem) {
|
||||
listItem.classList.add('active-marker');
|
||||
|
||||
// No longer scrolling into view to avoid shifting focus
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add event listener with safety checks
|
||||
if (player && typeof player.addEventListener === 'function') {
|
||||
player.addEventListener('marker', function(event) {
|
||||
try {
|
||||
const { index, time, label } = event;
|
||||
console.log(`marker! ${index} - ${time} - ${label}`);
|
||||
|
||||
// Speak the marker label and show toast
|
||||
speakText(label, time);
|
||||
showToast(label);
|
||||
|
||||
// Highlight the corresponding timestamp in the transcript
|
||||
highlightTimestamp(time);
|
||||
} catch (error) {
|
||||
console.error('Error in marker event handler:', error);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
32
aider/website/_includes/recording.md
Normal file
32
aider/website/_includes/recording.md
Normal file
@@ -0,0 +1,32 @@
|
||||
<link rel="stylesheet" type="text/css" href="/assets/asciinema/asciinema-player.css" />
|
||||
|
||||
<style>
|
||||
{% include recording.css %}
|
||||
</style>
|
||||
|
||||
<script src="/assets/asciinema/asciinema-player.min.js"></script>
|
||||
<script>
|
||||
{% include recording.js %}
|
||||
</script>
|
||||
|
||||
<div class="page-container">
|
||||
<div class="toast-container" id="toast-container"></div>
|
||||
|
||||
<div class="terminal-container">
|
||||
<div class="terminal-header">
|
||||
<div class="terminal-buttons">
|
||||
<div class="terminal-button terminal-close"></div>
|
||||
<div class="terminal-button terminal-minimize"></div>
|
||||
<div class="terminal-button terminal-expand"></div>
|
||||
</div>
|
||||
<div class="terminal-title">aider</div>
|
||||
</div>
|
||||
<div id="demo"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="keyboard-shortcuts">
|
||||
<kbd>Space</kbd> Play/pause —
|
||||
<kbd>f</kbd> Fullscreen —
|
||||
<kbd>←</kbd><kbd>→</kbd> ±5s
|
||||
</div>
|
||||
2366
aider/website/assets/asciinema/asciinema-player.css
Normal file
2366
aider/website/assets/asciinema/asciinema-player.css
Normal file
File diff suppressed because it is too large
Load Diff
1
aider/website/assets/asciinema/asciinema-player.min.js
vendored
Normal file
1
aider/website/assets/asciinema/asciinema-player.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
aider/website/assets/audio/auto-accept-architect/00-01.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/00-01.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/auto-accept-architect/00-11.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/00-11.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/auto-accept-architect/00-40.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/00-40.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/auto-accept-architect/00-48.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/00-48.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/auto-accept-architect/01-00.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/01-00.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/auto-accept-architect/01-28.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/01-28.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/auto-accept-architect/01-42.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/01-42.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/auto-accept-architect/02-00.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/02-00.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/auto-accept-architect/02-05.mp3
Normal file
BIN
aider/website/assets/audio/auto-accept-architect/02-05.mp3
Normal file
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"00-01": "We're going to add a new feature to automatically accept edits proposed by the architect model.",
|
||||
"00-11": "First, let's add the new switch.",
|
||||
"00-40": "Aider figured out that it should be passed to the Coder class.",
|
||||
"00-48": "Now we need to implement the functionality.",
|
||||
"01-00": "Let's do some manual testing.",
|
||||
"01-28": "That worked. Let's make sure we can turn it off too.",
|
||||
"02-00": "Let's quickly tidy up the changes to HISTORY.",
|
||||
"02-05": "All done!",
|
||||
"01-42": "That worked too. Let's have aider update the HISTORY file to document the new feature."
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"00-10": "We've added files that handle the main CLI and in-chat slash commands like /drop.",
|
||||
"00-20": "Let's explain the needed change to aider.",
|
||||
"01-20": "Ok, let's look at the code.",
|
||||
"01-30": "I'd prefer not to use \"hasattr()\", let's ask for improvements.",
|
||||
"01-45": "Let's try some manual testing.",
|
||||
"02-10": "Looks good. Let's check the existing test suite to ensure we didn't break anything.",
|
||||
"02-19": "Let's ask aider to add tests for this.",
|
||||
"02-50": "Tests look reasonable, we're done!",
|
||||
"00-01": "We're going to update the /drop command to keep any read only files that were originally specified at launch."
|
||||
}
|
||||
BIN
aider/website/assets/audio/tree-sitter-language-pack/00-01.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/00-01.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/00-10.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/00-10.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/01-00.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/01-00.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/01-10.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/01-10.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/01-29.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/01-29.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/01-45.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/01-45.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/02-05.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/02-05.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/03-37.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/03-37.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/04-19.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/04-19.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/05-02.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/05-02.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/05-55.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/05-55.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/06-12.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/06-12.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/06-30.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/06-30.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/09-02.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/09-02.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/09-45.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/09-45.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/10-15.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/10-15.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/11-15.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/11-15.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/12-00.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/12-00.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/13-00.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/13-00.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/14-00.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/14-00.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/16-07.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/16-07.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/16-16.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/16-16.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/16-33.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/16-33.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/17-01.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/17-01.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/17-12.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/17-12.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/19-04.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/19-04.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/19-28.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/19-28.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/21-30.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/21-30.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/24-39.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/24-39.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/27-00.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/27-00.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/27-10.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/27-10.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/27-19.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/27-19.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/27-50.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/27-50.mp3
Normal file
Binary file not shown.
BIN
aider/website/assets/audio/tree-sitter-language-pack/28-12.mp3
Normal file
BIN
aider/website/assets/audio/tree-sitter-language-pack/28-12.mp3
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user