Add Luna.Shared library with shared DTOs and models
Introduce ChannelMessage and ChatStreamUpdate types used across the solution for inter-project communication between channels, core, and the web interface.
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
namespace Luna.Shared;
|
||||||
|
|
||||||
|
public record ChannelMessage(
|
||||||
|
string MessageId,
|
||||||
|
string ConversationId,
|
||||||
|
string SenderId,
|
||||||
|
string SenderName,
|
||||||
|
string Content,
|
||||||
|
DateTimeOffset Timestamp,
|
||||||
|
Dictionary<string, string>? Metadata = null);
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
namespace Luna.Shared;
|
||||||
|
|
||||||
|
public enum ChatStreamUpdateType
|
||||||
|
{
|
||||||
|
Thinking,
|
||||||
|
Text,
|
||||||
|
ToolCall,
|
||||||
|
ToolResult,
|
||||||
|
Usage,
|
||||||
|
Complete
|
||||||
|
}
|
||||||
|
|
||||||
|
public record ChatStreamUpdate(
|
||||||
|
ChatStreamUpdateType Type,
|
||||||
|
string? Content,
|
||||||
|
string? Role,
|
||||||
|
bool IsComplete,
|
||||||
|
string? MessageId = null
|
||||||
|
);
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<AllowMissingPrunePackageData>true</AllowMissingPrunePackageData>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
Reference in New Issue
Block a user