Update roles/home/aichat.nix
This commit is contained in:
parent
047c36f1ca
commit
866a5de2b8
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user