-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathItems.cs
More file actions
32 lines (27 loc) · 835 Bytes
/
Items.cs
File metadata and controls
32 lines (27 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System.Text.Json.Nodes;
using ManagedCode.ClaudeCodeSharpSDK.Internal;
namespace ManagedCode.ClaudeCodeSharpSDK.Models;
public sealed record MessageContentBlock(
string Type,
string? Text,
string? Id,
string? Name,
string? ToolUseId,
bool? IsError,
JsonNode? Input,
JsonNode? Raw);
public abstract record ThreadItem(string Id, string Type);
public sealed record AssistantMessageItem(
string Id,
string Model,
string Text,
IReadOnlyList<MessageContentBlock> Content,
Usage? Usage,
string? StopReason,
string? Error)
: ThreadItem(Id, ClaudeProtocolConstants.EventTypes.Assistant);
public sealed record UserMessageItem(
string Id,
string Text,
IReadOnlyList<MessageContentBlock> Content)
: ThreadItem(Id, ClaudeProtocolConstants.EventTypes.User);