anixcode 0.12.6__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.6 → anixcode-0.13.0}/PKG-INFO +1 -1
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/__init__.py +1 -1
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/i18n_en.py +5 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tui/app.py +61 -15
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tui/app.tcss +73 -14
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode.egg-info/PKG-INFO +1 -1
- {anixcode-0.12.6 → anixcode-0.13.0}/pyproject.toml +1 -1
- {anixcode-0.12.6 → anixcode-0.13.0}/LICENSE +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/README.md +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/__main__.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/agent.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/airpc.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/browser.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/checkpoints.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/cli.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/commands.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/compaction.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/danger.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/i18n.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/images.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/llm.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/mcp.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/mentions.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/projects.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/prompts.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/providers.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/settings.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/storage.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tools/__init__.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tools/base.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tools/browser.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tools/files.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tools/search.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tools/shell.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tools/todo.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tools/web.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tui/__init__.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tui/anim.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tui/screens.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tui/widgets.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode.egg-info/SOURCES.txt +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode.egg-info/dependency_links.txt +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode.egg-info/entry_points.txt +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode.egg-info/requires.txt +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/anixcode.egg-info/top_level.txt +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/setup.cfg +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_agent.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_commands.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_i18n.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_images.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_llm.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_mcp.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_projects.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_providers.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_reliability.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_safety_mentions.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_settings.py +0 -0
- {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_tools.py +0 -0
- {anixcode-0.12.6 → 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
|
}
|
|
@@ -117,11 +117,17 @@ 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
133
|
return AnimatedLogo(Text(), animate=self.settings.animations, id="welcome")
|
|
@@ -248,6 +254,16 @@ class AnixApp(App):
|
|
|
248
254
|
if self.settings.full_access and self._pending is not None:
|
|
249
255
|
self._resolve_permission("once")
|
|
250
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
|
+
|
|
251
267
|
def _refresh_bars(self) -> None:
|
|
252
268
|
self._pulse_brand(force=True)
|
|
253
269
|
mode = self.agent.mode if self.agent else self._agent_mode
|
|
@@ -256,30 +272,60 @@ class AnixApp(App):
|
|
|
256
272
|
badge.update("GOAL" if goal_on else ("PLAN" if mode == "plan" else "BUILD"))
|
|
257
273
|
badge.set_class(mode == "plan" and not goal_on, "plan")
|
|
258
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
|
+
|
|
259
284
|
if self.settings.ready:
|
|
285
|
+
pname = providers.get(self.settings.provider, self.settings).name
|
|
260
286
|
model = Text(self.settings.model, style="bold")
|
|
261
287
|
if self.settings.reasoning_effort:
|
|
262
|
-
model.append(f"
|
|
288
|
+
model.append(f" ({self.settings.reasoning_effort})", style="dim")
|
|
289
|
+
model.append(f" {pname}", style="dim")
|
|
263
290
|
else:
|
|
264
291
|
model = Text(tr("модель не подключена · ctrl+o"), style="dim")
|
|
292
|
+
|
|
265
293
|
s = self.session
|
|
266
|
-
usage = Text(
|
|
267
|
-
if s.
|
|
268
|
-
usage.append(f"
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
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")
|
|
272
302
|
if self.agent and s.messages:
|
|
273
303
|
pct = int(self.agent.context_usage(s) * 100)
|
|
274
|
-
usage.
|
|
304
|
+
if usage.plain:
|
|
305
|
+
usage.append(" ", style="dim")
|
|
275
306
|
usage.append(f"{pct}%", style="bold red" if pct >= 80 else "bold yellow" if pct >= 60 else "dim")
|
|
307
|
+
|
|
276
308
|
self.query_one("#status-model", Chip).update(model)
|
|
277
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
|
+
|
|
278
324
|
access = self.query_one("#status-access", Chip)
|
|
279
325
|
if self.settings.full_access:
|
|
280
|
-
access.update(Text(tr("
|
|
326
|
+
access.update(Text.assemble(("f2 ", "bold yellow"), (tr("полный доступ"), "yellow")))
|
|
281
327
|
else:
|
|
282
|
-
access.update(Text(tr("
|
|
328
|
+
access.update(Text.assemble(("f2 ", "bold"), (tr("спрашивать"), "dim")))
|
|
283
329
|
|
|
284
330
|
def _pulse_brand(self, force: bool = False) -> None:
|
|
285
331
|
"""Header diamond: theme color at rest, flowing gradient while the agent works."""
|
|
@@ -184,33 +184,96 @@ Notice {
|
|
|
184
184
|
}
|
|
185
185
|
#composer {
|
|
186
186
|
height: auto;
|
|
187
|
-
padding: 0 1;
|
|
187
|
+
padding: 0 2 1 2;
|
|
188
|
+
align-horizontal: center;
|
|
188
189
|
}
|
|
189
|
-
|
|
190
|
+
#todos, #activity, #permission, #attachments, #mentions {
|
|
191
|
+
width: 100%;
|
|
192
|
+
max-width: 108;
|
|
193
|
+
}
|
|
194
|
+
#prompt-box {
|
|
195
|
+
width: 100%;
|
|
196
|
+
max-width: 108;
|
|
190
197
|
height: auto;
|
|
191
|
-
min-height: 3;
|
|
192
|
-
max-height: 12;
|
|
193
|
-
border: round $panel;
|
|
194
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;
|
|
195
216
|
}
|
|
196
217
|
PromptInput:focus {
|
|
197
|
-
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;
|
|
198
247
|
}
|
|
199
248
|
#activity {
|
|
200
249
|
height: 1;
|
|
201
250
|
padding: 0 1;
|
|
202
251
|
}
|
|
203
252
|
#statusbar {
|
|
253
|
+
width: 100%;
|
|
254
|
+
max-width: 108;
|
|
204
255
|
height: 1;
|
|
205
|
-
|
|
206
|
-
|
|
256
|
+
margin-top: 1;
|
|
257
|
+
padding: 0 1;
|
|
258
|
+
background: transparent;
|
|
207
259
|
color: $text-muted;
|
|
208
260
|
}
|
|
209
|
-
#status-
|
|
261
|
+
#status-path {
|
|
210
262
|
width: 1fr;
|
|
263
|
+
margin-left: 0;
|
|
264
|
+
text-style: none;
|
|
211
265
|
}
|
|
212
|
-
#status-
|
|
266
|
+
#status-path:hover {
|
|
267
|
+
text-style: underline;
|
|
268
|
+
}
|
|
269
|
+
#status-hints {
|
|
213
270
|
width: auto;
|
|
271
|
+
margin-right: 2;
|
|
272
|
+
}
|
|
273
|
+
#status-access {
|
|
274
|
+
width: auto;
|
|
275
|
+
margin-left: 0;
|
|
276
|
+
text-style: none;
|
|
214
277
|
}
|
|
215
278
|
ModalScreen {
|
|
216
279
|
align: center middle;
|
|
@@ -390,7 +453,3 @@ AttachmentBar {
|
|
|
390
453
|
ToolCard.pending .tool-header {
|
|
391
454
|
color: $warning;
|
|
392
455
|
}
|
|
393
|
-
#status-access {
|
|
394
|
-
width: auto;
|
|
395
|
-
margin-left: 3;
|
|
396
|
-
}
|
|
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
|
|
File without changes
|