ziya 0.1.1__py3-none-any.whl → 0.1.2__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 ziya might be problematic. Click here for more details.

app/agents/agent.py CHANGED
@@ -47,7 +47,8 @@ def get_combined_document_contents() -> str:
47
47
 
48
48
  combined_contents: str = ""
49
49
  ignored_patterns: List[str] = get_ignored_patterns(user_codebase_dir)
50
- all_files: List[str] = get_complete_file_list(user_codebase_dir, ignored_patterns)
50
+ included_relative_dirs = [pattern.strip() for pattern in os.environ.get("ZIYA_ADDITIONAL_INCLUDE_DIRS", "").split(',')]
51
+ all_files: List[str] = get_complete_file_list(user_codebase_dir, ignored_patterns, included_relative_dirs)
51
52
 
52
53
  print_file_tree(all_files)
53
54
 
@@ -59,7 +60,6 @@ def get_combined_document_contents() -> str:
59
60
  combined_contents += f"File: {file_path}\n{doc.page_content}\n\n"
60
61
  dir_path = os.path.dirname(file_path)
61
62
  if dir_path not in seen_dirs:
62
- # print_file_tree(dir_path, ignored_patterns)
63
63
  seen_dirs.add(dir_path)
64
64
  except Exception as e:
65
65
  print(f"Skipping file {file_path} due to error: {e}")
@@ -74,7 +74,6 @@ def get_combined_document_contents() -> str:
74
74
  print("--------------------------------------------------------")
75
75
  return combined_contents
76
76
 
77
-
78
77
  def get_child_paths(directory: str) -> Generator[str, None, None]:
79
78
  for entry in os.listdir(directory):
80
79
  child_path = os.path.join(directory, entry)
app/main.py CHANGED
@@ -8,6 +8,8 @@ def main():
8
8
  parser = argparse.ArgumentParser(description="Run with custom options")
9
9
  parser.add_argument("--exclude", default=[], type=lambda x: x.split(','),
10
10
  help="List of files or directories to exclude (e.g., --exclude 'tst,build,*.py')")
11
+ parser.add_argument("--include-dirs", default=[], type=lambda x: x.split(','),
12
+ help="List of directories to include (e.g., --include 'src,static')")
11
13
  parser.add_argument("--profile", type=str, default=None,
12
14
  help="AWS profile to use (e.g., --profile ziya)")
13
15
  parser.add_argument("--model", type=str, choices=["sonnet", "haiku", "opus"], default="haiku",
@@ -19,6 +21,9 @@ def main():
19
21
  additional_excluded_dirs = ','.join([item for item in args.exclude])
20
22
  os.environ["ZIYA_ADDITIONAL_EXCLUDE_DIRS"] = additional_excluded_dirs
21
23
 
24
+ additional_included_dirs = ','.join([item for item in args.include_dirs])
25
+ os.environ["ZIYA_ADDITIONAL_INCLUDE_DIRS"] = additional_included_dirs
26
+
22
27
  if args.profile:
23
28
  os.environ["ZIYA_AWS_PROFILE"] = args.profile
24
29
  if args.model:
@@ -30,4 +35,4 @@ def main():
30
35
 
31
36
 
32
37
  if __name__ == "__main__":
33
- main()
38
+ main()
@@ -41,17 +41,17 @@ def get_ignored_patterns(directory: str) -> List[Tuple[str, str]]:
41
41
  return ignored_patterns
42
42
 
43
43
 
44
- def get_complete_file_list(user_codebase_dir: str, ignored_patterns: List[str]) -> List[str]:
44
+ def get_complete_file_list(user_codebase_dir: str, ignored_patterns: List[str], included_relative_dirs: List[str]) -> List[str]:
45
45
  should_ignore = parse_gitignore_patterns(ignored_patterns, base_dir=user_codebase_dir)
46
46
  file_set: Set[str] = set()
47
-
48
- for root, dirs, files in os.walk(user_codebase_dir):
49
- # Filter out ignored directories
50
- dirs[:] = [d for d in dirs if not should_ignore(os.path.join(root, d))]
51
-
52
- for file in files:
53
- file_path = os.path.join(root, file)
54
- if not should_ignore(file_path):
55
- file_set.add(file_path)
47
+ for pattern in included_relative_dirs:
48
+ for root, dirs, files in os.walk(os.path.normpath(os.path.join(user_codebase_dir, pattern))):
49
+ # Filter out ignored directories
50
+ dirs[:] = [d for d in dirs if not should_ignore(os.path.join(root, d))]
51
+
52
+ for file in files:
53
+ file_path = os.path.join(root, file)
54
+ if not should_ignore(file_path):
55
+ file_set.add(file_path)
56
56
 
57
57
  return list(file_set)
pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "ziya"
3
- version = "0.1.1"
3
+ version = "0.1.2"
4
4
  description = ""
5
5
  authors = ["Vishnu Krishnaprasad <vishnukool@gmail.com>"]
6
6
  readme = "README.md"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ziya
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary:
5
5
  Author: Vishnu Krishnaprasad
6
6
  Author-email: vishnukool@gmail.com
@@ -1,22 +1,22 @@
1
1
  app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  app/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- app/agents/agent.py,sha256=k0e0GMKFfU6-3e-GyAX95R9iV3sWwvLknL1gxd3TO88,4181
3
+ app/agents/agent.py,sha256=A1GCNwPXoPY0wg9ukHyox8WuJu-i1o0ArZMpOF9I_kQ,4266
4
4
  app/agents/prompts.py,sha256=O54rH2KupyY7ZSjPEvm3j9DSGjdL3jJOz8F9PTcePQQ,1674
5
- app/main.py,sha256=blgAdLjoMa2HRqlr17lwbZ3hQYz2jUZJwu18KLI9FiQ,1359
5
+ app/main.py,sha256=p7FGRXeN-rtC56dHQiivEu5uKKniU_ULvUjsjFEe4-k,1688
6
6
  app/server.py,sha256=YTEHYUsFQhgkGRHZ_y7K3Ju3SmUIbVxLSdgrgi1BuEU,676
7
7
  app/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- app/utils/directory_util.py,sha256=XOImpzqVa2NrIAPl054VN2WC4kk1QUIE4COEL062ULw,2132
8
+ app/utils/directory_util.py,sha256=qx-LCHLZgFSz8WJTJcAkRnfxtg1eQgRX55dMJ2bTI3I,2278
9
9
  app/utils/gitignore_parser.py,sha256=ksAAvXr8_GFh94cvOdkLmES5k3xxNxW2_tQuQtialIA,7496
10
10
  app/utils/logging_utils.py,sha256=8JEcc1t7L-a0G4HLmM8zFydNNSOd5l2-gkTxviLQUns,280
11
11
  app/utils/print_tree_util.py,sha256=O4Rb-GS8UODxfH7Z6bZGsr-opG6QLmvdaU1im5kh4IA,1419
12
- pyproject.toml,sha256=mQavdT_weig3WJLIvmy0QpC9aUtDwqT__8bNolF00Sc,716
12
+ pyproject.toml,sha256=XQTaNA-iGsOAzHReXPn4heww08imAKKAeR4rXw8svu4,716
13
13
  static/app.js,sha256=qz2F0e5LxuVFI3MXWvcON9l1cN0J_ODdQOwbgT3ZqWA,3622
14
14
  static/favicon.ico,sha256=HgB8xAZdDHFK2lODUsp2H_Dds_i14pnpydx7NEJrNrU,15086
15
15
  static/sendPayload.js,sha256=VnypSWF7t8bv83026LGU3GMyr9tMrp05hmWATcbCG4k,1956
16
16
  static/ziya.css,sha256=OaieSXw_7LOk0WNNi-1mPsAaS3rOxhHycKFgFDoiZB0,1395
17
17
  templates/index.html,sha256=8auy9lGLdcDzBkzpjYB1ygrAVbXpo0rqQ8p1FgMEeck,800
18
- ziya-0.1.1.dist-info/LICENSE,sha256=8CfErGEG13yY1Z-CDlIhAQawX2KOv-QI_2Ge2z6x8SU,1064
19
- ziya-0.1.1.dist-info/METADATA,sha256=cBLlieO7ab7odRbHumQnZOqKoSuslCWDEBBY0Szkta0,2563
20
- ziya-0.1.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
21
- ziya-0.1.1.dist-info/entry_points.txt,sha256=1HspxMqCYRli3SqM6CqmT6gsW_G14G4ab3sHlrYUCAA,38
22
- ziya-0.1.1.dist-info/RECORD,,
18
+ ziya-0.1.2.dist-info/LICENSE,sha256=8CfErGEG13yY1Z-CDlIhAQawX2KOv-QI_2Ge2z6x8SU,1064
19
+ ziya-0.1.2.dist-info/METADATA,sha256=S24oPWhu0DnlG7THzeRUald_tyGxDK8C4ajFr3grIDA,2563
20
+ ziya-0.1.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
21
+ ziya-0.1.2.dist-info/entry_points.txt,sha256=1HspxMqCYRli3SqM6CqmT6gsW_G14G4ab3sHlrYUCAA,38
22
+ ziya-0.1.2.dist-info/RECORD,,
File without changes
File without changes