anixcode 0.12.5__tar.gz → 0.13.0__tar.gz
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.
- {anixcode-0.12.5 → anixcode-0.13.0}/PKG-INFO +1 -1
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/__init__.py +1 -1
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/i18n_en.py +5 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/tui/anim.py +3 -2
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/tui/app.py +62 -20
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/tui/app.tcss +77 -15
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode.egg-info/PKG-INFO +1 -1
- {anixcode-0.12.5 → anixcode-0.13.0}/pyproject.toml +1 -1
- {anixcode-0.12.5 → anixcode-0.13.0}/LICENSE +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/README.md +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/__main__.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/agent.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/airpc.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/browser.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/checkpoints.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/cli.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/commands.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/compaction.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/danger.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/i18n.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/images.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/llm.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/mcp.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/mentions.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/projects.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/prompts.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/providers.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/settings.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/storage.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/tools/__init__.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/tools/base.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/tools/browser.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/tools/files.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/tools/search.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/tools/shell.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/tools/todo.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/tools/web.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/tui/__init__.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/tui/screens.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode/tui/widgets.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode.egg-info/SOURCES.txt +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode.egg-info/dependency_links.txt +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode.egg-info/entry_points.txt +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode.egg-info/requires.txt +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/anixcode.egg-info/top_level.txt +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/setup.cfg +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/tests/test_agent.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/tests/test_commands.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/tests/test_i18n.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/tests/test_images.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/tests/test_llm.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/tests/test_mcp.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/tests/test_projects.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/tests/test_providers.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/tests/test_reliability.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/tests/test_safety_mentions.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/tests/test_settings.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/tests/test_tools.py +0 -0
- {anixcode-0.12.5 → anixcode-0.13.0}/tests/test_v011_features.py +0 -0
|
@@ -541,4 +541,9 @@ EN: dict[str, str] = {
|
|
|
541
541
|
'Server returned no list — type a model name and press Enter.',
|
|
542
542
|
'быстро переключить модель текущего провайдера': 'quickly switch model for the current provider',
|
|
543
543
|
'подключить провайдера и API-ключ': 'connect a provider and API key',
|
|
544
|
+
# v0.13.0: OpenCode-style input card
|
|
545
|
+
'помощь': 'help',
|
|
546
|
+
'проект ': 'project ',
|
|
547
|
+
'режим ': 'mode ',
|
|
548
|
+
'спрашивать': 'ask',
|
|
544
549
|
}
|
|
@@ -172,8 +172,9 @@ class AnimatedLogo(Static):
|
|
|
172
172
|
line = sub[:shown].ljust(len(sub))
|
|
173
173
|
for i, ch in enumerate(line):
|
|
174
174
|
text.append(ch, _style(self._gradient.at(i / len(sub) * 0.4 - t * 0.07)))
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
if self.logo_footer.plain:
|
|
176
|
+
text.append("\n")
|
|
177
|
+
text.append_text(self.logo_footer)
|
|
177
178
|
self.update(text)
|
|
178
179
|
|
|
179
180
|
|
|
@@ -117,18 +117,20 @@ class AnixApp(App):
|
|
|
117
117
|
yield PermissionBar(self._resolve_permission, id="permission")
|
|
118
118
|
yield AttachmentBar(self._remove_image, id="attachments")
|
|
119
119
|
yield MentionList(id="mentions")
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
with Vertical(id="prompt-box"):
|
|
121
|
+
yield PromptInput(id="prompt")
|
|
122
|
+
with Horizontal(id="prompt-meta"):
|
|
123
|
+
yield Chip("Build", self.action_toggle_mode, id="prompt-mode")
|
|
124
|
+
yield Static(" · ", id="meta-sep")
|
|
125
|
+
yield Chip("", self.action_model, id="status-model")
|
|
126
|
+
yield Static(id="status-usage")
|
|
127
|
+
with Horizontal(id="statusbar"):
|
|
128
|
+
yield Chip("", self.action_projects, id="status-path")
|
|
129
|
+
yield Static(id="status-hints")
|
|
130
|
+
yield Chip("", self.action_toggle_access, id="status-access")
|
|
125
131
|
|
|
126
132
|
def _welcome(self) -> Static:
|
|
127
|
-
|
|
128
|
-
footer.append(f"v{__version__}\n\n", style="dim")
|
|
129
|
-
footer.append(tr("Опишите задачу: агент сам прочитает код, внесёт правки и запустит команды.\n"), style="dim")
|
|
130
|
-
footer.append(tr("Tab: Build/Plan · Ctrl+O: модель · F1: все клавиши"), style="dim")
|
|
131
|
-
return AnimatedLogo(footer, animate=self.settings.animations, id="welcome")
|
|
133
|
+
return AnimatedLogo(Text(), animate=self.settings.animations, id="welcome")
|
|
132
134
|
|
|
133
135
|
def on_mount(self) -> None:
|
|
134
136
|
import contextlib
|
|
@@ -252,6 +254,16 @@ class AnixApp(App):
|
|
|
252
254
|
if self.settings.full_access and self._pending is not None:
|
|
253
255
|
self._resolve_permission("once")
|
|
254
256
|
|
|
257
|
+
def _git_branch(self) -> str:
|
|
258
|
+
head = self.project_root / ".git" / "HEAD"
|
|
259
|
+
try:
|
|
260
|
+
ref = head.read_text(encoding="utf-8", errors="replace").strip()
|
|
261
|
+
except OSError:
|
|
262
|
+
return ""
|
|
263
|
+
if ref.startswith("ref: refs/heads/"):
|
|
264
|
+
return ref[16:]
|
|
265
|
+
return ref[:7] if ref else ""
|
|
266
|
+
|
|
255
267
|
def _refresh_bars(self) -> None:
|
|
256
268
|
self._pulse_brand(force=True)
|
|
257
269
|
mode = self.agent.mode if self.agent else self._agent_mode
|
|
@@ -260,30 +272,60 @@ class AnixApp(App):
|
|
|
260
272
|
badge.update("GOAL" if goal_on else ("PLAN" if mode == "plan" else "BUILD"))
|
|
261
273
|
badge.set_class(mode == "plan" and not goal_on, "plan")
|
|
262
274
|
badge.set_class(goal_on, "goal")
|
|
275
|
+
|
|
276
|
+
pbox = self.query_one("#prompt-box", Vertical)
|
|
277
|
+
pbox.set_class(mode == "plan" and not goal_on, "plan")
|
|
278
|
+
pbox.set_class(goal_on, "goal")
|
|
279
|
+
pmode = self.query_one("#prompt-mode", Chip)
|
|
280
|
+
pmode.update("Goal" if goal_on else ("Plan" if mode == "plan" else "Build"))
|
|
281
|
+
pmode.set_class(mode == "plan" and not goal_on, "plan")
|
|
282
|
+
pmode.set_class(goal_on, "goal")
|
|
283
|
+
|
|
263
284
|
if self.settings.ready:
|
|
285
|
+
pname = providers.get(self.settings.provider, self.settings).name
|
|
264
286
|
model = Text(self.settings.model, style="bold")
|
|
265
287
|
if self.settings.reasoning_effort:
|
|
266
|
-
model.append(f"
|
|
288
|
+
model.append(f" ({self.settings.reasoning_effort})", style="dim")
|
|
289
|
+
model.append(f" {pname}", style="dim")
|
|
267
290
|
else:
|
|
268
291
|
model = Text(tr("модель не подключена · ctrl+o"), style="dim")
|
|
292
|
+
|
|
269
293
|
s = self.session
|
|
270
|
-
usage = Text(
|
|
271
|
-
if s.
|
|
272
|
-
usage.append(f"
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
294
|
+
usage = Text()
|
|
295
|
+
if s.tokens_in or s.tokens_out:
|
|
296
|
+
usage.append(f"↑{_tokens(s.tokens_in)} ↓{_tokens(s.tokens_out)}", style="dim")
|
|
297
|
+
if s.tokens_cached:
|
|
298
|
+
usage.append(f" · cache {_tokens(s.tokens_cached)}", style="green dim")
|
|
299
|
+
cost_str = format_cost(estimate_cost(self.settings.model, s.tokens_in, s.tokens_out, s.tokens_cached))
|
|
300
|
+
if cost_str:
|
|
301
|
+
usage.append(f" {cost_str}", style="dim")
|
|
276
302
|
if self.agent and s.messages:
|
|
277
303
|
pct = int(self.agent.context_usage(s) * 100)
|
|
278
|
-
usage.
|
|
304
|
+
if usage.plain:
|
|
305
|
+
usage.append(" ", style="dim")
|
|
279
306
|
usage.append(f"{pct}%", style="bold red" if pct >= 80 else "bold yellow" if pct >= 60 else "dim")
|
|
307
|
+
|
|
280
308
|
self.query_one("#status-model", Chip).update(model)
|
|
281
309
|
self.query_one("#status-usage", Static).update(usage)
|
|
310
|
+
|
|
311
|
+
branch = self._git_branch()
|
|
312
|
+
path_label = self._short_root() + (f":{branch}" if branch else "")
|
|
313
|
+
self.query_one("#status-path", Chip).update(Text(path_label, style="dim"))
|
|
314
|
+
|
|
315
|
+
hints = Text()
|
|
316
|
+
hints.append("tab ", style="bold")
|
|
317
|
+
hints.append(tr("режим "), style="dim")
|
|
318
|
+
hints.append("ctrl+p ", style="bold")
|
|
319
|
+
hints.append(tr("проект "), style="dim")
|
|
320
|
+
hints.append("f1 ", style="bold")
|
|
321
|
+
hints.append(tr("помощь"), style="dim")
|
|
322
|
+
self.query_one("#status-hints", Static).update(hints)
|
|
323
|
+
|
|
282
324
|
access = self.query_one("#status-access", Chip)
|
|
283
325
|
if self.settings.full_access:
|
|
284
|
-
access.update(Text(tr("
|
|
326
|
+
access.update(Text.assemble(("f2 ", "bold yellow"), (tr("полный доступ"), "yellow")))
|
|
285
327
|
else:
|
|
286
|
-
access.update(Text(tr("
|
|
328
|
+
access.update(Text.assemble(("f2 ", "bold"), (tr("спрашивать"), "dim")))
|
|
287
329
|
|
|
288
330
|
def _pulse_brand(self, force: bool = False) -> None:
|
|
289
331
|
"""Header diamond: theme color at rest, flowing gradient while the agent works."""
|
|
@@ -121,7 +121,10 @@ Screen {
|
|
|
121
121
|
}
|
|
122
122
|
#welcome {
|
|
123
123
|
width: 100%;
|
|
124
|
-
|
|
124
|
+
height: 1fr;
|
|
125
|
+
min-height: 9;
|
|
126
|
+
margin: 0;
|
|
127
|
+
content-align: center middle;
|
|
125
128
|
text-align: center;
|
|
126
129
|
color: $accent;
|
|
127
130
|
}
|
|
@@ -181,33 +184,96 @@ Notice {
|
|
|
181
184
|
}
|
|
182
185
|
#composer {
|
|
183
186
|
height: auto;
|
|
184
|
-
padding: 0 1;
|
|
187
|
+
padding: 0 2 1 2;
|
|
188
|
+
align-horizontal: center;
|
|
185
189
|
}
|
|
186
|
-
|
|
190
|
+
#todos, #activity, #permission, #attachments, #mentions {
|
|
191
|
+
width: 100%;
|
|
192
|
+
max-width: 108;
|
|
193
|
+
}
|
|
194
|
+
#prompt-box {
|
|
195
|
+
width: 100%;
|
|
196
|
+
max-width: 108;
|
|
187
197
|
height: auto;
|
|
188
|
-
min-height: 3;
|
|
189
|
-
max-height: 12;
|
|
190
|
-
border: round $panel;
|
|
191
198
|
background: $surface;
|
|
199
|
+
border-left: thick $primary;
|
|
200
|
+
padding: 1 2 1 2;
|
|
201
|
+
}
|
|
202
|
+
#prompt-box.plan {
|
|
203
|
+
border-left: thick $accent;
|
|
204
|
+
}
|
|
205
|
+
#prompt-box.goal {
|
|
206
|
+
border-left: thick $warning;
|
|
207
|
+
}
|
|
208
|
+
PromptInput {
|
|
209
|
+
width: 100%;
|
|
210
|
+
height: auto;
|
|
211
|
+
min-height: 2;
|
|
212
|
+
max-height: 10;
|
|
213
|
+
border: none;
|
|
214
|
+
padding: 0;
|
|
215
|
+
background: transparent;
|
|
192
216
|
}
|
|
193
217
|
PromptInput:focus {
|
|
194
|
-
border:
|
|
218
|
+
border: none;
|
|
219
|
+
}
|
|
220
|
+
#prompt-meta {
|
|
221
|
+
height: 1;
|
|
222
|
+
margin-top: 1;
|
|
223
|
+
width: 100%;
|
|
224
|
+
}
|
|
225
|
+
#prompt-mode {
|
|
226
|
+
width: auto;
|
|
227
|
+
margin-left: 0;
|
|
228
|
+
color: $primary;
|
|
229
|
+
text-style: bold;
|
|
230
|
+
}
|
|
231
|
+
#prompt-mode.plan {
|
|
232
|
+
color: $accent;
|
|
233
|
+
}
|
|
234
|
+
#prompt-mode.goal {
|
|
235
|
+
color: $warning;
|
|
236
|
+
}
|
|
237
|
+
#meta-sep {
|
|
238
|
+
width: auto;
|
|
239
|
+
color: $text-muted;
|
|
240
|
+
}
|
|
241
|
+
#status-model {
|
|
242
|
+
width: 1fr;
|
|
243
|
+
margin-left: 0;
|
|
244
|
+
}
|
|
245
|
+
#status-usage {
|
|
246
|
+
width: auto;
|
|
195
247
|
}
|
|
196
248
|
#activity {
|
|
197
249
|
height: 1;
|
|
198
250
|
padding: 0 1;
|
|
199
251
|
}
|
|
200
252
|
#statusbar {
|
|
253
|
+
width: 100%;
|
|
254
|
+
max-width: 108;
|
|
201
255
|
height: 1;
|
|
202
|
-
|
|
203
|
-
|
|
256
|
+
margin-top: 1;
|
|
257
|
+
padding: 0 1;
|
|
258
|
+
background: transparent;
|
|
204
259
|
color: $text-muted;
|
|
205
260
|
}
|
|
206
|
-
#status-
|
|
261
|
+
#status-path {
|
|
207
262
|
width: 1fr;
|
|
263
|
+
margin-left: 0;
|
|
264
|
+
text-style: none;
|
|
208
265
|
}
|
|
209
|
-
#status-
|
|
266
|
+
#status-path:hover {
|
|
267
|
+
text-style: underline;
|
|
268
|
+
}
|
|
269
|
+
#status-hints {
|
|
210
270
|
width: auto;
|
|
271
|
+
margin-right: 2;
|
|
272
|
+
}
|
|
273
|
+
#status-access {
|
|
274
|
+
width: auto;
|
|
275
|
+
margin-left: 0;
|
|
276
|
+
text-style: none;
|
|
211
277
|
}
|
|
212
278
|
ModalScreen {
|
|
213
279
|
align: center middle;
|
|
@@ -387,7 +453,3 @@ AttachmentBar {
|
|
|
387
453
|
ToolCard.pending .tool-header {
|
|
388
454
|
color: $warning;
|
|
389
455
|
}
|
|
390
|
-
#status-access {
|
|
391
|
-
width: auto;
|
|
392
|
-
margin-left: 3;
|
|
393
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|