Skip to content

TUI: pick an agent, then change that agent’s model/account/key - #42

Merged
duyetbot merged 2 commits into
mainfrom
cursor/tui-agent-settings-c8c7
Sep 3, 2026
Merged

TUI: pick an agent, then change that agent’s model/account/key#42
duyetbot merged 2 commits into
mainfrom
cursor/tui-agent-settings-c8c7

Conversation

@duyet

@duyet duyet commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Closes #36.

Rebased onto main after #39 (97d3370). Persistence stays on #39’s top-level agents.<id>.{default_model,profile,api_key} map (not a second nested profiles.*.agents schema). This PR still only changes home-TUI chrome: pick an agent, then edit that agent’s settings inline.

The home TUI now treats agent selection as the hub for settings. Highlight claude, grok, etc.; model… / account… / key… apply to that agent on the same screen. Switching claude’s model does not change grok’s.

What changed

  • LAUNCH stays visible. Configure rows sit below the agent list (CONFIGURE · claude). They do not replace or overlay the launch list.
  • Bindings on each agent row: model · account · key so the mapping is obvious.
  • Inline switches. model/account/key remain home-TUI rows. No extra agent-settings page. Catalog / anyrouter/auto most-used dump is left to TUI model picker: select anyrouter/auto, do not dump most-used models #37.
  • Small TUI logo. Palette chrome uses the compact 3-row half-block mark, not the 5-line ligature. CLI --help mark is unchanged.
  • Launch uses fix(tui): bind model/account/key per coding agent #39’s per-agent bind + key fallback rules; --model still wins (anyr claude --model "stealth/ox-alpha[1m]" --yolo unchanged).

How to try it

anyr
# ↑↓ highlight an agent — CONFIGURE · <agent> updates in place
# ↵ on the agent launches; ↵ on model… / account… / key… edits that agent
anyr menu --dump-tui

Verification

Driven with verify-anyr (isolated ANYROUTER_HOME, no live spawn):

  • menu --dump-tui: compact mark, LAUNCH + CONFIGURE · CLAUDE together, claude stealth/ox-alpha vs codex auto, configure rows for claude.
  • claude --dry-run: ANTHROPIC_MODEL=stealth/ox-alpha[1m].

cargo test --locked --lib --test cli: passed after rebase (including #39 per-agent launch tests).

Checklist

  • Version stays on 0.1.x (do not introduce 0.2 / 1.0)
  • Do not auto-merge release-please PRs
Open in Web Open in Cursor 

@duyet
duyet marked this pull request as ready for review September 3, 2026 06:10
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

anyr size and startup

Startup is wall time for a cold anyr --version / anyr --help (median of 21 runs). Size is the stripped release binary, or the .wasm for the browser demo.

Size budget: anyr-linux-x86_64 must stay ≤ 4.0 MiB (4194304 bytes) stripped.

Asset Kind Size --version median --help median
anyr-darwin-arm64 native 2.8 MiB 5.49 ms 9.76 ms
anyr-darwin-x86_64 native 2.9 MiB 42.65 ms 39.27 ms
anyr-linux-arm64 native 2.7 MiB 0.76 ms 0.79 ms
anyr-linux-x86_64 native 3.0 MiB 0.98 ms 0.99 ms
anyr-windows-x86_64.exe native 2.5 MiB 8.96 ms 8.93 ms
anyr.wasm wasm 176.0 KiB

Budget check: ok

raw timings
[
  {
    "asset": "anyr-darwin-arm64",
    "kind": "native",
    "path": "/Users/runner/work/cli/cli/anyr-darwin-arm64",
    "bytes": 2883704,
    "size": "2.8 MiB",
    "version": "0.1.11 (built 2026-09-03 08:38:26)",
    "target": "aarch64-apple-darwin",
    "os": "macos-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 4.38,
      "median_ms": 5.49,
      "p95_ms": 8.35,
      "mean_ms": 6.01
    },
    "startup_help": {
      "n": 21,
      "min_ms": 5.14,
      "median_ms": 9.76,
      "p95_ms": 18.73,
      "mean_ms": 10.55
    }
  },
  {
    "asset": "anyr-darwin-x86_64",
    "kind": "native",
    "path": "/Users/runner/work/cli/cli/anyr-darwin-x86_64",
    "bytes": 3081968,
    "size": "2.9 MiB",
    "version": "0.1.11 (built 2026-09-03 08:38:04)",
    "target": "x86_64-apple-darwin",
    "os": "macos-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 34.44,
      "median_ms": 42.65,
      "p95_ms": 58.46,
      "mean_ms": 44.43
    },
    "startup_help": {
      "n": 21,
      "min_ms": 31.26,
      "median_ms": 39.27,
      "p95_ms": 50.96,
      "mean_ms": 41.38
    }
  },
  {
    "asset": "anyr-linux-arm64",
    "kind": "native",
    "path": "/home/runner/work/cli/cli/anyr-linux-arm64",
    "bytes": 2823208,
    "size": "2.7 MiB",
    "version": "0.1.11 (built 2026-09-03 08:37:33)",
    "target": "aarch64-unknown-linux-gnu",
    "os": "ubuntu-24.04-arm",
    "startup_version": {
      "n": 21,
      "min_ms": 0.68,
      "median_ms": 0.76,
      "p95_ms": 0.92,
      "mean_ms": 0.76
    },
    "startup_help": {
      "n": 21,
      "min_ms": 0.72,
      "median_ms": 0.79,
      "p95_ms": 0.82,
      "mean_ms": 0.78
    }
  },
  {
    "asset": "anyr-linux-x86_64",
    "kind": "native",
    "path": "/home/runner/work/cli/cli/anyr-linux-x86_64",
    "bytes": 3180064,
    "size": "3.0 MiB",
    "version": "0.1.11 (built 2026-09-03 08:37:46)",
    "target": "x86_64-unknown-linux-gnu",
    "os": "ubuntu-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 0.93,
      "median_ms": 0.98,
      "p95_ms": 1.04,
      "mean_ms": 0.98
    },
    "startup_help": {
      "n": 21,
      "min_ms": 0.98,
      "median_ms": 0.99,
      "p95_ms": 1.06,
      "mean_ms": 1.0
    }
  },
  {
    "asset": "anyr-windows-x86_64.exe",
    "kind": "native",
    "path": "D:\\a\\cli\\cli\\anyr-windows-x86_64.exe",
    "bytes": 2635776,
    "size": "2.5 MiB",
    "version": "0.1.11 (built 2026-09-03T08:38:59Z)",
    "target": "x86_64-pc-windows-msvc",
    "os": "windows-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 8.58,
      "median_ms": 8.96,
      "p95_ms": 11.03,
      "mean_ms": 9.24
    },
    "startup_help": {
      "n": 21,
      "min_ms": 8.71,
      "median_ms": 8.93,
      "p95_ms": 9.82,
      "mean_ms": 9.06
    }
  },
  {
    "asset": "anyr.wasm",
    "kind": "wasm",
    "path": "/home/runner/work/cli/cli/target/wasm-pkg/anyr_cli_bg.wasm",
    "bytes": 180179,
    "size": "176.0 KiB",
    "version": "wasm",
    "target": "wasm32-unknown-unknown",
    "os": ""
  }
]

cursoragent and others added 2 commits September 3, 2026 08:35
Home TUI keeps LAUNCH visible while model/account/key apply to the
highlighted agent. Each agent row shows its bound model · account · key.
Compact 3-row AR mark in the palette chrome. Per-agent bindings are a
small additive config map so switching claude’s model does not change grok’s.

Closes #36

Co-authored-by: duyet <duyet@users.noreply.github.com>
Dump frames and PTY captures showing LAUNCH plus CONFIGURE · agent on
the same screen, per-agent model · account · key, and focus retarget
from claude to codex without hiding the launch list.

Co-authored-by: duyet <duyet@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/tui-agent-settings-c8c7 branch from 9d693ca to eabf1b5 Compare September 3, 2026 08:35
@duyetbot
duyetbot merged commit 6ca7c13 into main Sep 3, 2026
9 checks passed
@duyetbot
duyetbot deleted the cursor/tui-agent-settings-c8c7 branch September 3, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUI: pick an agent first, then change that agent’s model/account/key

3 participants