Files
orca/src/shared/quick-open-ripgrep-output-mode.ts
T
Neil 58bd15fa3f Fix ripgrep result completeness, filename handling, and search errors (#25156)
* Preserve ripgrep search results, filename identity, and failure diagnostics

* Fix adversarial Unicode and Explorer filename findings

* Register search failure localization fallback

* Preserve host filename identity through document and watcher consumers
2026-10-04 01:27:30 -07:00

15 lines
391 B
TypeScript

import type { RgOutputMode } from './quick-open-filter'
export function getQuickOpenRgOutputMode(
rawLine: string,
translatedLine: string,
rootPath: string
): RgOutputMode {
return translatedLine !== rawLine ||
rawLine.startsWith('/') ||
/^[A-Za-z]:[\\/]/.test(rawLine) ||
rawLine.startsWith('\\\\')
? { kind: 'absolute', rootPath }
: { kind: 'cwd-relative' }
}