sa-assistant 0.2.2__py3-none-any.whl → 0.2.4__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.
- {sa_assistant-0.2.2.dist-info → sa_assistant-0.2.4.dist-info}/METADATA +1 -1
- {sa_assistant-0.2.2.dist-info → sa_assistant-0.2.4.dist-info}/RECORD +7 -7
- tui/app.py +11 -4
- tui/styles.tcss +0 -1
- {sa_assistant-0.2.2.dist-info → sa_assistant-0.2.4.dist-info}/WHEEL +0 -0
- {sa_assistant-0.2.2.dist-info → sa_assistant-0.2.4.dist-info}/entry_points.txt +0 -0
- {sa_assistant-0.2.2.dist-info → sa_assistant-0.2.4.dist-info}/top_level.txt +0 -0
|
@@ -19,10 +19,10 @@ model/load.py,sha256=HTD4RCqoyTwASGBC3AaMEhFVrXwu3bN_URcxLbNSzVk,3036
|
|
|
19
19
|
prompts/__init__.py,sha256=gwn1ncE7d-zuoe1pRI5uwElTQQvO8cJgwZqQEJ6oPYs,1518
|
|
20
20
|
prompts/system_prompts.py,sha256=DynDO1Kjwv_fZUm1nGvSTFGH-MEmS5J9w5U01Csn368,16241
|
|
21
21
|
tui/__init__.py,sha256=AhmFoE3tpm8UY9zYeHnlFRgYh7EDREZ7-W8Ke1RozkI,147
|
|
22
|
-
tui/app.py,sha256=
|
|
23
|
-
tui/styles.tcss,sha256=
|
|
24
|
-
sa_assistant-0.2.
|
|
25
|
-
sa_assistant-0.2.
|
|
26
|
-
sa_assistant-0.2.
|
|
27
|
-
sa_assistant-0.2.
|
|
28
|
-
sa_assistant-0.2.
|
|
22
|
+
tui/app.py,sha256=WImvFJhZKM9KwRSGz02Xx2HDm3NajaqpaLK2RhWYqyQ,12919
|
|
23
|
+
tui/styles.tcss,sha256=Xz8PVyi-yHPxyXO6dppQ9_wOZZIW2KAi2glletTJsdU,2769
|
|
24
|
+
sa_assistant-0.2.4.dist-info/METADATA,sha256=UyJheWwSM4jDUriY9e6JhSATHuKxE3b5bzOwgbcpkZI,3065
|
|
25
|
+
sa_assistant-0.2.4.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
26
|
+
sa_assistant-0.2.4.dist-info/entry_points.txt,sha256=TeU6i2gSZtrDvfygfvLvplx5Cb3-Z5eqdMwdzG9_eM0,78
|
|
27
|
+
sa_assistant-0.2.4.dist-info/top_level.txt,sha256=g9-TL1R8z-SyVwHtV25DDxAxOiWCgU1ql21VYgzvERc,52
|
|
28
|
+
sa_assistant-0.2.4.dist-info/RECORD,,
|
tui/app.py
CHANGED
|
@@ -26,7 +26,7 @@ from agentskills import discover_skills, generate_skills_prompt, create_skill_to
|
|
|
26
26
|
|
|
27
27
|
CSS_PATH = Path(__file__).parent / "styles.tcss"
|
|
28
28
|
SKILLS_DIR = Path(__file__).parent.parent / "skills"
|
|
29
|
-
VERSION = "0.2.
|
|
29
|
+
VERSION = "0.2.4"
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class SessionHeader(Static):
|
|
@@ -263,6 +263,7 @@ class SAAssistantApp(App):
|
|
|
263
263
|
self._agent: Optional[Agent] = None
|
|
264
264
|
self._current_panel: Optional[MessagePanel] = None
|
|
265
265
|
self._response_buffer = ""
|
|
266
|
+
self._seen_tool_ids: set[str] = set() # Track tool_use IDs to prevent duplicates
|
|
266
267
|
self._init_agent()
|
|
267
268
|
|
|
268
269
|
def _init_agent(self) -> None:
|
|
@@ -306,8 +307,12 @@ class SAAssistantApp(App):
|
|
|
306
307
|
if "current_tool_use" in kwargs:
|
|
307
308
|
tool_use = kwargs["current_tool_use"]
|
|
308
309
|
if isinstance(tool_use, dict):
|
|
310
|
+
tool_id = tool_use.get("id", "")
|
|
309
311
|
tool_name = tool_use.get("name", "tool")
|
|
310
|
-
|
|
312
|
+
# Only add panel once per unique tool_use ID
|
|
313
|
+
if tool_id and tool_id not in self._seen_tool_ids:
|
|
314
|
+
self._seen_tool_ids.add(tool_id)
|
|
315
|
+
self.call_from_thread(self._add_tool_panel, tool_name)
|
|
311
316
|
|
|
312
317
|
def _add_tool_panel(self, tool_name: str) -> None:
|
|
313
318
|
"""Add a tool execution panel to the chat."""
|
|
@@ -318,9 +323,10 @@ class SAAssistantApp(App):
|
|
|
318
323
|
"""Compose the UI layout."""
|
|
319
324
|
yield SessionHeader()
|
|
320
325
|
yield ChatContainer()
|
|
321
|
-
yield
|
|
326
|
+
# Bottom elements: yield in order from bottom to top
|
|
327
|
+
yield HotkeyBar() # Very bottom
|
|
322
328
|
yield Input(placeholder="Type your message... (Enter to send)", id="input-field")
|
|
323
|
-
yield
|
|
329
|
+
yield AgentIndicator() # Above input
|
|
324
330
|
|
|
325
331
|
def on_mount(self) -> None:
|
|
326
332
|
"""Focus the input field on mount."""
|
|
@@ -347,6 +353,7 @@ class SAAssistantApp(App):
|
|
|
347
353
|
# Prepare for assistant response
|
|
348
354
|
self._current_panel = chat.add_assistant_message()
|
|
349
355
|
self._response_buffer = ""
|
|
356
|
+
self._seen_tool_ids.clear() # Reset for new conversation turn
|
|
350
357
|
|
|
351
358
|
# Run agent in background thread
|
|
352
359
|
self.run_agent(user_input)
|
tui/styles.tcss
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|