Skip to content

Commit c26752b

Browse files
hassoncsChris Hassonmrubens
authored
fix(environment): Filter out non-text tab inputs (RooCodeInc#6350)
Co-authored-by: Chris Hasson <[email protected]> Co-authored-by: Matt Rubens <[email protected]>
1 parent cc0f9e3 commit c26752b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/environment/getEnvironmentDetails.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ export async function getEnvironmentDetails(cline: Task, includeFileDetails: boo
5858
const maxTabs = maxOpenTabsContext ?? 20
5959
const openTabPaths = vscode.window.tabGroups.all
6060
.flatMap((group) => group.tabs)
61-
.map((tab) => (tab.input as vscode.TabInputText)?.uri?.fsPath)
61+
.filter((tab) => tab.input instanceof vscode.TabInputText)
62+
.map((tab) => (tab.input as vscode.TabInputText).uri.fsPath)
6263
.filter(Boolean)
6364
.map((absolutePath) => path.relative(cline.cwd, absolutePath).toPosix())
6465
.slice(0, maxTabs)

0 commit comments

Comments
 (0)