INNER CODE UNIT · Python

candidates

viticci/shortcuts-playground-plugin · claude/skills/shortcuts-playground/scripts/lookup_action_grounding.py:207

    candidates = {**tools, **structural}
    for key in (value, normalized_identifier(value)):
        if key in candidates:
            return key, candidates[key]
    suffix = value.removeprefix("is.workflow.actions.")
    matches = [
        (identifier, entry)
        for identifier, entry in candidates.items()
        if identifier.endswith(f".{suffix}") or identifier.rsplit(".", 1)[-1] == suffix
    ]
    return matches[0] if len(matches) == 1 else None


def find_by_python_name(catalog: dict[str, Any], value: str) -> tuple[str, dict[str, Any]] | None:
    lookup = catalog.get("pythonLookup") or {}
    if value in lookup:
        entry = lookup[value]
        identifier = entry.get("wfIdentifier")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…