sa-assistant 0.2.3__py3-none-any.whl → 0.2.5__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sa-assistant
3
- Version: 0.2.3
3
+ Version: 0.2.5
4
4
  Summary: SA Assistant - AWS Solutions Architect Professional Agent with Multi-Agent Architecture
5
5
  Author-email: onesuit <wltks2155@gmail.com>
6
6
  License: MIT
@@ -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=q4yll7stN5dh6A5QejxZg6X7nZbxb2an77jXDmUkMV8,12433
22
+ tui/app.py,sha256=eERgn-2vHRk1d2BgVrTCi6k-_io5GuwWINrDYfMsbkQ,13042
23
23
  tui/styles.tcss,sha256=Xz8PVyi-yHPxyXO6dppQ9_wOZZIW2KAi2glletTJsdU,2769
24
- sa_assistant-0.2.3.dist-info/METADATA,sha256=smWcUjScPo-ynUYfstP-rHMrrJqHqhu7aO3V_6EyqAc,3065
25
- sa_assistant-0.2.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
26
- sa_assistant-0.2.3.dist-info/entry_points.txt,sha256=TeU6i2gSZtrDvfygfvLvplx5Cb3-Z5eqdMwdzG9_eM0,78
27
- sa_assistant-0.2.3.dist-info/top_level.txt,sha256=g9-TL1R8z-SyVwHtV25DDxAxOiWCgU1ql21VYgzvERc,52
28
- sa_assistant-0.2.3.dist-info/RECORD,,
24
+ sa_assistant-0.2.5.dist-info/METADATA,sha256=HmJgklnJkgBs0my8dSPWT8kdN044RTgTXRiDzyc1iqk,3065
25
+ sa_assistant-0.2.5.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
26
+ sa_assistant-0.2.5.dist-info/entry_points.txt,sha256=TeU6i2gSZtrDvfygfvLvplx5Cb3-Z5eqdMwdzG9_eM0,78
27
+ sa_assistant-0.2.5.dist-info/top_level.txt,sha256=g9-TL1R8z-SyVwHtV25DDxAxOiWCgU1ql21VYgzvERc,52
28
+ sa_assistant-0.2.5.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.3"
29
+ VERSION = "0.2.5"
30
30
 
31
31
 
32
32
  class SessionHeader(Static):
@@ -154,6 +154,7 @@ class MessagePanel(Vertical):
154
154
 
155
155
  def update_content(self, text: str) -> None:
156
156
  """Replace all content."""
157
+ self._content = text # Store content for later if _log not ready
157
158
  if self._log:
158
159
  self._log.clear()
159
160
  self._log.write(text)
@@ -263,6 +264,7 @@ class SAAssistantApp(App):
263
264
  self._agent: Optional[Agent] = None
264
265
  self._current_panel: Optional[MessagePanel] = None
265
266
  self._response_buffer = ""
267
+ self._seen_tool_ids: set[str] = set() # Track tool_use IDs to prevent duplicates
266
268
  self._init_agent()
267
269
 
268
270
  def _init_agent(self) -> None:
@@ -306,8 +308,12 @@ class SAAssistantApp(App):
306
308
  if "current_tool_use" in kwargs:
307
309
  tool_use = kwargs["current_tool_use"]
308
310
  if isinstance(tool_use, dict):
311
+ tool_id = tool_use.get("toolUseId", "") # Fixed: was "id", should be "toolUseId"
309
312
  tool_name = tool_use.get("name", "tool")
310
- self.call_from_thread(self._add_tool_panel, tool_name)
313
+ # Only add panel once per unique tool_use ID
314
+ if tool_id and tool_id not in self._seen_tool_ids:
315
+ self._seen_tool_ids.add(tool_id)
316
+ self.call_from_thread(self._add_tool_panel, tool_name)
311
317
 
312
318
  def _add_tool_panel(self, tool_name: str) -> None:
313
319
  """Add a tool execution panel to the chat."""
@@ -318,9 +324,10 @@ class SAAssistantApp(App):
318
324
  """Compose the UI layout."""
319
325
  yield SessionHeader()
320
326
  yield ChatContainer()
321
- yield AgentIndicator()
327
+ # Bottom elements: yield in order from bottom to top
328
+ yield HotkeyBar() # Very bottom
322
329
  yield Input(placeholder="Type your message... (Enter to send)", id="input-field")
323
- yield HotkeyBar()
330
+ yield AgentIndicator() # Above input
324
331
 
325
332
  def on_mount(self) -> None:
326
333
  """Focus the input field on mount."""
@@ -347,6 +354,7 @@ class SAAssistantApp(App):
347
354
  # Prepare for assistant response
348
355
  self._current_panel = chat.add_assistant_message()
349
356
  self._response_buffer = ""
357
+ self._seen_tool_ids.clear() # Reset for new conversation turn
350
358
 
351
359
  # Run agent in background thread
352
360
  self.run_agent(user_input)