mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
Fix bug where new files won't show up in files dropdown (#1704)
* Fix bug where new files won't show up in files dropdown * Create small-gifts-count.md
This commit is contained in:
parent
134020d51b
commit
887456ead8
4 changed files with 17 additions and 3 deletions
5
.changeset/small-gifts-count.md
Normal file
5
.changeset/small-gifts-count.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"claude-dev": patch
|
||||
---
|
||||
|
||||
Fix bug where new files won't show up in files dropdown
|
||||
|
|
@ -1835,6 +1835,11 @@ export class Cline {
|
|||
`${newProblemsMessage}`,
|
||||
)
|
||||
}
|
||||
|
||||
if (!fileExists) {
|
||||
this.providerRef.deref()?.workspaceTracker?.populateFilePaths()
|
||||
}
|
||||
|
||||
await this.diffViewProvider.reset()
|
||||
await this.saveCheckpoint()
|
||||
break
|
||||
|
|
@ -2387,6 +2392,10 @@ export class Cline {
|
|||
if (userRejected) {
|
||||
this.didRejectTool = true
|
||||
}
|
||||
|
||||
// Re-populate file paths in case the command modified the workspace (vscode listeners do not trigger unless the user manually creates/deletes files)
|
||||
this.providerRef.deref()?.workspaceTracker?.populateFilePaths()
|
||||
|
||||
pushToolResult(result)
|
||||
await this.saveCheckpoint()
|
||||
break
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||
private disposables: vscode.Disposable[] = []
|
||||
private view?: vscode.WebviewView | vscode.WebviewPanel
|
||||
private cline?: Cline
|
||||
private workspaceTracker?: WorkspaceTracker
|
||||
workspaceTracker?: WorkspaceTracker
|
||||
mcpHub?: McpHub
|
||||
private authManager: FirebaseAuthManager
|
||||
private latestAnnouncementId = "jan-20-2025" // update to some unique identifier when we add a new announcement
|
||||
|
|
@ -379,7 +379,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||
switch (message.type) {
|
||||
case "webviewDidLaunch":
|
||||
this.postStateToWebview()
|
||||
this.workspaceTracker?.initializeFilePaths() // don't await
|
||||
this.workspaceTracker?.populateFilePaths() // don't await
|
||||
getTheme().then((theme) =>
|
||||
this.postMessageToWebview({
|
||||
type: "theme",
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class WorkspaceTracker {
|
|||
this.registerListeners()
|
||||
}
|
||||
|
||||
async initializeFilePaths() {
|
||||
async populateFilePaths() {
|
||||
// should not auto get filepaths for desktop since it would immediately show permission popup before cline ever creates a file
|
||||
if (!cwd) {
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue