From b7d12ed1a4949046e04b383daf31abaf398bdcf7 Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Wed, 15 Apr 2026 03:54:32 +0000 Subject: [PATCH] lexicons: cleanup `git.listLanguages` xrpc response schema We only need language name & its size Signed-off-by: Seongmin Lee --- api/tangled/templistLanguages.go | 14 ++------------ lexicons/git/temp/listLanguages.json | 29 +++-------------------------- 2 file(s) changed, 5 insertion(s)(+), 38 deletion(s)(-) diff --git a/api/tangled/templistLanguages.go b/api/tangled/templistLanguages.go --- a/api/tangled/templistLanguages.go +++ b/api/tangled/templistLanguages.go @@ -16,16 +16,8 @@ // GitTempListLanguages_Language is a "language" in the sh.tangled.git.temp.listLanguages schema. type GitTempListLanguages_Language struct { - // color: Hex color code for this language - Color *string `json:"color,omitempty" cborgen:"color,omitempty"` - // extensions: File extensions associated with this language - Extensions []string `json:"extensions,omitempty" cborgen:"extensions,omitempty"` - // fileCount: Number of files in this language - FileCount *int64 `json:"fileCount,omitempty" cborgen:"fileCount,omitempty"` // name: Programming language name Name string `json:"name" cborgen:"name"` - // percentage: Percentage of total codebase (0-100) - Percentage int64 `json:"percentage" cborgen:"percentage"` // size: Total size of files in this language (bytes) Size int64 `json:"size" cborgen:"size"` } @@ -35,10 +27,8 @@ Languages []*GitTempListLanguages_Language `json:"languages" cborgen:"languages"` // ref: The git reference used Ref string `json:"ref" cborgen:"ref"` - // totalFiles: Total number of files analyzed - TotalFiles *int64 `json:"totalFiles,omitempty" cborgen:"totalFiles,omitempty"` - // totalSize: Total size of all analyzed files in bytes - TotalSize *int64 `json:"totalSize,omitempty" cborgen:"totalSize,omitempty"` + // total: Total size of all analyzed files in bytes + Total int64 `json:"total" cborgen:"total"` } // GitTempListLanguages calls the XRPC method "sh.tangled.git.temp.listLanguages". diff --git a/lexicons/git/temp/listLanguages.json b/lexicons/git/temp/listLanguages.json --- a/lexicons/git/temp/listLanguages.json +++ b/lexicons/git/temp/listLanguages.json @@ -24,7 +24,7 @@ "encoding": "application/json", "schema": { "type": "object", - "required": ["ref", "languages"], + "required": ["ref", "languages", "total"], "properties": { "ref": { "type": "string", @@ -37,13 +37,9 @@ "ref": "#language" } }, - "totalSize": { + "total": { "type": "integer", "description": "Total size of all analyzed files in bytes" - }, - "totalFiles": { - "type": "integer", - "description": "Total number of files analyzed" } } } @@ -65,7 +61,7 @@ }, "language": { "type": "object", - "required": ["name", "size", "percentage"], + "required": ["name", "size"], "properties": { "name": { "type": "string", @@ -74,25 +70,6 @@ "size": { "type": "integer", "description": "Total size of files in this language (bytes)" - }, - "percentage": { - "type": "integer", - "description": "Percentage of total codebase (0-100)" - }, - "fileCount": { - "type": "integer", - "description": "Number of files in this language" - }, - "color": { - "type": "string", - "description": "Hex color code for this language" - }, - "extensions": { - "type": "array", - "items": { - "type": "string" - }, - "description": "File extensions associated with this language" } } } -- tangled.sh