bamboo-coding 0.1.2__tar.gz → 0.1.4__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.
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/PKG-INFO +1 -1
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/pyproject.toml +1 -1
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/git_utils.py +33 -2
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding.egg-info/PKG-INFO +1 -1
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/README.md +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/setup.cfg +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/__init__.py +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/capabilities/__init__.py +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/capabilities/repo.py +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/config.py +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/controller_client.py +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/journal.py +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/main.py +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/protocol.py +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/scrollback_buffer.py +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/status.py +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/terminal_runtime.py +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding.egg-info/SOURCES.txt +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding.egg-info/dependency_links.txt +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding.egg-info/entry_points.txt +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding.egg-info/requires.txt +0 -0
- {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding.egg-info/top_level.txt +0 -0
|
@@ -2026,21 +2026,52 @@ def browse_workspace(path: str) -> Dict[str, Any]:
|
|
|
2026
2026
|
'is_git_repo': is_git_repository_path(str(target)),
|
|
2027
2027
|
}
|
|
2028
2028
|
|
|
2029
|
+
# Try to find the enclosing git repo so we can call repo.ignored().
|
|
2030
|
+
_repo = None
|
|
2031
|
+
try:
|
|
2032
|
+
_repo = Repo(str(target), search_parent_directories=True)
|
|
2033
|
+
except (InvalidGitRepositoryError, NoSuchPathError, ValueError):
|
|
2034
|
+
pass
|
|
2035
|
+
|
|
2036
|
+
# Build a set of ignored paths in one batch call when possible.
|
|
2037
|
+
def _ignored_set(names: List[str]) -> set:
|
|
2038
|
+
if _repo is None or not names:
|
|
2039
|
+
return set()
|
|
2040
|
+
# Paths must be relative to the repo working tree root.
|
|
2041
|
+
repo_root = Path(_repo.working_tree_dir)
|
|
2042
|
+
try:
|
|
2043
|
+
rel_paths = [str((target / n).relative_to(repo_root)) for n in names]
|
|
2044
|
+
except ValueError:
|
|
2045
|
+
return set()
|
|
2046
|
+
try:
|
|
2047
|
+
ignored = set(_repo.ignored(*rel_paths))
|
|
2048
|
+
# Map back to bare names for easy lookup.
|
|
2049
|
+
return {Path(p).name for p in ignored}
|
|
2050
|
+
except Exception:
|
|
2051
|
+
return set()
|
|
2052
|
+
|
|
2053
|
+
children = sorted(target.iterdir(), key=lambda item: (item.is_file(), item.name.lower()))
|
|
2054
|
+
ignored_names = _ignored_set([c.name for c in children if c.name != '.git'])
|
|
2055
|
+
|
|
2029
2056
|
entries = []
|
|
2030
|
-
for child in
|
|
2057
|
+
for child in children:
|
|
2058
|
+
is_ignored = child.name in ignored_names
|
|
2031
2059
|
item = {
|
|
2032
2060
|
'name': child.name,
|
|
2033
2061
|
'path': str(child.resolve()),
|
|
2034
2062
|
'type': 'file' if child.is_file() else 'directory',
|
|
2063
|
+
'ignored': is_ignored,
|
|
2035
2064
|
}
|
|
2036
2065
|
if child.is_file():
|
|
2037
2066
|
item['size'] = child.stat().st_size
|
|
2067
|
+
if is_ignored:
|
|
2068
|
+
item['status'] = 'ignored'
|
|
2038
2069
|
entries.append(item)
|
|
2039
2070
|
return {
|
|
2040
2071
|
'path': str(target),
|
|
2041
2072
|
'kind': 'directory',
|
|
2042
2073
|
'entries': entries,
|
|
2043
|
-
'is_git_repo':
|
|
2074
|
+
'is_git_repo': _repo is not None,
|
|
2044
2075
|
}
|
|
2045
2076
|
|
|
2046
2077
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|