Conversation
|
@Tripplenut This workflow looks less than ideal. There's no way we're going to be doing multiple merges into feature branches and then merging the merges back into main? Our commit history will look awful. I will fix these branches when I have time but students should be doing a rebase instead this is 7 commits for slight changes to 1 file... interactive rebasing will be necessary |
|
@LeadFreeCandy The thing is I rebased. Unless I'm just stupid and don't know how git rebase works but my process for each rebase is just: git checkout feature-branch
git rebase main
git pull
git pushI think the history gets fucked cause I always forget to pull before the rebase and i'm just too lazy to fix it. Also if you wish to teach each person proper git techniques go for it. I don't really mind them just knowing how to commit, merge, and make a pr. I don't think the git workshop will be going over anything other than those 3 as we discussed it during the mentor meeting. If you want to teach them rebase, squash, and cherry pick make sure you do it well and we will also need to change some repo permissions. |
Created a function to find the closest label to the passed input field. Then used a loop to iterate through all the input fields and fill them with their closest label. Still very buggy and in testing phase.
LeadFreeCandy
left a comment
There was a problem hiding this comment.
Some great ideas! Not ready to merge but I'm really liking where this is heading!
autofill/autofillScript.ts
Outdated
| function labelDist(labels: Element[], input: Element): Element { | ||
| let minDist = Number.MAX_VALUE; | ||
| let minLabel = labels[0]; | ||
| for (let i = 0; i < labels.length; i++) { | ||
| let dist = Math.abs(labels[i].getBoundingClientRect().top - input.getBoundingClientRect().top); | ||
| if (dist < minDist) { | ||
| minDist = dist; | ||
| minLabel = labels[i]; | ||
| } | ||
| } | ||
| return minLabel; | ||
| } | ||
|
|
||
|
|
||
| // This file will be run on the content page, and should include all the logic for inserting text into form items. |
There was a problem hiding this comment.
This is a really interesting way to do this. Getting the actual rendered position is really cool! I think this would be a good fallback approach.
I think the first thing we should do is simply grab the label with something like this:
const label = document.querySelector(label[for="${inputField.id}"]);
if the website has its accessibly set up correctly, or use any decent form builder these should already be set up and will probably be more robust
There was a problem hiding this comment.
i think i commented out a loop that did this with email fields. Just commented it out so it wouldnt interfere witht the testing
autofill/autofillScript.ts
Outdated
| */ | ||
|
|
||
| // Trigger agree to terms and conditions. Tested on "https://store.steampowered.com/join" but should work on any site with a checkbox with the word "agree" in the name. Proof of concept for checkboxes | ||
| const agreeToTerms = document.querySelector('input[name*="agree"]'); |
There was a problem hiding this comment.
haha a robot agreeing to terms and conditions... we definitely might want to discuss whether we can really ethically do this. Maybe worth looking into a way to take the user to the fields that they must fill out manually for ethical reasons? Js has a really easy scrollTo method and we could highlight the field. Not necessary in this PR just something to think about
There was a problem hiding this comment.
you can also autocheck captchas too lol, but I thought that was a tad too far
New scripts to find fields and uses LLM to fill them
… of input parameters, then uses GPT-3.5 to fill in fields.
and memory wise. Also added a new feature to autofill allowing for AI completion of dropdown menus. The algoritm continues to use GPT to generate the proper field response. The new drop down algorithm passes GPT all possible options allowing it to choose the appropriate response.
AI responses are stripped of "AI :" prefixes. Dropdowns consitantly filled. AI responses made even more accurate by providing multiple data points to the AI. These include the field label, name and ID
Pull Request
Description
Please include a summary of the changes and the related issue (if applicable). Please also include relevant motivation and context. List any dependencies that are required for this change (if applicable).
Fixes # (issue)
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist
Try to checkoff as much as possible if not everything!