shotgun-sh 0.1.10.dev1__py3-none-any.whl → 0.1.11.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.
- shotgun/agents/agent_manager.py +47 -0
- shotgun/agents/history/compaction.py +15 -0
- shotgun/agents/history/history_processors.py +51 -0
- shotgun/cli/update.py +2 -3
- shotgun/posthog_telemetry.py +18 -42
- shotgun/sdk/codebase.py +49 -0
- shotgun/sentry_telemetry.py +1 -3
- shotgun/tui/screens/chat.py +9 -0
- shotgun/utils/source_detection.py +16 -0
- shotgun/utils/update_checker.py +4 -7
- {shotgun_sh-0.1.10.dev1.dist-info → shotgun_sh-0.1.11.dev1.dist-info}/METADATA +1 -1
- {shotgun_sh-0.1.10.dev1.dist-info → shotgun_sh-0.1.11.dev1.dist-info}/RECORD +15 -14
- {shotgun_sh-0.1.10.dev1.dist-info → shotgun_sh-0.1.11.dev1.dist-info}/WHEEL +0 -0
- {shotgun_sh-0.1.10.dev1.dist-info → shotgun_sh-0.1.11.dev1.dist-info}/entry_points.txt +0 -0
- {shotgun_sh-0.1.10.dev1.dist-info → shotgun_sh-0.1.11.dev1.dist-info}/licenses/LICENSE +0 -0
shotgun/agents/agent_manager.py
CHANGED
|
@@ -37,7 +37,9 @@ from textual.widget import Widget
|
|
|
37
37
|
|
|
38
38
|
from shotgun.agents.common import add_system_prompt_message, add_system_status_message
|
|
39
39
|
from shotgun.agents.models import AgentType, FileOperation
|
|
40
|
+
from shotgun.posthog_telemetry import track_event
|
|
40
41
|
from shotgun.tui.screens.chat_screen.hint_message import HintMessage
|
|
42
|
+
from shotgun.utils.source_detection import detect_source
|
|
41
43
|
|
|
42
44
|
from .export import create_export_agent
|
|
43
45
|
from .history.compaction import apply_persistent_compaction
|
|
@@ -351,6 +353,17 @@ class AgentManager(Widget):
|
|
|
351
353
|
"gpt-5" in model_name.lower()
|
|
352
354
|
)
|
|
353
355
|
|
|
356
|
+
# Track message send event
|
|
357
|
+
event_name = f"message_send_{self._current_agent_type.value}"
|
|
358
|
+
track_event(
|
|
359
|
+
event_name,
|
|
360
|
+
{
|
|
361
|
+
"has_prompt": prompt is not None,
|
|
362
|
+
"has_deferred_results": deferred_tool_results is not None,
|
|
363
|
+
"model_name": model_name,
|
|
364
|
+
},
|
|
365
|
+
)
|
|
366
|
+
|
|
354
367
|
try:
|
|
355
368
|
result: AgentRunResult[
|
|
356
369
|
str | DeferredToolRequests
|
|
@@ -448,6 +461,22 @@ class AgentManager(Widget):
|
|
|
448
461
|
self._post_partial_message(False)
|
|
449
462
|
|
|
450
463
|
elif isinstance(event, FunctionToolCallEvent):
|
|
464
|
+
# Track tool call event
|
|
465
|
+
|
|
466
|
+
# Detect source from call stack
|
|
467
|
+
source = detect_source()
|
|
468
|
+
|
|
469
|
+
track_event(
|
|
470
|
+
"tool_called",
|
|
471
|
+
{
|
|
472
|
+
"tool_name": event.part.tool_name,
|
|
473
|
+
"agent_mode": self._current_agent_type.value
|
|
474
|
+
if self._current_agent_type
|
|
475
|
+
else "unknown",
|
|
476
|
+
"source": source,
|
|
477
|
+
},
|
|
478
|
+
)
|
|
479
|
+
|
|
451
480
|
existing_call_idx = next(
|
|
452
481
|
(
|
|
453
482
|
i
|
|
@@ -477,6 +506,24 @@ class AgentManager(Widget):
|
|
|
477
506
|
state.current_response = partial_message
|
|
478
507
|
self._post_partial_message(False)
|
|
479
508
|
elif isinstance(event, FunctionToolResultEvent):
|
|
509
|
+
# Track tool completion event
|
|
510
|
+
|
|
511
|
+
# Detect source from call stack
|
|
512
|
+
source = detect_source()
|
|
513
|
+
|
|
514
|
+
track_event(
|
|
515
|
+
"tool_completed",
|
|
516
|
+
{
|
|
517
|
+
"tool_name": event.result.tool_name
|
|
518
|
+
if hasattr(event.result, "tool_name")
|
|
519
|
+
else "unknown",
|
|
520
|
+
"agent_mode": self._current_agent_type.value
|
|
521
|
+
if self._current_agent_type
|
|
522
|
+
else "unknown",
|
|
523
|
+
"source": source,
|
|
524
|
+
},
|
|
525
|
+
)
|
|
526
|
+
|
|
480
527
|
request_message = ModelRequest(parts=[event.result])
|
|
481
528
|
state.messages.append(request_message)
|
|
482
529
|
## this is what the user responded with
|
|
@@ -5,6 +5,7 @@ from pydantic_ai.usage import RequestUsage
|
|
|
5
5
|
|
|
6
6
|
from shotgun.agents.models import AgentDeps
|
|
7
7
|
from shotgun.logging_config import get_logger
|
|
8
|
+
from shotgun.posthog_telemetry import track_event
|
|
8
9
|
|
|
9
10
|
from .token_estimation import estimate_tokens_from_messages
|
|
10
11
|
|
|
@@ -57,6 +58,20 @@ async def apply_persistent_compaction(
|
|
|
57
58
|
f"Persistent compaction applied: {original_size} → {compacted_size} messages "
|
|
58
59
|
f"({reduction_pct:.1f}% reduction)"
|
|
59
60
|
)
|
|
61
|
+
|
|
62
|
+
# Track persistent compaction event
|
|
63
|
+
track_event(
|
|
64
|
+
"persistent_compaction_applied",
|
|
65
|
+
{
|
|
66
|
+
"messages_before": original_size,
|
|
67
|
+
"messages_after": compacted_size,
|
|
68
|
+
"tokens_before": estimated_tokens,
|
|
69
|
+
"reduction_percentage": round(reduction_pct, 2),
|
|
70
|
+
"agent_mode": deps.agent_mode.value
|
|
71
|
+
if hasattr(deps, "agent_mode") and deps.agent_mode
|
|
72
|
+
else "unknown",
|
|
73
|
+
},
|
|
74
|
+
)
|
|
60
75
|
else:
|
|
61
76
|
logger.debug(
|
|
62
77
|
f"No persistent compaction needed: {original_size} messages unchanged"
|
|
@@ -14,6 +14,7 @@ from shotgun.agents.config.models import shotgun_model_request
|
|
|
14
14
|
from shotgun.agents.messages import AgentSystemPrompt, SystemStatusPrompt
|
|
15
15
|
from shotgun.agents.models import AgentDeps
|
|
16
16
|
from shotgun.logging_config import get_logger
|
|
17
|
+
from shotgun.posthog_telemetry import track_event
|
|
17
18
|
from shotgun.prompts import PromptLoader
|
|
18
19
|
|
|
19
20
|
from .constants import SUMMARY_MARKER, TOKEN_LIMIT_RATIO
|
|
@@ -179,6 +180,10 @@ async def token_limit_compactor(
|
|
|
179
180
|
"Post-summary conversation exceeds threshold, performing incremental compaction"
|
|
180
181
|
)
|
|
181
182
|
|
|
183
|
+
# Track compaction event
|
|
184
|
+
messages_before = len(messages)
|
|
185
|
+
tokens_before = post_summary_tokens
|
|
186
|
+
|
|
182
187
|
# Extract existing summary content
|
|
183
188
|
summary_message = messages[last_summary_index]
|
|
184
189
|
existing_summary_part = None
|
|
@@ -320,6 +325,31 @@ async def token_limit_compactor(
|
|
|
320
325
|
logger.debug(
|
|
321
326
|
f"Incremental compaction complete: {len(messages)} -> {len(compacted_messages)} messages"
|
|
322
327
|
)
|
|
328
|
+
|
|
329
|
+
# Track compaction completion
|
|
330
|
+
messages_after = len(compacted_messages)
|
|
331
|
+
tokens_after = estimate_tokens_from_messages(compacted_messages, deps.llm_model)
|
|
332
|
+
reduction_percentage = (
|
|
333
|
+
((messages_before - messages_after) / messages_before * 100)
|
|
334
|
+
if messages_before > 0
|
|
335
|
+
else 0
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
track_event(
|
|
339
|
+
"context_compaction_triggered",
|
|
340
|
+
{
|
|
341
|
+
"compaction_type": "incremental",
|
|
342
|
+
"messages_before": messages_before,
|
|
343
|
+
"messages_after": messages_after,
|
|
344
|
+
"tokens_before": tokens_before,
|
|
345
|
+
"tokens_after": tokens_after,
|
|
346
|
+
"reduction_percentage": round(reduction_percentage, 2),
|
|
347
|
+
"agent_mode": deps.agent_mode.value
|
|
348
|
+
if hasattr(deps, "agent_mode") and deps.agent_mode
|
|
349
|
+
else "unknown",
|
|
350
|
+
},
|
|
351
|
+
)
|
|
352
|
+
|
|
323
353
|
return compacted_messages
|
|
324
354
|
|
|
325
355
|
else:
|
|
@@ -423,4 +453,25 @@ async def _full_compaction(
|
|
|
423
453
|
# Ensure history ends with ModelRequest for PydanticAI compatibility
|
|
424
454
|
compacted_messages = ensure_ends_with_model_request(compacted_messages, messages)
|
|
425
455
|
|
|
456
|
+
# Track full compaction event
|
|
457
|
+
messages_before = len(messages)
|
|
458
|
+
messages_after = len(compacted_messages)
|
|
459
|
+
tokens_before = current_tokens # Already calculated above
|
|
460
|
+
tokens_after = summary_usage.output_tokens if summary_usage else 0
|
|
461
|
+
|
|
462
|
+
track_event(
|
|
463
|
+
"context_compaction_triggered",
|
|
464
|
+
{
|
|
465
|
+
"compaction_type": "full",
|
|
466
|
+
"messages_before": messages_before,
|
|
467
|
+
"messages_after": messages_after,
|
|
468
|
+
"tokens_before": tokens_before,
|
|
469
|
+
"tokens_after": tokens_after,
|
|
470
|
+
"reduction_percentage": round(reduction_percentage, 2),
|
|
471
|
+
"agent_mode": deps.agent_mode.value
|
|
472
|
+
if hasattr(deps, "agent_mode") and deps.agent_mode
|
|
473
|
+
else "unknown",
|
|
474
|
+
},
|
|
475
|
+
)
|
|
476
|
+
|
|
426
477
|
return compacted_messages
|
shotgun/cli/update.py
CHANGED
|
@@ -6,8 +6,10 @@ import typer
|
|
|
6
6
|
from rich.console import Console
|
|
7
7
|
from rich.progress import Progress, SpinnerColumn, TextColumn
|
|
8
8
|
|
|
9
|
+
from shotgun import __version__
|
|
9
10
|
from shotgun.logging_config import get_logger
|
|
10
11
|
from shotgun.utils.update_checker import (
|
|
12
|
+
compare_versions,
|
|
11
13
|
detect_installation_method,
|
|
12
14
|
get_latest_version,
|
|
13
15
|
is_dev_version,
|
|
@@ -70,9 +72,6 @@ def update(
|
|
|
70
72
|
)
|
|
71
73
|
raise typer.Exit(1)
|
|
72
74
|
|
|
73
|
-
from shotgun import __version__
|
|
74
|
-
from shotgun.utils.update_checker import compare_versions
|
|
75
|
-
|
|
76
75
|
if compare_versions(__version__, latest):
|
|
77
76
|
console.print(
|
|
78
77
|
f"[green]✓[/green] Update available: [cyan]{__version__}[/cyan] → [green]{latest}[/green]",
|
shotgun/posthog_telemetry.py
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"""PostHog analytics setup for Shotgun."""
|
|
2
2
|
|
|
3
|
-
import os
|
|
4
3
|
from typing import Any
|
|
5
4
|
|
|
5
|
+
import posthog
|
|
6
|
+
|
|
7
|
+
from shotgun import __version__
|
|
8
|
+
from shotgun.agents.config import get_config_manager
|
|
6
9
|
from shotgun.logging_config import get_early_logger
|
|
7
10
|
|
|
8
11
|
# Use early logger to prevent automatic StreamHandler creation
|
|
@@ -21,41 +24,15 @@ def setup_posthog_observability() -> bool:
|
|
|
21
24
|
global _posthog_client
|
|
22
25
|
|
|
23
26
|
try:
|
|
24
|
-
import posthog
|
|
25
|
-
|
|
26
27
|
# Check if PostHog is already initialized
|
|
27
28
|
if _posthog_client is not None:
|
|
28
29
|
logger.debug("PostHog is already initialized, skipping")
|
|
29
30
|
return True
|
|
30
31
|
|
|
31
|
-
#
|
|
32
|
-
api_key =
|
|
33
|
-
|
|
34
|
-
try:
|
|
35
|
-
from shotgun import build_constants
|
|
36
|
-
|
|
37
|
-
api_key = build_constants.POSTHOG_API_KEY
|
|
38
|
-
if api_key:
|
|
39
|
-
logger.debug("Using PostHog configuration from build constants")
|
|
40
|
-
except (ImportError, AttributeError):
|
|
41
|
-
pass
|
|
42
|
-
|
|
43
|
-
# Fallback to environment variables if build constants are empty or missing
|
|
44
|
-
if not api_key:
|
|
45
|
-
api_key = os.getenv("POSTHOG_API_KEY", "")
|
|
46
|
-
if api_key:
|
|
47
|
-
logger.debug("Using PostHog configuration from environment variables")
|
|
48
|
-
|
|
49
|
-
if not api_key:
|
|
50
|
-
logger.debug(
|
|
51
|
-
"No PostHog API key configured, skipping PostHog initialization"
|
|
52
|
-
)
|
|
53
|
-
return False
|
|
54
|
-
|
|
55
|
-
logger.debug("Found PostHog configuration, proceeding with setup")
|
|
32
|
+
# Hardcoded PostHog configuration
|
|
33
|
+
api_key = "phc_KKnChzZUKeNqZDOTJ6soCBWNQSx3vjiULdwTR9H5Mcr"
|
|
56
34
|
|
|
57
|
-
|
|
58
|
-
from shotgun import __version__
|
|
35
|
+
logger.debug("Using hardcoded PostHog configuration")
|
|
59
36
|
|
|
60
37
|
# Determine environment based on version
|
|
61
38
|
# Dev versions contain "dev", "rc", "alpha", or "beta"
|
|
@@ -73,20 +50,25 @@ def setup_posthog_observability() -> bool:
|
|
|
73
50
|
|
|
74
51
|
# Set user context with anonymous user ID from config
|
|
75
52
|
try:
|
|
76
|
-
from shotgun.agents.config import get_config_manager
|
|
77
|
-
|
|
78
53
|
config_manager = get_config_manager()
|
|
79
54
|
user_id = config_manager.get_user_id()
|
|
80
55
|
|
|
56
|
+
# Identify the user in PostHog
|
|
57
|
+
posthog.identify( # type: ignore[attr-defined]
|
|
58
|
+
distinct_id=user_id,
|
|
59
|
+
properties={
|
|
60
|
+
"version": __version__,
|
|
61
|
+
"environment": environment,
|
|
62
|
+
},
|
|
63
|
+
)
|
|
64
|
+
|
|
81
65
|
# Set default properties for all events
|
|
82
66
|
posthog.disabled = False
|
|
83
67
|
posthog.personal_api_key = None # Not needed for event tracking
|
|
84
68
|
|
|
85
|
-
logger.debug(
|
|
86
|
-
"PostHog user context will be set with anonymous ID: %s", user_id
|
|
87
|
-
)
|
|
69
|
+
logger.debug("PostHog user identified with anonymous ID: %s", user_id)
|
|
88
70
|
except Exception as e:
|
|
89
|
-
logger.warning("Failed to
|
|
71
|
+
logger.warning("Failed to set user context: %s", e)
|
|
90
72
|
|
|
91
73
|
logger.debug(
|
|
92
74
|
"PostHog analytics configured successfully (environment: %s, version: %s)",
|
|
@@ -95,9 +77,6 @@ def setup_posthog_observability() -> bool:
|
|
|
95
77
|
)
|
|
96
78
|
return True
|
|
97
79
|
|
|
98
|
-
except ImportError as e:
|
|
99
|
-
logger.error("PostHog SDK not available: %s", e)
|
|
100
|
-
return False
|
|
101
80
|
except Exception as e:
|
|
102
81
|
logger.warning("Failed to setup PostHog analytics: %s", e)
|
|
103
82
|
return False
|
|
@@ -117,9 +96,6 @@ def track_event(event_name: str, properties: dict[str, Any] | None = None) -> No
|
|
|
117
96
|
return
|
|
118
97
|
|
|
119
98
|
try:
|
|
120
|
-
from shotgun import __version__
|
|
121
|
-
from shotgun.agents.config import get_config_manager
|
|
122
|
-
|
|
123
99
|
# Get user ID for tracking
|
|
124
100
|
config_manager = get_config_manager()
|
|
125
101
|
user_id = config_manager.get_user_id()
|
shotgun/sdk/codebase.py
CHANGED
|
@@ -5,6 +5,9 @@ from collections.abc import Awaitable, Callable
|
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
|
|
7
7
|
from shotgun.codebase.models import CodebaseGraph, QueryType
|
|
8
|
+
from shotgun.logging_config import get_logger
|
|
9
|
+
from shotgun.posthog_telemetry import track_event
|
|
10
|
+
from shotgun.utils.source_detection import detect_source
|
|
8
11
|
|
|
9
12
|
from .exceptions import CodebaseNotFoundError, InvalidPathError
|
|
10
13
|
from .models import (
|
|
@@ -17,6 +20,8 @@ from .models import (
|
|
|
17
20
|
)
|
|
18
21
|
from .services import get_codebase_service
|
|
19
22
|
|
|
23
|
+
logger = get_logger(__name__)
|
|
24
|
+
|
|
20
25
|
|
|
21
26
|
class CodebaseSDK:
|
|
22
27
|
"""Framework-agnostic SDK for codebase operations.
|
|
@@ -87,6 +92,28 @@ class CodebaseSDK:
|
|
|
87
92
|
)
|
|
88
93
|
file_count = sum(graph.language_stats.values()) if graph.language_stats else 0
|
|
89
94
|
|
|
95
|
+
# Track codebase indexing event
|
|
96
|
+
# Detect if called from TUI by checking the call stack
|
|
97
|
+
source = detect_source()
|
|
98
|
+
|
|
99
|
+
logger.debug(
|
|
100
|
+
"Tracking codebase_indexed event: file_count=%d, node_count=%d, relationship_count=%d, source=%s",
|
|
101
|
+
file_count,
|
|
102
|
+
graph.node_count,
|
|
103
|
+
graph.relationship_count,
|
|
104
|
+
source,
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
track_event(
|
|
108
|
+
"codebase_indexed",
|
|
109
|
+
{
|
|
110
|
+
"file_count": file_count,
|
|
111
|
+
"node_count": graph.node_count,
|
|
112
|
+
"relationship_count": graph.relationship_count,
|
|
113
|
+
"source": source,
|
|
114
|
+
},
|
|
115
|
+
)
|
|
116
|
+
|
|
90
117
|
return IndexResult(
|
|
91
118
|
graph_id=graph.graph_id,
|
|
92
119
|
name=name,
|
|
@@ -212,6 +239,28 @@ class CodebaseSDK:
|
|
|
212
239
|
|
|
213
240
|
stats = await self.service.reindex_graph(graph_id)
|
|
214
241
|
|
|
242
|
+
# Track codebase reindexing event
|
|
243
|
+
# Detect if called from TUI by checking the call stack
|
|
244
|
+
source = detect_source()
|
|
245
|
+
|
|
246
|
+
logger.debug(
|
|
247
|
+
"Tracking codebase_reindexed event: nodes_added=%d, nodes_removed=%d, source=%s",
|
|
248
|
+
stats.get("nodes_added", 0),
|
|
249
|
+
stats.get("nodes_removed", 0),
|
|
250
|
+
source,
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
track_event(
|
|
254
|
+
"codebase_reindexed",
|
|
255
|
+
{
|
|
256
|
+
"nodes_added": stats.get("nodes_added", 0),
|
|
257
|
+
"nodes_removed": stats.get("nodes_removed", 0),
|
|
258
|
+
"relationships_added": stats.get("relationships_added", 0),
|
|
259
|
+
"relationships_removed": stats.get("relationships_removed", 0),
|
|
260
|
+
"source": source,
|
|
261
|
+
},
|
|
262
|
+
)
|
|
263
|
+
|
|
215
264
|
return ReindexResult(
|
|
216
265
|
graph_id=graph_id,
|
|
217
266
|
name=graph.name,
|
shotgun/sentry_telemetry.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
4
|
|
|
5
|
+
from shotgun import __version__
|
|
5
6
|
from shotgun.logging_config import get_early_logger
|
|
6
7
|
|
|
7
8
|
# Use early logger to prevent automatic StreamHandler creation
|
|
@@ -41,9 +42,6 @@ def setup_sentry_observability() -> bool:
|
|
|
41
42
|
|
|
42
43
|
logger.debug("Found DSN, proceeding with Sentry setup")
|
|
43
44
|
|
|
44
|
-
# Get version for release tracking
|
|
45
|
-
from shotgun import __version__
|
|
46
|
-
|
|
47
45
|
# Determine environment based on version
|
|
48
46
|
# Dev versions contain "dev", "rc", "alpha", or "beta"
|
|
49
47
|
if any(marker in __version__ for marker in ["dev", "rc", "alpha", "beta"]):
|
shotgun/tui/screens/chat.py
CHANGED
|
@@ -41,6 +41,7 @@ from shotgun.agents.models import (
|
|
|
41
41
|
UserQuestion,
|
|
42
42
|
)
|
|
43
43
|
from shotgun.codebase.core.manager import CodebaseAlreadyIndexedError
|
|
44
|
+
from shotgun.posthog_telemetry import track_event
|
|
44
45
|
from shotgun.sdk.codebase import CodebaseSDK
|
|
45
46
|
from shotgun.sdk.exceptions import CodebaseNotFoundError, InvalidPathError
|
|
46
47
|
from shotgun.sdk.services import get_codebase_service
|
|
@@ -388,6 +389,14 @@ class ChatScreen(Screen[None]):
|
|
|
388
389
|
"""Handle key presses for cancellation."""
|
|
389
390
|
# If escape is pressed while agent is working, cancel the operation
|
|
390
391
|
if event.key == "escape" and self.working and self._current_worker:
|
|
392
|
+
# Track ESC cancellation event
|
|
393
|
+
track_event(
|
|
394
|
+
"agent_cancelled_escape",
|
|
395
|
+
{
|
|
396
|
+
"agent_mode": self.mode.value,
|
|
397
|
+
},
|
|
398
|
+
)
|
|
399
|
+
|
|
391
400
|
# Cancel the running agent worker
|
|
392
401
|
self._current_worker.cancel()
|
|
393
402
|
# Show cancellation message
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Utility for detecting the source of function calls (CLI vs TUI)."""
|
|
2
|
+
|
|
3
|
+
import inspect
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def detect_source() -> str:
|
|
7
|
+
"""Detect if the call originated from CLI or TUI by inspecting the call stack.
|
|
8
|
+
|
|
9
|
+
Returns:
|
|
10
|
+
"tui" if any frame in the call stack contains "tui" in the filename,
|
|
11
|
+
"cli" otherwise.
|
|
12
|
+
"""
|
|
13
|
+
for frame_info in inspect.stack():
|
|
14
|
+
if "tui" in frame_info.filename.lower():
|
|
15
|
+
return "tui"
|
|
16
|
+
return "cli"
|
shotgun/utils/update_checker.py
CHANGED
|
@@ -5,6 +5,10 @@ import sys
|
|
|
5
5
|
import threading
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
|
|
8
|
+
import httpx
|
|
9
|
+
from packaging import version
|
|
10
|
+
|
|
11
|
+
from shotgun import __version__
|
|
8
12
|
from shotgun.logging_config import get_logger
|
|
9
13
|
|
|
10
14
|
logger = get_logger(__name__)
|
|
@@ -110,13 +114,6 @@ def perform_auto_update_async(no_update_check: bool = False) -> threading.Thread
|
|
|
110
114
|
return thread
|
|
111
115
|
|
|
112
116
|
|
|
113
|
-
# Keep these for backward compatibility with the update CLI command
|
|
114
|
-
import httpx # noqa: E402
|
|
115
|
-
from packaging import version # noqa: E402
|
|
116
|
-
|
|
117
|
-
from shotgun import __version__ # noqa: E402
|
|
118
|
-
|
|
119
|
-
|
|
120
117
|
def is_dev_version(version_str: str | None = None) -> bool:
|
|
121
118
|
"""Check if the current or given version is a development version.
|
|
122
119
|
|
|
@@ -2,12 +2,12 @@ shotgun/__init__.py,sha256=P40K0fnIsb7SKcQrFnXZ4aREjpWchVDhvM1HxI4cyIQ,104
|
|
|
2
2
|
shotgun/build_constants.py,sha256=RXNxMz46HaB5jucgMVpw8a2yCJqjbhTOh0PddyEVMN8,713
|
|
3
3
|
shotgun/logging_config.py,sha256=UKenihvgH8OA3W0b8ZFcItYaFJVe9MlsMYlcevyW1HY,7440
|
|
4
4
|
shotgun/main.py,sha256=qteehx2FyqPVvSRNawEMorybNiIrYfgVeqtMaASQcPw,4606
|
|
5
|
-
shotgun/posthog_telemetry.py,sha256=
|
|
5
|
+
shotgun/posthog_telemetry.py,sha256=tu5FLao8uXd76RcKMyWQ9RWPCCJos749XJ_9uT_NNwI,4294
|
|
6
6
|
shotgun/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
shotgun/sentry_telemetry.py,sha256=
|
|
7
|
+
shotgun/sentry_telemetry.py,sha256=L7jFMNAnDIENWVeQYSLpyul2nmIm2w3wnOp2kDP_cic,2902
|
|
8
8
|
shotgun/telemetry.py,sha256=Ves6Ih3hshpKVNVAUUmwRdtW8NkTjFPg8hEqvFKZ0t0,3208
|
|
9
9
|
shotgun/agents/__init__.py,sha256=8Jzv1YsDuLyNPFJyckSr_qI4ehTVeDyIMDW4omsfPGc,25
|
|
10
|
-
shotgun/agents/agent_manager.py,sha256=
|
|
10
|
+
shotgun/agents/agent_manager.py,sha256=01MafRjUDFre00mZUWIyOImdBkylpEG75mLNuQ0cJv4,25308
|
|
11
11
|
shotgun/agents/common.py,sha256=vt7ECq1rT6GR5Rt63t0whH0R0cydrk7Mty2KyPL8mEg,19045
|
|
12
12
|
shotgun/agents/conversation_history.py,sha256=5J8_1yxdZiiWTq22aDio88DkBDZ4_Lh_p5Iy5_ENszc,3898
|
|
13
13
|
shotgun/agents/conversation_manager.py,sha256=fxAvXbEl3Cl2ugJ4N9aWXaqZtkrnfj3QzwjWC4LFXwI,3514
|
|
@@ -24,11 +24,11 @@ shotgun/agents/config/manager.py,sha256=kwMbPjz0kEH_WCQAamESGjHdE8d_P-ztel4NL4FW
|
|
|
24
24
|
shotgun/agents/config/models.py,sha256=vpVXrtiHsDt2D_h7BLyMiiQeT97vAz2L6lYKx2SEMjo,5909
|
|
25
25
|
shotgun/agents/config/provider.py,sha256=pVWf_WM3MNWH0v2fU-peBCqx49X-nW81piQ_M-AKWRE,7249
|
|
26
26
|
shotgun/agents/history/__init__.py,sha256=XFQj2a6fxDqVg0Q3juvN9RjV_RJbgvFZtQOCOjVJyp4,147
|
|
27
|
-
shotgun/agents/history/compaction.py,sha256=
|
|
27
|
+
shotgun/agents/history/compaction.py,sha256=Je8-7T2i78gv_QWzgZNe9mvscaHcaTMttQX9xS8M38Q,3509
|
|
28
28
|
shotgun/agents/history/constants.py,sha256=yWY8rrTZarLA3flCCMB_hS2NMvUDRDTwP4D4j7MIh1w,446
|
|
29
29
|
shotgun/agents/history/context_extraction.py,sha256=yVka1U6TqNVsORR4JlxpWi9yBt3Quip8g_u3x2Vi9Gs,3564
|
|
30
30
|
shotgun/agents/history/history_building.py,sha256=6LFDZ60MTPDoGAcmu_mjlnjVYu8YYWdIi-cGbF3jm7A,3532
|
|
31
|
-
shotgun/agents/history/history_processors.py,sha256=
|
|
31
|
+
shotgun/agents/history/history_processors.py,sha256=NbStr6CvszwK3DKO5LCiaVEJI-RAcVnH5dCpHTAHjQo,17731
|
|
32
32
|
shotgun/agents/history/message_utils.py,sha256=aPusAl2RYKbjc7lBxPaNprRHmZEG6fe97q7DQUlhlzU,2918
|
|
33
33
|
shotgun/agents/history/token_counting.py,sha256=RasWy84eNjbmqyQDTGAzj1Q1I9ml_G_9R-maWN7gr8s,13839
|
|
34
34
|
shotgun/agents/history/token_estimation.py,sha256=iNqhDSqFzG0YYxGijMRzj54GALFglOp0qVMB6G59RhU,4690
|
|
@@ -55,7 +55,7 @@ shotgun/cli/plan.py,sha256=T-eu-I9z-dSoKqJ-KI8X5i5Mm0VL1BfornxRiUjTgnk,2324
|
|
|
55
55
|
shotgun/cli/research.py,sha256=qvBBtX3Wyn6pDZlJpcEvbeK-0iTOXegi71tm8HKVYaE,2490
|
|
56
56
|
shotgun/cli/specify.py,sha256=ErRQ72Zc75fmxopZbKy0vvnLPuYBLsGynpjj1X6-BwI,2166
|
|
57
57
|
shotgun/cli/tasks.py,sha256=17qWoGCVYpNIxa2vaoIH1P-xz2RcGLaK8SF4JlPsOWI,2420
|
|
58
|
-
shotgun/cli/update.py,sha256=
|
|
58
|
+
shotgun/cli/update.py,sha256=Dn_No7jPmdZ-7qYlhzI0BtmlufetVdw1BN-xRi_UE5A,4718
|
|
59
59
|
shotgun/cli/utils.py,sha256=umVWXDx8pelovMk-nT8B7m0c39AKY9hHsuAMnbw_Hcg,732
|
|
60
60
|
shotgun/cli/codebase/__init__.py,sha256=rKdvx33p0i_BYbNkz5_4DCFgEMwzOOqLi9f5p7XTLKM,73
|
|
61
61
|
shotgun/cli/codebase/commands.py,sha256=zvcM9gjHHO6styhXojb_1bnpq-Cozh2c77ZOIjw4B8s,6683
|
|
@@ -97,7 +97,7 @@ shotgun/prompts/history/__init__.py,sha256=wbMLQ8yWmYz1sfXXigEAUlNkFcM50KdQv0kp4
|
|
|
97
97
|
shotgun/prompts/history/incremental_summarization.j2,sha256=GmnNh0pWTjaEaI1sPwKNsGCys5fK8xrzWqalAs_LhJw,2447
|
|
98
98
|
shotgun/prompts/history/summarization.j2,sha256=OYNVHg65zbuWB6_pXzTOs2T2k5qFD2gyfbmr6NP01rs,2268
|
|
99
99
|
shotgun/sdk/__init__.py,sha256=ESV0WM9MigjXG30g9qVjcCMI40GQv-P-MSMGVuOisK4,380
|
|
100
|
-
shotgun/sdk/codebase.py,sha256=
|
|
100
|
+
shotgun/sdk/codebase.py,sha256=3FzSI9eCg7idps_cD-cnRwMIsJVAVhZQWBR0bU4hdA8,8602
|
|
101
101
|
shotgun/sdk/exceptions.py,sha256=qBcQv0v7ZTwP7CMcxZST4GqCsfOWtOUjSzGBo0-heqo,412
|
|
102
102
|
shotgun/sdk/models.py,sha256=X9nOTUHH0cdkQW1NfnMEDu-QgK9oUsEISh1Jtwr5Am4,5496
|
|
103
103
|
shotgun/sdk/services.py,sha256=J4PJFSxCQ6--u7rb3Ta-9eYtlYcxcbnzrMP6ThyCnw4,705
|
|
@@ -109,7 +109,7 @@ shotgun/tui/components/prompt_input.py,sha256=Ss-htqraHZAPaehGE4x86ij0veMjc4Ugad
|
|
|
109
109
|
shotgun/tui/components/spinner.py,sha256=ovTDeaJ6FD6chZx_Aepia6R3UkPOVJ77EKHfRmn39MY,2427
|
|
110
110
|
shotgun/tui/components/splash.py,sha256=vppy9vEIEvywuUKRXn2y11HwXSRkQZHLYoVjhDVdJeU,1267
|
|
111
111
|
shotgun/tui/components/vertical_tail.py,sha256=GavHXNMq1X8hc0juDLKDWTW9seRLk3VlhBBMl60uPG0,439
|
|
112
|
-
shotgun/tui/screens/chat.py,sha256=
|
|
112
|
+
shotgun/tui/screens/chat.py,sha256=nlu3yHS6HAnloqA_v4xnFeM9BleUyIWY2fHV1P_7yBc,30083
|
|
113
113
|
shotgun/tui/screens/chat.tcss,sha256=2Yq3E23jxsySYsgZf4G1AYrYVcpX0UDW6kNNI0tDmtM,437
|
|
114
114
|
shotgun/tui/screens/directory_setup.py,sha256=lIZ1J4A6g5Q2ZBX8epW7BhR96Dmdcg22CyiM5S-I5WU,3237
|
|
115
115
|
shotgun/tui/screens/provider_config.py,sha256=A_tvDHF5KLP5PV60LjMJ_aoOdT3TjI6_g04UIUqGPqM,7126
|
|
@@ -123,9 +123,10 @@ shotgun/tui/utils/mode_progress.py,sha256=lseRRo7kMWLkBzI3cU5vqJmS2ZcCjyRYf9Zwtv
|
|
|
123
123
|
shotgun/utils/__init__.py,sha256=WinIEp9oL2iMrWaDkXz2QX4nYVPAm8C9aBSKTeEwLtE,198
|
|
124
124
|
shotgun/utils/env_utils.py,sha256=8QK5aw_f_V2AVTleQQlcL0RnD4sPJWXlDG46fsHu0d8,1057
|
|
125
125
|
shotgun/utils/file_system_utils.py,sha256=l-0p1bEHF34OU19MahnRFdClHufThfGAjQ431teAIp0,1004
|
|
126
|
-
shotgun/utils/
|
|
127
|
-
|
|
128
|
-
shotgun_sh-0.1.
|
|
129
|
-
shotgun_sh-0.1.
|
|
130
|
-
shotgun_sh-0.1.
|
|
131
|
-
shotgun_sh-0.1.
|
|
126
|
+
shotgun/utils/source_detection.py,sha256=Co6Q03R3fT771TF3RzB-70stfjNP2S4F_ArZKibwzm8,454
|
|
127
|
+
shotgun/utils/update_checker.py,sha256=IgzPHRhS1ETH7PnJR_dIx6lxgr1qHpCkMTgzUxvGjhI,7586
|
|
128
|
+
shotgun_sh-0.1.11.dev1.dist-info/METADATA,sha256=sxMCruZxOqBiw8AFfFi4VkhrPJvFYKi2Y0mamnMLFpk,11197
|
|
129
|
+
shotgun_sh-0.1.11.dev1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
130
|
+
shotgun_sh-0.1.11.dev1.dist-info/entry_points.txt,sha256=asZxLU4QILneq0MWW10saVCZc4VWhZfb0wFZvERnzfA,45
|
|
131
|
+
shotgun_sh-0.1.11.dev1.dist-info/licenses/LICENSE,sha256=YebsZl590zCHrF_acCU5pmNt0pnAfD2DmAnevJPB1tY,1065
|
|
132
|
+
shotgun_sh-0.1.11.dev1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|