nexus-tui 0.1.5__py3-none-any.whl → 0.1.13__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 -26
- nexus/style.tcss +18 -7
- {nexus_tui-0.1.5.dist-info → nexus_tui-0.1.13.dist-info}/METADATA +4 -1
- {nexus_tui-0.1.5.dist-info → nexus_tui-0.1.13.dist-info}/RECORD +7 -7
- {nexus_tui-0.1.5.dist-info → nexus_tui-0.1.13.dist-info}/WHEEL +0 -0
- {nexus_tui-0.1.5.dist-info → nexus_tui-0.1.13.dist-info}/entry_points.txt +0 -0
- {nexus_tui-0.1.5.dist-info → nexus_tui-0.1.13.dist-info}/licenses/LICENSE +0 -0
nexus/screens/tool_selector.py
CHANGED
|
@@ -9,16 +9,12 @@ 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.widgets.tool_list_item import CategoryListItem, ToolListItem
|
|
15
16
|
from nexus.logger import get_logger
|
|
16
17
|
from nexus.models import Tool
|
|
17
|
-
from nexus.widgets.tool_list_item import CategoryListItem, ToolListItem
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
log = get_logger(__name__)
|
|
22
18
|
|
|
23
19
|
|
|
24
20
|
class ToolSelector(Screen[None]):
|
|
@@ -40,12 +36,13 @@ class ToolSelector(Screen[None]):
|
|
|
40
36
|
BINDINGS = [
|
|
41
37
|
("ctrl+t", "show_theme_picker", "Theme"),
|
|
42
38
|
("ctrl+f", "toggle_favorite", "Favorite"),
|
|
43
|
-
("escape", "
|
|
39
|
+
("escape", "clear_search", "Clear Search"),
|
|
44
40
|
("down", "cursor_down", "Next Item"),
|
|
45
41
|
("up", "cursor_up", "Previous Item"),
|
|
46
42
|
("right", "cursor_right", "Enter List"),
|
|
47
43
|
("left", "cursor_left", "Back to Categories"),
|
|
48
44
|
("enter", "launch_current", "Launch Tool"),
|
|
45
|
+
("backspace", "delete_char", "Delete Character"),
|
|
49
46
|
("?", "show_help", "Help"),
|
|
50
47
|
("f1", "show_help", "Help"),
|
|
51
48
|
]
|
|
@@ -67,7 +64,7 @@ class ToolSelector(Screen[None]):
|
|
|
67
64
|
"**********************************\n Nexus Interface \n**********************************",
|
|
68
65
|
id="header-left",
|
|
69
66
|
)
|
|
70
|
-
yield
|
|
67
|
+
yield Label("Search tools...", id="tool-search")
|
|
71
68
|
|
|
72
69
|
with Horizontal(id="main-container"):
|
|
73
70
|
with Vertical(id="left-pane"):
|
|
@@ -107,7 +104,7 @@ class ToolSelector(Screen[None]):
|
|
|
107
104
|
yield Label("Type", classes="key-badge")
|
|
108
105
|
yield Label("Filter", classes="key-desc")
|
|
109
106
|
yield Label("Esc", classes="key-badge")
|
|
110
|
-
yield Label("
|
|
107
|
+
yield Label("Clear", classes="key-desc")
|
|
111
108
|
|
|
112
109
|
# SYSTEM
|
|
113
110
|
with Horizontal(classes="footer-col"):
|
|
@@ -189,31 +186,48 @@ class ToolSelector(Screen[None]):
|
|
|
189
186
|
def select_all_category(self) -> None:
|
|
190
187
|
"""Selects the 'ALL' category in the list."""
|
|
191
188
|
category_list = self.query_one("#category-list", ListView)
|
|
192
|
-
#
|
|
193
|
-
|
|
194
|
-
|
|
189
|
+
# Find the index of the ALL category
|
|
190
|
+
for idx, child in enumerate(category_list.children):
|
|
191
|
+
if isinstance(child, CategoryListItem) and child.category_id == "ALL":
|
|
192
|
+
if category_list.index != idx:
|
|
193
|
+
category_list.index = idx
|
|
194
|
+
break
|
|
195
195
|
|
|
196
|
-
def
|
|
197
|
-
"""
|
|
196
|
+
def watch_search_query(self, old_value: str, new_value: str) -> None:
|
|
197
|
+
"""Reacts to changes in the search query.
|
|
198
198
|
|
|
199
199
|
Args:
|
|
200
|
-
|
|
200
|
+
old_value: The previous search query.
|
|
201
|
+
new_value: The new search query.
|
|
201
202
|
"""
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
203
|
+
try:
|
|
204
|
+
feedback = self.query_one("#tool-search", Label)
|
|
205
|
+
except Exception:
|
|
206
|
+
return
|
|
207
|
+
|
|
208
|
+
if new_value:
|
|
209
|
+
feedback.update(f"SEARCH: {new_value}_")
|
|
210
|
+
# Switch to ALL category automatically if not already
|
|
211
|
+
self.select_all_category()
|
|
212
|
+
# Populate tools with filter
|
|
213
|
+
self.refresh_tools()
|
|
214
|
+
else:
|
|
215
|
+
feedback.update("Search tools...")
|
|
216
|
+
# Re-populate without filter
|
|
207
217
|
self.refresh_tools()
|
|
208
218
|
|
|
209
|
-
def
|
|
210
|
-
"""
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
219
|
+
def action_delete_char(self) -> None:
|
|
220
|
+
"""Deletes the last character from search query."""
|
|
221
|
+
if self.search_query:
|
|
222
|
+
self.search_query = self.search_query[:-1]
|
|
223
|
+
|
|
224
|
+
def action_clear_search(self) -> None:
|
|
225
|
+
"""Clears the search input."""
|
|
226
|
+
if self.search_query:
|
|
227
|
+
self.search_query = ""
|
|
214
228
|
|
|
215
229
|
def on_key(self, event: Key) -> None:
|
|
216
|
-
"""Global key handler for numeric quick launch.
|
|
230
|
+
"""Global key handler for type-to-search and numeric quick launch.
|
|
217
231
|
|
|
218
232
|
Args:
|
|
219
233
|
event: The key event.
|
|
@@ -229,6 +243,11 @@ class ToolSelector(Screen[None]):
|
|
|
229
243
|
event.stop()
|
|
230
244
|
return
|
|
231
245
|
|
|
246
|
+
if event.key.isprintable() and len(event.key) == 1:
|
|
247
|
+
# Append char to query
|
|
248
|
+
self.search_query += event.key
|
|
249
|
+
event.stop()
|
|
250
|
+
|
|
232
251
|
def refresh_tools(self) -> None:
|
|
233
252
|
"""Refreshes tool list based on current selection and search text."""
|
|
234
253
|
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.13
|
|
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=mkR_Otgv5bQa5_GYiJjYHyFXCOnkoUWyvkxYmD5R0gQ,19074
|
|
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.13.dist-info/METADATA,sha256=mfY152t-Btg88BMPFFd897P1i6obXXUIg8Gc2OMQ2ds,3861
|
|
23
|
+
nexus_tui-0.1.13.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
24
|
+
nexus_tui-0.1.13.dist-info/entry_points.txt,sha256=FLWKPqsNYxxaU0JyVfJoKJDTrFtx-LJVPejbvUdnc6o,41
|
|
25
|
+
nexus_tui-0.1.13.dist-info/licenses/LICENSE,sha256=gtmNw2nOOujPlKSYxW0EQC-cg2aSe--mVlMxElz5AmI,1062
|
|
26
|
+
nexus_tui-0.1.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|