shotgun-sh 0.1.9__tar.gz → 0.1.10.dev1__tar.gz

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.

Files changed (132) hide show
  1. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/PKG-INFO +1 -1
  2. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/pyproject.toml +1 -1
  3. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/agent_manager.py +2 -5
  4. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/build_constants.py +2 -2
  5. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/screens/chat_screen/history.py +43 -4
  6. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/.gitignore +0 -0
  7. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/LICENSE +0 -0
  8. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/README.md +0 -0
  9. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/hatch_build.py +0 -0
  10. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/__init__.py +0 -0
  11. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/__init__.py +0 -0
  12. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/common.py +0 -0
  13. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/config/__init__.py +0 -0
  14. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/config/constants.py +0 -0
  15. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/config/manager.py +0 -0
  16. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/config/models.py +0 -0
  17. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/config/provider.py +0 -0
  18. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/conversation_history.py +0 -0
  19. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/conversation_manager.py +0 -0
  20. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/export.py +0 -0
  21. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/history/__init__.py +0 -0
  22. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/history/compaction.py +0 -0
  23. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/history/constants.py +0 -0
  24. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/history/context_extraction.py +0 -0
  25. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/history/history_building.py +0 -0
  26. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/history/history_processors.py +0 -0
  27. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/history/message_utils.py +0 -0
  28. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/history/token_counting.py +0 -0
  29. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/history/token_estimation.py +0 -0
  30. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/messages.py +0 -0
  31. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/models.py +0 -0
  32. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/plan.py +0 -0
  33. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/research.py +0 -0
  34. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/specify.py +0 -0
  35. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/tasks.py +0 -0
  36. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/tools/__init__.py +0 -0
  37. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/tools/codebase/__init__.py +0 -0
  38. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/tools/codebase/codebase_shell.py +0 -0
  39. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/tools/codebase/directory_lister.py +0 -0
  40. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/tools/codebase/file_read.py +0 -0
  41. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/tools/codebase/models.py +0 -0
  42. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/tools/codebase/query_graph.py +0 -0
  43. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/tools/codebase/retrieve_code.py +0 -0
  44. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/tools/file_management.py +0 -0
  45. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/tools/user_interaction.py +0 -0
  46. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/tools/web_search/__init__.py +0 -0
  47. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/tools/web_search/anthropic.py +0 -0
  48. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/tools/web_search/gemini.py +0 -0
  49. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/tools/web_search/openai.py +0 -0
  50. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/agents/tools/web_search/utils.py +0 -0
  51. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/cli/__init__.py +0 -0
  52. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/cli/codebase/__init__.py +0 -0
  53. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/cli/codebase/commands.py +0 -0
  54. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/cli/codebase/models.py +0 -0
  55. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/cli/config.py +0 -0
  56. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/cli/export.py +0 -0
  57. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/cli/models.py +0 -0
  58. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/cli/plan.py +0 -0
  59. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/cli/research.py +0 -0
  60. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/cli/specify.py +0 -0
  61. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/cli/tasks.py +0 -0
  62. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/cli/update.py +0 -0
  63. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/cli/utils.py +0 -0
  64. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/codebase/__init__.py +0 -0
  65. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/codebase/core/__init__.py +0 -0
  66. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/codebase/core/change_detector.py +0 -0
  67. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/codebase/core/code_retrieval.py +0 -0
  68. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/codebase/core/cypher_models.py +0 -0
  69. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/codebase/core/ingestor.py +0 -0
  70. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/codebase/core/language_config.py +0 -0
  71. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/codebase/core/manager.py +0 -0
  72. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/codebase/core/nl_query.py +0 -0
  73. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/codebase/core/parser_loader.py +0 -0
  74. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/codebase/models.py +0 -0
  75. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/codebase/service.py +0 -0
  76. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/logging_config.py +0 -0
  77. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/main.py +0 -0
  78. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/posthog_telemetry.py +0 -0
  79. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/__init__.py +0 -0
  80. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/agents/__init__.py +0 -0
  81. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/agents/export.j2 +0 -0
  82. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/agents/partials/codebase_understanding.j2 +0 -0
  83. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/agents/partials/common_agent_system_prompt.j2 +0 -0
  84. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/agents/partials/content_formatting.j2 +0 -0
  85. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/agents/partials/interactive_mode.j2 +0 -0
  86. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/agents/plan.j2 +0 -0
  87. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/agents/research.j2 +0 -0
  88. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/agents/specify.j2 +0 -0
  89. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/agents/state/codebase/codebase_graphs_available.j2 +0 -0
  90. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/agents/state/system_state.j2 +0 -0
  91. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/agents/tasks.j2 +0 -0
  92. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/codebase/__init__.py +0 -0
  93. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/codebase/cypher_query_patterns.j2 +0 -0
  94. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/codebase/cypher_system.j2 +0 -0
  95. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/codebase/enhanced_query_context.j2 +0 -0
  96. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/codebase/partials/cypher_rules.j2 +0 -0
  97. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/codebase/partials/graph_schema.j2 +0 -0
  98. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/codebase/partials/temporal_context.j2 +0 -0
  99. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/history/__init__.py +0 -0
  100. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/history/incremental_summarization.j2 +0 -0
  101. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/history/summarization.j2 +0 -0
  102. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/prompts/loader.py +0 -0
  103. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/py.typed +0 -0
  104. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/sdk/__init__.py +0 -0
  105. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/sdk/codebase.py +0 -0
  106. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/sdk/exceptions.py +0 -0
  107. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/sdk/models.py +0 -0
  108. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/sdk/services.py +0 -0
  109. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/sentry_telemetry.py +0 -0
  110. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/telemetry.py +0 -0
  111. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/__init__.py +0 -0
  112. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/app.py +0 -0
  113. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/commands/__init__.py +0 -0
  114. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/components/prompt_input.py +0 -0
  115. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/components/spinner.py +0 -0
  116. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/components/splash.py +0 -0
  117. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/components/vertical_tail.py +0 -0
  118. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/screens/chat.py +0 -0
  119. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/screens/chat.tcss +0 -0
  120. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/screens/chat_screen/__init__.py +0 -0
  121. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/screens/chat_screen/command_providers.py +0 -0
  122. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/screens/chat_screen/hint_message.py +0 -0
  123. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/screens/directory_setup.py +0 -0
  124. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/screens/provider_config.py +0 -0
  125. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/screens/splash.py +0 -0
  126. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/styles.tcss +0 -0
  127. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/utils/__init__.py +0 -0
  128. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/tui/utils/mode_progress.py +0 -0
  129. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/utils/__init__.py +0 -0
  130. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/utils/env_utils.py +0 -0
  131. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/utils/file_system_utils.py +0 -0
  132. {shotgun_sh-0.1.9 → shotgun_sh-0.1.10.dev1}/src/shotgun/utils/update_checker.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shotgun-sh
3
- Version: 0.1.9
3
+ Version: 0.1.10.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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "shotgun-sh"
3
- version = "0.1.9"
3
+ version = "0.1.10.dev1"
4
4
  description = "AI-powered research, planning, and task management CLI tool"
5
5
  readme = "README.md"
6
6
  license = { text = "MIT" }
@@ -277,6 +277,8 @@ class AgentManager(Widget):
277
277
 
278
278
  # Clear file tracker before each run to track only this run's operations
279
279
  deps.file_tracker.clear()
280
+ # preprocess messages; maybe we need to include the user answer in the message history
281
+
280
282
  original_messages = self.ui_message_history.copy()
281
283
 
282
284
  if prompt:
@@ -477,11 +479,6 @@ class AgentManager(Widget):
477
479
  elif isinstance(event, FunctionToolResultEvent):
478
480
  request_message = ModelRequest(parts=[event.result])
479
481
  state.messages.append(request_message)
480
- if (
481
- event.result.tool_name == "ask_user"
482
- ): # special handling to ask_user, because deferred tool results mean we missed the user response
483
- self.ui_message_history.append(request_message)
484
- self._post_messages_updated()
485
482
  ## this is what the user responded with
486
483
  self._post_partial_message(is_last=False)
487
484
 
@@ -12,8 +12,8 @@ POSTHOG_API_KEY = ''
12
12
  POSTHOG_PROJECT_ID = '191396'
13
13
 
14
14
  # Logfire configuration embedded at build time (only for dev builds)
15
- LOGFIRE_ENABLED = ''
16
- LOGFIRE_TOKEN = ''
15
+ LOGFIRE_ENABLED = 'true'
16
+ LOGFIRE_TOKEN = 'pylf_v1_us_KZ5NM1pP3NwgJkbBJt6Ftdzk8mMhmrXcGJHQQgDJ1LfK'
17
17
 
18
18
  # Build metadata
19
19
  BUILD_TIME_ENV = "production" if SENTRY_DSN else "development"
@@ -1,5 +1,5 @@
1
1
  import json
2
- from collections.abc import Sequence
2
+ from collections.abc import Generator, Sequence
3
3
 
4
4
  from pydantic_ai.messages import (
5
5
  BuiltinToolCallPart,
@@ -19,6 +19,7 @@ from textual.reactive import reactive
19
19
  from textual.widget import Widget
20
20
  from textual.widgets import Markdown
21
21
 
22
+ from shotgun.agents.models import UserAnswer
22
23
  from shotgun.tui.components.vertical_tail import VerticalTail
23
24
  from shotgun.tui.screens.chat_screen.hint_message import HintMessage, HintMessageWidget
24
25
 
@@ -86,7 +87,7 @@ class ChatHistory(Widget):
86
87
  self.vertical_tail = VerticalTail()
87
88
 
88
89
  with self.vertical_tail:
89
- for item in self.items:
90
+ for item in self.filtered_items():
90
91
  if isinstance(item, ModelRequest):
91
92
  yield UserQuestionWidget(item)
92
93
  elif isinstance(item, HintMessage):
@@ -98,6 +99,44 @@ class ChatHistory(Widget):
98
99
  )
99
100
  self.call_later(self.autoscroll)
100
101
 
102
+ def filtered_items(self) -> Generator[ModelMessage | HintMessage, None, None]:
103
+ for idx, next_item in enumerate(self.items):
104
+ prev_item = self.items[idx - 1] if idx > 0 else None
105
+
106
+ if isinstance(prev_item, ModelRequest) and isinstance(
107
+ next_item, ModelResponse
108
+ ):
109
+ ask_user_tool_response_part = next(
110
+ (
111
+ part
112
+ for part in prev_item.parts
113
+ if isinstance(part, ToolReturnPart)
114
+ and part.tool_name == "ask_user"
115
+ ),
116
+ None,
117
+ )
118
+
119
+ ask_user_part = next(
120
+ (
121
+ part
122
+ for part in next_item.parts
123
+ if isinstance(part, ToolCallPart)
124
+ and part.tool_name == "ask_user"
125
+ ),
126
+ None,
127
+ )
128
+
129
+ if not ask_user_part or not ask_user_tool_response_part:
130
+ yield next_item
131
+ continue
132
+ if (
133
+ ask_user_tool_response_part.tool_call_id
134
+ == ask_user_part.tool_call_id
135
+ ):
136
+ continue # don't emit tool call that happens after tool response
137
+
138
+ yield next_item
139
+
101
140
  def update_messages(self, messages: list[ModelMessage | HintMessage]) -> None:
102
141
  """Update the displayed messages without recomposing."""
103
142
  if not self.vertical_tail:
@@ -133,8 +172,8 @@ class UserQuestionWidget(Widget):
133
172
  f"**>** {part.content if isinstance(part.content, str) else ''}\n\n"
134
173
  )
135
174
  elif isinstance(part, ToolReturnPart):
136
- if part.tool_name == "ask_user" and isinstance(part.content, dict):
137
- acc += f"**>** {part.content['answer']}\n\n"
175
+ if part.tool_name == "ask_user":
176
+ acc += f"**>** {part.content.answer if isinstance(part.content, UserAnswer) else part.content['answer']}\n\n"
138
177
  else:
139
178
  # acc += " ∟ finished\n\n" # let's not show anything yet
140
179
  pass
File without changes
File without changes
File without changes