shotgun-sh 0.2.8.dev4__py3-none-any.whl → 0.2.9.dev1__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.

Potentially problematic release.


This version of shotgun-sh might be problematic. Click here for more details.

@@ -506,9 +506,28 @@ class ChatScreen(Screen[None]):
506
506
  self.partial_message = event.message
507
507
  history = self.query_one(ChatHistory)
508
508
 
509
+ # Filter event.messages to exclude ModelRequest with only ToolReturnPart
510
+ # These are intermediate tool results that would render as empty (UserQuestionWidget
511
+ # filters out ToolReturnPart in format_prompt_parts), causing user messages to disappear
512
+ from pydantic_ai.messages import ToolReturnPart
513
+
514
+ filtered_event_messages: list[ModelMessage] = []
515
+ for msg in event.messages:
516
+ if isinstance(msg, ModelRequest):
517
+ # Check if this ModelRequest has any user-visible parts
518
+ has_user_content = any(
519
+ not isinstance(part, ToolReturnPart) for part in msg.parts
520
+ )
521
+ if has_user_content:
522
+ filtered_event_messages.append(msg)
523
+ # Skip ModelRequest with only ToolReturnPart
524
+ else:
525
+ # Keep all ModelResponse and other message types
526
+ filtered_event_messages.append(msg)
527
+
509
528
  # Only update messages if the message list changed
510
529
  new_message_list = self.messages + cast(
511
- list[ModelMessage | HintMessage], event.messages
530
+ list[ModelMessage | HintMessage], filtered_event_messages
512
531
  )
513
532
  if len(new_message_list) != len(history.items):
514
533
  history.update_messages(new_message_list)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shotgun-sh
3
- Version: 0.2.8.dev4
3
+ Version: 0.2.9.dev1
4
4
  Summary: AI-powered research, planning, and task management CLI tool
5
5
  Project-URL: Homepage, https://shotgun.sh/
6
6
  Project-URL: Repository, https://github.com/shotgun-sh/shotgun
@@ -127,7 +127,7 @@ shotgun/tui/components/prompt_input.py,sha256=Ss-htqraHZAPaehGE4x86ij0veMjc4Ugad
127
127
  shotgun/tui/components/spinner.py,sha256=ovTDeaJ6FD6chZx_Aepia6R3UkPOVJ77EKHfRmn39MY,2427
128
128
  shotgun/tui/components/splash.py,sha256=vppy9vEIEvywuUKRXn2y11HwXSRkQZHLYoVjhDVdJeU,1267
129
129
  shotgun/tui/components/vertical_tail.py,sha256=kROwTaRjUwVB7H35dtmNcUVPQqNYvvfq7K2tXBKEb6c,638
130
- shotgun/tui/screens/chat.py,sha256=v3MR0RoQOUeZ0e3W-sxBXM7eANq7ve7zCM-tkv386JA,37773
130
+ shotgun/tui/screens/chat.py,sha256=D_HKVSOjT1ex3AHRtE41hTmDKiiUmmHY7BIbHvTyj-w,38747
131
131
  shotgun/tui/screens/chat.tcss,sha256=2Yq3E23jxsySYsgZf4G1AYrYVcpX0UDW6kNNI0tDmtM,437
132
132
  shotgun/tui/screens/directory_setup.py,sha256=lIZ1J4A6g5Q2ZBX8epW7BhR96Dmdcg22CyiM5S-I5WU,3237
133
133
  shotgun/tui/screens/feedback.py,sha256=VxpW0PVxMp22ZvSfQkTtgixNrpEOlfWtekjqlVfYEjA,5708
@@ -148,8 +148,8 @@ shotgun/utils/env_utils.py,sha256=ulM3BRi9ZhS7uC-zorGeDQm4SHvsyFuuU9BtVPqdrHY,14
148
148
  shotgun/utils/file_system_utils.py,sha256=l-0p1bEHF34OU19MahnRFdClHufThfGAjQ431teAIp0,1004
149
149
  shotgun/utils/source_detection.py,sha256=Co6Q03R3fT771TF3RzB-70stfjNP2S4F_ArZKibwzm8,454
150
150
  shotgun/utils/update_checker.py,sha256=IgzPHRhS1ETH7PnJR_dIx6lxgr1qHpCkMTgzUxvGjhI,7586
151
- shotgun_sh-0.2.8.dev4.dist-info/METADATA,sha256=v-t-QSlw3TNyHCqVXVaBmw8QeZFUzPgzn9RUYg7P_IE,4299
152
- shotgun_sh-0.2.8.dev4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
153
- shotgun_sh-0.2.8.dev4.dist-info/entry_points.txt,sha256=asZxLU4QILneq0MWW10saVCZc4VWhZfb0wFZvERnzfA,45
154
- shotgun_sh-0.2.8.dev4.dist-info/licenses/LICENSE,sha256=YebsZl590zCHrF_acCU5pmNt0pnAfD2DmAnevJPB1tY,1065
155
- shotgun_sh-0.2.8.dev4.dist-info/RECORD,,
151
+ shotgun_sh-0.2.9.dev1.dist-info/METADATA,sha256=pwboOMILOv47b9GxLmWiURNBJuJkKdEt8NnpQerH6kQ,4299
152
+ shotgun_sh-0.2.9.dev1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
153
+ shotgun_sh-0.2.9.dev1.dist-info/entry_points.txt,sha256=asZxLU4QILneq0MWW10saVCZc4VWhZfb0wFZvERnzfA,45
154
+ shotgun_sh-0.2.9.dev1.dist-info/licenses/LICENSE,sha256=YebsZl590zCHrF_acCU5pmNt0pnAfD2DmAnevJPB1tY,1065
155
+ shotgun_sh-0.2.9.dev1.dist-info/RECORD,,