agentram 0.1.15 → 0.1.17

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.
package/agentram/cli.py CHANGED
@@ -307,8 +307,20 @@ def run_textual_tui(context: McpContext) -> bool:
307
307
  with Horizontal(id="layout"):
308
308
  yield Static(id="sidebar")
309
309
  with Vertical(id="main"):
310
+ with Vertical(id="setup"):
311
+ yield Static("Model setup ? bind supervisor/main/small before prompt", id="setup-title")
312
+ yield Input(value="openai-compatible", placeholder="Provider, e.g. openai-compatible / claude / claude-subagent", id="setup-provider", classes="setup-input")
313
+ yield Input(placeholder="Base URL or command, e.g. http://localhost:20128/v1", id="setup-base-url", classes="setup-input")
314
+ yield Input(value="OPENAI_API_KEY", placeholder="API key env name, not raw key", id="setup-api-key-env", classes="setup-input")
315
+ yield Input(placeholder="Supervisor model, e.g. claude-sonnet-4.5-thinking-agentic", id="setup-supervisor", classes="setup-input")
316
+ yield Input(placeholder="Main coding model, e.g. cx/gpt5.5", id="setup-main", classes="setup-input")
317
+ yield Input(placeholder="Small memory model, e.g. qwen2.5:7b", id="setup-small", classes="setup-input")
318
+ with Horizontal(id="setup-actions"):
319
+ yield Button("Save setup", id="setup-save", variant="primary")
320
+ yield Button("Skip", id="setup-skip")
310
321
  yield RichLog(id="chat", wrap=True, highlight=True, markup=False, auto_scroll=True)
311
- yield Input(placeholder="Prompt hoặc /command. Mouse wheel scroll trong khung chat.", id="input")
322
+ yield Static(id="palette")
323
+ yield Input(placeholder="Prompt ho?c /command. Mouse wheel scroll trong khung chat.", id="input")
312
324
  yield Footer()
313
325
 
314
326
  def on_mount(self) -> None:
@@ -318,7 +330,10 @@ def run_textual_tui(context: McpContext) -> bool:
318
330
  self.prefill_setup_from_profile()
319
331
  self.refresh_sidebar()
320
332
  self.set_interval(1.0, self.refresh_sidebar)
321
- self.query_one("#setup-provider", Input).focus()
333
+ try:
334
+ self.query_one("#setup-provider", Input).focus()
335
+ except Exception: # noqa: BLE001 - fallback if setup is hidden/unmounted
336
+ self.query_one("#input", Input).focus()
322
337
 
323
338
  @property
324
339
  def chat(self) -> RichLog:
@@ -388,12 +403,18 @@ def run_textual_tui(context: McpContext) -> bool:
388
403
  self.query_one("#input", Input).focus()
389
404
 
390
405
  def hide_palette(self) -> None:
391
- palette = self.query_one("#palette", Static)
406
+ try:
407
+ palette = self.query_one("#palette", Static)
408
+ except Exception: # noqa: BLE001 - widget may not be mounted yet
409
+ return
392
410
  palette.update("")
393
411
  palette.styles.display = "none"
394
412
 
395
413
  def show_palette(self, value: str) -> None:
396
- palette = self.query_one("#palette", Static)
414
+ try:
415
+ palette = self.query_one("#palette", Static)
416
+ except Exception: # noqa: BLE001 - widget may not be mounted yet
417
+ return
397
418
  query = value.strip().lower().lstrip("/")
398
419
  matches = []
399
420
  for command, description in SLASH_COMMANDS:
@@ -414,6 +435,8 @@ def run_textual_tui(context: McpContext) -> bool:
414
435
  palette.styles.display = "block"
415
436
 
416
437
  def on_input_changed(self, event: Input.Changed) -> None:
438
+ if event.input.id != "input":
439
+ return
417
440
  value = event.value.strip()
418
441
  if value.startswith("/"):
419
442
  self.show_palette(value)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentram",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "Async, model-agnostic Working RAM for coding agents.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/trancongnghia/AGENT_RAM#readme",
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "agentram"
7
- version = "0.1.15"
7
+ version = "0.1.17"
8
8
  description = "Async, model-agnostic RAM layer for agentic coding tools."
9
9
  readme = "README.md"
10
10
  license = "MIT"