mirror of
https://github.com/stablyai/orca.git
synced 2026-10-09 08:02:35 +00:00
* 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
15 lines
391 B
TypeScript
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' }
|
|
}
|