feat: play Grok local videos in Codex Desktop transcripts - #90
Merged
BytePioneer-AI merged 3 commits intoSep 1, 2026
Merged
Conversation
Grok replies use session-relative Markdown images such as ``. Codex Desktop treats those as remote images, so the player becomes a broken thumbnail and the path is not clickable. Resolve existing local media destinations onto absolute paths before projection, and upgrade leftover absolute video paths in the Renderer to `<video controls>` served through Codex's `app://fs/@fs` handler.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Grok replies often cite videos as inline code (`videos/clip.mp4`) rather than image Markdown. Codex Desktop renders those as `span[data-markdown-copy=inline-code]`, so a `<code>` upgrade never ran and no player appeared. Rewrite existing local media backticks onto `` before projection, and upgrade those inline-code chips in the Renderer.
Contributor
Author
本地验证:问题已修正已在本机用 codexhost 启动的 Codex Desktop(不是直接开 ChatGPT.app)验证,Agent 选 Grok。 复现与修正
本地再测后,对话里可以内联播放,不再是坏图或不可点击的灰色路径。 请审查并考虑合并。 |
Codex Desktop already plays `` natively. Keep Grok Adapter rewriting relative media and backticks onto absolute Markdown images, and stop injecting a global <video> MutationObserver.
BytePioneer-AI
added a commit
that referenced
this pull request
Sep 2, 2026
feat: play Grok local videos in Codex Desktop transcripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
在 CodexHost 里用 Grok Build 生成视频后,对话里会出现损坏的图片占位符。本地 mp4 路径以灰色 code 显示,不是链接,点不开,也无法在对话内播放。
视频文件本身是好的,系统播放器可以播。Grok TUI 能预览同一条
;Codex Desktop 不行。原因
Grok 的回复类似:
Codex Desktop 已经支持本地音视频:绝对路径的
会走app://fs/@fs/...,并用<video>播放。相对路径
videos/clip.mp4不会被当成本地文件,Markdown 图片被当成远程<img>,所以变成坏图。反引号路径也不是可点击链接。改动
Grok Adapter / history
把已存在的本地媒体 Markdown 图片改写成绝对路径,解析根包括 workspace cwd 和 Grok Native Session 目录(含
videos/、images/)。流式 delta 会暂扣未写完的。验证
npx vitest run --config tests/vitest.config.js packages/adapters/grok/test/local-media-markdown.test.ts packages/adapters/grok/test/grok-history.test.ts packages/adapters/grok/test/grok-adapter.test.ts packages/renderer-extension/test/renderer-local-media.test.tstsc -b、ESLint、package boundary check 通过未跑完整仓库测试套件,也未在 Codex Desktop 里做端到端录屏。建议用 Grok 生成一段视频后,确认对话里可以直接播放,而不只是坏图 + 灰色路径。
How to test
codexhost(not ChatGPT.app directly).and for backtick absolute.mp4paths.