diff --git a/.github/workflows/pilot.yml b/.github/workflows/pilot.yml index 1243aa9..7274e43 100644 --- a/.github/workflows/pilot.yml +++ b/.github/workflows/pilot.yml @@ -30,10 +30,17 @@ jobs: pip install anthropic pip install pre-commit + # - name: Run OpenAI Magic + # run: | + # cd DocPilot + # python3 src/openai-integration.py ${{secrets.OPENAI_API_KEY}} + # rm -rf diff.txt temp.txt + + - name: Run Claude Magic run: | cd DocPilot - python3 src/integration.py ${{secrets.ANTHROPIC_API_KEY}} + python3 src/claude-integration.py ${{secrets.ANTHROPIC_API_KEY}} rm -rf diff.txt temp.txt - name: Check for changes 📝 diff --git a/resources/templates/function_templates/java_template.txt b/resources/templates/function_templates/java_template.txt new file mode 100644 index 0000000..fceef7a --- /dev/null +++ b/resources/templates/function_templates/java_template.txt @@ -0,0 +1,28 @@ +/** + * Description paragraph here. + * + * @param first The 1st param description. + * @param second The 2nd param description. + * @param third The 3rd param, by default 'value'. (optional) + * @return Description of the return value. + * @throws KeyError When a key error occurs. + * @throws OtherError When another error occurs. + * + * Examples: + * - Some minimal examples of using the function should go here. + * - For example: + *
+ *   int[] result1 = myFunction(arg1, arg2);
+ *   System.out.println(result1); // Output: some result
+ *   
+ * + *
+ *   List seqList = sequentialList(1, 5);
+ *   System.out.println(seqList); // Output: [1, 2, 3, 4]
+ *   System.out.println(seqList.size()); // Output: 4
+ *   System.out.println(Collections.min(seqList)); // Output: 1
+ *   
+ */ +public ReturnType myFunction(ParameterType1 first, ParameterType2 second, ParameterType3 third) { + // Function implementation here. +} diff --git a/resources/templates/function_templates/javascript_typescript_template.txt b/resources/templates/function_templates/javascript_typescript_template.txt new file mode 100644 index 0000000..31b84e3 --- /dev/null +++ b/resources/templates/function_templates/javascript_typescript_template.txt @@ -0,0 +1,21 @@ +/** + * Description paragraph here. + * + * @param {array_like} first - The 1st param description. + * @param {type} second - The 2nd param description. + * @param {object} [third='value'] - The 3rd param, by default 'value'. (optional) + * + * @returns {type} - Description of the return value. + * + * @throws {ErrorType1} - Description of the first error condition. + * @throws {ErrorType2} - Description of the second error condition. + * + * @example + * // Example 1: Describe how to use the function with sample inputs and outputs. + * const result1 = myFunction(arg1, arg2); + * console.log(result1); // Output: some result + * + * // Example 2: Provide another example. + * const result2 = myFunction(arg3, arg4); + * console.log(result2); // Output: some other result + */ \ No newline at end of file diff --git a/resources/fn_docstring_template.txt b/resources/templates/function_templates/python_template.txt similarity index 99% rename from resources/fn_docstring_template.txt rename to resources/templates/function_templates/python_template.txt index f9f7070..c014f64 100644 --- a/resources/fn_docstring_template.txt +++ b/resources/templates/function_templates/python_template.txt @@ -1,4 +1,5 @@ """ + Description paragraph here. Parameters