Read the model catalog in claude_code/catalog.py
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import json
|
||||
|
||||
from loop_claude.claude_code.formats import catalog
|
||||
|
||||
|
||||
def offered_models(folder):
|
||||
return catalog(read_catalog(folder))
|
||||
|
||||
|
||||
def read_catalog(folder):
|
||||
for path in folder.glob("*.json"):
|
||||
try:
|
||||
with open(path, encoding="utf-8") as handle:
|
||||
yield json.load(handle)
|
||||
except (OSError, ValueError):
|
||||
continue
|
||||
Reference in New Issue
Block a user