mirror of
https://github.com/github/spec-kit.git
synced 2026-07-05 13:34:06 +08:00
Add TomlIntegration base class in base.py that mirrors MarkdownIntegration:
- Overrides command_filename() for .toml extension
- Extracts description from YAML frontmatter for top-level TOML key
- Renders prompt body in TOML multiline basic strings with escaped backslashes
- Keeps full processed template (including frontmatter) as prompt body
- Byte-for-byte parity with v0.4.4 release ZIP output
Create integrations/gemini/ and integrations/tabnine/ subpackages:
- Config-only __init__.py subclassing TomlIntegration
- Integration-specific update-context scripts (sh + ps1)
Add TomlIntegrationTests mixin with TOML-specific validations:
- Valid TOML parsing, description/prompt keys, {{args}} placeholder
- Setup/teardown, manifest tracking, install/uninstall round-trips
- CLI auto-promote (--ai) and --integration flag tests
- Complete file inventory tests (sh + ps)
Register both in INTEGRATION_REGISTRY; --ai auto-promote works automatically.
22 lines
563 B
Python
22 lines
563 B
Python
"""Tabnine CLI integration."""
|
|
|
|
from ..base import TomlIntegration
|
|
|
|
|
|
class TabnineIntegration(TomlIntegration):
|
|
key = "tabnine"
|
|
config = {
|
|
"name": "Tabnine CLI",
|
|
"folder": ".tabnine/agent/",
|
|
"commands_subdir": "commands",
|
|
"install_url": "https://docs.tabnine.com/main/getting-started/tabnine-cli",
|
|
"requires_cli": True,
|
|
}
|
|
registrar_config = {
|
|
"dir": ".tabnine/agent/commands",
|
|
"format": "toml",
|
|
"args": "{{args}}",
|
|
"extension": ".toml",
|
|
}
|
|
context_file = "TABNINE.md"
|