jacob-ai-bot / jacob

Just Another Coding Bot
https://jacb.ai
Apache License 2.0
131 stars 20 forks source link

Enhance MarkdownRenderer.tsx to Automatically Link Code File Paths #219

Closed kleneway closed 1 month ago

kleneway commented 1 month ago

Description

The MarkdownRenderer.tsx component is responsible for rendering markdown content within the dashboard. Currently, when the markdown includes a path to a code file, it displays the path as plain text. To improve user experience and navigation, we need to enhance this component to automatically detect code file paths, convert them into clickable links, and allow users to view the actual code file in a dedicated code-viewing environment.

Requirements

Expected Behavior

Steps to Implement

  1. Path Detection:

    • Utilize regex or a markdown parsing library to identify code file paths within the markdown content.
    • Define the file extensions that should be recognized as code files.
  2. Link Conversion:

    • Modify the rendering logic to wrap detected file paths with anchor tags pointing to the appropriate route that triggers the code-viewing component.
  3. Integration with Code-Viewing Components:

    • Ensure that clicking the link invokes the existing code-viewing components. dashboard assigned task component called Code.tsx has one example

workspace

  1. Testing:
    • Write unit tests to verify that file paths are correctly detected and converted into links.
    • Perform integration testing to ensure that the links open the correct files in the code viewer without breaking existing functionality.

Additional Information

Acceptance Criteria


@jacob-ai-bot --skip-build

jacob-ai-bot[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-ai-bot[bot] commented 1 month ago

Update

I've completed my work on this issue and have created a pull request: JACoB PR for Issue Enhance MarkdownRenderer.tsx to Automatically Link Code File Paths.

Please review my changes there.

jacob-ai-bot[bot] commented 1 month ago

Update

I've updated this pull request: JACoB PR for Issue Enhance MarkdownRenderer.tsx to Automatically Link Code File Paths.

The changes currently result in an error, so I'll be making some additional changes before it is ready to merge.

jacob-ai-bot[bot] commented 1 month ago

Update

I've updated this pull request: JACoB PR for Issue Enhance MarkdownRenderer.tsx to Automatically Link Code File Paths.

The changes currently result in an error, so I'll be making some additional changes before it is ready to merge.

jacob-ai-bot[bot] commented 1 month ago

Update

I've updated this pull request: JACoB PR for Issue Enhance MarkdownRenderer.tsx to Automatically Link Code File Paths.

The changes currently result in an error, so I'll be making some additional changes before it is ready to merge.

jacob-local-kevin[bot] commented 1 month ago

Update

I've updated this pull request: JACoB PR for Issue Enhance MarkdownRenderer.tsx to Automatically Link Code File Paths.

The changes currently result in an error, so I'll be making some additional changes before it is ready to merge.

jacob-local-kevin[bot] commented 1 month ago

Update

I've completed my work on this issue and have updated this pull request: JACoB PR for Issue Enhance MarkdownRenderer.tsx to Automatically Link Code File Paths.

Please review my changes there.