From 866a5de2b8964079eba9ad536a9fe7bed8a0a3e7 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Mon, 1 Jul 2024 18:26:31 +0100 Subject: [PATCH] Update roles/home/aichat.nix --- roles/home/aichat.nix | 100 +++++++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/roles/home/aichat.nix b/roles/home/aichat.nix index b2f891c..5905eda 100644 --- a/roles/home/aichat.nix +++ b/roles/home/aichat.nix @@ -152,67 +152,67 @@ roles = '' fix (cicd): Modified `prep_go` function to use `go mod download` instead of `go download` - - name: createpr - 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 given a git diff and a list of commits - use this context to generate the PR message. + - name: createpr + 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 given a git diff and a list of commits - use this context to generate the PR message. - # Requirements for the PR Description: - 1. **Title:** Provide a concise and descriptive title for the PR. - 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. - 4. **Impact:** Discuss any potential impact on the system, including backward compatibility, performance implications, and any new dependencies. + # Requirements for the PR Description: + 1. **Title:** Provide a concise and descriptive title for the PR. + 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. + 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 - index 83d2e7a..b6a1c3f 100644 - --- a/src/app.js - +++ b/src/app.js - @@ -10,6 +10,10 @@ function initialize() { - setupEventListeners(); - } + ``` + diff --git a/src/app.js b/src/app.js + index 83d2e7a..b6a1c3f 100644 + --- a/src/app.js + +++ b/src/app.js + @@ -10,6 +10,10 @@ function initialize() { + setupEventListeners(); + } - +// TODO: add other listeners - +// https://github.com/user/project/issue/123 - +function setupEventListeners() { - + document.getElementById('submit').addEventListener('click', handleSubmit); - + document.getElementById('reset').addEventListener('click', handleReset); - +} - + - function handleSubmit(event) { - event.preventDefault(); - const data = new FormData(event.target); - @@ -20,6 +24,10 @@ function handleSubmit(event) { + +// TODO: add other listeners + +// https://github.com/user/project/issue/123 + +function setupEventListeners() { + + document.getElementById('submit').addEventListener('click', handleSubmit); + + document.getElementById('reset').addEventListener('click', handleReset); + +} + + + function handleSubmit(event) { + event.preventDefault(); + const data = new FormData(event.target); + @@ -20,6 +24,10 @@ function handleSubmit(event) { - console.log('Form submitted:', data); - } + console.log('Form submitted:', data); + } - +function handleReset(event) { - + event.preventDefault(); - + event.target.form.reset(); - + console.log('Form reset'); - } - ``` + +function handleReset(event) { + + event.preventDefault(); + + event.target.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:** - 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. + **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. - **Details of Changes:** - 1. **src/app.js:** - - 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. - - Included a TODO comment to add other listeners, referencing issue [#123](https://github.com/user/project/issue/123). + **Details of Changes:** + 1. **src/app.js:** + - 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. + - Included a TODO comment to add other listeners, referencing issue [#123](https://github.com/user/project/issue/123). - **Impact:** - - **Backward Compatibility:** The changes are backward compatible. - - **Performance Implications:** Minimal performance impact due to the addition of event listeners. - - **New Dependencies:** No new dependencies introduced. + **Impact:** + - **Backward Compatibility:** The changes are backward compatible. + - **Performance Implications:** Minimal performance impact due to the addition of event listeners. + - **New Dependencies:** No new dependencies introduced. ''; in {