aider-ce 0.88.3__py3-none-any.whl → 0.88.6.dev7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of aider-ce might be problematic. Click here for more details.
- aider/__init__.py +1 -1
- aider/_version.py +2 -2
- aider/args.py +14 -2
- aider/coders/base_coder.py +162 -50
- aider/commands.py +248 -47
- aider/exceptions.py +3 -0
- aider/io.py +107 -94
- aider/main.py +4 -0
- aider/queries/tree-sitter-languages/haskell-tags.scm +3 -0
- aider/queries/tree-sitter-languages/zig-tags.scm +3 -0
- aider/repo.py +1 -1
- aider/urls.py +1 -1
- aider/versioncheck.py +1 -1
- aider/website/docs/sessions.md +182 -0
- {aider_ce-0.88.3.dist-info → aider_ce-0.88.6.dev7.dist-info}/METADATA +3 -1
- {aider_ce-0.88.3.dist-info → aider_ce-0.88.6.dev7.dist-info}/RECORD +20 -17
- {aider_ce-0.88.3.dist-info → aider_ce-0.88.6.dev7.dist-info}/WHEEL +0 -0
- {aider_ce-0.88.3.dist-info → aider_ce-0.88.6.dev7.dist-info}/entry_points.txt +0 -0
- {aider_ce-0.88.3.dist-info → aider_ce-0.88.6.dev7.dist-info}/licenses/LICENSE.txt +0 -0
- {aider_ce-0.88.3.dist-info → aider_ce-0.88.6.dev7.dist-info}/top_level.txt +0 -0
aider/__init__.py
CHANGED
aider/_version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.88.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 88,
|
|
31
|
+
__version__ = version = '0.88.6.dev7'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 88, 6, 'dev7')
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
aider/args.py
CHANGED
|
@@ -315,7 +315,12 @@ def get_parser(default_config_files, git_root):
|
|
|
315
315
|
" (default: current directory)"
|
|
316
316
|
),
|
|
317
317
|
)
|
|
318
|
-
|
|
318
|
+
group.add_argument(
|
|
319
|
+
"--map-memory-cache",
|
|
320
|
+
action="store_true",
|
|
321
|
+
help="Store repo map in memory (default: False)",
|
|
322
|
+
default=False,
|
|
323
|
+
)
|
|
319
324
|
##########
|
|
320
325
|
group = parser.add_argument_group("History Files")
|
|
321
326
|
default_input_history_file = (
|
|
@@ -745,7 +750,14 @@ def get_parser(default_config_files, git_root):
|
|
|
745
750
|
help="Print the system prompts and exit (debug)",
|
|
746
751
|
default=False,
|
|
747
752
|
)
|
|
748
|
-
|
|
753
|
+
group.add_argument(
|
|
754
|
+
"--linear-output",
|
|
755
|
+
action="store_true",
|
|
756
|
+
help=(
|
|
757
|
+
"Run input and output sequentially instead of us simultaneous streams (default: False)"
|
|
758
|
+
),
|
|
759
|
+
default=False,
|
|
760
|
+
)
|
|
749
761
|
##########
|
|
750
762
|
group = parser.add_argument_group("Voice settings")
|
|
751
763
|
group.add_argument(
|
aider/coders/base_coder.py
CHANGED
|
@@ -42,7 +42,7 @@ from rich.console import Console
|
|
|
42
42
|
|
|
43
43
|
from aider import __version__, models, prompts, urls, utils
|
|
44
44
|
from aider.analytics import Analytics
|
|
45
|
-
from aider.commands import Commands
|
|
45
|
+
from aider.commands import Commands, SwitchCoder
|
|
46
46
|
from aider.exceptions import LiteLLMExceptions
|
|
47
47
|
from aider.history import ChatSummary
|
|
48
48
|
from aider.io import ConfirmGroup, InputOutput
|
|
@@ -381,6 +381,7 @@ class Coder:
|
|
|
381
381
|
map_cache_dir=".",
|
|
382
382
|
repomap_in_memory=False,
|
|
383
383
|
preserve_todo_list=False,
|
|
384
|
+
linear_output=False,
|
|
384
385
|
):
|
|
385
386
|
# initialize from args.map_cache_dir
|
|
386
387
|
self.map_cache_dir = map_cache_dir
|
|
@@ -469,6 +470,7 @@ class Coder:
|
|
|
469
470
|
|
|
470
471
|
self.dry_run = dry_run
|
|
471
472
|
self.pretty = self.io.pretty
|
|
473
|
+
self.linear_output = linear_output
|
|
472
474
|
|
|
473
475
|
self.main_model = main_model
|
|
474
476
|
|
|
@@ -585,8 +587,6 @@ class Coder:
|
|
|
585
587
|
self.summarizer_thread = None
|
|
586
588
|
self.summarized_done_messages = []
|
|
587
589
|
self.summarizing_messages = None
|
|
588
|
-
self.input_task = None
|
|
589
|
-
self.confirmation_in_progress = False
|
|
590
590
|
|
|
591
591
|
self.files_edited_by_tools = set()
|
|
592
592
|
|
|
@@ -1057,18 +1057,71 @@ class Coder:
|
|
|
1057
1057
|
self.commit_before_message.append(self.repo.get_head_commit_sha())
|
|
1058
1058
|
|
|
1059
1059
|
async def run(self, with_message=None, preproc=True):
|
|
1060
|
-
while self.confirmation_in_progress:
|
|
1060
|
+
while self.io.confirmation_in_progress:
|
|
1061
1061
|
await asyncio.sleep(0.1) # Yield control and wait briefly
|
|
1062
1062
|
|
|
1063
|
+
if self.linear_output:
|
|
1064
|
+
return await self._run_linear(with_message, preproc)
|
|
1065
|
+
|
|
1063
1066
|
if self.io.prompt_session:
|
|
1064
1067
|
with patch_stdout(raw=True):
|
|
1065
1068
|
return await self._run_patched(with_message, preproc)
|
|
1066
1069
|
else:
|
|
1067
1070
|
return await self._run_patched(with_message, preproc)
|
|
1068
1071
|
|
|
1072
|
+
async def _run_linear(self, with_message=None, preproc=True):
|
|
1073
|
+
try:
|
|
1074
|
+
if with_message:
|
|
1075
|
+
self.io.user_input(with_message)
|
|
1076
|
+
await self.run_one(with_message, preproc)
|
|
1077
|
+
return self.partial_response_content
|
|
1078
|
+
|
|
1079
|
+
user_message = None
|
|
1080
|
+
await self.io.cancel_input_task()
|
|
1081
|
+
await self.io.cancel_processing_task()
|
|
1082
|
+
|
|
1083
|
+
while True:
|
|
1084
|
+
try:
|
|
1085
|
+
if self.commands.cmd_running:
|
|
1086
|
+
await asyncio.sleep(0.1)
|
|
1087
|
+
continue
|
|
1088
|
+
|
|
1089
|
+
if not self.suppress_announcements_for_next_prompt:
|
|
1090
|
+
self.show_announcements()
|
|
1091
|
+
self.suppress_announcements_for_next_prompt = True
|
|
1092
|
+
|
|
1093
|
+
self.io.input_task = asyncio.create_task(self.get_input())
|
|
1094
|
+
await asyncio.sleep(0)
|
|
1095
|
+
await self.io.input_task
|
|
1096
|
+
user_message = self.io.input_task.result()
|
|
1097
|
+
|
|
1098
|
+
self.io.processing_task = asyncio.create_task(
|
|
1099
|
+
self._processing_logic(user_message, preproc)
|
|
1100
|
+
)
|
|
1101
|
+
|
|
1102
|
+
await self.io.processing_task
|
|
1103
|
+
|
|
1104
|
+
self.io.ring_bell()
|
|
1105
|
+
user_message = None
|
|
1106
|
+
except KeyboardInterrupt:
|
|
1107
|
+
if self.io.input_task:
|
|
1108
|
+
self.io.set_placeholder("")
|
|
1109
|
+
await self.io.cancel_input_task()
|
|
1110
|
+
|
|
1111
|
+
if self.io.processing_task:
|
|
1112
|
+
await self.io.cancel_processing_task()
|
|
1113
|
+
self.io.stop_spinner()
|
|
1114
|
+
|
|
1115
|
+
self.keyboard_interrupt()
|
|
1116
|
+
except (asyncio.CancelledError, IndexError):
|
|
1117
|
+
pass
|
|
1118
|
+
except EOFError:
|
|
1119
|
+
return
|
|
1120
|
+
finally:
|
|
1121
|
+
await self.io.cancel_input_task()
|
|
1122
|
+
await self.io.cancel_processing_task()
|
|
1123
|
+
|
|
1069
1124
|
async def _run_patched(self, with_message=None, preproc=True):
|
|
1070
|
-
input_task = None
|
|
1071
|
-
processing_task = None
|
|
1072
1125
|
try:
|
|
1073
1126
|
if with_message:
|
|
1074
1127
|
self.io.user_input(with_message)
|
|
@@ -1076,91 +1129,142 @@ class Coder:
|
|
|
1076
1129
|
return self.partial_response_content
|
|
1077
1130
|
|
|
1078
1131
|
user_message = None
|
|
1132
|
+
await self.io.cancel_input_task()
|
|
1133
|
+
await self.io.cancel_processing_task()
|
|
1079
1134
|
|
|
1080
1135
|
while True:
|
|
1081
1136
|
try:
|
|
1137
|
+
if self.commands.cmd_running:
|
|
1138
|
+
await asyncio.sleep(0.1)
|
|
1139
|
+
continue
|
|
1140
|
+
|
|
1082
1141
|
if (
|
|
1083
|
-
not self.confirmation_in_progress
|
|
1084
|
-
and not input_task
|
|
1142
|
+
not self.io.confirmation_in_progress
|
|
1085
1143
|
and not user_message
|
|
1086
|
-
and (
|
|
1144
|
+
and (
|
|
1145
|
+
not self.io.input_task
|
|
1146
|
+
or self.io.input_task.done()
|
|
1147
|
+
or self.io.input_task.cancelled()
|
|
1148
|
+
)
|
|
1149
|
+
and (not self.io.processing_task or not self.io.placeholder)
|
|
1087
1150
|
):
|
|
1088
1151
|
if not self.suppress_announcements_for_next_prompt:
|
|
1089
1152
|
self.show_announcements()
|
|
1090
|
-
self.suppress_announcements_for_next_prompt =
|
|
1153
|
+
self.suppress_announcements_for_next_prompt = True
|
|
1091
1154
|
|
|
1092
1155
|
# Stop spinner before showing announcements or getting input
|
|
1093
1156
|
self.io.stop_spinner()
|
|
1094
|
-
|
|
1095
1157
|
self.copy_context()
|
|
1096
|
-
self.input_task = asyncio.create_task(self.get_input())
|
|
1097
|
-
|
|
1158
|
+
self.io.input_task = asyncio.create_task(self.get_input())
|
|
1159
|
+
|
|
1160
|
+
# Yield Control so input can actually get properly set up
|
|
1161
|
+
await asyncio.sleep(0)
|
|
1098
1162
|
|
|
1099
1163
|
tasks = set()
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1164
|
+
|
|
1165
|
+
if self.io.processing_task:
|
|
1166
|
+
if self.io.processing_task.done():
|
|
1167
|
+
exception = self.io.processing_task.exception()
|
|
1168
|
+
if exception:
|
|
1169
|
+
if isinstance(exception, SwitchCoder):
|
|
1170
|
+
await self.io.processing_task
|
|
1171
|
+
elif (
|
|
1172
|
+
not self.io.processing_task.done()
|
|
1173
|
+
and not self.io.processing_task.cancelled()
|
|
1174
|
+
):
|
|
1175
|
+
tasks.add(self.io.processing_task)
|
|
1176
|
+
|
|
1177
|
+
if (
|
|
1178
|
+
self.io.input_task
|
|
1179
|
+
and not self.io.input_task.done()
|
|
1180
|
+
and not self.io.input_task.cancelled()
|
|
1181
|
+
):
|
|
1182
|
+
tasks.add(self.io.input_task)
|
|
1104
1183
|
|
|
1105
1184
|
if tasks:
|
|
1106
1185
|
done, pending = await asyncio.wait(
|
|
1107
1186
|
tasks, return_when=asyncio.FIRST_COMPLETED
|
|
1108
1187
|
)
|
|
1109
1188
|
|
|
1110
|
-
if input_task and input_task in done:
|
|
1111
|
-
if processing_task:
|
|
1112
|
-
if not self.confirmation_in_progress:
|
|
1113
|
-
|
|
1114
|
-
try:
|
|
1115
|
-
await processing_task
|
|
1116
|
-
except asyncio.CancelledError:
|
|
1117
|
-
pass
|
|
1189
|
+
if self.io.input_task and self.io.input_task in done:
|
|
1190
|
+
if self.io.processing_task:
|
|
1191
|
+
if not self.io.confirmation_in_progress:
|
|
1192
|
+
await self.io.cancel_processing_task()
|
|
1118
1193
|
self.io.stop_spinner()
|
|
1119
|
-
processing_task = None
|
|
1120
1194
|
|
|
1121
1195
|
try:
|
|
1122
|
-
user_message = input_task.result()
|
|
1196
|
+
user_message = self.io.input_task.result()
|
|
1197
|
+
await self.io.cancel_input_task()
|
|
1198
|
+
|
|
1199
|
+
if self.commands.is_run_command(user_message):
|
|
1200
|
+
self.commands.cmd_running = True
|
|
1201
|
+
|
|
1123
1202
|
except (asyncio.CancelledError, KeyboardInterrupt):
|
|
1124
1203
|
user_message = None
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1204
|
+
|
|
1205
|
+
if not user_message:
|
|
1206
|
+
await self.io.cancel_input_task()
|
|
1128
1207
|
continue
|
|
1129
1208
|
|
|
1130
|
-
if processing_task and processing_task in
|
|
1209
|
+
if self.io.processing_task and self.io.processing_task in pending:
|
|
1131
1210
|
try:
|
|
1132
|
-
|
|
1211
|
+
tasks = set()
|
|
1212
|
+
tasks.add(self.io.processing_task)
|
|
1213
|
+
|
|
1214
|
+
# We just did a confirmation so add a new input task
|
|
1215
|
+
if (
|
|
1216
|
+
not self.io.input_task
|
|
1217
|
+
and self.io.get_confirmation_acknowledgement()
|
|
1218
|
+
):
|
|
1219
|
+
self.io.input_task = asyncio.create_task(self.get_input())
|
|
1220
|
+
tasks.add(self.io.input_task)
|
|
1221
|
+
|
|
1222
|
+
done, pending = await asyncio.wait(
|
|
1223
|
+
tasks, return_when=asyncio.FIRST_COMPLETED
|
|
1224
|
+
)
|
|
1225
|
+
|
|
1226
|
+
if self.io.input_task and self.io.input_task in done:
|
|
1227
|
+
await self.io.cancel_processing_task()
|
|
1228
|
+
self.io.stop_spinner()
|
|
1229
|
+
self.io.acknowledge_confirmation()
|
|
1230
|
+
|
|
1231
|
+
try:
|
|
1232
|
+
user_message = self.io.input_task.result()
|
|
1233
|
+
await self.io.cancel_input_task()
|
|
1234
|
+
except (asyncio.CancelledError, KeyboardInterrupt):
|
|
1235
|
+
user_message = None
|
|
1236
|
+
|
|
1133
1237
|
except (asyncio.CancelledError, KeyboardInterrupt):
|
|
1134
1238
|
pass
|
|
1135
|
-
|
|
1239
|
+
|
|
1136
1240
|
# Stop spinner when processing task completes
|
|
1137
1241
|
self.io.stop_spinner()
|
|
1138
1242
|
|
|
1139
|
-
if user_message and
|
|
1140
|
-
processing_task = asyncio.create_task(
|
|
1243
|
+
if user_message and not self.io.acknowledge_confirmation():
|
|
1244
|
+
self.io.processing_task = asyncio.create_task(
|
|
1141
1245
|
self._processing_logic(user_message, preproc)
|
|
1142
1246
|
)
|
|
1247
|
+
|
|
1143
1248
|
# Start spinner for processing task
|
|
1144
1249
|
self.io.start_spinner("Processing...")
|
|
1145
|
-
|
|
1250
|
+
|
|
1251
|
+
self.io.ring_bell()
|
|
1252
|
+
user_message = None
|
|
1146
1253
|
except KeyboardInterrupt:
|
|
1147
|
-
if
|
|
1148
|
-
processing_task.cancel()
|
|
1149
|
-
processing_task = None
|
|
1150
|
-
# Stop spinner when processing task is cancelled
|
|
1151
|
-
self.io.stop_spinner()
|
|
1152
|
-
if input_task:
|
|
1254
|
+
if self.io.input_task:
|
|
1153
1255
|
self.io.set_placeholder("")
|
|
1154
|
-
|
|
1155
|
-
|
|
1256
|
+
await self.io.cancel_input_task()
|
|
1257
|
+
|
|
1258
|
+
if self.io.processing_task:
|
|
1259
|
+
await self.io.cancel_processing_task()
|
|
1260
|
+
self.io.stop_spinner()
|
|
1261
|
+
|
|
1156
1262
|
self.keyboard_interrupt()
|
|
1157
1263
|
except EOFError:
|
|
1158
1264
|
return
|
|
1159
1265
|
finally:
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
if processing_task:
|
|
1163
|
-
processing_task.cancel()
|
|
1266
|
+
await self.io.cancel_input_task()
|
|
1267
|
+
await self.io.cancel_processing_task()
|
|
1164
1268
|
|
|
1165
1269
|
async def _processing_logic(self, user_message, preproc):
|
|
1166
1270
|
try:
|
|
@@ -1188,6 +1292,7 @@ class Coder:
|
|
|
1188
1292
|
all_read_only_files = [self.get_rel_fname(fname) for fname in all_read_only_fnames]
|
|
1189
1293
|
all_files = sorted(set(inchat_files + all_read_only_files))
|
|
1190
1294
|
edit_format = "" if self.edit_format == self.main_model.edit_format else self.edit_format
|
|
1295
|
+
|
|
1191
1296
|
return await self.io.get_input(
|
|
1192
1297
|
self.root,
|
|
1193
1298
|
all_files,
|
|
@@ -1203,6 +1308,12 @@ class Coder:
|
|
|
1203
1308
|
return
|
|
1204
1309
|
|
|
1205
1310
|
if self.commands.is_command(inp):
|
|
1311
|
+
if inp[0] in "!":
|
|
1312
|
+
inp = f"/run {inp[1:]}"
|
|
1313
|
+
|
|
1314
|
+
if self.commands.is_run_command(inp):
|
|
1315
|
+
self.commands.cmd_running = True
|
|
1316
|
+
|
|
1206
1317
|
return await self.commands.run(inp)
|
|
1207
1318
|
|
|
1208
1319
|
await self.check_for_file_mentions(inp)
|
|
@@ -1817,6 +1928,7 @@ class Coder:
|
|
|
1817
1928
|
self.usage_report = None
|
|
1818
1929
|
exhausted = False
|
|
1819
1930
|
interrupted = False
|
|
1931
|
+
|
|
1820
1932
|
try:
|
|
1821
1933
|
while True:
|
|
1822
1934
|
try:
|
|
@@ -2350,7 +2462,7 @@ class Coder:
|
|
|
2350
2462
|
return (server.name, server_tools)
|
|
2351
2463
|
except Exception as e:
|
|
2352
2464
|
if server.name != "unnamed-server":
|
|
2353
|
-
self.io.tool_warning(f"Error initializing MCP server {server.name}
|
|
2465
|
+
self.io.tool_warning(f"Error initializing MCP server {server.name}: {e}")
|
|
2354
2466
|
return None
|
|
2355
2467
|
|
|
2356
2468
|
async def get_all_server_tools():
|
|
@@ -2704,7 +2816,7 @@ class Coder:
|
|
|
2704
2816
|
|
|
2705
2817
|
async for chunk in completion:
|
|
2706
2818
|
# Check if confirmation is in progress and wait if needed
|
|
2707
|
-
while self.confirmation_in_progress:
|
|
2819
|
+
while self.io.confirmation_in_progress:
|
|
2708
2820
|
await asyncio.sleep(0.1) # Yield control and wait briefly
|
|
2709
2821
|
|
|
2710
2822
|
if isinstance(chunk, str):
|