shotgun-sh 0.2.4__tar.gz → 0.2.5.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 (157) hide show
  1. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/PKG-INFO +1 -1
  2. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/pyproject.toml +1 -1
  3. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/common.py +7 -0
  4. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/tools/web_search/anthropic.py +18 -3
  5. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/tools/web_search/gemini.py +16 -10
  6. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/tools/web_search/openai.py +15 -12
  7. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/build_constants.py +2 -2
  8. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/agents/state/system_state.j2 +4 -0
  9. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/loader.py +2 -2
  10. shotgun_sh-0.2.5.dev1/src/shotgun/prompts/tools/web_search.j2 +14 -0
  11. shotgun_sh-0.2.5.dev1/src/shotgun/utils/datetime_utils.py +77 -0
  12. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/.gitignore +0 -0
  13. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/LICENSE +0 -0
  14. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/README.md +0 -0
  15. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/hatch_build.py +0 -0
  16. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/__init__.py +0 -0
  17. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/__init__.py +0 -0
  18. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/agent_manager.py +0 -0
  19. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/config/__init__.py +0 -0
  20. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/config/constants.py +0 -0
  21. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/config/manager.py +0 -0
  22. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/config/models.py +0 -0
  23. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/config/provider.py +0 -0
  24. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/conversation_history.py +0 -0
  25. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/conversation_manager.py +0 -0
  26. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/export.py +0 -0
  27. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/history/__init__.py +0 -0
  28. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/history/compaction.py +0 -0
  29. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/history/constants.py +0 -0
  30. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/history/context_extraction.py +0 -0
  31. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/history/history_building.py +0 -0
  32. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/history/history_processors.py +0 -0
  33. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/history/message_utils.py +0 -0
  34. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/history/token_counting/__init__.py +0 -0
  35. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/history/token_counting/anthropic.py +0 -0
  36. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/history/token_counting/base.py +0 -0
  37. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/history/token_counting/openai.py +0 -0
  38. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/history/token_counting/sentencepiece_counter.py +0 -0
  39. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/history/token_counting/tokenizer_cache.py +0 -0
  40. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/history/token_counting/utils.py +0 -0
  41. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/history/token_estimation.py +0 -0
  42. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/llm.py +0 -0
  43. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/messages.py +0 -0
  44. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/models.py +0 -0
  45. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/plan.py +0 -0
  46. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/research.py +0 -0
  47. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/specify.py +0 -0
  48. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/tasks.py +0 -0
  49. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/tools/__init__.py +0 -0
  50. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/tools/codebase/__init__.py +0 -0
  51. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/tools/codebase/codebase_shell.py +0 -0
  52. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/tools/codebase/directory_lister.py +0 -0
  53. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/tools/codebase/file_read.py +0 -0
  54. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/tools/codebase/models.py +0 -0
  55. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/tools/codebase/query_graph.py +0 -0
  56. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/tools/codebase/retrieve_code.py +0 -0
  57. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/tools/file_management.py +0 -0
  58. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/tools/user_interaction.py +0 -0
  59. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/tools/web_search/__init__.py +0 -0
  60. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/tools/web_search/utils.py +0 -0
  61. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/agents/usage_manager.py +0 -0
  62. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/api_endpoints.py +0 -0
  63. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/cli/__init__.py +0 -0
  64. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/cli/codebase/__init__.py +0 -0
  65. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/cli/codebase/commands.py +0 -0
  66. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/cli/codebase/models.py +0 -0
  67. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/cli/config.py +0 -0
  68. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/cli/export.py +0 -0
  69. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/cli/feedback.py +0 -0
  70. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/cli/models.py +0 -0
  71. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/cli/plan.py +0 -0
  72. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/cli/research.py +0 -0
  73. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/cli/specify.py +0 -0
  74. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/cli/tasks.py +0 -0
  75. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/cli/update.py +0 -0
  76. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/cli/utils.py +0 -0
  77. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/codebase/__init__.py +0 -0
  78. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/codebase/core/__init__.py +0 -0
  79. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/codebase/core/change_detector.py +0 -0
  80. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/codebase/core/code_retrieval.py +0 -0
  81. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/codebase/core/cypher_models.py +0 -0
  82. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/codebase/core/ingestor.py +0 -0
  83. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/codebase/core/language_config.py +0 -0
  84. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/codebase/core/manager.py +0 -0
  85. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/codebase/core/nl_query.py +0 -0
  86. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/codebase/core/parser_loader.py +0 -0
  87. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/codebase/models.py +0 -0
  88. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/codebase/service.py +0 -0
  89. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/llm_proxy/__init__.py +0 -0
  90. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/llm_proxy/clients.py +0 -0
  91. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/llm_proxy/constants.py +0 -0
  92. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/logging_config.py +0 -0
  93. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/main.py +0 -0
  94. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/posthog_telemetry.py +0 -0
  95. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/__init__.py +0 -0
  96. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/agents/__init__.py +0 -0
  97. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/agents/export.j2 +0 -0
  98. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/agents/partials/codebase_understanding.j2 +0 -0
  99. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/agents/partials/common_agent_system_prompt.j2 +0 -0
  100. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/agents/partials/content_formatting.j2 +0 -0
  101. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/agents/partials/interactive_mode.j2 +0 -0
  102. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/agents/plan.j2 +0 -0
  103. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/agents/research.j2 +0 -0
  104. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/agents/specify.j2 +0 -0
  105. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/agents/state/codebase/codebase_graphs_available.j2 +0 -0
  106. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/agents/tasks.j2 +0 -0
  107. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/codebase/__init__.py +0 -0
  108. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/codebase/cypher_query_patterns.j2 +0 -0
  109. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/codebase/cypher_system.j2 +0 -0
  110. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/codebase/enhanced_query_context.j2 +0 -0
  111. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/codebase/partials/cypher_rules.j2 +0 -0
  112. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/codebase/partials/graph_schema.j2 +0 -0
  113. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/codebase/partials/temporal_context.j2 +0 -0
  114. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/history/__init__.py +0 -0
  115. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/history/incremental_summarization.j2 +0 -0
  116. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/prompts/history/summarization.j2 +0 -0
  117. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/py.typed +0 -0
  118. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/sdk/__init__.py +0 -0
  119. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/sdk/codebase.py +0 -0
  120. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/sdk/exceptions.py +0 -0
  121. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/sdk/models.py +0 -0
  122. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/sdk/services.py +0 -0
  123. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/sentry_telemetry.py +0 -0
  124. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/shotgun_web/__init__.py +0 -0
  125. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/shotgun_web/client.py +0 -0
  126. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/shotgun_web/constants.py +0 -0
  127. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/shotgun_web/models.py +0 -0
  128. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/telemetry.py +0 -0
  129. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/__init__.py +0 -0
  130. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/app.py +0 -0
  131. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/commands/__init__.py +0 -0
  132. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/components/prompt_input.py +0 -0
  133. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/components/spinner.py +0 -0
  134. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/components/splash.py +0 -0
  135. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/components/vertical_tail.py +0 -0
  136. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/filtered_codebase_service.py +0 -0
  137. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/screens/chat.py +0 -0
  138. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/screens/chat.tcss +0 -0
  139. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/screens/chat_screen/__init__.py +0 -0
  140. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/screens/chat_screen/command_providers.py +0 -0
  141. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/screens/chat_screen/hint_message.py +0 -0
  142. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/screens/chat_screen/history.py +0 -0
  143. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/screens/directory_setup.py +0 -0
  144. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/screens/feedback.py +0 -0
  145. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/screens/model_picker.py +0 -0
  146. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/screens/provider_config.py +0 -0
  147. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/screens/shotgun_auth.py +0 -0
  148. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/screens/splash.py +0 -0
  149. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/screens/welcome.py +0 -0
  150. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/styles.tcss +0 -0
  151. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/utils/__init__.py +0 -0
  152. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/tui/utils/mode_progress.py +0 -0
  153. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/utils/__init__.py +0 -0
  154. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/utils/env_utils.py +0 -0
  155. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/utils/file_system_utils.py +0 -0
  156. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.dev1}/src/shotgun/utils/source_detection.py +0 -0
  157. {shotgun_sh-0.2.4 → shotgun_sh-0.2.5.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.2.4
3
+ Version: 0.2.5.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.2.4"
3
+ version = "0.2.5.dev1"
4
4
  description = "AI-powered research, planning, and task management CLI tool"
5
5
  readme = "README.md"
6
6
  license = { text = "MIT" }
@@ -24,6 +24,7 @@ from shotgun.logging_config import get_logger
24
24
  from shotgun.prompts import PromptLoader
25
25
  from shotgun.sdk.services import get_codebase_service
26
26
  from shotgun.utils import ensure_shotgun_directory_exists
27
+ from shotgun.utils.datetime_utils import get_datetime_context
27
28
  from shotgun.utils.file_system_utils import get_shotgun_base_path
28
29
 
29
30
  from .history import token_limit_compactor
@@ -74,12 +75,18 @@ async def add_system_status_message(
74
75
  # Extract table of contents from the agent's markdown file
75
76
  markdown_toc = extract_markdown_toc(deps.agent_mode)
76
77
 
78
+ # Get current datetime with timezone information
79
+ dt_context = get_datetime_context()
80
+
77
81
  system_state = prompt_loader.render(
78
82
  "agents/state/system_state.j2",
79
83
  codebase_understanding_graphs=codebase_understanding_graphs,
80
84
  is_tui_context=deps.is_tui_context,
81
85
  existing_files=existing_files,
82
86
  markdown_toc=markdown_toc,
87
+ current_datetime=dt_context.datetime_formatted,
88
+ timezone_name=dt_context.timezone_name,
89
+ utc_offset=dt_context.utc_offset,
83
90
  )
84
91
 
85
92
  message_history.append(
@@ -9,9 +9,14 @@ from shotgun.agents.config.constants import MEDIUM_TEXT_8K_TOKENS
9
9
  from shotgun.agents.config.models import ProviderType
10
10
  from shotgun.agents.llm import shotgun_model_request
11
11
  from shotgun.logging_config import get_logger
12
+ from shotgun.prompts import PromptLoader
13
+ from shotgun.utils.datetime_utils import get_datetime_context
12
14
 
13
15
  logger = get_logger(__name__)
14
16
 
17
+ # Global prompt loader instance
18
+ prompt_loader = PromptLoader()
19
+
15
20
 
16
21
  async def anthropic_web_search_tool(query: str) -> str:
17
22
  """Perform a web search using Anthropic's Claude API.
@@ -42,10 +47,20 @@ async def anthropic_web_search_tool(query: str) -> str:
42
47
  span.set_attribute("output.value", f"**Error:**\n {error_msg}\n")
43
48
  return error_msg
44
49
 
50
+ # Get datetime context for the search prompt
51
+ dt_context = get_datetime_context()
52
+
53
+ # Render search prompt from template
54
+ search_prompt = prompt_loader.render(
55
+ "tools/web_search.j2",
56
+ query=query,
57
+ current_datetime=dt_context.datetime_formatted,
58
+ timezone_name=dt_context.timezone_name,
59
+ utc_offset=dt_context.utc_offset,
60
+ )
61
+
45
62
  # Build the request messages
46
- messages: list[ModelMessage] = [
47
- ModelRequest.user_text_prompt(f"Search for: {query}")
48
- ]
63
+ messages: list[ModelMessage] = [ModelRequest.user_text_prompt(search_prompt)]
49
64
 
50
65
  # Use the Messages API with web search tool
51
66
  try:
@@ -9,9 +9,14 @@ from shotgun.agents.config.constants import MEDIUM_TEXT_8K_TOKENS
9
9
  from shotgun.agents.config.models import ModelName
10
10
  from shotgun.agents.llm import shotgun_model_request
11
11
  from shotgun.logging_config import get_logger
12
+ from shotgun.prompts import PromptLoader
13
+ from shotgun.utils.datetime_utils import get_datetime_context
12
14
 
13
15
  logger = get_logger(__name__)
14
16
 
17
+ # Global prompt loader instance
18
+ prompt_loader = PromptLoader()
19
+
15
20
 
16
21
  async def gemini_web_search_tool(query: str) -> str:
17
22
  """Perform a web search using Google's Gemini API with grounding.
@@ -42,16 +47,17 @@ async def gemini_web_search_tool(query: str) -> str:
42
47
  span.set_attribute("output.value", f"**Error:**\n {error_msg}\n")
43
48
  return error_msg
44
49
 
45
- # Create a search-optimized prompt
46
- search_prompt = f"""Please provide current and accurate information about the following query:
47
-
48
- Query: {query}
49
-
50
- Instructions:
51
- - Provide comprehensive, factual information
52
- - Include relevant details and context
53
- - Focus on current and recent information
54
- - Be specific and accurate in your response"""
50
+ # Get datetime context for the search prompt
51
+ dt_context = get_datetime_context()
52
+
53
+ # Render search prompt from template
54
+ search_prompt = prompt_loader.render(
55
+ "tools/web_search.j2",
56
+ query=query,
57
+ current_datetime=dt_context.datetime_formatted,
58
+ timezone_name=dt_context.timezone_name,
59
+ utc_offset=dt_context.utc_offset,
60
+ )
55
61
 
56
62
  # Build the request messages
57
63
  messages: list[ModelMessage] = [ModelRequest.user_text_prompt(search_prompt)]
@@ -6,9 +6,14 @@ from opentelemetry import trace
6
6
  from shotgun.agents.config import get_provider_model
7
7
  from shotgun.agents.config.models import ProviderType
8
8
  from shotgun.logging_config import get_logger
9
+ from shotgun.prompts import PromptLoader
10
+ from shotgun.utils.datetime_utils import get_datetime_context
9
11
 
10
12
  logger = get_logger(__name__)
11
13
 
14
+ # Global prompt loader instance
15
+ prompt_loader = PromptLoader()
16
+
12
17
 
13
18
  async def openai_web_search_tool(query: str) -> str:
14
19
  """Perform a web search and return results.
@@ -40,19 +45,17 @@ async def openai_web_search_tool(query: str) -> str:
40
45
  span.set_attribute("output.value", f"**Error:**\n {error_msg}\n")
41
46
  return error_msg
42
47
 
43
- prompt = f"""Please provide current and accurate information about the following query:
44
-
45
- Query: {query}
48
+ # Get datetime context for the search prompt
49
+ dt_context = get_datetime_context()
46
50
 
47
- Instructions:
48
- - Provide comprehensive, factual information
49
- - Include relevant details and context
50
- - Focus on current and recent information
51
- - Be specific and accurate in your response
52
- - You can't ask the user for details, so assume the most relevant details for the query
53
-
54
- ALWAYS PROVIDE THE SOURCES (urls) TO BACK UP THE INFORMATION YOU PROVIDE.
55
- """
51
+ # Render search prompt from template
52
+ prompt = prompt_loader.render(
53
+ "tools/web_search.j2",
54
+ query=query,
55
+ current_datetime=dt_context.datetime_formatted,
56
+ timezone_name=dt_context.timezone_name,
57
+ utc_offset=dt_context.utc_offset,
58
+ )
56
59
 
57
60
  client = AsyncOpenAI(api_key=api_key)
58
61
  response = await client.responses.create( # type: ignore[call-overload]
@@ -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,7 @@
1
1
  ## System Status
2
2
 
3
+ Your training data may be old. The current date and time is: {{ current_datetime }} in {{ timezone_name }} (UTC{{ utc_offset }})
4
+
3
5
  {% include 'agents/state/codebase/codebase_graphs_available.j2' %}
4
6
 
5
7
  ## Available Files
@@ -20,6 +22,8 @@ No files currently exist in your allowed directories. You can create:
20
22
  - `exports/` folder - For exported documents
21
23
  {% endif %}
22
24
 
25
+ When updating a file try to add into the footer that this was created using Shotgun (https://shotgun.sh).
26
+
23
27
  {% if markdown_toc %}
24
28
  ## Document Table of Contents - READ THE ENTIRE FILE TO UNDERSTAND MORE
25
29
 
@@ -5,7 +5,7 @@ from datetime import datetime
5
5
  from pathlib import Path
6
6
  from typing import Any
7
7
 
8
- from jinja2 import Environment, FileSystemLoader, Template, select_autoescape
8
+ from jinja2 import Environment, FileSystemLoader, Template
9
9
 
10
10
  from shotgun.logging_config import setup_logger
11
11
 
@@ -32,7 +32,7 @@ class PromptLoader:
32
32
  self.templates_dir = templates_dir
33
33
  self.env = Environment(
34
34
  loader=FileSystemLoader(str(templates_dir)),
35
- autoescape=select_autoescape(["j2"]),
35
+ autoescape=False, # noqa: S701 - These are LLM prompts, not HTML
36
36
  trim_blocks=True,
37
37
  lstrip_blocks=True,
38
38
  )
@@ -0,0 +1,14 @@
1
+ Your training data may be old. The current date and time is: {{ current_datetime }} ({{ timezone_name }}, {{ utc_offset }})
2
+
3
+ Please provide current and accurate information about the following query:
4
+
5
+ Query: {{ query }}
6
+
7
+ Instructions:
8
+ - Provide comprehensive, factual information
9
+ - Include relevant details and context
10
+ - Focus on current and recent information
11
+ - Be specific and accurate in your response
12
+ - You can't ask the user for details, so assume the most relevant details for the query
13
+
14
+ ALWAYS PROVIDE THE SOURCES (urls) TO BACK UP THE INFORMATION YOU PROVIDE.
@@ -0,0 +1,77 @@
1
+ """Datetime utilities for consistent datetime formatting across the application."""
2
+
3
+ from datetime import datetime
4
+
5
+ from pydantic import BaseModel, Field
6
+
7
+
8
+ class DateTimeContext(BaseModel):
9
+ """Structured datetime context with timezone information.
10
+
11
+ This model provides consistently formatted datetime information
12
+ for use in prompts, templates, and UI display.
13
+
14
+ Attributes:
15
+ datetime_formatted: Human-readable datetime string
16
+ timezone_name: Short timezone name (e.g., "PST", "UTC")
17
+ utc_offset: UTC offset formatted with colon (e.g., "UTC-08:00")
18
+
19
+ Example:
20
+ >>> dt_context = get_datetime_context()
21
+ >>> print(dt_context.datetime_formatted)
22
+ 'Monday, January 13, 2025 at 3:45:30 PM'
23
+ >>> print(dt_context.timezone_name)
24
+ 'PST'
25
+ >>> print(dt_context.utc_offset)
26
+ 'UTC-08:00'
27
+ """
28
+
29
+ datetime_formatted: str = Field(
30
+ description="Human-readable datetime string in format: 'Day, Month DD, YYYY at HH:MM:SS AM/PM'"
31
+ )
32
+ timezone_name: str = Field(description="Short timezone name (e.g., PST, EST, UTC)")
33
+ utc_offset: str = Field(
34
+ description="UTC offset formatted with colon (e.g., UTC-08:00, UTC+05:30)"
35
+ )
36
+
37
+
38
+ def get_datetime_context() -> DateTimeContext:
39
+ """Get formatted datetime context with timezone information.
40
+
41
+ Returns a Pydantic model containing consistently formatted datetime
42
+ information suitable for use in prompts and templates.
43
+
44
+ Returns:
45
+ DateTimeContext: Structured datetime context with formatted strings
46
+
47
+ Example:
48
+ >>> dt_context = get_datetime_context()
49
+ >>> dt_context.datetime_formatted
50
+ 'Monday, January 13, 2025 at 3:45:30 PM'
51
+ >>> dt_context.timezone_name
52
+ 'PST'
53
+ >>> dt_context.utc_offset
54
+ 'UTC-08:00'
55
+ """
56
+ # Get current datetime with timezone information
57
+ now = datetime.now().astimezone()
58
+
59
+ # Format datetime in plain English
60
+ # Example: "Monday, January 13, 2025 at 3:45:30 PM"
61
+ datetime_formatted = now.strftime("%A, %B %d, %Y at %I:%M:%S %p")
62
+
63
+ # Get timezone name and UTC offset
64
+ # Example: "PST" and "UTC-08:00"
65
+ timezone_name = now.strftime("%Z")
66
+ utc_offset = now.strftime("%z") # Format: +0800 or -0500
67
+
68
+ # Reformat UTC offset to include colon: +08:00 or -05:00
69
+ utc_offset_formatted = (
70
+ f"UTC{utc_offset[:3]}:{utc_offset[3:]}" if utc_offset else "UTC"
71
+ )
72
+
73
+ return DateTimeContext(
74
+ datetime_formatted=datetime_formatted,
75
+ timezone_name=timezone_name,
76
+ utc_offset=utc_offset_formatted,
77
+ )
File without changes
File without changes
File without changes