-
Notifications
You must be signed in to change notification settings - Fork 495
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(amazonq): refactor doc and featureDev SessionState #6388
base: master
Are you sure you want to change the base?
refactor(amazonq): refactor doc and featureDev SessionState #6388
Conversation
packages/core/src/test/amazonqFeatureDev/session/sessionState.test.ts
Outdated
Show resolved
Hide resolved
33f1073
to
bcd4d1a
Compare
03f7ed3
to
4fb81be
Compare
/runIntegrationTests |
/runIntegrationTests |
/runIntegrationTests |
/runIntegrationTests |
/runIntegrationTests |
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.
This file is mostly copied over from FeatureDev's types.ts. Original file is deleted
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.
This is an abstract class of the original FeatureDevClient from amazonFeatureDev/client/featureDev.ts, allowing /doc to inherit.
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.
The several abstract classes CodeGenBase
, BasePrepareCodeGenState
and BaseCodeGenState
are refactor versions of /doc and /dev's CodeGenBase
, PrepareCodeGenState
and CodeGenState
. Most implementations are copied over, with different logic addressed with polymorphism (through methods such as handleProgress
handleGenerationComplete
). Logic-wise, this is the same as the original implementation.
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.
Moved from FeatureDev to common folder, with getDeletedFileInfos and registerNewFiles added to allow calling from /doc
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.
Moved logic to common sessionState.ts and handled different logic with polymorphism
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.
Same as /doc sessionState.ts
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.
Copied from original featureDev test file to allow calling from /doc tests
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.
Moved common functions to amazonq folder
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.
createCodeGenState was called from two places. Moved to be a common function
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.
createCodeGenState was called from two places. Moved to be a common function
9863db6
to
34b539e
Compare
Duplicate code for |
2536198
to
2f6ce38
Compare
Co-authored-by: Avi Alpert <[email protected]>
Co-authored-by: Avi Alpert <[email protected]>
2f6ce38
to
68672b2
Compare
/runIntegrationTests |
Problem
This is aimed to resolve jscpd
Solution
Refactor SessionState in doc and featureDev
feature/x
branches will not be squash-merged at release time.