Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2416,7 +2416,7 @@ data class ContentRef(
)

@Serializable
data class ResourceReponsePart(
data class ResourceResponsePart(
/**
* Content URI
*/
Expand Down Expand Up @@ -4773,7 +4773,7 @@ sealed interface ResponsePart
@JvmInline
value class ResponsePartMarkdown(val value: MarkdownResponsePart) : ResponsePart
@JvmInline
value class ResponsePartContentRef(val value: ResourceReponsePart) : ResponsePart
value class ResponsePartContentRef(val value: ResourceResponsePart) : ResponsePart
@JvmInline
value class ResponsePartToolCall(val value: ToolCallResponsePart) : ResponsePart
@JvmInline
Expand Down Expand Up @@ -4807,7 +4807,7 @@ internal object ResponsePartSerializer : KSerializer<ResponsePart> {
?: return ResponsePartUnknown(obj)
return when (discriminant) {
"markdown" -> ResponsePartMarkdown(input.json.decodeFromJsonElement(MarkdownResponsePart.serializer(), element))
"contentRef" -> ResponsePartContentRef(input.json.decodeFromJsonElement(ResourceReponsePart.serializer(), element))
"contentRef" -> ResponsePartContentRef(input.json.decodeFromJsonElement(ResourceResponsePart.serializer(), element))
"toolCall" -> ResponsePartToolCall(input.json.decodeFromJsonElement(ToolCallResponsePart.serializer(), element))
"reasoning" -> ResponsePartReasoning(input.json.decodeFromJsonElement(ReasoningResponsePart.serializer(), element))
"systemNotification" -> ResponsePartSystemNotification(input.json.decodeFromJsonElement(SystemNotificationResponsePart.serializer(), element))
Expand All @@ -4821,7 +4821,7 @@ internal object ResponsePartSerializer : KSerializer<ResponsePart> {
?: error("ResponsePart can only be serialized to JSON")
val element: JsonElement = when (value) {
is ResponsePartMarkdown -> output.json.encodeToJsonElement(MarkdownResponsePart.serializer(), value.value)
is ResponsePartContentRef -> output.json.encodeToJsonElement(ResourceReponsePart.serializer(), value.value)
is ResponsePartContentRef -> output.json.encodeToJsonElement(ResourceResponsePart.serializer(), value.value)
is ResponsePartToolCall -> output.json.encodeToJsonElement(ToolCallResponsePart.serializer(), value.value)
is ResponsePartReasoning -> output.json.encodeToJsonElement(ReasoningResponsePart.serializer(), value.value)
is ResponsePartSystemNotification -> output.json.encodeToJsonElement(SystemNotificationResponsePart.serializer(), value.value)
Expand Down
4 changes: 2 additions & 2 deletions clients/swift/AHPApp/AHPApp/Views/ResponsePartView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ struct TerminalToolResultView: View {
// MARK: - ContentRefView

struct ContentRefView: View {
let ref: ResourceReponsePart
let ref: ResourceResponsePart

var body: some View {
HStack {
Expand Down Expand Up @@ -892,7 +892,7 @@ struct ContentRefView: View {

// Content Ref
Text("Content Ref").font(.caption.bold()).foregroundStyle(.secondary)
ContentRefView(ref: ResourceReponsePart(
ContentRefView(ref: ResourceResponsePart(
uri: "file:///Users/me/project/README.md",
contentType: "text/markdown",
kind: .contentRef
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2414,7 +2414,7 @@ public struct ContentRef: Codable, Sendable {
}
}

public struct ResourceReponsePart: Codable, Sendable {
public struct ResourceResponsePart: Codable, Sendable {
/// Content URI
public var uri: String
/// Approximate size in bytes
Expand Down Expand Up @@ -5330,7 +5330,7 @@ public enum ChatOrigin: Codable, Sendable {

public enum ResponsePart: Codable, Sendable {
case markdown(MarkdownResponsePart)
case contentRef(ResourceReponsePart)
case contentRef(ResourceResponsePart)
case toolCall(ToolCallResponsePart)
case reasoning(ReasoningResponsePart)
case systemNotification(SystemNotificationResponsePart)
Expand All @@ -5350,7 +5350,7 @@ public enum ResponsePart: Codable, Sendable {
case "markdown":
self = .markdown(try MarkdownResponsePart(from: decoder))
case "contentRef":
self = .contentRef(try ResourceReponsePart(from: decoder))
self = .contentRef(try ResourceResponsePart(from: decoder))
case "toolCall":
self = .toolCall(try ToolCallResponsePart(from: decoder))
case "reasoning":
Expand Down
4 changes: 4 additions & 0 deletions docs/.changes/20260730-resource-response-part-rename.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "changed",
"message": "Renamed `ResourceReponsePart` to `ResourceResponsePart`, correcting a misspelling. The Rust and Go clients already exposed the corrected name via generator-level renames; the TypeScript, Kotlin and Swift clients previously carried the typo, so the type now has one consistent name across all five clients."
}
2 changes: 1 addition & 1 deletion docs/guide/state-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ ToolCallResponsePart {
}

// Response-part wrapper around a large content reference
ResourceReponsePart {
ResourceResponsePart {
kind: 'contentRef'
uri: string
sizeHint?: number
Expand Down
4 changes: 2 additions & 2 deletions schema/actions.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5475,7 +5475,7 @@
"content"
]
},
"ResourceReponsePart": {
"ResourceResponsePart": {
"type": "object",
"description": "A content part that's a reference to large content stored outside the state tree.",
"properties": {
Expand Down Expand Up @@ -7376,7 +7376,7 @@
"$ref": "#/$defs/MarkdownResponsePart"
},
{
"$ref": "#/$defs/ResourceReponsePart"
"$ref": "#/$defs/ResourceResponsePart"
},
{
"$ref": "#/$defs/ToolCallResponsePart"
Expand Down
4 changes: 2 additions & 2 deletions schema/commands.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4644,7 +4644,7 @@
"content"
]
},
"ResourceReponsePart": {
"ResourceResponsePart": {
"type": "object",
"description": "A content part that's a reference to large content stored outside the state tree.",
"properties": {
Expand Down Expand Up @@ -9084,7 +9084,7 @@
"$ref": "#/$defs/MarkdownResponsePart"
},
{
"$ref": "#/$defs/ResourceReponsePart"
"$ref": "#/$defs/ResourceResponsePart"
},
{
"$ref": "#/$defs/ToolCallResponsePart"
Expand Down
4 changes: 2 additions & 2 deletions schema/errors.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3380,7 +3380,7 @@
"content"
]
},
"ResourceReponsePart": {
"ResourceResponsePart": {
"type": "object",
"description": "A content part that's a reference to large content stored outside the state tree.",
"properties": {
Expand Down Expand Up @@ -6684,7 +6684,7 @@
"$ref": "#/$defs/MarkdownResponsePart"
},
{
"$ref": "#/$defs/ResourceReponsePart"
"$ref": "#/$defs/ResourceResponsePart"
},
{
"$ref": "#/$defs/ToolCallResponsePart"
Expand Down
4 changes: 2 additions & 2 deletions schema/notifications.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3543,7 +3543,7 @@
"content"
]
},
"ResourceReponsePart": {
"ResourceResponsePart": {
"type": "object",
"description": "A content part that's a reference to large content stored outside the state tree.",
"properties": {
Expand Down Expand Up @@ -5502,7 +5502,7 @@
"$ref": "#/$defs/MarkdownResponsePart"
},
{
"$ref": "#/$defs/ResourceReponsePart"
"$ref": "#/$defs/ResourceResponsePart"
},
{
"$ref": "#/$defs/ToolCallResponsePart"
Expand Down
4 changes: 2 additions & 2 deletions schema/state.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3291,7 +3291,7 @@
"content"
]
},
"ResourceReponsePart": {
"ResourceResponsePart": {
"type": "object",
"description": "A content part that's a reference to large content stored outside the state tree.",
"properties": {
Expand Down Expand Up @@ -5192,7 +5192,7 @@
"$ref": "#/$defs/MarkdownResponsePart"
},
{
"$ref": "#/$defs/ResourceReponsePart"
"$ref": "#/$defs/ResourceResponsePart"
},
{
"$ref": "#/$defs/ToolCallResponsePart"
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-go.ts
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ const STATE_STRUCTS: { name: string; omitDiscriminants?: boolean; goName?: strin
{ name: 'MessageChatAttachment' },
{ name: 'MarkdownResponsePart' },
{ name: 'ContentRef' },
{ name: 'ResourceReponsePart', goName: 'ResourceResponsePart' },
{ name: 'ResourceResponsePart' },
{ name: 'ToolCallResponsePart' },
{ name: 'ReasoningResponsePart' },
{ name: 'SystemNotificationResponsePart' },
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate-kotlin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ const STATE_STRUCTS = [
'SimpleMessageAttachment', 'MessageEmbeddedResourceAttachment', 'MessageResourceAttachment',
'MessageAnnotationsAttachment', 'MessageChatAttachment',
'MarkdownResponsePart', 'ContentRef',
'ResourceReponsePart', 'ToolCallResponsePart', 'ReasoningResponsePart',
'ResourceResponsePart', 'ToolCallResponsePart', 'ReasoningResponsePart',
'SystemNotificationResponsePart', 'InputRequestResponsePart',
'ToolCallResult', 'ToolCallStreamingState',
'ToolCallPendingConfirmationState', 'ToolCallRunningState', 'ToolCallAuthRequiredState',
Expand Down Expand Up @@ -965,7 +965,7 @@ const RESPONSE_PART_UNION: UnionConfig = {
discriminantField: 'kind',
variants: [
{ caseName: 'Markdown', structName: 'MarkdownResponsePart', discriminantValue: 'markdown' },
{ caseName: 'ContentRef', structName: 'ResourceReponsePart', discriminantValue: 'contentRef' },
{ caseName: 'ContentRef', structName: 'ResourceResponsePart', discriminantValue: 'contentRef' },
{ caseName: 'ToolCall', structName: 'ToolCallResponsePart', discriminantValue: 'toolCall' },
{ caseName: 'Reasoning', structName: 'ReasoningResponsePart', discriminantValue: 'reasoning' },
{ caseName: 'SystemNotification', structName: 'SystemNotificationResponsePart', discriminantValue: 'systemNotification' },
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-rust.ts
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ const STATE_STRUCTS: { name: string; omitDiscriminants?: boolean; rustName?: str
{ name: 'MessageChatAttachment', omitDiscriminants: true },
{ name: 'MarkdownResponsePart', omitDiscriminants: true },
{ name: 'ContentRef' },
{ name: 'ResourceReponsePart', omitDiscriminants: true, rustName: 'ResourceResponsePart' },
{ name: 'ResourceResponsePart', omitDiscriminants: true },
{ name: 'ToolCallResponsePart', omitDiscriminants: true },
{ name: 'ReasoningResponsePart', omitDiscriminants: true },
{ name: 'SystemNotificationResponsePart', omitDiscriminants: true },
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate-swift.ts
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ const STATE_STRUCTS = [
'SimpleMessageAttachment', 'MessageEmbeddedResourceAttachment', 'MessageResourceAttachment',
'MessageAnnotationsAttachment', 'MessageChatAttachment',
'MarkdownResponsePart', 'ContentRef',
'ResourceReponsePart', 'ToolCallResponsePart', 'ReasoningResponsePart',
'ResourceResponsePart', 'ToolCallResponsePart', 'ReasoningResponsePart',
'SystemNotificationResponsePart', 'InputRequestResponsePart',
'ToolCallResult', 'ToolCallStreamingState',
'ToolCallPendingConfirmationState', 'ToolCallRunningState', 'ToolCallAuthRequiredState',
Expand Down Expand Up @@ -679,7 +679,7 @@ const RESPONSE_PART_UNION: UnionConfig = {
allowUnknown: true,
variants: [
{ caseName: 'markdown', structName: 'MarkdownResponsePart', discriminantValue: 'markdown' },
{ caseName: 'contentRef', structName: 'ResourceReponsePart', discriminantValue: 'contentRef' },
{ caseName: 'contentRef', structName: 'ResourceResponsePart', discriminantValue: 'contentRef' },
{ caseName: 'toolCall', structName: 'ToolCallResponsePart', discriminantValue: 'toolCall' },
{ caseName: 'reasoning', structName: 'ReasoningResponsePart', discriminantValue: 'reasoning' },
{ caseName: 'systemNotification', structName: 'SystemNotificationResponsePart', discriminantValue: 'systemNotification' },
Expand Down
4 changes: 2 additions & 2 deletions types/channels-chat/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ export interface MarkdownResponsePart {
*
* @category Response Parts
*/
export interface ResourceReponsePart extends ContentRef {
export interface ResourceResponsePart extends ContentRef {
/** Discriminant */
kind: ResponsePartKind.ContentRef;
}
Expand Down Expand Up @@ -921,7 +921,7 @@ export interface ReasoningResponsePart {
*/
export type ResponsePart =
| MarkdownResponsePart
| ResourceReponsePart
| ResourceResponsePart
| ToolCallResponsePart
| ReasoningResponsePart
| SystemNotificationResponsePart
Expand Down
Loading