raggiecode 0.2.1__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.
- Agent/__init__.py +0 -0
- Agent/agent.py +891 -0
- Agent/chat_history_db.py +1500 -0
- Agent/command.py +49 -0
- Agent/config.py +46 -0
- Agent/effort_levels.py +33 -0
- Agent/git_manager.py +727 -0
- Agent/tools.py +35 -0
- Commands/__init__.py +18 -0
- Commands/effort.py +42 -0
- Commands/global_todo.py +23 -0
- Commands/help.py +22 -0
- Commands/reasoning.py +24 -0
- Commands/redo.py +11 -0
- Commands/reindex.py +27 -0
- Commands/shell.py +28 -0
- Commands/stream.py +24 -0
- Commands/undo.py +13 -0
- Commands/unlimited_effort.py +8 -0
- Commands/window_size.py +29 -0
- RAG/__init__.py +0 -0
- RAG/document.py +119 -0
- RAG/find.py +408 -0
- RAG/graph.py +231 -0
- Tools/GetFileCodeStructure.py +43 -0
- Tools/GetSymbolSourceCode.py +27 -0
- Tools/__init__.py +39 -0
- Tools/ask_user.py +102 -0
- Tools/dispatch_subagent.py +215 -0
- Tools/document.py +35 -0
- Tools/edit_symbol.py +250 -0
- Tools/fuzzy_search.py +119 -0
- Tools/list_dir.py +51 -0
- Tools/read.py +49 -0
- Tools/read_image.py +75 -0
- Tools/remove.py +75 -0
- Tools/replace.py +305 -0
- Tools/search.py +41 -0
- Tools/shell.py +149 -0
- Tools/shell_kill.py +87 -0
- Tools/temp_background_service.py +113 -0
- Tools/todo_list.py +481 -0
- Tools/utils.py +116 -0
- Tools/view_changes.py +179 -0
- Tools/walk_call_tree.py +30 -0
- Tools/web_fetch.py +175 -0
- Tools/web_search.py +69 -0
- Tools/write.py +48 -0
- cli.py +111 -0
- config/__init__.py +0 -0
- config/coder_system_prompt.md +119 -0
- config/roles.json +43 -0
- config/tools.json +709 -0
- indexing/__init__.py +0 -0
- indexing/cli.py +128 -0
- indexing/code_index_sdk.py +832 -0
- indexing/code_indexer.py +1763 -0
- indexing/db_schema.py +396 -0
- indexing/export_to_json.py +346 -0
- indexing/extractors.py +189 -0
- indexing/file_utils.py +97 -0
- indexing/frontend/__init__.py +0 -0
- indexing/frontend/css_extractor.py +195 -0
- indexing/frontend/css_parser.py +387 -0
- indexing/frontend/css_selector_utils.py +226 -0
- indexing/frontend/edit_safety.py +573 -0
- indexing/frontend/graph.py +838 -0
- indexing/frontend/html_extractor.py +496 -0
- indexing/frontend/html_parser.py +314 -0
- indexing/frontend/jsx_extractor.py +1204 -0
- indexing/frontend/location_lookup.py +247 -0
- indexing/frontend/resolver.py +485 -0
- indexing/frontend/runtime_resolver.py +862 -0
- indexing/frontend/semantic_output.py +705 -0
- indexing/frontend/source_location.py +69 -0
- indexing/frontend_config.py +72 -0
- indexing/frontend_models.py +347 -0
- indexing/language_config.py +360 -0
- indexing/models.py +284 -0
- indexing/node_utils.py +1112 -0
- indexing/parse_worker.py +1082 -0
- indexing/queries.py +1542 -0
- indexing/sdk_examples.py +426 -0
- interactive.py +248 -0
- raggie.py +673 -0
- raggiecode-0.2.1.dist-info/METADATA +944 -0
- raggiecode-0.2.1.dist-info/RECORD +93 -0
- raggiecode-0.2.1.dist-info/WHEEL +5 -0
- raggiecode-0.2.1.dist-info/entry_points.txt +2 -0
- raggiecode-0.2.1.dist-info/top_level.txt +10 -0
- skills/__init__.py +3 -0
- skills/manager.py +114 -0
- skills/tool.py +121 -0
indexing/__init__.py
ADDED
|
File without changes
|
indexing/cli.py
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"""
|
|
2
|
+
CLI argument parsing for the code indexer.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
from indexing.language_config import LANGUAGE_CONFIG, is_language_available
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
FRONTEND_LANGUAGES = ["html", "css", "tsx", "javascript"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def create_argument_parser():
|
|
13
|
+
"""Create and configure the argument parser."""
|
|
14
|
+
parser = argparse.ArgumentParser(
|
|
15
|
+
description="Code Indexer - Index source code files using tree-sitter",
|
|
16
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
17
|
+
epilog="""
|
|
18
|
+
Supported languages:
|
|
19
|
+
python, go, csharp, javascript, typescript, rust, zig, elixir, cpp
|
|
20
|
+
Frontend: html, css, tsx (jsx via javascript)
|
|
21
|
+
|
|
22
|
+
Examples:
|
|
23
|
+
python code_indexer.py . # Index all supported languages
|
|
24
|
+
python code_indexer.py . -l python,go # Index only Python and Go files
|
|
25
|
+
python code_indexer.py . -o my_index.json # Save to custom output file
|
|
26
|
+
python code_indexer.py . --frontend # Enable frontend indexing
|
|
27
|
+
python code_indexer.py . --no-frontend # Disable frontend indexing
|
|
28
|
+
python code_indexer.py --list-frontend-languages # List frontend languages
|
|
29
|
+
"""
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
parser.add_argument(
|
|
33
|
+
"directory",
|
|
34
|
+
nargs='?',
|
|
35
|
+
help="Directory to index (required for indexing mode)"
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
parser.add_argument(
|
|
39
|
+
"-l", "--languages",
|
|
40
|
+
help="Languages to index (comma-separated, default: all supported languages)"
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
parser.add_argument(
|
|
44
|
+
"-o", "--output",
|
|
45
|
+
default="code_index.db",
|
|
46
|
+
help="Output SQLite database file (default: code_index.db)"
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
parser.add_argument(
|
|
50
|
+
"--list-languages",
|
|
51
|
+
action="store_true",
|
|
52
|
+
help="List all supported languages and exit"
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
parser.add_argument(
|
|
56
|
+
"--list-frontend-languages",
|
|
57
|
+
action="store_true",
|
|
58
|
+
help="List supported frontend languages and exit"
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
frontend_group = parser.add_mutually_exclusive_group()
|
|
62
|
+
frontend_group.add_argument(
|
|
63
|
+
"--frontend",
|
|
64
|
+
action="store_true",
|
|
65
|
+
default=True,
|
|
66
|
+
help="Enable frontend indexing (HTML, CSS, JSX/TSX) (default: enabled)"
|
|
67
|
+
)
|
|
68
|
+
frontend_group.add_argument(
|
|
69
|
+
"--no-frontend",
|
|
70
|
+
action="store_false",
|
|
71
|
+
dest="frontend",
|
|
72
|
+
help="Disable frontend indexing"
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
parser.add_argument(
|
|
76
|
+
"--export-json",
|
|
77
|
+
metavar="JSON_FILE",
|
|
78
|
+
help="Export SQLite database to JSON file"
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
parser.add_argument(
|
|
82
|
+
"--force",
|
|
83
|
+
action="store_true",
|
|
84
|
+
help="Force reindexing of all files, ignoring hash checks"
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
parser.add_argument(
|
|
88
|
+
"--graph",
|
|
89
|
+
metavar="FILE_PATH",
|
|
90
|
+
help="View dependency graph for a specific file (relative path)"
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
parser.add_argument(
|
|
94
|
+
"-v", "--verbose",
|
|
95
|
+
action="store_true",
|
|
96
|
+
help="Print detailed timing and progress information"
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
return parser
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def parse_arguments(args=None):
|
|
103
|
+
"""Parse command line arguments."""
|
|
104
|
+
parser = create_argument_parser()
|
|
105
|
+
return parser.parse_args(args)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def list_supported_languages():
|
|
109
|
+
"""Print all supported languages and their status."""
|
|
110
|
+
print("Supported languages:")
|
|
111
|
+
for lang in LANGUAGE_CONFIG.keys():
|
|
112
|
+
config = LANGUAGE_CONFIG[lang]
|
|
113
|
+
status = "ok" if is_language_available(lang) else "disabled (not installed)"
|
|
114
|
+
print(f" {lang:12} {status}")
|
|
115
|
+
print(f" Extensions: {', '.join(config['extensions'])}")
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def list_frontend_languages():
|
|
119
|
+
"""Print supported frontend languages and their status."""
|
|
120
|
+
print("Supported frontend languages:")
|
|
121
|
+
for lang in FRONTEND_LANGUAGES:
|
|
122
|
+
if lang in LANGUAGE_CONFIG:
|
|
123
|
+
config = LANGUAGE_CONFIG[lang]
|
|
124
|
+
status = "ok" if is_language_available(lang) else "disabled (not installed)"
|
|
125
|
+
print(f" {lang:12} {status}")
|
|
126
|
+
print(f" Extensions: {', '.join(config['extensions'])}")
|
|
127
|
+
else:
|
|
128
|
+
print(f" {lang:12} not configured")
|