From 9b2fd5fedcc71e5de67286b5f4bd57bb309d7747 Mon Sep 17 00:00:00 2001 From: Danielle Maywood Date: Tue, 28 Jul 2026 14:30:40 +0000 Subject: [PATCH] fix: delete the unused ChatMessagePart.Signature field The field was added in #22290 and has never been assigned by any code path. It carries no variants tag, so codegen excluded it from every generated TypeScript variant and typesGenerated.ts never contained it. Nothing ever wrote the JSON key, and encoding/json ignores unknown keys on read, so persisted chat_messages.content rows are unaffected. Removes the now-redundant excludedFields entry, and the swagger, apidoc and reference-docs output from make gen. --- coderd/apidoc/docs.go | 3 --- coderd/apidoc/swagger.json | 3 --- codersdk/chats.go | 1 - codersdk/chats_test.go | 1 - docs/reference/api/chats.md | 8 -------- docs/reference/api/schemas.md | 13 ------------- 6 files changed, 29 deletions(-) diff --git a/coderd/apidoc/docs.go b/coderd/apidoc/docs.go index 6f9843821fe..0696730e54e 100644 --- a/coderd/apidoc/docs.go +++ b/coderd/apidoc/docs.go @@ -17884,9 +17884,6 @@ const docTemplate = `{ "result_reset": { "type": "boolean" }, - "signature": { - "type": "string" - }, "skill_description": { "description": "SkillDescription is the short description from the skill's\nSKILL.md frontmatter.", "type": "string" diff --git a/coderd/apidoc/swagger.json b/coderd/apidoc/swagger.json index 59bfe973780..bec8be3303f 100644 --- a/coderd/apidoc/swagger.json +++ b/coderd/apidoc/swagger.json @@ -16114,9 +16114,6 @@ "result_reset": { "type": "boolean" }, - "signature": { - "type": "string" - }, "skill_description": { "description": "SkillDescription is the short description from the skill's\nSKILL.md frontmatter.", "type": "string" diff --git a/codersdk/chats.go b/codersdk/chats.go index 6dd5192fc80..7c283226f6b 100644 --- a/codersdk/chats.go +++ b/codersdk/chats.go @@ -333,7 +333,6 @@ func AllChatMessagePartTypes() []ChatMessagePartType { type ChatMessagePart struct { Type ChatMessagePartType `json:"type"` Text string `json:"text" variants:"text,reasoning"` - Signature string `json:"signature,omitempty"` ToolCallID string `json:"tool_call_id,omitempty" variants:"tool-call?,tool-result?"` ToolName string `json:"tool_name,omitempty" variants:"tool-call?,tool-result?"` MCPServerConfigID uuid.NullUUID `json:"mcp_server_config_id,omitempty" format:"uuid" variants:"tool-call?,tool-result?"` diff --git a/codersdk/chats_test.go b/codersdk/chats_test.go index 29727491c1f..6cc0b1f14f8 100644 --- a/codersdk/chats_test.go +++ b/codersdk/chats_test.go @@ -307,7 +307,6 @@ func TestChatMessagePartVariantTags(t *testing.T) { // variants tag or add it here with a comment explaining why. excludedFields := map[string]string{ "type": "discriminant, added automatically by codegen", - "signature": "added in #22290, never populated by any code path", "provider_metadata": "internal only, stripped by db2sdk before API responses", "context_file_content": "internal only, stripped before API responses (typescript:\"-\")", "context_file_os": "internal only, used during prompt expansion (typescript:\"-\")", diff --git a/docs/reference/api/chats.md b/docs/reference/api/chats.md index ca4de9f0049..9af2df8ada1 100644 --- a/docs/reference/api/chats.md +++ b/docs/reference/api/chats.md @@ -1686,7 +1686,6 @@ Experimental: this endpoint is subject to change. ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -1769,7 +1768,6 @@ Experimental: this endpoint is subject to change. ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -1905,7 +1903,6 @@ Experimental: this endpoint is subject to change. ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -1987,7 +1984,6 @@ Experimental: this endpoint is subject to change. ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -2121,7 +2117,6 @@ Experimental: this endpoint is subject to change. ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -2545,7 +2540,6 @@ Experimental: this endpoint is subject to change. ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -2626,7 +2620,6 @@ Experimental: this endpoint is subject to change. ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -2695,7 +2688,6 @@ Experimental: this endpoint is subject to change. ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", diff --git a/docs/reference/api/schemas.md b/docs/reference/api/schemas.md index 80023c6ccc6..d3277298fe4 100644 --- a/docs/reference/api/schemas.md +++ b/docs/reference/api/schemas.md @@ -2825,7 +2825,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -2921,7 +2920,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -2967,7 +2965,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in | `result` | array of integer | false | | | | `result_delta` | string | false | | | | `result_reset` | boolean | false | | | -| `signature` | string | false | | | | `skill_description` | string | false | | Skill description is the short description from the skill's SKILL.md frontmatter. | | `skill_dir` | string | false | | Skill dir is the absolute path to the skill directory inside the workspace filesystem. Internal only: used by read_skill/read_skill_file tools to locate skill files. | | `skill_name` | string | false | | Skill name is the kebab-case name of a discovered skill from the workspace's .agents/skills/ directory. | @@ -3092,7 +3089,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -3175,7 +3171,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -3405,7 +3400,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -3571,7 +3565,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -3652,7 +3645,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -3721,7 +3713,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -3839,7 +3830,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -4541,7 +4531,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -4623,7 +4612,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string", @@ -7122,7 +7110,6 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o ], "result_delta": "string", "result_reset": true, - "signature": "string", "skill_description": "string", "skill_dir": "string", "skill_name": "string",