diff --git a/MANIFEST.in b/MANIFEST.in index 2bccc21e..9ce91acf 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,7 @@ recursive-include zt_backend/dist_dev * recursive-include zt_backend/dist_app * recursive-include copilot/node_modules * +recursive-include mintlify-docs/Components * include copilot/client.js include zt_cli/log_config.yaml include zt_dev_cli/log_config.yaml \ No newline at end of file diff --git a/copilot/copilot.py b/copilot/copilot.py index cc1577cd..42170877 100644 --- a/copilot/copilot.py +++ b/copilot/copilot.py @@ -14,6 +14,7 @@ import traceback from copilot.context_extractor import MdxComponentParser from zt_backend.config import settings +import importlib.resources copilot_app = FastAPI() @@ -30,7 +31,7 @@ copilot_enabled = False copilot_doc_open = False version = 0 -MDX_DIRECTORY = os.path.join(settings.zt_path, 'mintlify-docs', 'Components') +MDX_DIRECTORY = importlib.resources.files("mintlify-docs") / "Components" mdx_parser = MdxComponentParser(MDX_DIRECTORY) def is_docker(): diff --git a/mintlify-docs/__init__.py b/mintlify-docs/__init__.py new file mode 100644 index 00000000..e69de29b