shotgun-sh 0.1.13__tar.gz → 0.1.14__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 (134) hide show
  1. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/PKG-INFO +1 -1
  2. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/pyproject.toml +1 -1
  3. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/agent_manager.py +20 -24
  4. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/codebase/core/manager.py +11 -21
  5. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/screens/chat.py +2 -21
  6. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/.gitignore +0 -0
  7. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/LICENSE +0 -0
  8. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/README.md +0 -0
  9. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/hatch_build.py +0 -0
  10. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/__init__.py +0 -0
  11. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/__init__.py +0 -0
  12. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/common.py +0 -0
  13. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/config/__init__.py +0 -0
  14. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/config/constants.py +0 -0
  15. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/config/manager.py +0 -0
  16. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/config/models.py +0 -0
  17. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/config/provider.py +0 -0
  18. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/conversation_history.py +0 -0
  19. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/conversation_manager.py +0 -0
  20. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/export.py +0 -0
  21. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/history/__init__.py +0 -0
  22. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/history/compaction.py +0 -0
  23. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/history/constants.py +0 -0
  24. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/history/context_extraction.py +0 -0
  25. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/history/history_building.py +0 -0
  26. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/history/history_processors.py +0 -0
  27. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/history/message_utils.py +0 -0
  28. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/history/token_counting.py +0 -0
  29. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/history/token_estimation.py +0 -0
  30. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/messages.py +0 -0
  31. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/models.py +0 -0
  32. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/plan.py +0 -0
  33. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/research.py +0 -0
  34. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/specify.py +0 -0
  35. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/tasks.py +0 -0
  36. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/tools/__init__.py +0 -0
  37. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/tools/codebase/__init__.py +0 -0
  38. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/tools/codebase/codebase_shell.py +0 -0
  39. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/tools/codebase/directory_lister.py +0 -0
  40. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/tools/codebase/file_read.py +0 -0
  41. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/tools/codebase/models.py +0 -0
  42. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/tools/codebase/query_graph.py +0 -0
  43. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/tools/codebase/retrieve_code.py +0 -0
  44. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/tools/file_management.py +0 -0
  45. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/tools/user_interaction.py +0 -0
  46. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/tools/web_search/__init__.py +0 -0
  47. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/tools/web_search/anthropic.py +0 -0
  48. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/tools/web_search/gemini.py +0 -0
  49. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/tools/web_search/openai.py +0 -0
  50. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/agents/tools/web_search/utils.py +0 -0
  51. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/build_constants.py +0 -0
  52. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/cli/__init__.py +0 -0
  53. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/cli/codebase/__init__.py +0 -0
  54. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/cli/codebase/commands.py +0 -0
  55. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/cli/codebase/models.py +0 -0
  56. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/cli/config.py +0 -0
  57. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/cli/export.py +0 -0
  58. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/cli/models.py +0 -0
  59. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/cli/plan.py +0 -0
  60. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/cli/research.py +0 -0
  61. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/cli/specify.py +0 -0
  62. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/cli/tasks.py +0 -0
  63. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/cli/update.py +0 -0
  64. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/cli/utils.py +0 -0
  65. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/codebase/__init__.py +0 -0
  66. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/codebase/core/__init__.py +0 -0
  67. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/codebase/core/change_detector.py +0 -0
  68. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/codebase/core/code_retrieval.py +0 -0
  69. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/codebase/core/cypher_models.py +0 -0
  70. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/codebase/core/ingestor.py +0 -0
  71. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/codebase/core/language_config.py +0 -0
  72. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/codebase/core/nl_query.py +0 -0
  73. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/codebase/core/parser_loader.py +0 -0
  74. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/codebase/models.py +0 -0
  75. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/codebase/service.py +0 -0
  76. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/logging_config.py +0 -0
  77. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/main.py +0 -0
  78. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/posthog_telemetry.py +0 -0
  79. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/__init__.py +0 -0
  80. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/agents/__init__.py +0 -0
  81. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/agents/export.j2 +0 -0
  82. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/agents/partials/codebase_understanding.j2 +0 -0
  83. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/agents/partials/common_agent_system_prompt.j2 +0 -0
  84. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/agents/partials/content_formatting.j2 +0 -0
  85. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/agents/partials/interactive_mode.j2 +0 -0
  86. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/agents/plan.j2 +0 -0
  87. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/agents/research.j2 +0 -0
  88. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/agents/specify.j2 +0 -0
  89. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/agents/state/codebase/codebase_graphs_available.j2 +0 -0
  90. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/agents/state/system_state.j2 +0 -0
  91. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/agents/tasks.j2 +0 -0
  92. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/codebase/__init__.py +0 -0
  93. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/codebase/cypher_query_patterns.j2 +0 -0
  94. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/codebase/cypher_system.j2 +0 -0
  95. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/codebase/enhanced_query_context.j2 +0 -0
  96. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/codebase/partials/cypher_rules.j2 +0 -0
  97. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/codebase/partials/graph_schema.j2 +0 -0
  98. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/codebase/partials/temporal_context.j2 +0 -0
  99. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/history/__init__.py +0 -0
  100. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/history/incremental_summarization.j2 +0 -0
  101. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/history/summarization.j2 +0 -0
  102. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/prompts/loader.py +0 -0
  103. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/py.typed +0 -0
  104. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/sdk/__init__.py +0 -0
  105. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/sdk/codebase.py +0 -0
  106. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/sdk/exceptions.py +0 -0
  107. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/sdk/models.py +0 -0
  108. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/sdk/services.py +0 -0
  109. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/sentry_telemetry.py +0 -0
  110. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/telemetry.py +0 -0
  111. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/__init__.py +0 -0
  112. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/app.py +0 -0
  113. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/commands/__init__.py +0 -0
  114. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/components/prompt_input.py +0 -0
  115. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/components/spinner.py +0 -0
  116. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/components/splash.py +0 -0
  117. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/components/vertical_tail.py +0 -0
  118. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/filtered_codebase_service.py +0 -0
  119. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/screens/chat.tcss +0 -0
  120. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/screens/chat_screen/__init__.py +0 -0
  121. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/screens/chat_screen/command_providers.py +0 -0
  122. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/screens/chat_screen/hint_message.py +0 -0
  123. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/screens/chat_screen/history.py +0 -0
  124. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/screens/directory_setup.py +0 -0
  125. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/screens/provider_config.py +0 -0
  126. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/screens/splash.py +0 -0
  127. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/styles.tcss +0 -0
  128. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/utils/__init__.py +0 -0
  129. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/tui/utils/mode_progress.py +0 -0
  130. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/utils/__init__.py +0 -0
  131. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/utils/env_utils.py +0 -0
  132. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/utils/file_system_utils.py +0 -0
  133. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/src/shotgun/utils/source_detection.py +0 -0
  134. {shotgun_sh-0.1.13 → shotgun_sh-0.1.14}/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.13
3
+ Version: 0.1.14
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.13"
3
+ version = "0.1.14"
4
4
  description = "AI-powered research, planning, and task management CLI tool"
5
5
  readme = "README.md"
6
6
  license = { text = "MIT" }
@@ -31,7 +31,6 @@ from pydantic_ai.messages import (
31
31
  SystemPromptPart,
32
32
  ToolCallPart,
33
33
  ToolCallPartDelta,
34
- ToolReturnPart,
35
34
  )
36
35
  from textual.message import Message
37
36
  from textual.widget import Widget
@@ -273,8 +272,15 @@ class AgentManager(Widget):
273
272
  # Use merged deps (shared state + agent-specific system prompt) if not provided
274
273
  if deps is None:
275
274
  deps = self._create_merged_deps(self._current_agent_type)
276
- if not deferred_tool_results:
277
- self.ensure_agent_canecelled_safely()
275
+ ask_user_part = self.get_unanswered_ask_user_part()
276
+ if ask_user_part and prompt:
277
+ if not deferred_tool_results:
278
+ deferred_tool_results = DeferredToolResults()
279
+ deferred_tool_results.calls[ask_user_part.tool_call_id] = UserAnswer(
280
+ answer=prompt,
281
+ tool_call_id=ask_user_part.tool_call_id,
282
+ )
283
+ prompt = None
278
284
 
279
285
  # Ensure deps is not None
280
286
  if deps is None:
@@ -677,31 +683,21 @@ class AgentManager(Widget):
677
683
  self.ui_message_history.append(message)
678
684
  self._post_messages_updated()
679
685
 
680
- def ensure_agent_canecelled_safely(self) -> None:
686
+ def get_unanswered_ask_user_part(self) -> ToolCallPart | None:
681
687
  if not self.message_history:
682
- return
688
+ return None
683
689
  self.last_response = self.message_history[-1]
684
690
  ## we're searching for unanswered ask_user parts
685
- found_tool = None
686
- for part in self.message_history[-1].parts:
687
- if isinstance(part, ToolCallPart) and part.tool_name == "ask_user":
688
- found_tool = part
689
- break
690
- if not found_tool:
691
- return
692
- tool_result = ModelRequest(
693
- parts=[
694
- ToolReturnPart(
695
- tool_call_id=found_tool.tool_call_id,
696
- tool_name=found_tool.tool_name,
697
- content=UserAnswer(
698
- answer="⚠️ Operation cancelled by user",
699
- tool_call_id=found_tool.tool_call_id,
700
- ),
701
- )
702
- ]
691
+ found_tool = next(
692
+ (
693
+ part
694
+ for part in self.message_history[-1].parts
695
+ if isinstance(part, ToolCallPart) and part.tool_name == "ask_user"
696
+ ),
697
+ None,
703
698
  )
704
- self.message_history.append(tool_result)
699
+
700
+ return found_tool
705
701
 
706
702
 
707
703
  # Re-export AgentType for backward compatibility
@@ -1221,26 +1221,11 @@ class CodebaseGraphManager:
1221
1221
 
1222
1222
  removed_graphs = []
1223
1223
 
1224
- # Find all .kuzu files (can be files or directories)
1224
+ # Find all .kuzu databases (files in v0.11.2, directories in newer versions)
1225
1225
  for path in self.storage_dir.glob("*.kuzu"):
1226
1226
  graph_id = path.stem
1227
1227
 
1228
- # If it's a plain file (not a directory), it's corrupted
1229
- # Valid Kuzu databases are always directories
1230
- if path.is_file():
1231
- logger.warning(
1232
- f"Detected corrupted database file (should be directory) at {path}, removing it"
1233
- )
1234
- try:
1235
- await anyio.to_thread.run_sync(path.unlink)
1236
- removed_graphs.append(graph_id)
1237
- logger.info(f"Removed corrupted database file: {graph_id}")
1238
- except Exception as e:
1239
- logger.error(
1240
- f"Failed to remove corrupted database file {graph_id}: {e}"
1241
- )
1242
- continue
1243
-
1228
+ # Try to open and validate the database
1244
1229
  try:
1245
1230
  # Try to open the database with a timeout to prevent hanging
1246
1231
  async def try_open_database(
@@ -1346,7 +1331,7 @@ class CodebaseGraphManager:
1346
1331
  """
1347
1332
  graphs = []
1348
1333
 
1349
- # Find all .kuzu files
1334
+ # Find all .kuzu database files (Kuzu v0.11.2 creates files, not directories)
1350
1335
  for path in self.storage_dir.glob("*.kuzu"):
1351
1336
  if path.is_file():
1352
1337
  graph_id = path.stem
@@ -1439,6 +1424,8 @@ class CodebaseGraphManager:
1439
1424
  Args:
1440
1425
  graph_id: Graph to delete
1441
1426
  """
1427
+ import shutil
1428
+
1442
1429
  # Stop watcher if running
1443
1430
  if graph_id in self._watchers:
1444
1431
  await self.stop_watcher(graph_id)
@@ -1453,11 +1440,14 @@ class CodebaseGraphManager:
1453
1440
  self._databases[graph_id].close()
1454
1441
  del self._databases[graph_id]
1455
1442
 
1456
- # Delete files
1443
+ # Delete database (files in v0.11.2, directories in newer versions)
1457
1444
  graph_path = self.storage_dir / f"{graph_id}.kuzu"
1458
1445
  if graph_path.exists():
1459
- # Delete the database file
1460
- await anyio.to_thread.run_sync(graph_path.unlink)
1446
+ if graph_path.is_dir():
1447
+ await anyio.to_thread.run_sync(shutil.rmtree, graph_path)
1448
+ else:
1449
+ # File-based database (Kuzu v0.11.2)
1450
+ await anyio.to_thread.run_sync(graph_path.unlink)
1461
1451
 
1462
1452
  # Also delete the WAL file if it exists
1463
1453
  wal_path = self.storage_dir / f"{graph_id}.kuzu.wal"
@@ -4,7 +4,7 @@ from dataclasses import dataclass
4
4
  from pathlib import Path
5
5
  from typing import cast
6
6
 
7
- from pydantic_ai import DeferredToolResults, RunContext
7
+ from pydantic_ai import RunContext
8
8
  from pydantic_ai.messages import (
9
9
  ModelMessage,
10
10
  ModelRequest,
@@ -37,7 +37,6 @@ from shotgun.agents.models import (
37
37
  AgentDeps,
38
38
  AgentType,
39
39
  FileOperationTracker,
40
- UserAnswer,
41
40
  UserQuestion,
42
41
  )
43
42
  from shotgun.codebase.core.manager import CodebaseAlreadyIndexedError
@@ -712,7 +711,6 @@ class ChatScreen(Screen[None]):
712
711
 
713
712
  @work
714
713
  async def run_agent(self, message: str) -> None:
715
- deferred_tool_results = None
716
714
  prompt = None
717
715
  self.working = True
718
716
 
@@ -721,32 +719,15 @@ class ChatScreen(Screen[None]):
721
719
 
722
720
  self._current_worker = get_current_worker()
723
721
 
724
- if self.question:
725
- # This is a response to a question from the agent
726
- self.question.result.set_result(
727
- UserAnswer(answer=message, tool_call_id=self.question.tool_call_id)
728
- )
729
-
730
- deferred_tool_results = DeferredToolResults()
731
-
732
- deferred_tool_results.calls[self.question.tool_call_id] = UserAnswer(
733
- answer=message, tool_call_id=self.question.tool_call_id
734
- )
735
-
736
- self.question = None
737
- else:
738
- # This is a new user prompt
739
- prompt = message
722
+ prompt = message
740
723
 
741
724
  try:
742
725
  await self.agent_manager.run(
743
726
  prompt=prompt,
744
- deferred_tool_results=deferred_tool_results,
745
727
  )
746
728
  except asyncio.CancelledError:
747
729
  # Handle cancellation gracefully - DO NOT re-raise
748
730
  self.mount_hint("⚠️ Operation cancelled by user")
749
- self.agent_manager.ensure_agent_canecelled_safely()
750
731
  finally:
751
732
  self.working = False
752
733
  self._current_worker = None
File without changes
File without changes
File without changes
File without changes