-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Make edit logging directories user-configurable #6497
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
Conversation
✅ Deploy Preview for continuedev canceled.
|
|
…inuedev/continue into adarsh/feat/logging-control
@@ -132,6 +132,7 @@ export const processNextEditData = async ({ | |||
afterContent, | |||
filePath, | |||
DiffFormatType.Unified, | |||
25, // 25 context lines; store a large number for trimming later on |
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.
IMO this would be a good point to modify createDiff
to instead take a single object as a param instead of n single arg params.
Then would you would have {..., contextLine: 25 }
which reads much more easily.
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.
completed
ide: IDE, | ||
) => { | ||
// gets the workspace dir uri and checks if it's the open-source continue repo | ||
const isFileWithinFolder = (fileUri: string, folderPath: string): boolean => { |
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.
Feels like a quick unit test would be easy to one-shot here
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.
Also, the purpose of this is just to check if there is a .editlogdirs
file? How are we doing this for the .staging
/.local
files? I'd think that logic already exists
|
||
const isEditLoggingAllowed = async (editedFileURI: string) => { | ||
const globalContinuePath = getContinueGlobalPath(); | ||
const editLogDirsPath = resolve(globalContinuePath, ".editlogdirs"); |
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.
I think we want to put this in core/util/paths.ts
, we try to keep all the path logic centralized there
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.
filepath logic is moved to core/util/paths.ts
diffType: DiffFormatType, | ||
contextLines: number = 3, | ||
) => { | ||
export interface createDiffArgs { |
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.
Super minor nitpick but interfaces in TypeScript should be in PascalCase
, eg CreateDiffArgs
Description
Instead of somewhat flaky and hardcoded repo detection, made edit-logging directories user-configurable via .editlogdirs file in global ~/.continue folder.
Checklist
Summary by cubic
Edit logging directories are now user-configurable using a .editlogdirs file in the global ~/.continue folder, replacing hardcoded repo detection.