shotgun-sh 0.2.1.dev5__py3-none-any.whl → 0.2.2.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/codebase/core/ingestor.py +22 -3
- shotgun/codebase/core/manager.py +7 -3
- shotgun/tui/screens/chat.py +2 -2
- {shotgun_sh-0.2.1.dev5.dist-info → shotgun_sh-0.2.2.dev1.dist-info}/METADATA +1 -1
- {shotgun_sh-0.2.1.dev5.dist-info → shotgun_sh-0.2.2.dev1.dist-info}/RECORD +8 -8
- {shotgun_sh-0.2.1.dev5.dist-info → shotgun_sh-0.2.2.dev1.dist-info}/WHEEL +0 -0
- {shotgun_sh-0.2.1.dev5.dist-info → shotgun_sh-0.2.2.dev1.dist-info}/entry_points.txt +0 -0
- {shotgun_sh-0.2.1.dev5.dist-info → shotgun_sh-0.2.2.dev1.dist-info}/licenses/LICENSE +0 -0
|
@@ -56,6 +56,23 @@ BUILD_ARTIFACT_DIRECTORIES = {
|
|
|
56
56
|
# Default ignore patterns combines base directories and build artifacts
|
|
57
57
|
IGNORE_PATTERNS = BASE_IGNORE_DIRECTORIES | BUILD_ARTIFACT_DIRECTORIES
|
|
58
58
|
|
|
59
|
+
# Directory prefixes that should always be ignored
|
|
60
|
+
IGNORED_DIRECTORY_PREFIXES = (".",)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def should_ignore_directory(name: str, ignore_patterns: set[str] | None = None) -> bool:
|
|
64
|
+
"""Return True if the directory name should be ignored."""
|
|
65
|
+
patterns = IGNORE_PATTERNS if ignore_patterns is None else ignore_patterns
|
|
66
|
+
if name in patterns:
|
|
67
|
+
return True
|
|
68
|
+
return name.startswith(IGNORED_DIRECTORY_PREFIXES)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def is_path_ignored(path: Path, ignore_patterns: set[str] | None = None) -> bool:
|
|
72
|
+
"""Return True if any part of the path should be ignored."""
|
|
73
|
+
patterns = IGNORE_PATTERNS if ignore_patterns is None else ignore_patterns
|
|
74
|
+
return any(should_ignore_directory(part, patterns) for part in path.parts)
|
|
75
|
+
|
|
59
76
|
|
|
60
77
|
class Ingestor:
|
|
61
78
|
"""Handles all communication and ingestion with the Kuzu database."""
|
|
@@ -627,7 +644,9 @@ class SimpleGraphBuilder:
|
|
|
627
644
|
"""First pass: Walk directory to find packages and folders."""
|
|
628
645
|
dir_count = 0
|
|
629
646
|
for root_str, dirs, _ in os.walk(self.repo_path, topdown=True):
|
|
630
|
-
dirs[:] = [
|
|
647
|
+
dirs[:] = [
|
|
648
|
+
d for d in dirs if not should_ignore_directory(d, self.ignore_dirs)
|
|
649
|
+
]
|
|
631
650
|
root = Path(root_str)
|
|
632
651
|
relative_root = root.relative_to(self.repo_path)
|
|
633
652
|
|
|
@@ -760,7 +779,7 @@ class SimpleGraphBuilder:
|
|
|
760
779
|
root = Path(root_str)
|
|
761
780
|
|
|
762
781
|
# Skip ignored directories
|
|
763
|
-
if
|
|
782
|
+
if is_path_ignored(root, self.ignore_dirs):
|
|
764
783
|
continue
|
|
765
784
|
|
|
766
785
|
for filename in files:
|
|
@@ -777,7 +796,7 @@ class SimpleGraphBuilder:
|
|
|
777
796
|
root = Path(root_str)
|
|
778
797
|
|
|
779
798
|
# Skip ignored directories
|
|
780
|
-
if
|
|
799
|
+
if is_path_ignored(root, self.ignore_dirs):
|
|
781
800
|
continue
|
|
782
801
|
|
|
783
802
|
for filename in files:
|
shotgun/codebase/core/manager.py
CHANGED
|
@@ -51,9 +51,13 @@ class CodebaseFileHandler(FileSystemEventHandler):
|
|
|
51
51
|
self.pending_changes: list[FileChange] = []
|
|
52
52
|
self._lock = anyio.Lock()
|
|
53
53
|
# Import default ignore patterns from ingestor
|
|
54
|
-
from shotgun.codebase.core.ingestor import
|
|
54
|
+
from shotgun.codebase.core.ingestor import (
|
|
55
|
+
IGNORE_PATTERNS,
|
|
56
|
+
should_ignore_directory,
|
|
57
|
+
)
|
|
55
58
|
|
|
56
59
|
self.ignore_patterns = ignore_patterns or IGNORE_PATTERNS
|
|
60
|
+
self._should_ignore_directory = should_ignore_directory
|
|
57
61
|
|
|
58
62
|
def on_any_event(self, event: FileSystemEvent) -> None:
|
|
59
63
|
"""Handle any file system event."""
|
|
@@ -71,7 +75,7 @@ class CodebaseFileHandler(FileSystemEventHandler):
|
|
|
71
75
|
|
|
72
76
|
# Check if any parent directory should be ignored
|
|
73
77
|
for parent in path.parents:
|
|
74
|
-
if parent.name
|
|
78
|
+
if self._should_ignore_directory(parent.name, self.ignore_patterns):
|
|
75
79
|
logger.debug(
|
|
76
80
|
f"Ignoring file in ignored directory: {parent.name} - path: {src_path_str}"
|
|
77
81
|
)
|
|
@@ -106,7 +110,7 @@ class CodebaseFileHandler(FileSystemEventHandler):
|
|
|
106
110
|
)
|
|
107
111
|
dest_path = Path(dest_path_str)
|
|
108
112
|
for parent in dest_path.parents:
|
|
109
|
-
if parent.name
|
|
113
|
+
if self._should_ignore_directory(parent.name, self.ignore_patterns):
|
|
110
114
|
logger.debug(
|
|
111
115
|
f"Ignoring move to ignored directory: {parent.name} - dest_path: {dest_path_str}"
|
|
112
116
|
)
|
shotgun/tui/screens/chat.py
CHANGED
|
@@ -114,9 +114,9 @@ class StatusBar(Widget):
|
|
|
114
114
|
|
|
115
115
|
def render(self) -> str:
|
|
116
116
|
if self.working:
|
|
117
|
-
return """[$foreground-muted][bold $text]esc[/] to stop • [bold $text]enter[/] to send • [bold $text]ctrl+p[/] command palette • [bold $text]shift+tab[/] cycle modes • /help for commands[/]"""
|
|
117
|
+
return """[$foreground-muted][bold $text]esc[/] to stop • [bold $text]enter[/] to send • [bold $text]ctrl+j[/] for newline • [bold $text]ctrl+p[/] command palette • [bold $text]shift+tab[/] cycle modes • /help for commands[/]"""
|
|
118
118
|
else:
|
|
119
|
-
return """[$foreground-muted][bold $text]enter[/] to send • [bold $text]ctrl+p[/] command palette • [bold $text]shift+tab[/] cycle modes • /help for commands[/]"""
|
|
119
|
+
return """[$foreground-muted][bold $text]enter[/] to send • [bold $text]ctrl+j[/] for newline • [bold $text]ctrl+p[/] command palette • [bold $text]shift+tab[/] cycle modes • /help for commands[/]"""
|
|
120
120
|
|
|
121
121
|
|
|
122
122
|
class ModeIndicator(Widget):
|
|
@@ -76,9 +76,9 @@ shotgun/codebase/core/__init__.py,sha256=GWWhJEqChiDXAF4omYCgzgoZmJjwsAf6P1aZ5Bl
|
|
|
76
76
|
shotgun/codebase/core/change_detector.py,sha256=kWCYLWzRzb3IGGOj71KBn7UOCOKMpINJbOBDf98aMxE,12409
|
|
77
77
|
shotgun/codebase/core/code_retrieval.py,sha256=_JVyyQKHDFm3dxOOua1mw9eIIOHIVz3-I8aZtEsEj1E,7927
|
|
78
78
|
shotgun/codebase/core/cypher_models.py,sha256=Yfysfa9lLguILftkmtuJCN3kLBFIo7WW7NigM-Zr-W4,1735
|
|
79
|
-
shotgun/codebase/core/ingestor.py,sha256=
|
|
79
|
+
shotgun/codebase/core/ingestor.py,sha256=CNYbdoJycnbA2psYCD9uKcUwIe3Ao7I7T6NrPhTQE9k,64613
|
|
80
80
|
shotgun/codebase/core/language_config.py,sha256=vsqHyuFnumRPRBV1lMOxWKNOIiClO6FyfKQR0fGrtl4,8934
|
|
81
|
-
shotgun/codebase/core/manager.py,sha256=
|
|
81
|
+
shotgun/codebase/core/manager.py,sha256=kjxQ9eCs5vVCVDproCN1eYSKuGiqtcxF01reQ18JfOw,66184
|
|
82
82
|
shotgun/codebase/core/nl_query.py,sha256=kPoSJXBlm5rLhzOofZhqPVMJ_Lj3rV2H6sld6BwtMdg,16115
|
|
83
83
|
shotgun/codebase/core/parser_loader.py,sha256=LZRrDS8Sp518jIu3tQW-BxdwJ86lnsTteI478ER9Td8,4278
|
|
84
84
|
shotgun/llm_proxy/__init__.py,sha256=BLD9NnVzdD0H7gFb65Ajud-Q7SiCymegLRaGx8UkC-Y,435
|
|
@@ -126,7 +126,7 @@ shotgun/tui/components/prompt_input.py,sha256=Ss-htqraHZAPaehGE4x86ij0veMjc4Ugad
|
|
|
126
126
|
shotgun/tui/components/spinner.py,sha256=ovTDeaJ6FD6chZx_Aepia6R3UkPOVJ77EKHfRmn39MY,2427
|
|
127
127
|
shotgun/tui/components/splash.py,sha256=vppy9vEIEvywuUKRXn2y11HwXSRkQZHLYoVjhDVdJeU,1267
|
|
128
128
|
shotgun/tui/components/vertical_tail.py,sha256=kROwTaRjUwVB7H35dtmNcUVPQqNYvvfq7K2tXBKEb6c,638
|
|
129
|
-
shotgun/tui/screens/chat.py,sha256=
|
|
129
|
+
shotgun/tui/screens/chat.py,sha256=Yb5zWpWVmvtIFjO1jkhU6piJyGVc9XdTErNd6kUbjjw,30389
|
|
130
130
|
shotgun/tui/screens/chat.tcss,sha256=2Yq3E23jxsySYsgZf4G1AYrYVcpX0UDW6kNNI0tDmtM,437
|
|
131
131
|
shotgun/tui/screens/directory_setup.py,sha256=lIZ1J4A6g5Q2ZBX8epW7BhR96Dmdcg22CyiM5S-I5WU,3237
|
|
132
132
|
shotgun/tui/screens/feedback.py,sha256=VxpW0PVxMp22ZvSfQkTtgixNrpEOlfWtekjqlVfYEjA,5708
|
|
@@ -146,8 +146,8 @@ shotgun/utils/env_utils.py,sha256=5spVCdeqVKtlWoKocPhz_5j_iRN30neqcGUzUuiWmfc,13
|
|
|
146
146
|
shotgun/utils/file_system_utils.py,sha256=l-0p1bEHF34OU19MahnRFdClHufThfGAjQ431teAIp0,1004
|
|
147
147
|
shotgun/utils/source_detection.py,sha256=Co6Q03R3fT771TF3RzB-70stfjNP2S4F_ArZKibwzm8,454
|
|
148
148
|
shotgun/utils/update_checker.py,sha256=IgzPHRhS1ETH7PnJR_dIx6lxgr1qHpCkMTgzUxvGjhI,7586
|
|
149
|
-
shotgun_sh-0.2.
|
|
150
|
-
shotgun_sh-0.2.
|
|
151
|
-
shotgun_sh-0.2.
|
|
152
|
-
shotgun_sh-0.2.
|
|
153
|
-
shotgun_sh-0.2.
|
|
149
|
+
shotgun_sh-0.2.2.dev1.dist-info/METADATA,sha256=8_6NnepJIc4kB05vOqw0AoedwoJHuIJBjMRpjmWsJQQ,11226
|
|
150
|
+
shotgun_sh-0.2.2.dev1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
151
|
+
shotgun_sh-0.2.2.dev1.dist-info/entry_points.txt,sha256=asZxLU4QILneq0MWW10saVCZc4VWhZfb0wFZvERnzfA,45
|
|
152
|
+
shotgun_sh-0.2.2.dev1.dist-info/licenses/LICENSE,sha256=YebsZl590zCHrF_acCU5pmNt0pnAfD2DmAnevJPB1tY,1065
|
|
153
|
+
shotgun_sh-0.2.2.dev1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|