Lightweight coding agent that runs in your terminal
Rust
fix: remember to set lastIndex = 0 on shared RegExp (#918)
Michael Bolindd354e213420
diff --git a/codex-cli/src/components/chat/terminal-chat-response-item.tsx b/codex-cli/src/components/chat/terminal-chat-response-item.tsxindex 90c188aa62..888547a66c 100644--- a/codex-cli/src/components/chat/terminal-chat-response-item.tsx+++ b/codex-cli/src/components/chat/terminal-chat-response-item.tsx@@ -330,6 +330,7 @@ function rewriteFileCitations(return markdown;}+ citationRegex.lastIndex = 0;return markdown.replace(citationRegex, (_match, file, start, _end) => {const absPath = path.resolve(cwd, file);const uri = `${fileOpener}://file${absPath}:${start}`;