Inline base64 source maps had been checked into tracked src files. This strips those comments from the repository without changing runtime behavior or adding ongoing guardrails, per the requested one-time cleanup scope. Constraint: Keep this change limited to tracked source cleanup only Rejected: Add CI/source verification guard | user requested one-time cleanup only Confidence: high Scope-risk: narrow Reversibility: clean Directive: If these directives reappear, fix the producing transform instead of reintroducing repo-side cleanup code Tested: rg -n "sourceMappingURL" ., bun run smoke, bun run verify:privacy, bun run test:provider, npm run test:provider-recommendation Not-tested: bun run typecheck (repository has many pre-existing unrelated failures) Co-authored-by: anandh8x <test@example.com>
43 lines
954 B
TypeScript
43 lines
954 B
TypeScript
import { c as _c } from "react-compiler-runtime";
|
|
import React from 'react';
|
|
import { pathToFileURL } from 'url';
|
|
import Link from '../ink/components/Link.js';
|
|
type Props = {
|
|
/** The absolute file path */
|
|
filePath: string;
|
|
/** Optional display text (defaults to filePath) */
|
|
children?: React.ReactNode;
|
|
};
|
|
|
|
/**
|
|
* Renders a file path as an OSC 8 hyperlink.
|
|
* This helps terminals like iTerm correctly identify file paths
|
|
* even when they appear inside parentheses or other text.
|
|
*/
|
|
export function FilePathLink(t0) {
|
|
const $ = _c(5);
|
|
const {
|
|
filePath,
|
|
children
|
|
} = t0;
|
|
let t1;
|
|
if ($[0] !== filePath) {
|
|
t1 = pathToFileURL(filePath);
|
|
$[0] = filePath;
|
|
$[1] = t1;
|
|
} else {
|
|
t1 = $[1];
|
|
}
|
|
const t2 = children ?? filePath;
|
|
let t3;
|
|
if ($[2] !== t1.href || $[3] !== t2) {
|
|
t3 = <Link url={t1.href}>{t2}</Link>;
|
|
$[2] = t1.href;
|
|
$[3] = t2;
|
|
$[4] = t3;
|
|
} else {
|
|
t3 = $[4];
|
|
}
|
|
return t3;
|
|
}
|