diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 27beac5..af62f99 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -88,8 +88,8 @@ jobs: run: > 7z a pay-respects-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.zip ./target/${{ matrix.target }}/release/pay-respects.exe - ./target/${{ matrix.target }}/release/pay-respects-module-runtime-rules.exe - ./target/${{ matrix.target }}/release/pay-respects-fallback-request-ai.exe + ./target/${{ matrix.target }}/release/_pay-respects-module-runtime-rules.exe + ./target/${{ matrix.target }}/release/_pay-respects-fallback-request-ai.exe - name: zipping files (unix) if: runner.os != 'Windows' @@ -97,8 +97,8 @@ jobs: tar -czf pay-respects-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release pay-respects - pay-respects-module-runtime-rules - pay-respects-fallback-request-ai + _pay-respects-module-runtime-rules + _pay-respects-fallback-request-ai - name: uploading to release uses: ncipollo/release-action@v1 diff --git a/Cargo.lock b/Cargo.lock index e8589e7..1a76ae0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -481,7 +481,7 @@ dependencies = [ [[package]] name = "pay-respects-module-request-ai" -version = "0.1.0" +version = "0.1.1" dependencies = [ "colored", "curl", @@ -494,7 +494,7 @@ dependencies = [ [[package]] name = "pay-respects-module-runtime-rules" -version = "0.1.0" +version = "0.1.1" dependencies = [ "pay-respects-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex-lite", diff --git a/core/src/shell.rs b/core/src/shell.rs index e11692a..e76e1c3 100644 --- a/core/src/shell.rs +++ b/core/src/shell.rs @@ -60,9 +60,9 @@ impl Data { let mut modules = vec![]; let mut fallbacks = vec![]; for exe in path_executables { - if exe.starts_with("pay-respects-module-") { + if exe.starts_with("_pay-respects-module-") { modules.push(exe.to_string()); - } else if exe.starts_with("pay-respects-fallback-") { + } else if exe.starts_with("_pay-respects-fallback-") { fallbacks.push(exe.to_string()); } else { executables.push(exe.to_string()); diff --git a/core/src/suggestions.rs b/core/src/suggestions.rs index 85a94b8..affb080 100644 --- a/core/src/suggestions.rs +++ b/core/src/suggestions.rs @@ -50,7 +50,6 @@ pub fn suggest_candidates(data: &mut Data) { } for fallback in fallbacks { let candidates = module_output(data, fallback); - eprintln!("fallback: {candidates:?}"); if candidates.is_some() { add_candidates_no_dup(command, &mut suggest_candidates, &candidates.unwrap()); data.candidates = suggest_candidates; diff --git a/install.sh b/install.sh index c511850..51af090 100644 --- a/install.sh +++ b/install.sh @@ -19,7 +19,7 @@ main() { echo "Detected architecture: ${_arch}" local _bin_name="pay-respects" - local _modules="pay-respects-module-runtime-rules pay-respects-fallback-request-ai" + local _modules="_pay-respects-module-runtime-rules _pay-respects-fallback-request-ai" case "${_arch}" in *windows*) _bin_name="${_bin_name}.exe" diff --git a/module-request-ai/Cargo.toml b/module-request-ai/Cargo.toml index 7345bda..9bf862d 100644 --- a/module-request-ai/Cargo.toml +++ b/module-request-ai/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pay-respects-module-request-ai" -version = "0.1.0" +version = "0.1.1" edition = "2021" description = "AI request module for the pay-respects CLI tool" @@ -26,5 +26,5 @@ curl = { version = "0.4", optional = true } libcurl = ["dep:curl"] [[bin]] -name = "pay-respects-fallback-request-ai" +name = "_pay-respects-fallback-request-ai" path = "src/main.rs" diff --git a/module-runtime-rules/Cargo.toml b/module-runtime-rules/Cargo.toml index 7012513..4cb3a10 100644 --- a/module-runtime-rules/Cargo.toml +++ b/module-runtime-rules/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pay-respects-module-runtime-rules" -version = "0.1.0" +version = "0.1.1" edition = "2021" # for crates.io @@ -18,3 +18,7 @@ toml = { version = "0.8" } serde = { version = "1.0", features = ["derive"] } pay-respects-utils = "0.1.0" # pay-respects-utils = { path = "../utils" } + +[[bin]] +name = "_pay-respects-module-runtime-rules" +path = "src/main.rs" diff --git a/modules.md b/modules.md index 9b24745..f370a11 100644 --- a/modules.md +++ b/modules.md @@ -17,10 +17,10 @@ There are 2 types of modules: - **Standard module**: Will always run to retrieve suggestions - - Naming convention: `pay-respects-module-` + - Naming convention: `_pay-respects-module-` - **Fallback module**: Will only be run if no previous suggestion were found - **CAUTION**: Will immediately return if a suggestion is obtained, and there is no guaranteed the modules are executed in a specific order. - - Naming convention: `pay-respects-fallback-` + - Naming convention: `_pay-respects-fallback-` When running your module, you will get the following environment variables: