-
Notifications
You must be signed in to change notification settings - Fork 304
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
adding more granular diff format for autoedits model training #6173
Conversation
ac66aad
to
be81dbc
Compare
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.
As we discussed last week, let's aim to keep PRs focused on a single key change. This will make them easier to review and help reduce the risk of regressions.
This PR could be split into a series of changes that build on each other. For example, we could start by updating the implementation of the UnifiedDiffStrategy
with the relevant interfaces (in DefaultContextStrategyFactory
and ContextRetrieverDataCollection
). After that, we can introduce one new diff strategy per PR: first TwoStageUnifiedDiffStrategy
, then LineLevelDiffStrategy
. The changes to prompt utils and RecentViewPortRetriever
seem relatively independent and could also be extracted into smaller, separate PRs out of the stack.
I know it's not fun to spend time on this "extra" work, but we need to make it a habit from the get-go. This PR could be a great place to start. Holding each other accountable will make it easier to iterate faster in the long run.
@@ -323,24 +327,61 @@ ${RECENT_COPY_TAG_CLOSE} | |||
` | |||
} | |||
|
|||
export function getRecentEditsPrompt(contextItems: AutocompleteContextSnippet[]): PromptString { | |||
export function getRecentEditsPromptComponents( |
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.
Let's add tests to prompt-utils.test.ts
to cover recent edits prompt structure changes.
Refactored the PR into several other PRs. Closing this one. |
Context
The PR makes the following high-level changes:
10 sec
diff data by the user in the analytics to capture the short term diffs.Test plan
Added Unit tests for various changes