Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(chat): render Codex follow-up suggestions #11355

ClosedAndrew-Forster(GitHub profile, opens in a new tab)wants to merge 21 commits intomain fromrefs/pull/11355/headopened View on GitHub

Showing 10 changed files with 43 additions and 0 deletions (loading 7).

x
0 of 10 viewed, 10 left
18 additions and 0 deletionsapps/mobile/modules/t3-markdown-text/src/markdownLinks.test.tsAdded
View file
@@ -0,0 +1,18 @@
+import { describe, expect, it } from "vite-plus/test";
+​
+import { resolveMarkdownLinkPresentation } from "./markdownLinks";
+​
+describe("resolveMarkdownLinkPresentation", () => {
+ it("preserves valid Codex follow-up actions for the native press handler", () => {
+ const href = "t3-followup:Explain%20why%20sunsets%20look%20red.";
+​
+ expect(resolveMarkdownLinkPresentation(href)).toEqual({ kind: "link", href });
+ });
+​
+ it("does not preserve malformed Codex follow-up actions", () => {
+ expect(resolveMarkdownLinkPresentation("t3-followup:%E0%A4%A")).toEqual({
+ kind: "link",
+ href: null,
+ });
+ });
+});
5 additions and 0 deletionsapps/mobile/modules/t3-markdown-text/src/markdownLinks.tsModified
View file
@@ -5,6 +5,7 @@
normalizeMarkdownLinkDestination,
parseMarkdownFileLink,
} from "@t3tools/client-runtime/markdown-links";
+import { codexFollowupPromptFromHref } from "@t3tools/client-runtime/codex-markdown-directives";
import { videoMimeType } from "@t3tools/shared/video";
​
import type { MARKDOWN_FILE_ICON_SOURCES } from "./markdownFileIcons.generated";