-
Notifications
You must be signed in to change notification settings - Fork 1.3k
refactor actHandler #1329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor actHandler #1329
Conversation
|
8d8e569 to
08d8454
Compare
Greptile OverviewGreptile SummaryRefactors the
Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant V3 as V3.act()
participant AH as ActHandler
participant LLM as getActionFromLLM
participant TDA as takeDeterministicAction
participant Page as Page/DOM
V3->>AH: act(instruction)
AH->>Page: waitForDomNetworkQuiet()
AH->>Page: captureHybridSnapshot()
Page-->>AH: combinedTree, combinedXpathMap
AH->>LLM: getActionFromLLM(instruction, domElements)
LLM->>LLM: actInference()
LLM->>LLM: recordActMetrics()
LLM->>LLM: normalizeActInferenceElement()
LLM->>LLM: substituteVariablesInArguments()
LLM-->>AH: {action, response}
AH->>TDA: takeDeterministicAction(action)
TDA->>Page: performUnderstudyMethod()
alt twoStep === true
AH->>Page: captureHybridSnapshot()
AH->>AH: diffCombinedTrees()
AH->>LLM: getActionFromLLM(stepTwoInstructions)
LLM-->>AH: {secondAction}
AH->>TDA: takeDeterministicAction(secondAction)
TDA->>Page: performUnderstudyMethod()
end
alt Self-heal on error
TDA->>Page: captureHybridSnapshot()
TDA->>LLM: getActionFromLLM(fallback)
LLM-->>TDA: {fallbackAction}
TDA->>Page: performUnderstudyMethod(newSelector)
end
AH-->>V3: ActResult
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 files reviewed, no comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 4 files
miguelg719
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
why
act,extract, andobservenot respectingtimeoutparam #1330Summary by cubic
Refactors actHandler to centralize LLM action parsing and execution, reduce duplication, and improve metrics reporting. Behavior stays the same, with clearer naming and more reliable two-step and fallback flows.
Why:
What:
Test Plan:
Written for commit 08d8454. Summary will update automatically on new commits.