Skip to content
Open
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ Thumbs.db
# Local dev helpers
install.bat
launch.bat

# Session continuity (local)
.claude/plan.md
17 changes: 4 additions & 13 deletions api/services/generator_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@
)
_REGISTRATION_CAPABILITY_LOCK = threading.Lock()

print(f"[Registry] MODELS_DIR = {MODELS_DIR}")
print(f"[Registry] WORKSPACE_DIR = {WORKSPACE_DIR}")
print(f"[Registry] EXTENSIONS_DIR = {EXTENSIONS_DIR or '(not set)'}")


# ------------------------------------------------------------------ #
# Extension loader
Expand Down Expand Up @@ -461,10 +457,10 @@ def _discover_extensions(
and not (
registration_authorization is not None
and registration_authorization[0] == ext_id
and registration_authorization[1].exists()
and registration_authorization[2]
== Path(os.path.abspath(ext_dir))
)
and registration_authorization[1].exists()
and registration_authorization[2]
== ext_dir.resolve()
)
)
)
if install_interrupted:
Expand Down Expand Up @@ -643,9 +639,6 @@ def initialize(
)
self._active_id = fallback

print(f"[Registry] Active model : {self._active_id}")
print(f"[Registry] All models : {list(self._generators.keys())}")

def reload(self, validation_capability: object = None) -> None:
"""
Re-scans extensions and updates the registry without restarting FastAPI.
Expand All @@ -654,7 +647,6 @@ def reload(self, validation_capability: object = None) -> None:
registration_authorization = _consume_registration_validation_capability(
validation_capability,
)
print("[Registry] Reloading extensions...")
for gen in self._generators.values():
if isinstance(gen, ExtensionProcess):
gen.stop()
Expand All @@ -672,7 +664,6 @@ def reload(self, validation_capability: object = None) -> None:
self._errors.clear()
self._remove_legacy_paths()
self.initialize(registration_authorization)
print("[Registry] Reload complete.")

def load_errors(self) -> Dict[str, str]:
"""Returns extension loading errors."""
Expand Down
3 changes: 2 additions & 1 deletion electron/main/artifact-registry-service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { readdir, readFile, stat } from 'node:fs/promises'
import type { Dirent } from 'node:fs'
import { basename, extname, isAbsolute, join, relative, resolve, sep } from 'node:path'

import type {
Expand Down Expand Up @@ -254,7 +255,7 @@ async function collectFiles(workspaceDir: string, rootName: typeof ALLOWED_ROOTS
const files: string[] = []

async function walk(dir: string): Promise<void> {
let entries: Awaited<ReturnType<typeof readdir>>
let entries: Dirent[]
try {
entries = await readdir(dir, { withFileTypes: true })
} catch {
Expand Down
Loading