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.
Files changed (59) hide show
  1. {anixcode-0.12.6 → anixcode-0.13.0}/PKG-INFO +1 -1
  2. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/__init__.py +1 -1
  3. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/i18n_en.py +5 -0
  4. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tui/app.py +61 -15
  5. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tui/app.tcss +73 -14
  6. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode.egg-info/PKG-INFO +1 -1
  7. {anixcode-0.12.6 → anixcode-0.13.0}/pyproject.toml +1 -1
  8. {anixcode-0.12.6 → anixcode-0.13.0}/LICENSE +0 -0
  9. {anixcode-0.12.6 → anixcode-0.13.0}/README.md +0 -0
  10. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/__main__.py +0 -0
  11. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/agent.py +0 -0
  12. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/airpc.py +0 -0
  13. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/browser.py +0 -0
  14. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/checkpoints.py +0 -0
  15. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/cli.py +0 -0
  16. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/commands.py +0 -0
  17. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/compaction.py +0 -0
  18. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/danger.py +0 -0
  19. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/i18n.py +0 -0
  20. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/images.py +0 -0
  21. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/llm.py +0 -0
  22. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/mcp.py +0 -0
  23. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/mentions.py +0 -0
  24. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/projects.py +0 -0
  25. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/prompts.py +0 -0
  26. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/providers.py +0 -0
  27. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/settings.py +0 -0
  28. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/storage.py +0 -0
  29. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tools/__init__.py +0 -0
  30. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tools/base.py +0 -0
  31. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tools/browser.py +0 -0
  32. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tools/files.py +0 -0
  33. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tools/search.py +0 -0
  34. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tools/shell.py +0 -0
  35. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tools/todo.py +0 -0
  36. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tools/web.py +0 -0
  37. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tui/__init__.py +0 -0
  38. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tui/anim.py +0 -0
  39. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tui/screens.py +0 -0
  40. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode/tui/widgets.py +0 -0
  41. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode.egg-info/SOURCES.txt +0 -0
  42. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode.egg-info/dependency_links.txt +0 -0
  43. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode.egg-info/entry_points.txt +0 -0
  44. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode.egg-info/requires.txt +0 -0
  45. {anixcode-0.12.6 → anixcode-0.13.0}/anixcode.egg-info/top_level.txt +0 -0
  46. {anixcode-0.12.6 → anixcode-0.13.0}/setup.cfg +0 -0
  47. {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_agent.py +0 -0
  48. {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_commands.py +0 -0
  49. {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_i18n.py +0 -0
  50. {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_images.py +0 -0
  51. {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_llm.py +0 -0
  52. {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_mcp.py +0 -0
  53. {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_projects.py +0 -0
  54. {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_providers.py +0 -0
  55. {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_reliability.py +0 -0
  56. {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_safety_mentions.py +0 -0
  57. {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_settings.py +0 -0
  58. {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_tools.py +0 -0
  59. {anixcode-0.12.6 → anixcode-0.13.0}/tests/test_v011_features.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: anixcode
3
- Version: 0.12.6
3
+ Version: 0.13.0
4
4
  Summary: AI coding agent for the terminal. Bring your own API key.
5
5
  Author: an1zy
6
6
  License-Expression: MIT
@@ -1,3 +1,3 @@
1
1
  """ANIX Code: an AI coding agent for your terminal. Bring your own API key."""
2
2
 
3
- __version__ = "0.12.6"
3
+ __version__ = "0.13.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
- yield PromptInput(id="prompt")
121
- with Horizontal(id="statusbar"):
122
- yield Chip("", self.action_model, id="status-model")
123
- yield Static(id="status-usage")
124
- yield Chip("", self.action_toggle_access, id="status-access")
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" · {self.settings.reasoning_effort}", style="dim")
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(f"↑{_tokens(s.tokens_in)} ↓{_tokens(s.tokens_out)}", style="dim")
267
- if s.tokens_cached:
268
- usage.append(f" · cache {_tokens(s.tokens_cached)}", style="green dim")
269
- cost_str = format_cost(estimate_cost(self.settings.model, s.tokens_in, s.tokens_out, s.tokens_cached))
270
- if cost_str:
271
- usage.append(f" {cost_str}", style="dim")
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.append(tr(" контекст "), style="dim")
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("🔓 полный доступ"), style="bold yellow"))
326
+ access.update(Text.assemble(("f2 ", "bold yellow"), (tr("полный доступ"), "yellow")))
281
327
  else:
282
- access.update(Text(tr("🔒 спрашивать"), style="dim"))
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
- PromptInput {
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: round $primary;
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
- padding: 0 2;
206
- background: $background;
256
+ margin-top: 1;
257
+ padding: 0 1;
258
+ background: transparent;
207
259
  color: $text-muted;
208
260
  }
209
- #status-model {
261
+ #status-path {
210
262
  width: 1fr;
263
+ margin-left: 0;
264
+ text-style: none;
211
265
  }
212
- #status-usage {
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
- }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: anixcode
3
- Version: 0.12.6
3
+ Version: 0.13.0
4
4
  Summary: AI coding agent for the terminal. Bring your own API key.
5
5
  Author: an1zy
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "anixcode"
3
- version = "0.12.6"
3
+ version = "0.13.0"
4
4
  description = "AI coding agent for the terminal. Bring your own API key."
5
5
  readme = "README.md"
6
6
  license = "MIT"
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