jupyter-ai
jupyter-ai copied to clipboard
Simplify markdown table generation in magic command - %ai list
trafficstars
Issue Reference: Issue-118
Description
Refactored the code responsible for generating markdown tables by replacing custom imperative logic with the py-markdown-table library.
- Closes #118.
Changes
- Updated the
_ai_list_command_markdownmethod inmagics.pyto generate markdown tables using the py-markdown-table library. - Modified the
_ai_env_status_for_provider_markdownmethod to return theenv_variablealongside its status in emoji form, replacing the previous approach where the emoji was appended to theenv_variablestring. - Added the
py-markdown-tablelibrary as a dependency inpyproject.toml. - Updated the help text in the
aws.pyfile to address an issue where markdown was not rendering correctly within a markdown table cell. To resolve this, markdown syntax was replaced with HTML tags to ensure proper rendering.
Testing
- Verified the changes by running Jupyter Lab in a local environment setup.
- Attached screenshots from the local environment for reference.