just redo all of it from scratch

This commit is contained in:
Joey Cardosi 2025-05-30 12:15:11 -04:00
commit d80b13736e
No known key found for this signature in database
GPG key ID: 5F93AEDDAAE66774

33
lib/mcp/shared/content.rb Normal file
View file

@ -0,0 +1,33 @@
# typed: true
# frozen_string_literal: true
module MCP
module Content
class Text
attr_reader :text, :annotations
def initialize(text, annotations: nil)
@text = text
@annotations = annotations
end
def to_h
{ text:, annotations:, type: "text" }.compact
end
end
class Image
attr_reader :data, :mime_type, :annotations
def initialize(data, mime_type, annotations: nil)
@data = data
@mime_type = mime_type
@annotations = annotations
end
def to_h
{ data:, mime_type:, annotations:, type: "image" }.compact
end
end
end
end