Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install Tk (Ubuntu only)
- name: Install Tk + Xvfb (Ubuntu only)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y python3-tk
sudo apt-get install -y python3-tk xvfb

- name: Install pytest
run: |
Expand All @@ -43,7 +43,16 @@ jobs:
run: python -m pip install -e .

- name: Run tests
run: python -m pytest -v --tb=short --junit-xml=junit.xml
shell: bash
run: |
# Tk tests need a display. On Ubuntu, wrap pytest under xvfb-run so
# the Tk subsystem can create (hidden) windows; on Windows, DISPLAY
# is irrelevant so we just invoke pytest directly.
if [ "$RUNNER_OS" = "Linux" ]; then
xvfb-run -a python -m pytest -v --tb=short --junit-xml=junit.xml
else
python -m pytest -v --tb=short --junit-xml=junit.xml
fi

- name: Upload JUnit test report
if: always()
Expand Down
38 changes: 38 additions & 0 deletions core/ai/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
"""``modules.ai`` — AI features for the editor.

Submodules:

* :mod:`.provider` — provider auto-detection from ``base_url``
* :mod:`.client` — :class:`AIClient` (urllib + threading, stdlib-only)
* :mod:`.skills` — :class:`AISkill` + :class:`AISkillRegistry`
* :mod:`.marketplace` — :class:`AISkillMarketplaceProvider`
"""

from __future__ import annotations

from .client import AIClient, AIRequestError, AIResponse, ChatMessage
from .marketplace import (
AISkillMarketplaceProvider,
bundled_skills,
install_skill_from_marketplace,
)
from .provider import AIProvider, default_model, detect_provider, provider_label, resolve_model
from .skills import AISkill, AISkillRegistry, MCPServer

__all__ = [
"AIClient",
"AIProvider",
"AIRequestError",
"AIResponse",
"AISkill",
"AISkillMarketplaceProvider",
"AISkillRegistry",
"ChatMessage",
"MCPServer",
"bundled_skills",
"default_model",
"detect_provider",
"install_skill_from_marketplace",
"provider_label",
"resolve_model",
]
Loading
Loading