mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-21 12:51:17 -05:00
Misc refactor cline
This commit is contained in:
@@ -29,7 +29,7 @@ Diagnostics update in real-time as you edit code, helping identify issues quickl
|
||||
|
||||
Notes on diagnostics:
|
||||
- linter diagnostics are only captured for open editors
|
||||
- this works great for us since when claude edits/creates files its through vscode's textedit api's and we get those diagnostics for free
|
||||
- this works great for us since when cline edits/creates files its through vscode's textedit api's and we get those diagnostics for free
|
||||
- some tools might require you to save the file or manually refresh to clear the problem from the list.
|
||||
|
||||
System Prompt
|
||||
@@ -63,7 +63,7 @@ class DiagnosticsMonitor {
|
||||
|
||||
let timeout = 300 // only way this happens is if theres no errors
|
||||
|
||||
// if diagnostics contain existing errors (since the check above didn't trigger) then it's likely claude just did something that should have fixed the error, so we'll give a longer grace period for diagnostics to catch up
|
||||
// if diagnostics contain existing errors (since the check above didn't trigger) then it's likely cline just did something that should have fixed the error, so we'll give a longer grace period for diagnostics to catch up
|
||||
const hasErrors = currentDiagnostics.some(([_, diagnostics]) =>
|
||||
diagnostics.some((d) => d.severity === vscode.DiagnosticSeverity.Error)
|
||||
)
|
||||
|
||||
@@ -39,7 +39,7 @@ export class DiffViewProvider {
|
||||
}
|
||||
}
|
||||
|
||||
// get diagnostics before editing the file, we'll compare to diagnostics after editing to see if claude needs to fix anything
|
||||
// get diagnostics before editing the file, we'll compare to diagnostics after editing to see if cline needs to fix anything
|
||||
this.preDiagnostics = vscode.languages.getDiagnostics()
|
||||
|
||||
if (fileExists) {
|
||||
@@ -153,17 +153,17 @@ export class DiffViewProvider {
|
||||
Getting diagnostics before and after the file edit is a better approach than
|
||||
automatically tracking problems in real-time. This method ensures we only
|
||||
report new problems that are a direct result of this specific edit.
|
||||
Since these are new problems resulting from Claude's edit, we know they're
|
||||
directly related to the work he's doing. This eliminates the risk of Claude
|
||||
Since these are new problems resulting from Cline's edit, we know they're
|
||||
directly related to the work he's doing. This eliminates the risk of Cline
|
||||
going off-task or getting distracted by unrelated issues, which was a problem
|
||||
with the previous auto-debug approach. Some users' machines may be slow to
|
||||
update diagnostics, so this approach provides a good balance between automation
|
||||
and avoiding potential issues where Claude might get stuck in loops due to
|
||||
and avoiding potential issues where Cline might get stuck in loops due to
|
||||
outdated problem information. If no new problems show up by the time the user
|
||||
accepts the changes, they can always debug later using the '@problems' mention.
|
||||
This way, Claude only becomes aware of new problems resulting from his edits
|
||||
This way, Cline only becomes aware of new problems resulting from his edits
|
||||
and can address them accordingly. If problems don't change immediately after
|
||||
applying a fix, Claude won't be notified, which is generally fine since the
|
||||
applying a fix, Cline won't be notified, which is generally fine since the
|
||||
initial fix is usually correct and it may just take time for linters to catch up.
|
||||
*/
|
||||
const postDiagnostics = vscode.languages.getDiagnostics()
|
||||
@@ -191,7 +191,7 @@ export class DiffViewProvider {
|
||||
)
|
||||
return { newProblemsMessage, userEdits }
|
||||
} else {
|
||||
// no changes to claude's edits
|
||||
// no changes to cline's edits
|
||||
return { newProblemsMessage, userEdits: undefined }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ export async function downloadTask(dateTs: number, conversationHistory: Anthropi
|
||||
const ampm = hours >= 12 ? "pm" : "am"
|
||||
hours = hours % 12
|
||||
hours = hours ? hours : 12 // the hour '0' should be '12'
|
||||
const fileName = `claude_dev_task_${month}-${day}-${year}_${hours}-${minutes}-${seconds}-${ampm}.md`
|
||||
const fileName = `cline_task_${month}-${day}-${year}_${hours}-${minutes}-${seconds}-${ampm}.md`
|
||||
|
||||
// Generate markdown
|
||||
const markdownContent = conversationHistory
|
||||
|
||||
@@ -162,7 +162,7 @@ export class TerminalManager {
|
||||
if (t.busy) {
|
||||
return false
|
||||
}
|
||||
const terminalCwd = t.terminal.shellIntegration?.cwd // one of claude's commands could have changed the cwd of the terminal
|
||||
const terminalCwd = t.terminal.shellIntegration?.cwd // one of cline's commands could have changed the cwd of the terminal
|
||||
if (!terminalCwd) {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ export class TerminalProcess extends EventEmitter<TerminalProcessEvents> {
|
||||
if (this.hotTimer) {
|
||||
clearTimeout(this.hotTimer)
|
||||
}
|
||||
// these markers indicate the command is some kind of local dev server recompiling the app, which we want to wait for output of before sending request to claude
|
||||
// these markers indicate the command is some kind of local dev server recompiling the app, which we want to wait for output of before sending request to cline
|
||||
const compilingMarkers = ["compiling", "building", "bundling", "transpiling", "generating", "starting"]
|
||||
const markerNullifiers = [
|
||||
"compiled",
|
||||
|
||||
@@ -17,7 +17,7 @@ class WorkspaceTracker {
|
||||
}
|
||||
|
||||
async initializeFilePaths() {
|
||||
// should not auto get filepaths for desktop since it would immediately show permission popup before claude every creates a file
|
||||
// should not auto get filepaths for desktop since it would immediately show permission popup before cline ever creates a file
|
||||
if (!cwd) {
|
||||
return
|
||||
}
|
||||
@@ -44,7 +44,7 @@ class WorkspaceTracker {
|
||||
event) will be terminated and restarted so that the (deprecated) `rootPath` property is updated
|
||||
to point to the first workspace folder.
|
||||
*/
|
||||
// In other words, we don't have to worry about the root workspace folder ([0]) changing since the extension will be restarted and our cwd will be updated to reflect the new workspace folder. (We don't care about non root workspace folders, since claude will only be working within the root folder cwd)
|
||||
// In other words, we don't have to worry about the root workspace folder ([0]) changing since the extension will be restarted and our cwd will be updated to reflect the new workspace folder. (We don't care about non root workspace folders, since cline will only be working within the root folder cwd)
|
||||
// this.disposables.push(vscode.workspace.onDidChangeWorkspaceFolders(this.onWorkspaceFoldersChanged.bind(this)))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user