feat(file-explorer): add gitignored visibility toggle (#2022)

This commit is contained in:
Leynier Gutiérrez González
2026-05-17 18:33:47 -04:00
committed by GitHub
parent 0dc0995bd1
commit 231bad8e19
30 changed files with 647 additions and 69 deletions
+16
View File
@@ -35,6 +35,7 @@ import { getHistory as getGitHistory } from '../git/history'
import { getUpstreamStatus } from '../git/upstream'
import { gitFetch, gitPull, gitPush } from '../git/remote'
import { getSshGitProvider } from '../providers/ssh-git-dispatch'
import { checkIgnoredPaths } from '../git/check-ignored-paths'
import {
cancelGenerateCommitMessageLocal,
cancelGeneratePullRequestFieldsLocal,
@@ -95,6 +96,21 @@ export class RuntimeGitCommands {
: getGitStatus(target.worktree.path)
}
async checkRuntimeGitIgnoredPaths(
worktreeSelector: string,
relativePaths: string[]
): Promise<string[]> {
const target = await this.host.resolveRuntimeGitTarget(worktreeSelector)
const provider = target.connectionId ? getSshGitProvider(target.connectionId) : null
if (target.connectionId) {
if (!provider) {
throw new Error('remote_git_unavailable')
}
return provider.checkIgnoredPaths(target.worktree.path, relativePaths)
}
return checkIgnoredPaths(target.worktree.path, relativePaths)
}
async getRuntimeGitHistory(
worktreeSelector: string,
options: GitHistoryOptions = {}