mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
fix(environment): Filter out non-text tab inputs (#6350)
Co-authored-by: Chris Hasson <noreply@example.com> Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
This commit is contained in:
parent
cc0f9e3604
commit
c26752be17
1 changed files with 2 additions and 1 deletions
|
|
@ -58,7 +58,8 @@ export async function getEnvironmentDetails(cline: Task, includeFileDetails: boo
|
|||
const maxTabs = maxOpenTabsContext ?? 20
|
||||
const openTabPaths = vscode.window.tabGroups.all
|
||||
.flatMap((group) => group.tabs)
|
||||
.map((tab) => (tab.input as vscode.TabInputText)?.uri?.fsPath)
|
||||
.filter((tab) => tab.input instanceof vscode.TabInputText)
|
||||
.map((tab) => (tab.input as vscode.TabInputText).uri.fsPath)
|
||||
.filter(Boolean)
|
||||
.map((absolutePath) => path.relative(cline.cwd, absolutePath).toPosix())
|
||||
.slice(0, maxTabs)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue