Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix: render images whose destination has spaces #12815

ClosedValeraZSD(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/12815/headopened View on GitHub

Showing 5 changed files with 59 additions and 8 deletions (loading 2).

x
0 of 5 viewed, 5 left
5 additions and 2 deletionsapps/mobile/src/features/threads/ThreadFeed.tsxModified
View file
@@ -36,6 +36,7 @@
classifyMarkdownImageSource,
markdownImageSourceFragment,
} from "@t3tools/client-runtime/markdown-images";
+import { repairMarkdownImageDestinations } from "@t3tools/client-runtime/markdown-links";
import { resolveViewedImageAsset } from "@t3tools/client-runtime/work-log/presentation";
import {
renderCodexFileCitationsAsMarkdown,
@@ -788,7 +789,7 @@
readonly skills?: ReadonlyArray<SelectableMarkdownSkill> | undefined;
}) {
const segments = useMemo(
- () => splitCodexArtifactTemplateMarkdown(props.markdown),
+ () => splitCodexArtifactTemplateMarkdown(repairMarkdownImageDestinations(props.markdown)),
[props.markdown],
​
@@ -1515,7 +1516,9 @@
const isUser = message.role === "user";
- const renderedText = renderAssistantCitationsAsText(message.text);
+ const renderedText = renderAssistantCitationsAsText(
+ repairMarkdownImageDestinations(message.text),
+ );
const styles = isUser ? markdownStyles.user : markdownStyles.assistant;
const timestampLabel = formatMessageTime(isUser ? message.createdAt : message.updatedAt);
const attachments = message.attachments ?? [];