shotgun-sh 0.1.0.dev23__py3-none-any.whl → 0.1.0.dev24__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/common.py +4 -1
- shotgun/codebase/core/ingestor.py +1 -1
- shotgun/codebase/core/manager.py +106 -4
- shotgun/codebase/models.py +4 -0
- shotgun/codebase/service.py +60 -2
- shotgun/sdk/codebase.py +26 -2
- shotgun/tui/screens/chat.py +23 -11
- {shotgun_sh-0.1.0.dev23.dist-info → shotgun_sh-0.1.0.dev24.dist-info}/METADATA +1 -1
- {shotgun_sh-0.1.0.dev23.dist-info → shotgun_sh-0.1.0.dev24.dist-info}/RECORD +12 -12
- {shotgun_sh-0.1.0.dev23.dist-info → shotgun_sh-0.1.0.dev24.dist-info}/WHEEL +0 -0
- {shotgun_sh-0.1.0.dev23.dist-info → shotgun_sh-0.1.0.dev24.dist-info}/entry_points.txt +0 -0
- {shotgun_sh-0.1.0.dev23.dist-info → shotgun_sh-0.1.0.dev24.dist-info}/licenses/LICENSE +0 -0
shotgun/agents/common.py
CHANGED
|
@@ -62,7 +62,10 @@ async def add_system_status_message(
|
|
|
62
62
|
Updated message history with system status message prepended
|
|
63
63
|
"""
|
|
64
64
|
message_history = message_history or []
|
|
65
|
-
|
|
65
|
+
# Only show graphs for the current working directory
|
|
66
|
+
codebase_understanding_graphs = (
|
|
67
|
+
await deps.codebase_service.list_graphs_for_directory()
|
|
68
|
+
)
|
|
66
69
|
|
|
67
70
|
# Get existing files for the agent
|
|
68
71
|
existing_files = get_agent_existing_files(deps.agent_mode)
|
|
@@ -54,7 +54,7 @@ class Ingestor:
|
|
|
54
54
|
|
|
55
55
|
# Node tables
|
|
56
56
|
node_schemas = [
|
|
57
|
-
"CREATE NODE TABLE Project(name STRING PRIMARY KEY, repo_path STRING, graph_id STRING, created_at INT64, updated_at INT64, schema_version STRING, build_options STRING, node_count INT64, relationship_count INT64, stats_updated_at INT64, status STRING, current_operation_id STRING, last_operation STRING)",
|
|
57
|
+
"CREATE NODE TABLE Project(name STRING PRIMARY KEY, repo_path STRING, graph_id STRING, created_at INT64, updated_at INT64, schema_version STRING, build_options STRING, node_count INT64, relationship_count INT64, stats_updated_at INT64, status STRING, current_operation_id STRING, last_operation STRING, indexed_from_cwds STRING)",
|
|
58
58
|
"CREATE NODE TABLE Package(qualified_name STRING PRIMARY KEY, name STRING, path STRING)",
|
|
59
59
|
"CREATE NODE TABLE Folder(path STRING PRIMARY KEY, name STRING)",
|
|
60
60
|
"CREATE NODE TABLE File(path STRING PRIMARY KEY, name STRING, extension STRING)",
|
shotgun/codebase/core/manager.py
CHANGED
|
@@ -252,6 +252,7 @@ class CodebaseGraphManager:
|
|
|
252
252
|
name: str,
|
|
253
253
|
languages: list[str] | None,
|
|
254
254
|
exclude_patterns: list[str] | None,
|
|
255
|
+
indexed_from_cwd: str | None = None,
|
|
255
256
|
) -> None:
|
|
256
257
|
"""Initialize the graph database and create initial metadata.
|
|
257
258
|
|
|
@@ -294,7 +295,8 @@ class CodebaseGraphManager:
|
|
|
294
295
|
last_operation: $last_operation,
|
|
295
296
|
node_count: 0,
|
|
296
297
|
relationship_count: 0,
|
|
297
|
-
stats_updated_at: $stats_updated_at
|
|
298
|
+
stats_updated_at: $stats_updated_at,
|
|
299
|
+
indexed_from_cwds: $indexed_from_cwds
|
|
298
300
|
})
|
|
299
301
|
""",
|
|
300
302
|
{
|
|
@@ -311,6 +313,9 @@ class CodebaseGraphManager:
|
|
|
311
313
|
"current_operation_id": None,
|
|
312
314
|
"last_operation": None,
|
|
313
315
|
"stats_updated_at": int(time.time()),
|
|
316
|
+
"indexed_from_cwds": json.dumps(
|
|
317
|
+
[indexed_from_cwd] if indexed_from_cwd else []
|
|
318
|
+
),
|
|
314
319
|
},
|
|
315
320
|
)
|
|
316
321
|
|
|
@@ -323,6 +328,7 @@ class CodebaseGraphManager:
|
|
|
323
328
|
name: str | None = None,
|
|
324
329
|
languages: list[str] | None = None,
|
|
325
330
|
exclude_patterns: list[str] | None = None,
|
|
331
|
+
indexed_from_cwd: str | None = None,
|
|
326
332
|
) -> CodebaseGraph:
|
|
327
333
|
"""Build a new code knowledge graph.
|
|
328
334
|
|
|
@@ -397,7 +403,8 @@ class CodebaseGraphManager:
|
|
|
397
403
|
created_at: $created_at,
|
|
398
404
|
updated_at: $updated_at,
|
|
399
405
|
schema_version: $schema_version,
|
|
400
|
-
build_options: $build_options
|
|
406
|
+
build_options: $build_options,
|
|
407
|
+
indexed_from_cwds: $indexed_from_cwds
|
|
401
408
|
})
|
|
402
409
|
""",
|
|
403
410
|
{
|
|
@@ -410,6 +417,9 @@ class CodebaseGraphManager:
|
|
|
410
417
|
"build_options": json.dumps(
|
|
411
418
|
{"languages": languages, "exclude_patterns": exclude_patterns}
|
|
412
419
|
),
|
|
420
|
+
"indexed_from_cwds": json.dumps(
|
|
421
|
+
[indexed_from_cwd] if indexed_from_cwd else []
|
|
422
|
+
),
|
|
413
423
|
},
|
|
414
424
|
)
|
|
415
425
|
|
|
@@ -475,6 +485,7 @@ class CodebaseGraphManager:
|
|
|
475
485
|
status=GraphStatus.READY,
|
|
476
486
|
last_operation=None,
|
|
477
487
|
current_operation_id=None,
|
|
488
|
+
indexed_from_cwds=[indexed_from_cwd] if indexed_from_cwd else [],
|
|
478
489
|
)
|
|
479
490
|
|
|
480
491
|
# Update status to READY
|
|
@@ -1145,6 +1156,15 @@ class CodebaseGraphManager:
|
|
|
1145
1156
|
logger.debug(f"Failed to parse last operation stats: {e}")
|
|
1146
1157
|
last_operation = None
|
|
1147
1158
|
|
|
1159
|
+
# Parse indexed_from_cwds - handle backward compatibility
|
|
1160
|
+
indexed_from_cwds_json = project.get("indexed_from_cwds", "[]")
|
|
1161
|
+
try:
|
|
1162
|
+
indexed_from_cwds = (
|
|
1163
|
+
json.loads(indexed_from_cwds_json) if indexed_from_cwds_json else []
|
|
1164
|
+
)
|
|
1165
|
+
except (json.JSONDecodeError, TypeError):
|
|
1166
|
+
indexed_from_cwds = []
|
|
1167
|
+
|
|
1148
1168
|
return CodebaseGraph(
|
|
1149
1169
|
graph_id=graph_id,
|
|
1150
1170
|
repo_path=project.get("repo_path", ""),
|
|
@@ -1165,6 +1185,7 @@ class CodebaseGraphManager:
|
|
|
1165
1185
|
status=status,
|
|
1166
1186
|
last_operation=last_operation,
|
|
1167
1187
|
current_operation_id=project.get("current_operation_id"),
|
|
1188
|
+
indexed_from_cwds=indexed_from_cwds,
|
|
1168
1189
|
)
|
|
1169
1190
|
except Exception as e:
|
|
1170
1191
|
logger.error(
|
|
@@ -1190,6 +1211,83 @@ class CodebaseGraphManager:
|
|
|
1190
1211
|
|
|
1191
1212
|
return sorted(graphs, key=lambda g: g.updated_at, reverse=True)
|
|
1192
1213
|
|
|
1214
|
+
async def add_cwd_access(self, graph_id: str, cwd: str | None = None) -> None:
|
|
1215
|
+
"""Add a working directory to a graph's access list.
|
|
1216
|
+
|
|
1217
|
+
Args:
|
|
1218
|
+
graph_id: Graph ID to update
|
|
1219
|
+
cwd: Working directory to add. If None, uses current working directory.
|
|
1220
|
+
"""
|
|
1221
|
+
from pathlib import Path
|
|
1222
|
+
|
|
1223
|
+
if cwd is None:
|
|
1224
|
+
cwd = str(Path.cwd().resolve())
|
|
1225
|
+
else:
|
|
1226
|
+
cwd = str(Path(cwd).resolve())
|
|
1227
|
+
|
|
1228
|
+
# Get current graph
|
|
1229
|
+
graph = await self.get_graph(graph_id)
|
|
1230
|
+
if not graph:
|
|
1231
|
+
raise ValueError(f"Graph {graph_id} not found")
|
|
1232
|
+
|
|
1233
|
+
# Get current list
|
|
1234
|
+
current_cwds = graph.indexed_from_cwds.copy()
|
|
1235
|
+
|
|
1236
|
+
# Add new CWD if not already present
|
|
1237
|
+
if cwd not in current_cwds:
|
|
1238
|
+
current_cwds.append(cwd)
|
|
1239
|
+
|
|
1240
|
+
# Update in database
|
|
1241
|
+
await self._execute_query(
|
|
1242
|
+
graph_id,
|
|
1243
|
+
"""
|
|
1244
|
+
MATCH (p:Project {graph_id: $graph_id})
|
|
1245
|
+
SET p.indexed_from_cwds = $indexed_from_cwds
|
|
1246
|
+
""",
|
|
1247
|
+
{
|
|
1248
|
+
"graph_id": graph_id,
|
|
1249
|
+
"indexed_from_cwds": json.dumps(current_cwds),
|
|
1250
|
+
},
|
|
1251
|
+
)
|
|
1252
|
+
logger.info(f"Added CWD access for {cwd} to graph {graph_id}")
|
|
1253
|
+
|
|
1254
|
+
async def remove_cwd_access(self, graph_id: str, cwd: str) -> None:
|
|
1255
|
+
"""Remove a working directory from a graph's access list.
|
|
1256
|
+
|
|
1257
|
+
Args:
|
|
1258
|
+
graph_id: Graph ID to update
|
|
1259
|
+
cwd: Working directory to remove
|
|
1260
|
+
"""
|
|
1261
|
+
from pathlib import Path
|
|
1262
|
+
|
|
1263
|
+
cwd = str(Path(cwd).resolve())
|
|
1264
|
+
|
|
1265
|
+
# Get current graph
|
|
1266
|
+
graph = await self.get_graph(graph_id)
|
|
1267
|
+
if not graph:
|
|
1268
|
+
raise ValueError(f"Graph {graph_id} not found")
|
|
1269
|
+
|
|
1270
|
+
# Get current list
|
|
1271
|
+
current_cwds = graph.indexed_from_cwds.copy()
|
|
1272
|
+
|
|
1273
|
+
# Remove CWD if present
|
|
1274
|
+
if cwd in current_cwds:
|
|
1275
|
+
current_cwds.remove(cwd)
|
|
1276
|
+
|
|
1277
|
+
# Update in database
|
|
1278
|
+
await self._execute_query(
|
|
1279
|
+
graph_id,
|
|
1280
|
+
"""
|
|
1281
|
+
MATCH (p:Project {graph_id: $graph_id})
|
|
1282
|
+
SET p.indexed_from_cwds = $indexed_from_cwds
|
|
1283
|
+
""",
|
|
1284
|
+
{
|
|
1285
|
+
"graph_id": graph_id,
|
|
1286
|
+
"indexed_from_cwds": json.dumps(current_cwds),
|
|
1287
|
+
},
|
|
1288
|
+
)
|
|
1289
|
+
logger.info(f"Removed CWD access for {cwd} from graph {graph_id}")
|
|
1290
|
+
|
|
1193
1291
|
async def delete_graph(self, graph_id: str) -> None:
|
|
1194
1292
|
"""Delete a graph.
|
|
1195
1293
|
|
|
@@ -1365,6 +1463,7 @@ class CodebaseGraphManager:
|
|
|
1365
1463
|
name: str,
|
|
1366
1464
|
languages: list[str] | None,
|
|
1367
1465
|
exclude_patterns: list[str] | None,
|
|
1466
|
+
indexed_from_cwd: str | None = None,
|
|
1368
1467
|
) -> CodebaseGraph:
|
|
1369
1468
|
"""Internal implementation of graph building (runs in background)."""
|
|
1370
1469
|
operation_id = str(uuid.uuid4())
|
|
@@ -1388,7 +1487,7 @@ class CodebaseGraphManager:
|
|
|
1388
1487
|
|
|
1389
1488
|
# Do the actual build work
|
|
1390
1489
|
graph = await self._do_build_graph(
|
|
1391
|
-
graph_id, repo_path, name, languages, exclude_patterns
|
|
1490
|
+
graph_id, repo_path, name, languages, exclude_patterns, indexed_from_cwd
|
|
1392
1491
|
)
|
|
1393
1492
|
|
|
1394
1493
|
# Update operation stats
|
|
@@ -1436,6 +1535,7 @@ class CodebaseGraphManager:
|
|
|
1436
1535
|
name: str,
|
|
1437
1536
|
languages: list[str] | None,
|
|
1438
1537
|
exclude_patterns: list[str] | None,
|
|
1538
|
+
indexed_from_cwd: str | None = None,
|
|
1439
1539
|
) -> CodebaseGraph:
|
|
1440
1540
|
"""Execute the actual graph building logic (extracted from original build_graph)."""
|
|
1441
1541
|
# The database and Project node already exist from _initialize_graph_metadata
|
|
@@ -1515,6 +1615,7 @@ class CodebaseGraphManager:
|
|
|
1515
1615
|
name: str | None = None,
|
|
1516
1616
|
languages: list[str] | None = None,
|
|
1517
1617
|
exclude_patterns: list[str] | None = None,
|
|
1618
|
+
indexed_from_cwd: str | None = None,
|
|
1518
1619
|
) -> str:
|
|
1519
1620
|
"""Start building a new code knowledge graph asynchronously.
|
|
1520
1621
|
|
|
@@ -1547,12 +1648,13 @@ class CodebaseGraphManager:
|
|
|
1547
1648
|
name=name,
|
|
1548
1649
|
languages=languages,
|
|
1549
1650
|
exclude_patterns=exclude_patterns,
|
|
1651
|
+
indexed_from_cwd=indexed_from_cwd,
|
|
1550
1652
|
)
|
|
1551
1653
|
|
|
1552
1654
|
# Start the build operation in background
|
|
1553
1655
|
task = asyncio.create_task(
|
|
1554
1656
|
self._build_graph_impl(
|
|
1555
|
-
graph_id, repo_path, name, languages, exclude_patterns
|
|
1657
|
+
graph_id, repo_path, name, languages, exclude_patterns, indexed_from_cwd
|
|
1556
1658
|
)
|
|
1557
1659
|
)
|
|
1558
1660
|
self._operations[graph_id] = task
|
shotgun/codebase/models.py
CHANGED
|
@@ -73,6 +73,10 @@ class CodebaseGraph(BaseModel):
|
|
|
73
73
|
current_operation_id: str | None = Field(
|
|
74
74
|
None, description="ID of current in-progress operation"
|
|
75
75
|
)
|
|
76
|
+
indexed_from_cwds: list[str] = Field(
|
|
77
|
+
default_factory=list,
|
|
78
|
+
description="List of working directories from which this graph is accessible. Empty list means globally accessible.",
|
|
79
|
+
)
|
|
76
80
|
|
|
77
81
|
|
|
78
82
|
class QueryResult(BaseModel):
|
shotgun/codebase/service.py
CHANGED
|
@@ -36,17 +36,57 @@ class CodebaseService:
|
|
|
36
36
|
"""
|
|
37
37
|
return await self.manager.list_graphs()
|
|
38
38
|
|
|
39
|
-
async def
|
|
39
|
+
async def list_graphs_for_directory(
|
|
40
|
+
self, directory: Path | str | None = None
|
|
41
|
+
) -> list[CodebaseGraph]:
|
|
42
|
+
"""List graphs that match a specific directory.
|
|
43
|
+
|
|
44
|
+
Args:
|
|
45
|
+
directory: Directory to filter by. If None, uses current working directory.
|
|
46
|
+
|
|
47
|
+
Returns:
|
|
48
|
+
List of CodebaseGraph objects accessible from the specified directory
|
|
49
|
+
"""
|
|
50
|
+
from pathlib import Path
|
|
51
|
+
|
|
52
|
+
if directory is None:
|
|
53
|
+
directory = Path.cwd()
|
|
54
|
+
elif isinstance(directory, str):
|
|
55
|
+
directory = Path(directory)
|
|
56
|
+
|
|
57
|
+
# Resolve to absolute path for comparison
|
|
58
|
+
target_path = str(directory.resolve())
|
|
59
|
+
|
|
60
|
+
# Get all graphs and filter by those accessible from this directory
|
|
61
|
+
all_graphs = await self.manager.list_graphs()
|
|
62
|
+
filtered_graphs = []
|
|
63
|
+
|
|
64
|
+
for graph in all_graphs:
|
|
65
|
+
# If indexed_from_cwds is empty, it's globally accessible (backward compatibility)
|
|
66
|
+
if not graph.indexed_from_cwds:
|
|
67
|
+
filtered_graphs.append(graph)
|
|
68
|
+
# Otherwise, check if current directory is in the allowed list
|
|
69
|
+
elif target_path in graph.indexed_from_cwds:
|
|
70
|
+
filtered_graphs.append(graph)
|
|
71
|
+
|
|
72
|
+
return filtered_graphs
|
|
73
|
+
|
|
74
|
+
async def create_graph(
|
|
75
|
+
self, repo_path: str | Path, name: str, indexed_from_cwd: str | None = None
|
|
76
|
+
) -> CodebaseGraph:
|
|
40
77
|
"""Create and index a new graph from a repository.
|
|
41
78
|
|
|
42
79
|
Args:
|
|
43
80
|
repo_path: Path to the repository to index
|
|
44
81
|
name: Human-readable name for the graph
|
|
82
|
+
indexed_from_cwd: Working directory from which indexing was initiated
|
|
45
83
|
|
|
46
84
|
Returns:
|
|
47
85
|
The created CodebaseGraph
|
|
48
86
|
"""
|
|
49
|
-
return await self.manager.build_graph(
|
|
87
|
+
return await self.manager.build_graph(
|
|
88
|
+
str(repo_path), name, indexed_from_cwd=indexed_from_cwd
|
|
89
|
+
)
|
|
50
90
|
|
|
51
91
|
async def get_graph(self, graph_id: str) -> CodebaseGraph | None:
|
|
52
92
|
"""Get graph metadata by ID.
|
|
@@ -59,6 +99,24 @@ class CodebaseService:
|
|
|
59
99
|
"""
|
|
60
100
|
return await self.manager.get_graph(graph_id)
|
|
61
101
|
|
|
102
|
+
async def add_cwd_access(self, graph_id: str, cwd: str | None = None) -> None:
|
|
103
|
+
"""Add a working directory to a graph's access list.
|
|
104
|
+
|
|
105
|
+
Args:
|
|
106
|
+
graph_id: Graph ID to update
|
|
107
|
+
cwd: Working directory to add. If None, uses current working directory.
|
|
108
|
+
"""
|
|
109
|
+
await self.manager.add_cwd_access(graph_id, cwd)
|
|
110
|
+
|
|
111
|
+
async def remove_cwd_access(self, graph_id: str, cwd: str) -> None:
|
|
112
|
+
"""Remove a working directory from a graph's access list.
|
|
113
|
+
|
|
114
|
+
Args:
|
|
115
|
+
graph_id: Graph ID to update
|
|
116
|
+
cwd: Working directory to remove
|
|
117
|
+
"""
|
|
118
|
+
await self.manager.remove_cwd_access(graph_id, cwd)
|
|
119
|
+
|
|
62
120
|
async def delete_graph(self, graph_id: str) -> None:
|
|
63
121
|
"""Delete a graph and its data.
|
|
64
122
|
|
shotgun/sdk/codebase.py
CHANGED
|
@@ -43,12 +43,30 @@ class CodebaseSDK:
|
|
|
43
43
|
graphs = await self.service.list_graphs()
|
|
44
44
|
return ListResult(graphs=graphs)
|
|
45
45
|
|
|
46
|
-
async def
|
|
46
|
+
async def list_codebases_for_directory(
|
|
47
|
+
self, directory: Path | None = None
|
|
48
|
+
) -> ListResult:
|
|
49
|
+
"""List codebases accessible from a specific directory.
|
|
50
|
+
|
|
51
|
+
Args:
|
|
52
|
+
directory: Directory to filter by. If None, uses current working directory.
|
|
53
|
+
|
|
54
|
+
Returns:
|
|
55
|
+
ListResult containing filtered list of codebases
|
|
56
|
+
"""
|
|
57
|
+
graphs = await self.service.list_graphs_for_directory(directory)
|
|
58
|
+
return ListResult(graphs=graphs)
|
|
59
|
+
|
|
60
|
+
async def index_codebase(
|
|
61
|
+
self, path: Path, name: str, indexed_from_cwd: str | None = None
|
|
62
|
+
) -> IndexResult:
|
|
47
63
|
"""Index a new codebase.
|
|
48
64
|
|
|
49
65
|
Args:
|
|
50
66
|
path: Path to the repository to index
|
|
51
67
|
name: Human-readable name for the codebase
|
|
68
|
+
indexed_from_cwd: Working directory from which indexing was initiated.
|
|
69
|
+
If None, uses current working directory.
|
|
52
70
|
|
|
53
71
|
Returns:
|
|
54
72
|
IndexResult with indexing details
|
|
@@ -60,7 +78,13 @@ class CodebaseSDK:
|
|
|
60
78
|
if not resolved_path.exists():
|
|
61
79
|
raise InvalidPathError(f"Path does not exist: {resolved_path}")
|
|
62
80
|
|
|
63
|
-
|
|
81
|
+
# Default to current working directory if not specified
|
|
82
|
+
if indexed_from_cwd is None:
|
|
83
|
+
indexed_from_cwd = str(Path.cwd().resolve())
|
|
84
|
+
|
|
85
|
+
graph = await self.service.create_graph(
|
|
86
|
+
resolved_path, name, indexed_from_cwd=indexed_from_cwd
|
|
87
|
+
)
|
|
64
88
|
file_count = sum(graph.language_stats.values()) if graph.language_stats else 0
|
|
65
89
|
|
|
66
90
|
return IndexResult(
|
shotgun/tui/screens/chat.py
CHANGED
|
@@ -378,16 +378,11 @@ class ChatScreen(Screen[None]):
|
|
|
378
378
|
if is_empty:
|
|
379
379
|
return
|
|
380
380
|
|
|
381
|
-
#
|
|
382
|
-
|
|
383
|
-
(
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
if cur_dir.is_relative_to(Path(dir.repo_path).resolve())
|
|
387
|
-
),
|
|
388
|
-
None,
|
|
389
|
-
)
|
|
390
|
-
if directory_indexed:
|
|
381
|
+
# Check if the current directory has any accessible codebases
|
|
382
|
+
accessible_graphs = (
|
|
383
|
+
await self.codebase_sdk.list_codebases_for_directory()
|
|
384
|
+
).graphs
|
|
385
|
+
if accessible_graphs:
|
|
391
386
|
self.mount_hint(help_text_with_codebase())
|
|
392
387
|
return
|
|
393
388
|
|
|
@@ -651,8 +646,18 @@ class ChatScreen(Screen[None]):
|
|
|
651
646
|
)
|
|
652
647
|
label.refresh()
|
|
653
648
|
try:
|
|
649
|
+
# Pass the current working directory as the indexed_from_cwd
|
|
650
|
+
logger.debug(
|
|
651
|
+
f"Starting indexing - repo_path: {selection.repo_path}, "
|
|
652
|
+
f"name: {selection.name}, cwd: {Path.cwd().resolve()}"
|
|
653
|
+
)
|
|
654
654
|
result = await self.codebase_sdk.index_codebase(
|
|
655
|
-
selection.repo_path,
|
|
655
|
+
selection.repo_path,
|
|
656
|
+
selection.name,
|
|
657
|
+
indexed_from_cwd=str(Path.cwd().resolve()),
|
|
658
|
+
)
|
|
659
|
+
logger.info(
|
|
660
|
+
f"Successfully indexed codebase '{result.name}' (ID: {result.graph_id})"
|
|
656
661
|
)
|
|
657
662
|
self.notify(
|
|
658
663
|
f"Indexed codebase '{result.name}' (ID: {result.graph_id})",
|
|
@@ -662,12 +667,19 @@ class ChatScreen(Screen[None]):
|
|
|
662
667
|
|
|
663
668
|
self.mount_hint(codebase_indexed_hint(selection.name))
|
|
664
669
|
except CodebaseAlreadyIndexedError as exc:
|
|
670
|
+
logger.warning(f"Codebase already indexed: {exc}")
|
|
665
671
|
self.notify(str(exc), severity="warning")
|
|
666
672
|
return
|
|
667
673
|
except InvalidPathError as exc:
|
|
674
|
+
logger.error(f"Invalid path error: {exc}")
|
|
668
675
|
self.notify(str(exc), severity="error")
|
|
669
676
|
|
|
670
677
|
except Exception as exc: # pragma: no cover - defensive UI path
|
|
678
|
+
# Log full exception details with stack trace
|
|
679
|
+
logger.exception(
|
|
680
|
+
f"Failed to index codebase - repo_path: {selection.repo_path}, "
|
|
681
|
+
f"name: {selection.name}, error: {exc}"
|
|
682
|
+
)
|
|
671
683
|
self.notify(f"Failed to index codebase: {exc}", severity="error")
|
|
672
684
|
finally:
|
|
673
685
|
label.update("")
|
|
@@ -8,7 +8,7 @@ shotgun/sentry_telemetry.py,sha256=3r9on0GQposn9aX6Dkb9mrfaVQl_dIZzhu9BjE838AU,2
|
|
|
8
8
|
shotgun/telemetry.py,sha256=aBwCRFU97oiIK5K13OhT7yYCQUAVQyrvnoG-aX3k2ZE,3109
|
|
9
9
|
shotgun/agents/__init__.py,sha256=8Jzv1YsDuLyNPFJyckSr_qI4ehTVeDyIMDW4omsfPGc,25
|
|
10
10
|
shotgun/agents/agent_manager.py,sha256=ApRzriE3mvAms5144rQ4Vjv1JWvRS89DruTtBvgVPdg,20235
|
|
11
|
-
shotgun/agents/common.py,sha256=
|
|
11
|
+
shotgun/agents/common.py,sha256=z4MOOHXpGWVpnxfGbOmfz-gYX9r8gjzcPPIOAJ9-2hc,15704
|
|
12
12
|
shotgun/agents/conversation_history.py,sha256=vw7LMOCmpkidQGAidPIxPly2sh1k1K-5NF3iYkXOAAU,1815
|
|
13
13
|
shotgun/agents/conversation_manager.py,sha256=fxAvXbEl3Cl2ugJ4N9aWXaqZtkrnfj3QzwjWC4LFXwI,3514
|
|
14
14
|
shotgun/agents/export.py,sha256=Zke952DbJ_lOBUmN-TPHw7qmjbfqsFu1uycBRQI_pkg,2969
|
|
@@ -60,14 +60,14 @@ shotgun/cli/codebase/__init__.py,sha256=rKdvx33p0i_BYbNkz5_4DCFgEMwzOOqLi9f5p7XT
|
|
|
60
60
|
shotgun/cli/codebase/commands.py,sha256=zvcM9gjHHO6styhXojb_1bnpq-Cozh2c77ZOIjw4B8s,6683
|
|
61
61
|
shotgun/cli/codebase/models.py,sha256=B9vs-d-Bq0aS6FZKebhHT-9tw90Y5f6k_t71VlZpL8k,374
|
|
62
62
|
shotgun/codebase/__init__.py,sha256=QBgFE2Abd5Vl7_NdYOglF9S6d-vIjkb3C0cpIYoHZEU,309
|
|
63
|
-
shotgun/codebase/models.py,sha256=
|
|
64
|
-
shotgun/codebase/service.py,sha256=
|
|
63
|
+
shotgun/codebase/models.py,sha256=hxjbfDUka8loTApXq9KTvkXKt272fzdjr5u2ImYrNtk,4367
|
|
64
|
+
shotgun/codebase/service.py,sha256=IK7h6IW84cblpHZVx5z9ulLDqJImGg6L9aZJimijBu8,6804
|
|
65
65
|
shotgun/codebase/core/__init__.py,sha256=GWWhJEqChiDXAF4omYCgzgoZmJjwsAf6P1aZ5Bl8OE0,1170
|
|
66
66
|
shotgun/codebase/core/change_detector.py,sha256=kWCYLWzRzb3IGGOj71KBn7UOCOKMpINJbOBDf98aMxE,12409
|
|
67
67
|
shotgun/codebase/core/code_retrieval.py,sha256=_JVyyQKHDFm3dxOOua1mw9eIIOHIVz3-I8aZtEsEj1E,7927
|
|
68
|
-
shotgun/codebase/core/ingestor.py,sha256=
|
|
68
|
+
shotgun/codebase/core/ingestor.py,sha256=H_kVCqdOKmnQpjcXvUdPFpep8OC2AbOhhE-9HKr_XZM,59836
|
|
69
69
|
shotgun/codebase/core/language_config.py,sha256=vsqHyuFnumRPRBV1lMOxWKNOIiClO6FyfKQR0fGrtl4,8934
|
|
70
|
-
shotgun/codebase/core/manager.py,sha256=
|
|
70
|
+
shotgun/codebase/core/manager.py,sha256=6gyjfACbC5n1Hdy-JQIEDH2aNAlesUS9plQP_FHoJ94,59277
|
|
71
71
|
shotgun/codebase/core/nl_query.py,sha256=iV6NbsyDd1SQpT9U9BtgxcZPsNoEW3OHrkk475r_jAY,11410
|
|
72
72
|
shotgun/codebase/core/parser_loader.py,sha256=LZRrDS8Sp518jIu3tQW-BxdwJ86lnsTteI478ER9Td8,4278
|
|
73
73
|
shotgun/prompts/__init__.py,sha256=RswUm0HMdfm2m2YKUwUsEdRIwoczdbI7zlucoEvHYRo,132
|
|
@@ -95,7 +95,7 @@ shotgun/prompts/history/__init__.py,sha256=wbMLQ8yWmYz1sfXXigEAUlNkFcM50KdQv0kp4
|
|
|
95
95
|
shotgun/prompts/history/incremental_summarization.j2,sha256=GmnNh0pWTjaEaI1sPwKNsGCys5fK8xrzWqalAs_LhJw,2447
|
|
96
96
|
shotgun/prompts/history/summarization.j2,sha256=OYNVHg65zbuWB6_pXzTOs2T2k5qFD2gyfbmr6NP01rs,2268
|
|
97
97
|
shotgun/sdk/__init__.py,sha256=ESV0WM9MigjXG30g9qVjcCMI40GQv-P-MSMGVuOisK4,380
|
|
98
|
-
shotgun/sdk/codebase.py,sha256=
|
|
98
|
+
shotgun/sdk/codebase.py,sha256=EYujvSl1EcQ1WfMjAvrX-h2H5_gHdcnmscQDaUxsCho,6965
|
|
99
99
|
shotgun/sdk/exceptions.py,sha256=qBcQv0v7ZTwP7CMcxZST4GqCsfOWtOUjSzGBo0-heqo,412
|
|
100
100
|
shotgun/sdk/models.py,sha256=X9nOTUHH0cdkQW1NfnMEDu-QgK9oUsEISh1Jtwr5Am4,5496
|
|
101
101
|
shotgun/sdk/services.py,sha256=J4PJFSxCQ6--u7rb3Ta-9eYtlYcxcbnzrMP6ThyCnw4,705
|
|
@@ -107,7 +107,7 @@ shotgun/tui/components/prompt_input.py,sha256=Ss-htqraHZAPaehGE4x86ij0veMjc4Ugad
|
|
|
107
107
|
shotgun/tui/components/spinner.py,sha256=ovTDeaJ6FD6chZx_Aepia6R3UkPOVJ77EKHfRmn39MY,2427
|
|
108
108
|
shotgun/tui/components/splash.py,sha256=vppy9vEIEvywuUKRXn2y11HwXSRkQZHLYoVjhDVdJeU,1267
|
|
109
109
|
shotgun/tui/components/vertical_tail.py,sha256=kkCH0WjAh54jDvRzIaOffRZXUKn_zHFZ_ichfUpgzaE,1071
|
|
110
|
-
shotgun/tui/screens/chat.py,sha256=
|
|
110
|
+
shotgun/tui/screens/chat.py,sha256=UlyFrd3OISB-M62R3fGBb-E9CoD6G4untbMVfDUSV3U,27820
|
|
111
111
|
shotgun/tui/screens/chat.tcss,sha256=2Yq3E23jxsySYsgZf4G1AYrYVcpX0UDW6kNNI0tDmtM,437
|
|
112
112
|
shotgun/tui/screens/directory_setup.py,sha256=lIZ1J4A6g5Q2ZBX8epW7BhR96Dmdcg22CyiM5S-I5WU,3237
|
|
113
113
|
shotgun/tui/screens/provider_config.py,sha256=A_tvDHF5KLP5PV60LjMJ_aoOdT3TjI6_g04UIUqGPqM,7126
|
|
@@ -121,8 +121,8 @@ shotgun/utils/__init__.py,sha256=WinIEp9oL2iMrWaDkXz2QX4nYVPAm8C9aBSKTeEwLtE,198
|
|
|
121
121
|
shotgun/utils/env_utils.py,sha256=8QK5aw_f_V2AVTleQQlcL0RnD4sPJWXlDG46fsHu0d8,1057
|
|
122
122
|
shotgun/utils/file_system_utils.py,sha256=l-0p1bEHF34OU19MahnRFdClHufThfGAjQ431teAIp0,1004
|
|
123
123
|
shotgun/utils/update_checker.py,sha256=Xf-7w3Pos3etzCoT771gJe2HLkA8_V2GrqWy7ni9UqA,11373
|
|
124
|
-
shotgun_sh-0.1.0.
|
|
125
|
-
shotgun_sh-0.1.0.
|
|
126
|
-
shotgun_sh-0.1.0.
|
|
127
|
-
shotgun_sh-0.1.0.
|
|
128
|
-
shotgun_sh-0.1.0.
|
|
124
|
+
shotgun_sh-0.1.0.dev24.dist-info/METADATA,sha256=mB7WwoiAOFmL6UFlltGz7UR8CD_nhRAgJict5L7i574,11197
|
|
125
|
+
shotgun_sh-0.1.0.dev24.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
126
|
+
shotgun_sh-0.1.0.dev24.dist-info/entry_points.txt,sha256=asZxLU4QILneq0MWW10saVCZc4VWhZfb0wFZvERnzfA,45
|
|
127
|
+
shotgun_sh-0.1.0.dev24.dist-info/licenses/LICENSE,sha256=YebsZl590zCHrF_acCU5pmNt0pnAfD2DmAnevJPB1tY,1065
|
|
128
|
+
shotgun_sh-0.1.0.dev24.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|