Commit 4aa5ca6
authored
feat: improve agent support in interactive rli (#209)
This PR adapts and modifies the changes from Jason's jason/agents_tab
branch. There are a number of additions to the interactive rli
interface:
- New Agents screens: Add agent list (with private/public tabs), detail,
and create screens to the interactive rli TUI, accessible from the main
menu via [a] shortcut
- Unified agent column definitions: Extract shared getAgentColumns() in
agentService and buildAgentTableColumns() in a new agentColumns.ts
module, used by both the CLI rli agent list and all
interactive agent pickers (agent list, devbox create, benchmark job
create) for consistent column layout (NAME, SOURCE, VERSION, ID,
CREATED) with terminal-width-adaptive sizing
- Agent picker in devbox create: Add optional agent mount field to the
devbox creation form with a tabbed private/public agent picker that
merges results during search
- Agent picker in benchmark job create: Wire up agent selection using
the shared columns, with server-side search and correct totalCount
propagation
- ResourcePicker improvements: Add extraDeps and extraOverhead props for
tab-switching contexts; add nextCursor support for opaque/merged
pagination cursors; stabilize checkbox column
rendering via ref to reduce flicker; fix cross-page multi-select by
tracking item objects in a ref Map
- CLI agent list cleanup: Remove local ColumnDef/computeColumnWidths()
in favor of shared getAgentColumns(); fix scoped package version styling
(lastIndexOf("@"))
- Routing & navigation: Register agent-list, agent-detail, agent-create
screens in Router with proper cleanup; add Agents to main menu and
benchmark menu label updates
## Files changed
src/services/agentService.ts
Add AgentColumn, agentVersionText(), getAgentColumns(); fix totalCount
to use response.total_count
src/components/agentColumns.ts
New — shared buildAgentTableColumns() UI-layer column builder
src/commands/agent/list.ts
Replace local column/width logic with shared getAgentColumns()
src/screens/AgentListScreen.tsx
New — agent list with private/public tabs
src/screens/AgentDetailScreen.tsx
New — agent detail with delete operation
src/screens/AgentCreateScreen.tsx
New — agent creation form (npm/pip/git/object sources)
src/components/MainMenu.tsx
Add Agents menu item with [a] shortcut
src/components/BenchmarkMenu.tsx
Rename menu labels for clarity
src/router/Router.tsx
Register 3 new agent screens
src/store/navigationStore.tsx
Add agent screen types
src/screens/MenuScreen.tsx
Route "agents" selection to agent-list
src/components/DevboxCreatePage.tsx
Add agent mount picker with merged private+public search
src/screens/BenchmarkJobCreateScreen.tsx
Switch agent picker to single-select, use shared columns, server-side
search
src/components/ResourcePicker.tsx
Add extraDeps, extraOverhead, nextCursor; stabilize columns via ref; fix
cross-page selection tracking
src/hooks/useCursorPagination.ts
Support opaque nextCursor in fetch results1 parent 86cda21 commit 4aa5ca6
15 files changed
Lines changed: 1568 additions & 156 deletions
File tree
- src
- commands/agent
- components
- hooks
- router
- screens
- services
- store
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | | - | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
54 | 30 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 31 | + | |
94 | 32 | | |
95 | 33 | | |
96 | 34 | | |
| |||
105 | 43 | | |
106 | 44 | | |
107 | 45 | | |
108 | | - | |
109 | 46 | | |
| 47 | + | |
110 | 48 | | |
111 | 49 | | |
112 | | - | |
| 50 | + | |
113 | 51 | | |
114 | 52 | | |
115 | 53 | | |
116 | 54 | | |
117 | 55 | | |
118 | 56 | | |
119 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
120 | 63 | | |
121 | 64 | | |
122 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
0 commit comments