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.
Files changed (22) hide show
  1. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/PKG-INFO +1 -1
  2. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/pyproject.toml +1 -1
  3. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/git_utils.py +33 -2
  4. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding.egg-info/PKG-INFO +1 -1
  5. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/README.md +0 -0
  6. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/setup.cfg +0 -0
  7. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/__init__.py +0 -0
  8. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/capabilities/__init__.py +0 -0
  9. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/capabilities/repo.py +0 -0
  10. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/config.py +0 -0
  11. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/controller_client.py +0 -0
  12. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/journal.py +0 -0
  13. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/main.py +0 -0
  14. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/protocol.py +0 -0
  15. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/scrollback_buffer.py +0 -0
  16. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/status.py +0 -0
  17. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding/terminal_runtime.py +0 -0
  18. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding.egg-info/SOURCES.txt +0 -0
  19. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding.egg-info/dependency_links.txt +0 -0
  20. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding.egg-info/entry_points.txt +0 -0
  21. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding.egg-info/requires.txt +0 -0
  22. {bamboo_coding-0.1.2 → bamboo_coding-0.1.4}/src/bamboo_coding.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bamboo-coding
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: Bamboo Coding outbound client
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "bamboo-coding"
7
- version = "0.1.2"
7
+ version = "0.1.4"
8
8
  description = "Bamboo Coding outbound client"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -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 sorted(target.iterdir(), key=lambda item: (item.is_file(), item.name.lower())):
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': is_git_repository_path(str(target)),
2074
+ 'is_git_repo': _repo is not None,
2044
2075
  }
2045
2076
 
2046
2077
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bamboo-coding
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: Bamboo Coding outbound client
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
File without changes
File without changes