Skip to content

Conversation

SushritaSingh
Copy link

Changes

  • Added react-markdown dependency.
  • Implemented Markdown rendering in Terminal.tsx for AI responses.
  • Updated package.json and Tailwind configuration.
  • Applied Tailwind-based UI styling.

Closes

Closes #21

@SushritaSingh
Copy link
Author

I do PR review it please.

Copy link
Collaborator

@thedevyashsaini thedevyashsaini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it’d be good to add a real example from actual AI output — like pipe a markdown-style response from the LLM and see how react-markdown renders it. also check if it breaks with any malformed markdown or ansi output (like **\x1b[31merror\x1b[0m**)

Comment on lines 10 to 15
const [messages] = useState<Message[]>([
{
type: 'llm',
text: '**Welcome!**\n\n_Everything you type will render as Markdown._\n\nTry list:\n- Item 1\n- Item 2\n\nCode:\n```\necho hello\n```'
}
]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rn the messages array is hardcoded — this just demos markdown rendering, but isn’t actually wired into the real terminal logic or AI response handling. can you hook this into the actual data flow where llm messages are pushed during runtime?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure I'll do

@SushritaSingh
Copy link
Author

SushritaSingh commented Aug 1, 2025

review it again please!!!

Copy link
Collaborator

@thedevyashsaini thedevyashsaini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

appreciate the effort here - but this PR doesn’t really solve the issue as described.

the problem in #21 was about rendering markdown inside real AI responses in the terminal, not creating a demo component with static markdown.

a few things:

  • you’ve added a new Terminal.tsx instead of working inside the actual components/Terminal/index.tsx, which handles real commands and LLM output
  • this new component isn’t used anywhere in the main app flow
  • App.tsx was changed to use static props instead of integrating with actual response history

i’d suggest updating the real terminal output renderer (TerminalOutput.tsx) to parse markdown only when the message type is 'llm', and integrate react-markdown there.
let me know if you need help figuring out where exactly that happens — happy to point you to the right hook.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn’t the actual terminal component - the real one is in components/Terminal/index.tsx and handles input, history, command execution, and AI response handling. this new file isn’t used in the app and doesn’t integrate with anything.

Comment on lines -5 to +32
return <Terminal />;
return (
<div className="h-screen w-full bg-gray-950 text-white p-4 space-y-4">
{/* ✅ Use both to remove warning and test */}
<Terminal aiResponse={exampleResponse} />
<Terminal aiResponse={malformedResponse} />
</div>
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you’ve swapped the actual terminal for a demo version here - this breaks the real app flow. we shouldn’t be hardcoding markdown props into ; markdown rendering needs to work inside the real terminal output from the AI responses.

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 Request: Add basic markdown rendering for AI responses
2 participants