mirror of
https://github.com/safishamsi/graphify.git
synced 2026-09-23 14:05:43 +00:00
This commit is contained in:
@@ -23,6 +23,19 @@ def _check_skill_version(skill_dst: Path) -> None:
|
||||
if installed != __version__:
|
||||
print(f" warning: skill is from graphify {installed}, package is {__version__}. Run 'graphify install' to update.")
|
||||
|
||||
|
||||
def _refresh_all_version_stamps() -> None:
|
||||
"""After a successful install, update .graphify_version in all other known skill dirs.
|
||||
|
||||
Prevents stale-version warnings from platforms that were installed previously
|
||||
but not explicitly re-installed during this upgrade.
|
||||
"""
|
||||
for cfg in _PLATFORM_CONFIG.values():
|
||||
vf = Path.home() / cfg["skill_dst"]
|
||||
vf = vf.parent / ".graphify_version"
|
||||
if vf.exists():
|
||||
vf.write_text(__version__, encoding="utf-8")
|
||||
|
||||
_SETTINGS_HOOK = {
|
||||
"matcher": "Glob|Grep",
|
||||
"hooks": [
|
||||
@@ -159,6 +172,10 @@ def install(platform: str = "claude") -> None:
|
||||
if platform == "opencode":
|
||||
_install_opencode_plugin(Path("."))
|
||||
|
||||
# Refresh version stamps in all other previously-installed skill dirs so
|
||||
# stale-version warnings don't fire for platforms not explicitly re-installed.
|
||||
_refresh_all_version_stamps()
|
||||
|
||||
print()
|
||||
print("Done. Open your AI coding assistant and type:")
|
||||
print()
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ class FileType(str, Enum):
|
||||
_MANIFEST_PATH = "graphify-out/manifest.json"
|
||||
|
||||
CODE_EXTENSIONS = {'.py', '.ts', '.js', '.jsx', '.tsx', '.mjs', '.ejs', '.go', '.rs', '.java', '.cpp', '.cc', '.cxx', '.c', '.h', '.hpp', '.rb', '.swift', '.kt', '.kts', '.cs', '.scala', '.php', '.lua', '.toc', '.zig', '.ps1', '.ex', '.exs', '.m', '.mm', '.jl', '.vue', '.svelte', '.dart', '.v', '.sv'}
|
||||
DOC_EXTENSIONS = {'.md', '.mdx', '.txt', '.rst'}
|
||||
DOC_EXTENSIONS = {'.md', '.mdx', '.txt', '.rst', '.html'}
|
||||
PAPER_EXTENSIONS = {'.pdf'}
|
||||
IMAGE_EXTENSIONS = {'.png', '.jpg', '.jpeg', '.gif', '.webp', '.svg'}
|
||||
OFFICE_EXTENSIONS = {'.docx', '.xlsx'}
|
||||
|
||||
Reference in New Issue
Block a user