Update roles/home/aichat.nix

This commit is contained in:
Giulio De Pasquale 2024-07-01 18:26:31 +01:00
parent 047c36f1ca
commit 866a5de2b8

View File

@ -152,67 +152,67 @@ roles = ''
fix (cicd): Modified `prep_go` function to use `go mod download` instead of `go download` fix (cicd): Modified `prep_go` function to use `go mod download` instead of `go download`
- name: createpr - name: createpr
prompt: |- prompt: |-
You are an AI language model tasked with generating a comprehensive Pull Request (PR) description. Your goal is to create a clear and informative PR description that summarizes the changes and highlights any important details or considerations. You are an AI language model tasked with generating a comprehensive Pull Request (PR) description. Your goal is to create a clear and informative PR description that summarizes the changes and highlights any important details or considerations.
You are given a git diff and a list of commits - use this context to generate the PR message. You are given a git diff and a list of commits - use this context to generate the PR message.
# Requirements for the PR Description: # Requirements for the PR Description:
1. **Title:** Provide a concise and descriptive title for the PR. 1. **Title:** Provide a concise and descriptive title for the PR.
2. **Summary:** Summarize the overall purpose and scope of the changes. 2. **Summary:** Summarize the overall purpose and scope of the changes.
3. **Details of Changes:** Describe the key changes made, referencing specific files or functions if necessary. 3. **Details of Changes:** Describe the key changes made, referencing specific files or functions if necessary.
4. **Impact:** Discuss any potential impact on the system, including backward compatibility, performance implications, and any new dependencies. 4. **Impact:** Discuss any potential impact on the system, including backward compatibility, performance implications, and any new dependencies.
### INPUT: ### INPUT:
``` ```
diff --git a/src/app.js b/src/app.js diff --git a/src/app.js b/src/app.js
index 83d2e7a..b6a1c3f 100644 index 83d2e7a..b6a1c3f 100644
--- a/src/app.js --- a/src/app.js
+++ b/src/app.js +++ b/src/app.js
@@ -10,6 +10,10 @@ function initialize() { @@ -10,6 +10,10 @@ function initialize() {
setupEventListeners(); setupEventListeners();
} }
+// TODO: add other listeners +// TODO: add other listeners
+// https://github.com/user/project/issue/123 +// https://github.com/user/project/issue/123
+function setupEventListeners() { +function setupEventListeners() {
+ document.getElementById('submit').addEventListener('click', handleSubmit); + document.getElementById('submit').addEventListener('click', handleSubmit);
+ document.getElementById('reset').addEventListener('click', handleReset); + document.getElementById('reset').addEventListener('click', handleReset);
+} +}
+ +
function handleSubmit(event) { function handleSubmit(event) {
event.preventDefault(); event.preventDefault();
const data = new FormData(event.target); const data = new FormData(event.target);
@@ -20,6 +24,10 @@ function handleSubmit(event) { @@ -20,6 +24,10 @@ function handleSubmit(event) {
console.log('Form submitted:', data); console.log('Form submitted:', data);
} }
+function handleReset(event) { +function handleReset(event) {
+ event.preventDefault(); + event.preventDefault();
+ event.target.form.reset(); + event.target.form.reset();
+ console.log('Form reset'); + console.log('Form reset');
} }
``` ```
### OUTPUT: ### OUTPUT:
**Title:** feat(app): add event listeners for submit and reset buttons **Title:** feat(app): add event listeners for submit and reset buttons
**Summary:** **Summary:**
This PR adds event listeners for the submit and reset buttons in the application. It introduces a new function to set up these event listeners and implements a handler for the reset button. This PR adds event listeners for the submit and reset buttons in the application. It introduces a new function to set up these event listeners and implements a handler for the reset button.
**Details of Changes:** **Details of Changes:**
1. **src/app.js:** 1. **src/app.js:**
- Added a new function `setupEventListeners` to attach click event listeners to the submit and reset buttons. - Added a new function `setupEventListeners` to attach click event listeners to the submit and reset buttons.
- Implemented the `handleReset` function to reset the form and log the reset action. - Implemented the `handleReset` function to reset the form and log the reset action.
- Included a TODO comment to add other listeners, referencing issue [#123](https://github.com/user/project/issue/123). - Included a TODO comment to add other listeners, referencing issue [#123](https://github.com/user/project/issue/123).
**Impact:** **Impact:**
- **Backward Compatibility:** The changes are backward compatible. - **Backward Compatibility:** The changes are backward compatible.
- **Performance Implications:** Minimal performance impact due to the addition of event listeners. - **Performance Implications:** Minimal performance impact due to the addition of event listeners.
- **New Dependencies:** No new dependencies introduced. - **New Dependencies:** No new dependencies introduced.
''; '';
in in
{ {