nexus-tui 0.1.5__py3-none-any.whl → 0.1.14__py3-none-any.whl
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.
- nexus/screens/tool_selector.py +45 -27
- nexus/style.tcss +18 -7
- {nexus_tui-0.1.5.dist-info → nexus_tui-0.1.14.dist-info}/METADATA +4 -1
- {nexus_tui-0.1.5.dist-info → nexus_tui-0.1.14.dist-info}/RECORD +7 -7
- {nexus_tui-0.1.5.dist-info → nexus_tui-0.1.14.dist-info}/WHEEL +0 -0
- {nexus_tui-0.1.5.dist-info → nexus_tui-0.1.14.dist-info}/entry_points.txt +0 -0
- {nexus_tui-0.1.5.dist-info → nexus_tui-0.1.14.dist-info}/licenses/LICENSE +0 -0
nexus/screens/tool_selector.py
CHANGED
|
@@ -9,16 +9,11 @@ from textual.containers import Horizontal, Vertical
|
|
|
9
9
|
from textual.events import Key
|
|
10
10
|
from textual.reactive import reactive
|
|
11
11
|
from textual.screen import Screen
|
|
12
|
-
from textual.widgets import Label, ListView
|
|
12
|
+
from textual.widgets import Label, ListView
|
|
13
13
|
|
|
14
14
|
from nexus.config import get_tools
|
|
15
|
-
from nexus.logger import get_logger
|
|
16
|
-
from nexus.models import Tool
|
|
17
15
|
from nexus.widgets.tool_list_item import CategoryListItem, ToolListItem
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
log = get_logger(__name__)
|
|
16
|
+
from nexus.models import Tool
|
|
22
17
|
|
|
23
18
|
|
|
24
19
|
class ToolSelector(Screen[None]):
|
|
@@ -40,12 +35,13 @@ class ToolSelector(Screen[None]):
|
|
|
40
35
|
BINDINGS = [
|
|
41
36
|
("ctrl+t", "show_theme_picker", "Theme"),
|
|
42
37
|
("ctrl+f", "toggle_favorite", "Favorite"),
|
|
43
|
-
("escape", "
|
|
38
|
+
("escape", "clear_search", "Clear Search"),
|
|
44
39
|
("down", "cursor_down", "Next Item"),
|
|
45
40
|
("up", "cursor_up", "Previous Item"),
|
|
46
41
|
("right", "cursor_right", "Enter List"),
|
|
47
42
|
("left", "cursor_left", "Back to Categories"),
|
|
48
43
|
("enter", "launch_current", "Launch Tool"),
|
|
44
|
+
("backspace", "delete_char", "Delete Character"),
|
|
49
45
|
("?", "show_help", "Help"),
|
|
50
46
|
("f1", "show_help", "Help"),
|
|
51
47
|
]
|
|
@@ -67,7 +63,7 @@ class ToolSelector(Screen[None]):
|
|
|
67
63
|
"**********************************\n Nexus Interface \n**********************************",
|
|
68
64
|
id="header-left",
|
|
69
65
|
)
|
|
70
|
-
yield
|
|
66
|
+
yield Label("Search tools...", id="tool-search")
|
|
71
67
|
|
|
72
68
|
with Horizontal(id="main-container"):
|
|
73
69
|
with Vertical(id="left-pane"):
|
|
@@ -107,7 +103,7 @@ class ToolSelector(Screen[None]):
|
|
|
107
103
|
yield Label("Type", classes="key-badge")
|
|
108
104
|
yield Label("Filter", classes="key-desc")
|
|
109
105
|
yield Label("Esc", classes="key-badge")
|
|
110
|
-
yield Label("
|
|
106
|
+
yield Label("Clear", classes="key-desc")
|
|
111
107
|
|
|
112
108
|
# SYSTEM
|
|
113
109
|
with Horizontal(classes="footer-col"):
|
|
@@ -189,31 +185,48 @@ class ToolSelector(Screen[None]):
|
|
|
189
185
|
def select_all_category(self) -> None:
|
|
190
186
|
"""Selects the 'ALL' category in the list."""
|
|
191
187
|
category_list = self.query_one("#category-list", ListView)
|
|
192
|
-
#
|
|
193
|
-
|
|
194
|
-
|
|
188
|
+
# Find the index of the ALL category
|
|
189
|
+
for idx, child in enumerate(category_list.children):
|
|
190
|
+
if isinstance(child, CategoryListItem) and child.category_id == "ALL":
|
|
191
|
+
if category_list.index != idx:
|
|
192
|
+
category_list.index = idx
|
|
193
|
+
break
|
|
195
194
|
|
|
196
|
-
def
|
|
197
|
-
"""
|
|
195
|
+
def watch_search_query(self, old_value: str, new_value: str) -> None:
|
|
196
|
+
"""Reacts to changes in the search query.
|
|
198
197
|
|
|
199
198
|
Args:
|
|
200
|
-
|
|
199
|
+
old_value: The previous search query.
|
|
200
|
+
new_value: The new search query.
|
|
201
201
|
"""
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
202
|
+
try:
|
|
203
|
+
feedback = self.query_one("#tool-search", Label)
|
|
204
|
+
except Exception:
|
|
205
|
+
return
|
|
206
|
+
|
|
207
|
+
if new_value:
|
|
208
|
+
feedback.update(f"SEARCH: {new_value}_")
|
|
209
|
+
# Switch to ALL category automatically if not already
|
|
210
|
+
self.select_all_category()
|
|
211
|
+
# Populate tools with filter
|
|
212
|
+
self.refresh_tools()
|
|
213
|
+
else:
|
|
214
|
+
feedback.update("Search tools...")
|
|
215
|
+
# Re-populate without filter
|
|
207
216
|
self.refresh_tools()
|
|
208
217
|
|
|
209
|
-
def
|
|
210
|
-
"""
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
218
|
+
def action_delete_char(self) -> None:
|
|
219
|
+
"""Deletes the last character from search query."""
|
|
220
|
+
if self.search_query:
|
|
221
|
+
self.search_query = self.search_query[:-1]
|
|
222
|
+
|
|
223
|
+
def action_clear_search(self) -> None:
|
|
224
|
+
"""Clears the search input."""
|
|
225
|
+
if self.search_query:
|
|
226
|
+
self.search_query = ""
|
|
214
227
|
|
|
215
228
|
def on_key(self, event: Key) -> None:
|
|
216
|
-
"""Global key handler for numeric quick launch.
|
|
229
|
+
"""Global key handler for type-to-search and numeric quick launch.
|
|
217
230
|
|
|
218
231
|
Args:
|
|
219
232
|
event: The key event.
|
|
@@ -229,6 +242,11 @@ class ToolSelector(Screen[None]):
|
|
|
229
242
|
event.stop()
|
|
230
243
|
return
|
|
231
244
|
|
|
245
|
+
if event.key.isprintable() and len(event.key) == 1:
|
|
246
|
+
# Append char to query
|
|
247
|
+
self.search_query += event.key
|
|
248
|
+
event.stop()
|
|
249
|
+
|
|
232
250
|
def refresh_tools(self) -> None:
|
|
233
251
|
"""Refreshes tool list based on current selection and search text."""
|
|
234
252
|
category_list = self.query_one("#category-list", ListView)
|
nexus/style.tcss
CHANGED
|
@@ -24,13 +24,9 @@ Screen {
|
|
|
24
24
|
#tool-search {
|
|
25
25
|
width: 60%;
|
|
26
26
|
margin-left: 2;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
#tool-search:focus {
|
|
33
|
-
border: solid #7aa2f7;
|
|
27
|
+
padding: 0 1;
|
|
28
|
+
height: 3;
|
|
29
|
+
/* Colors/Borders moved to theme sections */
|
|
34
30
|
}
|
|
35
31
|
|
|
36
32
|
#tool-description {
|
|
@@ -153,6 +149,11 @@ ListItem {
|
|
|
153
149
|
.theme-dark #left-pane { border-right: solid #c0caf5; }
|
|
154
150
|
.theme-dark .pane-header-container { border-bottom: solid #c0caf5; }
|
|
155
151
|
.theme-dark #tool-description { color: #bb9af7; border-top: solid #c0caf5; }
|
|
152
|
+
.theme-dark #tool-search {
|
|
153
|
+
background: #292e42;
|
|
154
|
+
color: #c0caf5;
|
|
155
|
+
border: tall #7aa2f7;
|
|
156
|
+
}
|
|
156
157
|
|
|
157
158
|
/* Highlight - Dark (Only when list has focus OR it is the tool-list) */
|
|
158
159
|
.theme-dark ListView:focus > ListItem.--highlight,
|
|
@@ -198,6 +199,11 @@ ListItem {
|
|
|
198
199
|
.theme-storm #left-pane { border-right: solid #c0caf5; }
|
|
199
200
|
.theme-storm .pane-header-container { border-bottom: solid #c0caf5; }
|
|
200
201
|
.theme-storm #tool-description { color: #bb9af7; border-top: solid #c0caf5; }
|
|
202
|
+
.theme-storm #tool-search {
|
|
203
|
+
background: #414868;
|
|
204
|
+
color: #c0caf5;
|
|
205
|
+
border: tall #bb9af7;
|
|
206
|
+
}
|
|
201
207
|
|
|
202
208
|
/* Highlight - Storm (Only when list has focus OR it is the tool-list) */
|
|
203
209
|
.theme-storm ListView:focus > ListItem.--highlight,
|
|
@@ -244,6 +250,11 @@ ListItem {
|
|
|
244
250
|
.theme-light #left-pane { border-right: solid #343b58; }
|
|
245
251
|
.theme-light .pane-header-container { border-bottom: solid #343b58; }
|
|
246
252
|
.theme-light #tool-description { color: #8c4351; border-top: solid #343b58; }
|
|
253
|
+
.theme-light #tool-search {
|
|
254
|
+
background: #ffffff;
|
|
255
|
+
color: #343b58;
|
|
256
|
+
border: tall #343b58;
|
|
257
|
+
}
|
|
247
258
|
|
|
248
259
|
/* Highlight - Light (Only when list has focus OR it is the tool-list) */
|
|
249
260
|
.theme-light ListView:focus > ListItem.--highlight,
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nexus-tui
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.14
|
|
4
4
|
Summary: A TUI orchestrator to manage your installed terminal tools—access everything through a single command
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Requires-Python: >=3.12
|
|
7
|
+
Requires-Dist: platformdirs>=4.0.0
|
|
7
8
|
Requires-Dist: pydantic>=2.12.5
|
|
9
|
+
Requires-Dist: structlog>=24.1.0
|
|
8
10
|
Requires-Dist: textual>=0.86.0
|
|
11
|
+
Requires-Dist: thefuzz>=0.20.0
|
|
9
12
|
Description-Content-Type: text/markdown
|
|
10
13
|
|
|
11
14
|
# Nexus
|
|
@@ -5,7 +5,7 @@ nexus/container.py,sha256=lQA2WB1WqvW9Y8lbY2QUYkpDTtep1ts00XBD2d3JY70,1152
|
|
|
5
5
|
nexus/logger.py,sha256=sRhNYYErXzPzZ84uLm7MLH6NJb6EAGKUijRF1AvnfeU,1337
|
|
6
6
|
nexus/models.py,sha256=elqUVjMMxa2RZoETtxKJkTpRrpLuglP43mBOwVSbA0o,1100
|
|
7
7
|
nexus/state.py,sha256=dmBnHpzws2aErG42LaZFLXcse_9EwecmZy2dFgot4Tw,2532
|
|
8
|
-
nexus/style.tcss,sha256=
|
|
8
|
+
nexus/style.tcss,sha256=7PIAYBF2m6L_QnqTyFYyNQThkHWN3pQds5zH52Hq-ho,10067
|
|
9
9
|
nexus/tools.toml,sha256=uYfBA7WMLAu6fPDRzB4p5ggk0aVTUpDPrxRrzLnGiMA,740
|
|
10
10
|
nexus/screens/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
nexus/screens/create_project.py,sha256=uVAQioL6C-3mtriQfvuylUD0kX3sYA0KWgM0yWvzF9M,3597
|
|
@@ -13,14 +13,14 @@ nexus/screens/error.py,sha256=LQOkb-rLHbcYCRPrBybuusABcf73RbwN9q_f3N2VqmE,1817
|
|
|
13
13
|
nexus/screens/help.py,sha256=lG6Lkt-t3kPGcbltKZiFfv5S5d57ZiZkU4cc_jfM3Nw,1697
|
|
14
14
|
nexus/screens/project_picker.py,sha256=ghXHKRLd4fxP8LWASi6_C8_BzEZFv266bsD591OSEyQ,9590
|
|
15
15
|
nexus/screens/theme_picker.py,sha256=KZ_L2QYnv95bdJGd3PcQnb0QJe1sgr3EIXm7Vd-tz-8,3479
|
|
16
|
-
nexus/screens/tool_selector.py,sha256=
|
|
16
|
+
nexus/screens/tool_selector.py,sha256=Q2ZeCxxifiyvScxwF4-Ke3sCM0ZolHODpfsIHHp9A-c,19038
|
|
17
17
|
nexus/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
nexus/services/executor.py,sha256=SqeZa6owOTc04dCvMChiWVsGOWnrO1YW2gUvT5m4Nuk,1494
|
|
19
19
|
nexus/services/scanner.py,sha256=YTx6WQBAvERK3zfdkHfwfj0Ygj9ZL1idhO8JUr_IF4M,1311
|
|
20
20
|
nexus/widgets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
21
|
nexus/widgets/tool_list_item.py,sha256=H0C04ef4OreL9vmyiku3hTA0SAXLoKWoGagIMn73jpI,5880
|
|
22
|
-
nexus_tui-0.1.
|
|
23
|
-
nexus_tui-0.1.
|
|
24
|
-
nexus_tui-0.1.
|
|
25
|
-
nexus_tui-0.1.
|
|
26
|
-
nexus_tui-0.1.
|
|
22
|
+
nexus_tui-0.1.14.dist-info/METADATA,sha256=yVod_20wGc0w--UitU8sR5KpOltuv4Lv6TTNdQELFEI,3861
|
|
23
|
+
nexus_tui-0.1.14.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
24
|
+
nexus_tui-0.1.14.dist-info/entry_points.txt,sha256=FLWKPqsNYxxaU0JyVfJoKJDTrFtx-LJVPejbvUdnc6o,41
|
|
25
|
+
nexus_tui-0.1.14.dist-info/licenses/LICENSE,sha256=gtmNw2nOOujPlKSYxW0EQC-cg2aSe--mVlMxElz5AmI,1062
|
|
26
|
+
nexus_tui-0.1.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|