Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

Merge branch 'codex/merge-7464' into codex/merge-7430

Ezra Ellette62bd592bf8e1
diff --cc apps/screenpipe-app-tauri/components/markdown.tsx
index 0367829c4,d907c7072..3cd9d8b4b
--- a/apps/screenpipe-app-tauri/components/markdown.tsx
+++ b/apps/screenpipe-app-tauri/components/markdown.tsx
@@@ -222,19 -209,14 +222,24 @@@ export function createMediaAwareMarkdow
if (CustomAnchor) {
return <CustomAnchor href={href} {...props}>{children}</CustomAnchor>;
}
- return <a href={href} {...props}>{children}</a>;
+ // A plain web link would load the site inside the app window. The opener
+ // plugin sends `_blank` http(s) clicks to the system browser instead.
+ const webLink = href && /^https?:/i.test(href)
+ ? { target: "_blank", rel: "noopener noreferrer" }
+ : {};
+ return <a href={href} {...props} {...webLink}>{children}</a>;
};
+ // An image that doesn't show keeps its alt text and where it pointed, so it
+ // never vanishes without a trace. A web address becomes a link, which opens
+ // only when clicked.
+ const imageAsText = (src: string | undefined, alt: string | undefined) => {
+ // The url transform removed an unsafe address; there is none to show.
+ if (!src) return <ImageAltText alt={alt} />;
+ if (!WEB_ADDRESS.test(src)) return addressAsText(src, alt);
+ return <OutsideLinkOnly inside={alt || src}>{link(src, alt || src)}</OutsideLinkOnly>;
+ };
+
return {
...base,
a({ href, children, ...props }) {