package connector import ( gitea_sdk "gitea.dev/sdk" ) // slimSearchResult is the concise entry shape ChatGPT-style connectors // expect from search: an id, a title, and a url to fetch it by. func slimSearchResult(r *gitea_sdk.Repository) map[string]any { if r == nil { return nil } return map[string]any{ "id": r.ID, "name": r.Name, "full_name": r.FullName, "description": r.Description, "url": r.HTMLURL, "html_url": r.HTMLURL, } } func slimSearchResults(repos []*gitea_sdk.Repository) []map[string]any { out := make([]map[string]any, 0, len(repos)) for _, r := range repos { out = append(out, slimSearchResult(r)) } return out }