这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@homanp
Copy link
Contributor

@homanp homanp commented Jul 21, 2025

What does this PR do?

This pull request enhances the rendering of chat history in the UI by adding support for Markdown formatting and improves code modularity. The most important changes include introducing a new MarkdownRenderer component, updating the ChatHistory component to use it, and adding a new dependency for Markdown rendering.

Markdown rendering enhancements:

  • New MarkdownRenderer component: Added a utility component in src/ui/utils/markdown-renderer.tsx to render Markdown content using the ink-markdown library. ([src/ui/utils/markdown-renderer.tsxR1-R6](https://github.com/superagent-ai/grok-cli/pull/14/files#diff-005ce32cfd4f531d35e14136e30ad697a9ccab02e95dc4f2a429d812c4cebe42R1-R6))
  • Integration in ChatHistory: Updated the ChatHistory component in src/ui/components/chat-history.tsx to use the MarkdownRenderer for rendering chat messages as Markdown if no tool calls are present. ([src/ui/components/chat-history.tsxL62-R76](https://github.com/superagent-ai/grok-cli/pull/14/files#diff-82d2091fe49b119bba0c22185835018b6456bf9c35099c7f30f5ce2abd9b5e86L62-R76))

Dependency updates:

  • Added ink-markdown: Introduced the ink-markdown library as a new dependency in package.json to enable Markdown rendering in the terminal. ([package.jsonR34](https://github.com/superagent-ai/grok-cli/pull/14/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R34))

Fixes #13

Checklist

  • I tested my changes
  • I reviewed my own code

@homanp homanp self-assigned this Jul 21, 2025
@homanp homanp merged commit ae4028e into main Jul 21, 2025
2 checks passed
hinetapora added a commit to hinetapora/grok-cli-hurry-mode that referenced this pull request Nov 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add support for rendering markdown

2 participants