siada-cli 0.0.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_config.yaml +34 -0
- siada/__init__.py +13 -0
- siada/agent_hub/__init__.py +10 -0
- siada/agent_hub/coder/bug_fix_agent.py +398 -0
- siada/agent_hub/coder/code_gen_agent.py +235 -0
- siada/agent_hub/coder/fe_gen_agent.py +37 -0
- siada/agent_hub/coder/issue_review_agent.py +68 -0
- siada/agent_hub/coder/prompt/__init__.py +0 -0
- siada/agent_hub/coder/prompt/base/__init__.py +0 -0
- siada/agent_hub/coder/prompt/base/capabilities.py +18 -0
- siada/agent_hub/coder/prompt/base/non_interactive.py +14 -0
- siada/agent_hub/coder/prompt/base/prompt_builder.py +33 -0
- siada/agent_hub/coder/prompt/base/rules.py +40 -0
- siada/agent_hub/coder/prompt/base/tool_use.py +14 -0
- siada/agent_hub/coder/prompt/bug_prompt/bug_fix_prompt.py +51 -0
- siada/agent_hub/coder/prompt/bug_prompt/rules.py +53 -0
- siada/agent_hub/coder/prompt/code_gen_prompt.py +45 -0
- siada/agent_hub/coder/prompt/fe_gen_prompt.py +45 -0
- siada/agent_hub/coder/prompt/issue_review_prompt.py +121 -0
- siada/agent_hub/coder/tracing/__init__.py +22 -0
- siada/agent_hub/coder/tracing/logger_tracing_processor.py +458 -0
- siada/agent_hub/hooks/__init__.py +0 -0
- siada/agent_hub/hooks/io_hooks.py +30 -0
- siada/agent_hub/siada_agent.py +214 -0
- siada/config/__init__.py +0 -0
- siada/config/config_loader.py +67 -0
- siada/entrypoint/__init__.py +3 -0
- siada/entrypoint/args_parser/__init__.py +0 -0
- siada/entrypoint/args_parser/args.py +195 -0
- siada/entrypoint/interaction/__init__.py +0 -0
- siada/entrypoint/interaction/base_turn.py +107 -0
- siada/entrypoint/interaction/config.py +30 -0
- siada/entrypoint/interaction/controller.py +122 -0
- siada/entrypoint/interaction/nointeractive_controller.py +27 -0
- siada/entrypoint/interaction/turn/interface.py +116 -0
- siada/entrypoint/interaction/turn/models.py +34 -0
- siada/entrypoint/interaction/turn/run_turn.py +641 -0
- siada/entrypoint/interaction/turn_factory.py +35 -0
- siada/entrypoint/interaction/turn_models.py +28 -0
- siada/entrypoint/siadahub.py +413 -0
- siada/foundation/__init__.py +0 -0
- siada/foundation/code_agent_context.py +48 -0
- siada/foundation/config.py +59 -0
- siada/foundation/constants.py +2 -0
- siada/foundation/context.py +76 -0
- siada/foundation/logging.py +341 -0
- siada/foundation/tools/__init__.py +0 -0
- siada/foundation/tools/get_git_diff.py +105 -0
- siada/io/__init__.py +0 -0
- siada/io/banner.py +148 -0
- siada/io/color_settings.py +207 -0
- siada/io/color_utils.py +16 -0
- siada/io/components/__init__.py +0 -0
- siada/io/components/mdstream.py +204 -0
- siada/io/console_printer.py +68 -0
- siada/io/io.py +661 -0
- siada/io/key_bindings.py +129 -0
- siada/io/notification_command.py +40 -0
- siada/io/test_banner.py +64 -0
- siada/models/__init__.py +0 -0
- siada/models/agent.py +47 -0
- siada/models/coder/__init__.py +0 -0
- siada/models/converter.py +27 -0
- siada/models/model_base_config.py +121 -0
- siada/models/model_run_config.py +153 -0
- siada/provider/__init__.py +0 -0
- siada/provider/client_factory.py +112 -0
- siada/provider/llm_client.py +11 -0
- siada/provider/openrouter/__init__.py +0 -0
- siada/provider/openrouter/coverter.py +17 -0
- siada/provider/openrouter/openroute_provider.py +33 -0
- siada/provider/provider_factory.py +53 -0
- siada/queries/tree-sitter-language-pack/README.md +7 -0
- siada/queries/tree-sitter-language-pack/arduino-tags.scm +5 -0
- siada/queries/tree-sitter-language-pack/c-tags.scm +9 -0
- siada/queries/tree-sitter-language-pack/chatito-tags.scm +16 -0
- siada/queries/tree-sitter-language-pack/commonlisp-tags.scm +122 -0
- siada/queries/tree-sitter-language-pack/cpp-tags.scm +15 -0
- siada/queries/tree-sitter-language-pack/csharp-tags.scm +26 -0
- siada/queries/tree-sitter-language-pack/d-tags.scm +26 -0
- siada/queries/tree-sitter-language-pack/dart-tags.scm +92 -0
- siada/queries/tree-sitter-language-pack/elisp-tags.scm +5 -0
- siada/queries/tree-sitter-language-pack/elixir-tags.scm +54 -0
- siada/queries/tree-sitter-language-pack/elm-tags.scm +19 -0
- siada/queries/tree-sitter-language-pack/gleam-tags.scm +41 -0
- siada/queries/tree-sitter-language-pack/go-tags.scm +42 -0
- siada/queries/tree-sitter-language-pack/java-tags.scm +20 -0
- siada/queries/tree-sitter-language-pack/javascript-tags.scm +88 -0
- siada/queries/tree-sitter-language-pack/lua-tags.scm +34 -0
- siada/queries/tree-sitter-language-pack/ocaml-tags.scm +115 -0
- siada/queries/tree-sitter-language-pack/ocaml_interface-tags.scm +98 -0
- siada/queries/tree-sitter-language-pack/pony-tags.scm +39 -0
- siada/queries/tree-sitter-language-pack/properties-tags.scm +5 -0
- siada/queries/tree-sitter-language-pack/python-tags.scm +14 -0
- siada/queries/tree-sitter-language-pack/r-tags.scm +21 -0
- siada/queries/tree-sitter-language-pack/racket-tags.scm +12 -0
- siada/queries/tree-sitter-language-pack/ruby-tags.scm +64 -0
- siada/queries/tree-sitter-language-pack/rust-tags.scm +60 -0
- siada/queries/tree-sitter-language-pack/solidity-tags.scm +43 -0
- siada/queries/tree-sitter-language-pack/swift-tags.scm +51 -0
- siada/queries/tree-sitter-language-pack/udev-tags.scm +20 -0
- siada/queries/tree-sitter-languages/README.md +23 -0
- siada/queries/tree-sitter-languages/c-tags.scm +9 -0
- siada/queries/tree-sitter-languages/c_sharp-tags.scm +46 -0
- siada/queries/tree-sitter-languages/cpp-tags.scm +15 -0
- siada/queries/tree-sitter-languages/dart-tags.scm +91 -0
- siada/queries/tree-sitter-languages/elisp-tags.scm +8 -0
- siada/queries/tree-sitter-languages/elixir-tags.scm +54 -0
- siada/queries/tree-sitter-languages/elm-tags.scm +19 -0
- siada/queries/tree-sitter-languages/go-tags.scm +30 -0
- siada/queries/tree-sitter-languages/hcl-tags.scm +77 -0
- siada/queries/tree-sitter-languages/java-tags.scm +20 -0
- siada/queries/tree-sitter-languages/javascript-tags.scm +88 -0
- siada/queries/tree-sitter-languages/kotlin-tags.scm +27 -0
- siada/queries/tree-sitter-languages/ocaml-tags.scm +115 -0
- siada/queries/tree-sitter-languages/ocaml_interface-tags.scm +98 -0
- siada/queries/tree-sitter-languages/php-tags.scm +26 -0
- siada/queries/tree-sitter-languages/python-tags.scm +12 -0
- siada/queries/tree-sitter-languages/ql-tags.scm +26 -0
- siada/queries/tree-sitter-languages/ruby-tags.scm +64 -0
- siada/queries/tree-sitter-languages/rust-tags.scm +60 -0
- siada/queries/tree-sitter-languages/scala-tags.scm +65 -0
- siada/queries/tree-sitter-languages/typescript-tags.scm +41 -0
- siada/services/__init__.py +30 -0
- siada/services/at_file_recommendation_design_document.md +1213 -0
- siada/services/code_context_manager.py +136 -0
- siada/services/enhanced_fix_result_check.py +546 -0
- siada/services/execution_trace_collector.py +207 -0
- siada/services/file_recommendation/__init__.py +136 -0
- siada/services/file_recommendation/core/__init__.py +17 -0
- siada/services/file_recommendation/core/completion_engine.py +351 -0
- siada/services/file_recommendation/core/config.py +62 -0
- siada/services/file_recommendation/core/file_discovery.py +353 -0
- siada/services/file_recommendation/core/suggestion.py +110 -0
- siada/services/file_recommendation/utils/__init__.py +22 -0
- siada/services/file_recommendation/utils/path_utils.py +138 -0
- siada/services/file_recommendation/utils/text_utils.py +253 -0
- siada/services/fix_result_check.py +377 -0
- siada/services/handle_at_command/README.md +247 -0
- siada/services/handle_at_command/__init__.py +115 -0
- siada/services/handle_at_command/exceptions.py +46 -0
- siada/services/handle_at_command/models.py +92 -0
- siada/services/handle_at_command/parser.py +189 -0
- siada/services/handle_at_command/processor.py +321 -0
- siada/services/handle_at_command/resolver.py +318 -0
- siada/services/handle_at_command/utils.py +345 -0
- siada/services/model_info_service.py +103 -0
- siada/services/siada_runner.py +170 -0
- siada/session/__init__.py +29 -0
- siada/session/session_manager.py +66 -0
- siada/session/session_models.py +43 -0
- siada/support/__init__.py +0 -0
- siada/support/completer.py +204 -0
- siada/support/editor.py +146 -0
- siada/support/envprocessor.py +54 -0
- siada/support/repo.py +51 -0
- siada/support/slash_commands.py +410 -0
- siada/support/spinner.py +320 -0
- siada/tools/__init__.py +0 -0
- siada/tools/ast/README.md +345 -0
- siada/tools/ast/ast_tool.py +341 -0
- siada/tools/ast/models.py +11 -0
- siada/tools/coder/__init__.py +0 -0
- siada/tools/coder/ask_followup_question.py +70 -0
- siada/tools/coder/cmd_runner.py +132 -0
- siada/tools/coder/file_operator.py +284 -0
- siada/tools/coder/file_search/README.md +223 -0
- siada/tools/coder/file_search/__init__.py +10 -0
- siada/tools/coder/file_search/bin/rg-linux-arm64 +0 -0
- siada/tools/coder/file_search/bin/rg-linux-x64 +0 -0
- siada/tools/coder/file_search/bin/rg-macos-arm64 +0 -0
- siada/tools/coder/file_search/bin/rg-macos-x64 +0 -0
- siada/tools/coder/file_search/bin/rg.exe +0 -0
- siada/tools/coder/file_search/search.py +437 -0
- siada/tools/coder/file_search/setup_package.py +150 -0
- siada/tools/coder/file_search/test_search.py +142 -0
- siada/tools/coder/files.py +147 -0
- siada/tools/coder/fix_attempt_completion.py +58 -0
- siada/tools/coder/issue_review_completion.py +29 -0
- siada/tools/coder/observation/__init__.py +0 -0
- siada/tools/coder/observation/error.py +22 -0
- siada/tools/coder/observation/file_observation.py +216 -0
- siada/tools/coder/observation/observation.py +71 -0
- siada/tools/coder/repo_map/__init__.py +157 -0
- siada/tools/coder/repo_map/dump.py +29 -0
- siada/tools/coder/repo_map/io.py +226 -0
- siada/tools/coder/repo_map/repo_map.py +881 -0
- siada/tools/coder/repo_map/special.py +203 -0
- siada/tools/coder/repo_map/token_counter.py +154 -0
- siada/tools/coder/repo_map/waiting.py +221 -0
- siada/tools/coder/reproduce_completion.py +39 -0
- siada/tools/coder/run_cmd.py +60 -0
- siada/tools/coder/test_completion.py +25 -0
- siada/tools/coder/tool_docs.py +44 -0
- siada/tools/compression_tool.py +200 -0
- siada/tools/read_many_files/README.md +220 -0
- siada/tools/read_many_files/__init__.py +25 -0
- siada/tools/read_many_files/file_processor.py +486 -0
- siada/tools/read_many_files/filters.py +326 -0
- siada/tools/read_many_files/formatters.py +204 -0
- siada/tools/read_many_files/models.py +189 -0
- siada/tools/read_many_files_tool.py +233 -0
- siada/tools/tool_call_format/__init__.py +55 -0
- siada/tools/tool_call_format/file_to_language.py +231 -0
- siada/tools/tool_call_format/formatter_factory.py +80 -0
- siada/tools/tool_call_format/formatters.py +282 -0
- siada/tools/tool_call_format/tool_call_formatter.py +54 -0
- siada/tools/web/__init__.py +0 -0
- siada/tools/web/web_crawl.py +208 -0
- siada/utils.py +194 -0
- siada_cli-0.0.1.dist-info/LICENSE +201 -0
- siada_cli-0.0.1.dist-info/METADATA +457 -0
- siada_cli-0.0.1.dist-info/RECORD +215 -0
- siada_cli-0.0.1.dist-info/WHEEL +4 -0
- siada_cli-0.0.1.dist-info/entry_points.txt +3 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
; Modules
|
|
2
|
+
;--------
|
|
3
|
+
|
|
4
|
+
(
|
|
5
|
+
(comment)? @doc .
|
|
6
|
+
(module_definition (module_binding (module_name) @name.definition.module) @definition.module)
|
|
7
|
+
(#strip! @doc "^\\(\\*\\*?\\s*|\\s\\*\\)$")
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
(module_path (module_name) @name.reference.module) @reference.module
|
|
11
|
+
|
|
12
|
+
; Module types
|
|
13
|
+
;--------------
|
|
14
|
+
|
|
15
|
+
(
|
|
16
|
+
(comment)? @doc .
|
|
17
|
+
(module_type_definition (module_type_name) @name.definition.interface) @definition.interface
|
|
18
|
+
(#strip! @doc "^\\(\\*\\*?\\s*|\\s\\*\\)$")
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
(module_type_path (module_type_name) @name.reference.implementation) @reference.implementation
|
|
22
|
+
|
|
23
|
+
; Functions
|
|
24
|
+
;----------
|
|
25
|
+
|
|
26
|
+
(
|
|
27
|
+
(comment)? @doc .
|
|
28
|
+
(value_definition
|
|
29
|
+
[
|
|
30
|
+
(let_binding
|
|
31
|
+
pattern: (value_name) @name.definition.function
|
|
32
|
+
(parameter))
|
|
33
|
+
(let_binding
|
|
34
|
+
pattern: (value_name) @name.definition.function
|
|
35
|
+
body: [(fun_expression) (function_expression)])
|
|
36
|
+
] @definition.function
|
|
37
|
+
)
|
|
38
|
+
(#strip! @doc "^\\(\\*\\*?\\s*|\\s\\*\\)$")
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
(
|
|
42
|
+
(comment)? @doc .
|
|
43
|
+
(external (value_name) @name.definition.function) @definition.function
|
|
44
|
+
(#strip! @doc "^\\(\\*\\*?\\s*|\\s\\*\\)$")
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
(application_expression
|
|
48
|
+
function: (value_path (value_name) @name.reference.call)) @reference.call
|
|
49
|
+
|
|
50
|
+
(infix_expression
|
|
51
|
+
left: (value_path (value_name) @name.reference.call)
|
|
52
|
+
operator: (concat_operator) @reference.call
|
|
53
|
+
(#eq? @reference.call "@@"))
|
|
54
|
+
|
|
55
|
+
(infix_expression
|
|
56
|
+
operator: (rel_operator) @reference.call
|
|
57
|
+
right: (value_path (value_name) @name.reference.call)
|
|
58
|
+
(#eq? @reference.call "|>"))
|
|
59
|
+
|
|
60
|
+
; Operator
|
|
61
|
+
;---------
|
|
62
|
+
|
|
63
|
+
(
|
|
64
|
+
(comment)? @doc .
|
|
65
|
+
(value_definition
|
|
66
|
+
(let_binding
|
|
67
|
+
pattern: (parenthesized_operator (_) @name.definition.function)) @definition.function)
|
|
68
|
+
(#strip! @doc "^\\(\\*\\*?\\s*|\\s\\*\\)$")
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
[
|
|
72
|
+
(prefix_operator)
|
|
73
|
+
(sign_operator)
|
|
74
|
+
(pow_operator)
|
|
75
|
+
(mult_operator)
|
|
76
|
+
(add_operator)
|
|
77
|
+
(concat_operator)
|
|
78
|
+
(rel_operator)
|
|
79
|
+
(and_operator)
|
|
80
|
+
(or_operator)
|
|
81
|
+
(assign_operator)
|
|
82
|
+
(hash_operator)
|
|
83
|
+
(indexing_operator)
|
|
84
|
+
(let_operator)
|
|
85
|
+
(let_and_operator)
|
|
86
|
+
(match_operator)
|
|
87
|
+
] @name.reference.call @reference.call
|
|
88
|
+
|
|
89
|
+
; Classes
|
|
90
|
+
;--------
|
|
91
|
+
|
|
92
|
+
(
|
|
93
|
+
(comment)? @doc .
|
|
94
|
+
[
|
|
95
|
+
(class_definition (class_binding (class_name) @name.definition.class) @definition.class)
|
|
96
|
+
(class_type_definition (class_type_binding (class_type_name) @name.definition.class) @definition.class)
|
|
97
|
+
]
|
|
98
|
+
(#strip! @doc "^\\(\\*\\*?\\s*|\\s\\*\\)$")
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
[
|
|
102
|
+
(class_path (class_name) @name.reference.class)
|
|
103
|
+
(class_type_path (class_type_name) @name.reference.class)
|
|
104
|
+
] @reference.class
|
|
105
|
+
|
|
106
|
+
; Methods
|
|
107
|
+
;--------
|
|
108
|
+
|
|
109
|
+
(
|
|
110
|
+
(comment)? @doc .
|
|
111
|
+
(method_definition (method_name) @name.definition.method) @definition.method
|
|
112
|
+
(#strip! @doc "^\\(\\*\\*?\\s*|\\s\\*\\)$")
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
(method_invocation (method_name) @name.reference.call) @reference.call
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
; Modules
|
|
2
|
+
;--------
|
|
3
|
+
|
|
4
|
+
(
|
|
5
|
+
(comment)? @doc .
|
|
6
|
+
(module_definition
|
|
7
|
+
(module_binding (module_name) @name) @definition.module
|
|
8
|
+
)
|
|
9
|
+
(#strip! @doc "^\\(\\*+\\s*|\\s*\\*+\\)$")
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
(module_path (module_name) @name) @reference.module
|
|
13
|
+
(extended_module_path (module_name) @name) @reference.module
|
|
14
|
+
|
|
15
|
+
(
|
|
16
|
+
(comment)? @doc .
|
|
17
|
+
(module_type_definition (module_type_name) @name) @definition.interface
|
|
18
|
+
(#strip! @doc "^\\(\\*+\\s*|\\s*\\*+\\)$")
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
(module_type_path (module_type_name) @name) @reference.implementation
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
; Classes
|
|
25
|
+
;--------
|
|
26
|
+
|
|
27
|
+
(
|
|
28
|
+
(comment)? @doc .
|
|
29
|
+
[
|
|
30
|
+
(class_definition
|
|
31
|
+
(class_binding (class_name) @name) @definition.class
|
|
32
|
+
)
|
|
33
|
+
(class_type_definition
|
|
34
|
+
(class_type_binding (class_type_name) @name) @definition.class
|
|
35
|
+
)
|
|
36
|
+
]
|
|
37
|
+
(#strip! @doc "^\\(\\*+\\s*|\\s*\\*+\\)$")
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
[
|
|
41
|
+
(class_path (class_name) @name)
|
|
42
|
+
(class_type_path (class_type_name) @name)
|
|
43
|
+
] @reference.class
|
|
44
|
+
|
|
45
|
+
(
|
|
46
|
+
(comment)? @doc .
|
|
47
|
+
(method_definition (method_name) @name) @definition.method
|
|
48
|
+
(#strip! @doc "^\\(\\*+\\s*|\\s*\\*+\\)$")
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
(method_invocation (method_name) @name) @reference.call
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
; Types
|
|
55
|
+
;------
|
|
56
|
+
|
|
57
|
+
(
|
|
58
|
+
(comment)? @doc .
|
|
59
|
+
(type_definition
|
|
60
|
+
(type_binding
|
|
61
|
+
name: [
|
|
62
|
+
(type_constructor) @name
|
|
63
|
+
(type_constructor_path (type_constructor) @name)
|
|
64
|
+
]
|
|
65
|
+
) @definition.type
|
|
66
|
+
)
|
|
67
|
+
(#strip! @doc "^\\(\\*+\\s*|\\s*\\*+\\)$")
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
(type_constructor_path (type_constructor) @name) @reference.type
|
|
71
|
+
|
|
72
|
+
[
|
|
73
|
+
(constructor_declaration (constructor_name) @name)
|
|
74
|
+
(tag_specification (tag) @name)
|
|
75
|
+
] @definition.enum_variant
|
|
76
|
+
|
|
77
|
+
[
|
|
78
|
+
(constructor_path (constructor_name) @name)
|
|
79
|
+
(tag) @name
|
|
80
|
+
] @reference.enum_variant
|
|
81
|
+
|
|
82
|
+
(field_declaration (field_name) @name) @definition.field
|
|
83
|
+
|
|
84
|
+
(field_path (field_name) @name) @reference.field
|
|
85
|
+
|
|
86
|
+
(
|
|
87
|
+
(comment)? @doc .
|
|
88
|
+
(external (value_name) @name) @definition.function
|
|
89
|
+
(#strip! @doc "^\\(\\*+\\s*|\\s*\\*+\\)$")
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
(
|
|
93
|
+
(comment)? @doc .
|
|
94
|
+
(value_specification
|
|
95
|
+
(value_name) @name.definition.function
|
|
96
|
+
) @definition.function
|
|
97
|
+
(#strip! @doc "^\\(\\*+\\s*|\\s*\\*+\\)$")
|
|
98
|
+
)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
(class_declaration
|
|
2
|
+
name: (name) @name.definition.class) @definition.class
|
|
3
|
+
|
|
4
|
+
(function_definition
|
|
5
|
+
name: (name) @name.definition.function) @definition.function
|
|
6
|
+
|
|
7
|
+
(method_declaration
|
|
8
|
+
name: (name) @name.definition.function) @definition.function
|
|
9
|
+
|
|
10
|
+
(object_creation_expression
|
|
11
|
+
[
|
|
12
|
+
(qualified_name (name) @name.reference.class)
|
|
13
|
+
(variable_name (name) @name.reference.class)
|
|
14
|
+
]) @reference.class
|
|
15
|
+
|
|
16
|
+
(function_call_expression
|
|
17
|
+
function: [
|
|
18
|
+
(qualified_name (name) @name.reference.call)
|
|
19
|
+
(variable_name (name)) @name.reference.call
|
|
20
|
+
]) @reference.call
|
|
21
|
+
|
|
22
|
+
(scoped_call_expression
|
|
23
|
+
name: (name) @name.reference.call) @reference.call
|
|
24
|
+
|
|
25
|
+
(member_call_expression
|
|
26
|
+
name: (name) @name.reference.call) @reference.call
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
(class_definition
|
|
2
|
+
name: (identifier) @name.definition.class) @definition.class
|
|
3
|
+
|
|
4
|
+
(function_definition
|
|
5
|
+
name: (identifier) @name.definition.function) @definition.function
|
|
6
|
+
|
|
7
|
+
(call
|
|
8
|
+
function: [
|
|
9
|
+
(identifier) @name.reference.call
|
|
10
|
+
(attribute
|
|
11
|
+
attribute: (identifier) @name.reference.call)
|
|
12
|
+
]) @reference.call
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
(classlessPredicate
|
|
2
|
+
name: (predicateName) @name.definition.function) @definition.function
|
|
3
|
+
|
|
4
|
+
(memberPredicate
|
|
5
|
+
name: (predicateName) @name.definition.method) @definition.method
|
|
6
|
+
|
|
7
|
+
(aritylessPredicateExpr
|
|
8
|
+
name: (literalId) @name.reference.call) @reference.call
|
|
9
|
+
|
|
10
|
+
(module
|
|
11
|
+
name: (moduleName) @name.definition.module) @definition.module
|
|
12
|
+
|
|
13
|
+
(dataclass
|
|
14
|
+
name: (className) @name.definition.class) @definition.class
|
|
15
|
+
|
|
16
|
+
(datatype
|
|
17
|
+
name: (className) @name.definition.class) @definition.class
|
|
18
|
+
|
|
19
|
+
(datatypeBranch
|
|
20
|
+
name: (className) @name.definition.class) @definition.class
|
|
21
|
+
|
|
22
|
+
(qualifiedRhs
|
|
23
|
+
name: (predicateName) @name.reference.call) @reference.call
|
|
24
|
+
|
|
25
|
+
(typeExpr
|
|
26
|
+
name: (className) @name.reference.type) @reference.type
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
; Method definitions
|
|
2
|
+
|
|
3
|
+
(
|
|
4
|
+
(comment)* @doc
|
|
5
|
+
.
|
|
6
|
+
[
|
|
7
|
+
(method
|
|
8
|
+
name: (_) @name.definition.method) @definition.method
|
|
9
|
+
(singleton_method
|
|
10
|
+
name: (_) @name.definition.method) @definition.method
|
|
11
|
+
]
|
|
12
|
+
(#strip! @doc "^#\\s*")
|
|
13
|
+
(#select-adjacent! @doc @definition.method)
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
(alias
|
|
17
|
+
name: (_) @name.definition.method) @definition.method
|
|
18
|
+
|
|
19
|
+
(setter
|
|
20
|
+
(identifier) @ignore)
|
|
21
|
+
|
|
22
|
+
; Class definitions
|
|
23
|
+
|
|
24
|
+
(
|
|
25
|
+
(comment)* @doc
|
|
26
|
+
.
|
|
27
|
+
[
|
|
28
|
+
(class
|
|
29
|
+
name: [
|
|
30
|
+
(constant) @name.definition.class
|
|
31
|
+
(scope_resolution
|
|
32
|
+
name: (_) @name.definition.class)
|
|
33
|
+
]) @definition.class
|
|
34
|
+
(singleton_class
|
|
35
|
+
value: [
|
|
36
|
+
(constant) @name.definition.class
|
|
37
|
+
(scope_resolution
|
|
38
|
+
name: (_) @name.definition.class)
|
|
39
|
+
]) @definition.class
|
|
40
|
+
]
|
|
41
|
+
(#strip! @doc "^#\\s*")
|
|
42
|
+
(#select-adjacent! @doc @definition.class)
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
; Module definitions
|
|
46
|
+
|
|
47
|
+
(
|
|
48
|
+
(module
|
|
49
|
+
name: [
|
|
50
|
+
(constant) @name.definition.module
|
|
51
|
+
(scope_resolution
|
|
52
|
+
name: (_) @name.definition.module)
|
|
53
|
+
]) @definition.module
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
; Calls
|
|
57
|
+
|
|
58
|
+
(call method: (identifier) @name.reference.call) @reference.call
|
|
59
|
+
|
|
60
|
+
(
|
|
61
|
+
[(identifier) (constant)] @name.reference.call @reference.call
|
|
62
|
+
(#is-not? local)
|
|
63
|
+
(#not-match? @name.reference.call "^(lambda|load|require|require_relative|__FILE__|__LINE__)$")
|
|
64
|
+
)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
; ADT definitions
|
|
2
|
+
|
|
3
|
+
(struct_item
|
|
4
|
+
name: (type_identifier) @name.definition.class) @definition.class
|
|
5
|
+
|
|
6
|
+
(enum_item
|
|
7
|
+
name: (type_identifier) @name.definition.class) @definition.class
|
|
8
|
+
|
|
9
|
+
(union_item
|
|
10
|
+
name: (type_identifier) @name.definition.class) @definition.class
|
|
11
|
+
|
|
12
|
+
; type aliases
|
|
13
|
+
|
|
14
|
+
(type_item
|
|
15
|
+
name: (type_identifier) @name.definition.class) @definition.class
|
|
16
|
+
|
|
17
|
+
; method definitions
|
|
18
|
+
|
|
19
|
+
(declaration_list
|
|
20
|
+
(function_item
|
|
21
|
+
name: (identifier) @name.definition.method)) @definition.method
|
|
22
|
+
|
|
23
|
+
; function definitions
|
|
24
|
+
|
|
25
|
+
(function_item
|
|
26
|
+
name: (identifier) @name.definition.function) @definition.function
|
|
27
|
+
|
|
28
|
+
; trait definitions
|
|
29
|
+
(trait_item
|
|
30
|
+
name: (type_identifier) @name.definition.interface) @definition.interface
|
|
31
|
+
|
|
32
|
+
; module definitions
|
|
33
|
+
(mod_item
|
|
34
|
+
name: (identifier) @name.definition.module) @definition.module
|
|
35
|
+
|
|
36
|
+
; macro definitions
|
|
37
|
+
|
|
38
|
+
(macro_definition
|
|
39
|
+
name: (identifier) @name.definition.macro) @definition.macro
|
|
40
|
+
|
|
41
|
+
; references
|
|
42
|
+
|
|
43
|
+
(call_expression
|
|
44
|
+
function: (identifier) @name.reference.call) @reference.call
|
|
45
|
+
|
|
46
|
+
(call_expression
|
|
47
|
+
function: (field_expression
|
|
48
|
+
field: (field_identifier) @name.reference.call)) @reference.call
|
|
49
|
+
|
|
50
|
+
(macro_invocation
|
|
51
|
+
macro: (identifier) @name.reference.call) @reference.call
|
|
52
|
+
|
|
53
|
+
; implementations
|
|
54
|
+
|
|
55
|
+
(impl_item
|
|
56
|
+
trait: (type_identifier) @name.reference.implementation) @reference.implementation
|
|
57
|
+
|
|
58
|
+
(impl_item
|
|
59
|
+
type: (type_identifier) @name.reference.implementation
|
|
60
|
+
!trait) @reference.implementation
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
; Definitions
|
|
2
|
+
|
|
3
|
+
(package_clause
|
|
4
|
+
name: (package_identifier) @name.definition.module) @definition.module
|
|
5
|
+
|
|
6
|
+
(trait_definition
|
|
7
|
+
name: (identifier) @name.definition.interface) @definition.interface
|
|
8
|
+
|
|
9
|
+
(enum_definition
|
|
10
|
+
name: (identifier) @name.definition.enum) @definition.enum
|
|
11
|
+
|
|
12
|
+
(simple_enum_case
|
|
13
|
+
name: (identifier) @name.definition.class) @definition.class
|
|
14
|
+
|
|
15
|
+
(full_enum_case
|
|
16
|
+
name: (identifier) @name.definition.class) @definition.class
|
|
17
|
+
|
|
18
|
+
(class_definition
|
|
19
|
+
name: (identifier) @name.definition.class) @definition.class
|
|
20
|
+
|
|
21
|
+
(object_definition
|
|
22
|
+
name: (identifier) @name.definition.object) @definition.object
|
|
23
|
+
|
|
24
|
+
(function_definition
|
|
25
|
+
name: (identifier) @name.definition.function) @definition.function
|
|
26
|
+
|
|
27
|
+
(val_definition
|
|
28
|
+
pattern: (identifier) @name.definition.variable) @definition.variable
|
|
29
|
+
|
|
30
|
+
(given_definition
|
|
31
|
+
name: (identifier) @name.definition.variable) @definition.variable
|
|
32
|
+
|
|
33
|
+
(var_definition
|
|
34
|
+
pattern: (identifier) @name.definition.variable) @definition.variable
|
|
35
|
+
|
|
36
|
+
(val_declaration
|
|
37
|
+
name: (identifier) @name.definition.variable) @definition.variable
|
|
38
|
+
|
|
39
|
+
(var_declaration
|
|
40
|
+
name: (identifier) @name.definition.variable) @definition.variable
|
|
41
|
+
|
|
42
|
+
(type_definition
|
|
43
|
+
name: (type_identifier) @name.definition.type) @definition.type
|
|
44
|
+
|
|
45
|
+
(class_parameter
|
|
46
|
+
name: (identifier) @name.definition.property) @definition.property
|
|
47
|
+
|
|
48
|
+
; References
|
|
49
|
+
|
|
50
|
+
(call_expression
|
|
51
|
+
(identifier) @name.reference.call) @reference.call
|
|
52
|
+
|
|
53
|
+
(instance_expression
|
|
54
|
+
(type_identifier) @name.reference.interface) @reference.interface
|
|
55
|
+
|
|
56
|
+
(instance_expression
|
|
57
|
+
(generic_type
|
|
58
|
+
(type_identifier) @name.reference.interface)) @reference.interface
|
|
59
|
+
|
|
60
|
+
(extends_clause
|
|
61
|
+
(type_identifier) @name.reference.class) @reference.class
|
|
62
|
+
|
|
63
|
+
(extends_clause
|
|
64
|
+
(generic_type
|
|
65
|
+
(type_identifier) @name.reference.class)) @reference.class
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
(function_signature
|
|
2
|
+
name: (identifier) @name.definition.function) @definition.function
|
|
3
|
+
|
|
4
|
+
(method_signature
|
|
5
|
+
name: (property_identifier) @name.definition.method) @definition.method
|
|
6
|
+
|
|
7
|
+
(abstract_method_signature
|
|
8
|
+
name: (property_identifier) @name.definition.method) @definition.method
|
|
9
|
+
|
|
10
|
+
(abstract_class_declaration
|
|
11
|
+
name: (type_identifier) @name.definition.class) @definition.class
|
|
12
|
+
|
|
13
|
+
(module
|
|
14
|
+
name: (identifier) @name.definition.module) @definition.module
|
|
15
|
+
|
|
16
|
+
(interface_declaration
|
|
17
|
+
name: (type_identifier) @name.definition.interface) @definition.interface
|
|
18
|
+
|
|
19
|
+
(type_annotation
|
|
20
|
+
(type_identifier) @name.reference.type) @reference.type
|
|
21
|
+
|
|
22
|
+
(new_expression
|
|
23
|
+
constructor: (identifier) @name.reference.class) @reference.class
|
|
24
|
+
|
|
25
|
+
(function_declaration
|
|
26
|
+
name: (identifier) @name.definition.function) @definition.function
|
|
27
|
+
|
|
28
|
+
(method_definition
|
|
29
|
+
name: (property_identifier) @name.definition.method) @definition.method
|
|
30
|
+
|
|
31
|
+
(class_declaration
|
|
32
|
+
name: (type_identifier) @name.definition.class) @definition.class
|
|
33
|
+
|
|
34
|
+
(interface_declaration
|
|
35
|
+
name: (type_identifier) @name.definition.class) @definition.class
|
|
36
|
+
|
|
37
|
+
(type_alias_declaration
|
|
38
|
+
name: (type_identifier) @name.definition.type) @definition.type
|
|
39
|
+
|
|
40
|
+
(enum_declaration
|
|
41
|
+
name: (identifier) @name.definition.enum) @definition.enum
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Services package for Siada.
|
|
3
|
+
|
|
4
|
+
This package contains various services used throughout the Siada application.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from .handle_at_command import (
|
|
8
|
+
AtCommandProcessor,
|
|
9
|
+
HandleAtCommandParams,
|
|
10
|
+
HandleAtCommandResult,
|
|
11
|
+
handle_at_command
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
from .file_recommendation import (
|
|
15
|
+
FileRecommendationEngine,
|
|
16
|
+
CompletionConfig,
|
|
17
|
+
FilterOptions,
|
|
18
|
+
DEFAULT_COMPLETION_CONFIG
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
'AtCommandProcessor',
|
|
23
|
+
'HandleAtCommandParams',
|
|
24
|
+
'HandleAtCommandResult',
|
|
25
|
+
'handle_at_command',
|
|
26
|
+
'FileRecommendationEngine',
|
|
27
|
+
'CompletionConfig',
|
|
28
|
+
'FilterOptions',
|
|
29
|
+
'DEFAULT_COMPLETION_CONFIG'
|
|
30
|
+
]
|