feat: scaffold repository and mobile gateway network layer
This commit is contained in:
1 parent
a4d0f97839
commit
2d14cc5cc8
12 files changed
+363
-19
No files matched your search
@@ -6,6 +6,7 @@ plugins {
|
||||
alias(libs.plugins.androidApplication)
|
||||
alias(libs.plugins.composeMultiplatform)
|
||||
alias(libs.plugins.composeCompiler)
|
||||
alias(libs.plugins.kotlinxSerialization)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
@@ -50,6 +51,10 @@ kotlin {
|
||||
implementation(libs.compose.uiToolingPreview)
|
||||
implementation(libs.androidx.lifecycle.viewmodelCompose)
|
||||
implementation(libs.androidx.lifecycle.runtimeCompose)
|
||||
implementation(libs.ktor.client.core)
|
||||
implementation(libs.ktor.client.contentNegotiation)
|
||||
implementation(libs.ktor.serialization.kotlinx.json)
|
||||
implementation(libs.kotlinx.serialization.json)
|
||||
}
|
||||
commonTest.dependencies {
|
||||
implementation(libs.kotlin.test)
|
||||
|
||||
@@ -43,9 +43,11 @@ fun App() {
|
||||
baseUrl = baseUrl,
|
||||
token = token,
|
||||
defaultAgent = agent,
|
||||
dataSource = appState.dataSource,
|
||||
onBaseUrlChange = { baseUrl = it },
|
||||
onTokenChange = { token = it },
|
||||
onDefaultAgentChange = { agent = it },
|
||||
onDataSourceChange = appState::updateDataSource,
|
||||
onConnect = {
|
||||
appState.connect(
|
||||
ServerConfig(
|
||||
@@ -157,8 +159,10 @@ private fun OpenClawRoot(appState: OpenClawAppState) {
|
||||
currentModel = appState.repository.status.currentModel,
|
||||
availableAgents = appState.repository.availableAgents,
|
||||
currentTheme = appState.themeMode,
|
||||
currentDataSource = appState.dataSource,
|
||||
onSelectAgent = appState::updateDefaultAgent,
|
||||
onSelectTheme = appState::updateTheme,
|
||||
onSelectDataSource = appState::updateDataSource,
|
||||
onDisconnect = appState::disconnect,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@ package cn.xiaobai.openclawapp.app
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import cn.xiaobai.openclawapp.data.MockOpenClawRepository
|
||||
import cn.xiaobai.openclawapp.data.OpenClawRepository
|
||||
import cn.xiaobai.openclawapp.data.RepositoryFactory
|
||||
import cn.xiaobai.openclawapp.data.ServerConfig
|
||||
|
||||
class OpenClawAppState {
|
||||
@@ -13,12 +14,20 @@ class OpenClawAppState {
|
||||
var serverConfig by mutableStateOf(ServerConfig())
|
||||
var feedbackMessage by mutableStateOf<String?>(null)
|
||||
var themeMode by mutableStateOf(AppThemeMode.Dark)
|
||||
val repository = MockOpenClawRepository()
|
||||
var dataSource by mutableStateOf(DataSourceMode.Mock)
|
||||
var repository: OpenClawRepository by mutableStateOf(RepositoryFactory.createMock())
|
||||
|
||||
fun connect(config: ServerConfig) {
|
||||
serverConfig = config
|
||||
repository = when (dataSource) {
|
||||
DataSourceMode.Mock -> RepositoryFactory.createMock()
|
||||
DataSourceMode.Remote -> RepositoryFactory.createRemote(config)
|
||||
}
|
||||
isConfigured = true
|
||||
feedbackMessage = "已连接到 ${config.baseUrl}"
|
||||
feedbackMessage = when (dataSource) {
|
||||
DataSourceMode.Mock -> "已进入 Mock 模式"
|
||||
DataSourceMode.Remote -> "已连接到 ${config.baseUrl}"
|
||||
}
|
||||
}
|
||||
|
||||
fun disconnect() {
|
||||
@@ -56,6 +65,14 @@ class OpenClawAppState {
|
||||
feedbackMessage = if (pinned) "已置顶会话" else "已取消置顶"
|
||||
}
|
||||
|
||||
fun updateDataSource(mode: DataSourceMode) {
|
||||
dataSource = mode
|
||||
feedbackMessage = when (mode) {
|
||||
DataSourceMode.Mock -> "数据源已切到 Mock"
|
||||
DataSourceMode.Remote -> "数据源已切到 Remote 骨架"
|
||||
}
|
||||
}
|
||||
|
||||
fun clearFeedback() {
|
||||
feedbackMessage = null
|
||||
}
|
||||
@@ -71,3 +88,8 @@ enum class AppThemeMode(val label: String) {
|
||||
Dark("深色"),
|
||||
Light("浅色"),
|
||||
}
|
||||
|
||||
enum class DataSourceMode(val label: String) {
|
||||
Mock("Mock"),
|
||||
Remote("Remote"),
|
||||
}
|
||||
+11
-11
@@ -5,10 +5,10 @@ import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import kotlin.random.Random
|
||||
|
||||
class MockOpenClawRepository {
|
||||
val availableAgents = listOf("main", "pm", "rd-lead", "backend-dev")
|
||||
class MockOpenClawRepository : OpenClawRepository {
|
||||
override val availableAgents = listOf("main", "pm", "rd-lead", "backend-dev")
|
||||
|
||||
var sessions by mutableStateOf(
|
||||
override var sessions by mutableStateOf(
|
||||
listOf(
|
||||
SessionSummary(
|
||||
id = "agent:main:main",
|
||||
@@ -34,7 +34,7 @@ class MockOpenClawRepository {
|
||||
)
|
||||
)
|
||||
|
||||
var status by mutableStateOf(
|
||||
override var status by mutableStateOf(
|
||||
ServerStatus(
|
||||
online = true,
|
||||
openClawVersion = "2026.2.26",
|
||||
@@ -64,15 +64,15 @@ class MockOpenClawRepository {
|
||||
)
|
||||
)
|
||||
|
||||
fun findSession(sessionId: String): SessionSummary? = sessions.firstOrNull { it.id == sessionId }
|
||||
override fun findSession(sessionId: String): SessionSummary? = sessions.firstOrNull { it.id == sessionId }
|
||||
|
||||
fun messagesFor(sessionId: String): List<ChatMessage> = messageStore[sessionId].orEmpty()
|
||||
override fun messagesFor(sessionId: String): List<ChatMessage> = messageStore[sessionId].orEmpty()
|
||||
|
||||
fun recentSession(): SessionSummary? = findSession(recentSessionId)
|
||||
override fun recentSession(): SessionSummary? = findSession(recentSessionId)
|
||||
|
||||
fun pinnedCount(): Int = sessions.count { it.isPinned }
|
||||
override fun pinnedCount(): Int = sessions.count { it.isPinned }
|
||||
|
||||
fun markSessionOpened(sessionId: String) {
|
||||
override fun markSessionOpened(sessionId: String) {
|
||||
recentSessionId = sessionId
|
||||
sessions = resortSessions(
|
||||
sessions.map {
|
||||
@@ -82,7 +82,7 @@ class MockOpenClawRepository {
|
||||
)
|
||||
}
|
||||
|
||||
fun togglePinned(sessionId: String): Boolean {
|
||||
override fun togglePinned(sessionId: String): Boolean {
|
||||
var pinned = false
|
||||
sessions = resortSessions(
|
||||
sessions.map {
|
||||
@@ -97,7 +97,7 @@ class MockOpenClawRepository {
|
||||
return pinned
|
||||
}
|
||||
|
||||
fun sendMessage(sessionId: String, text: String) {
|
||||
override fun sendMessage(sessionId: String, text: String) {
|
||||
val currentMessages = messageStore[sessionId].orEmpty()
|
||||
val assistantReply = mockAssistantReply(text)
|
||||
val newMessages = currentMessages + ChatMessage(
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package cn.xiaobai.openclawapp.data
|
||||
|
||||
interface OpenClawRepository {
|
||||
val availableAgents: List<String>
|
||||
val sessions: List<SessionSummary>
|
||||
var status: ServerStatus
|
||||
|
||||
fun findSession(sessionId: String): SessionSummary?
|
||||
fun messagesFor(sessionId: String): List<ChatMessage>
|
||||
fun recentSession(): SessionSummary?
|
||||
fun pinnedCount(): Int
|
||||
fun markSessionOpened(sessionId: String)
|
||||
fun togglePinned(sessionId: String): Boolean
|
||||
fun sendMessage(sessionId: String, text: String)
|
||||
}
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
package cn.xiaobai.openclawapp.data
|
||||
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import cn.xiaobai.openclawapp.network.MobileGatewayApi
|
||||
import cn.xiaobai.openclawapp.network.SessionSummaryDto
|
||||
|
||||
class RemoteOpenClawRepository(
|
||||
private val config: ServerConfig,
|
||||
) : OpenClawRepository {
|
||||
private val api by lazy {
|
||||
MobileGatewayApi(
|
||||
baseUrl = config.baseUrl,
|
||||
tokenProvider = { config.token },
|
||||
)
|
||||
}
|
||||
override val availableAgents = listOf("main")
|
||||
|
||||
override var sessions by mutableStateOf<List<SessionSummary>>(emptyList())
|
||||
override var status by mutableStateOf(
|
||||
ServerStatus(
|
||||
online = false,
|
||||
openClawVersion = "unknown",
|
||||
currentModel = "unknown",
|
||||
defaultAgent = config.defaultAgent,
|
||||
updatedAt = "未同步",
|
||||
)
|
||||
)
|
||||
|
||||
private var recentSessionId by mutableStateOf<String?>(null)
|
||||
private var messageStore by mutableStateOf<Map<String, List<ChatMessage>>>(emptyMap())
|
||||
|
||||
override fun findSession(sessionId: String): SessionSummary? = sessions.firstOrNull { it.id == sessionId }
|
||||
|
||||
override fun messagesFor(sessionId: String): List<ChatMessage> = messageStore[sessionId].orEmpty()
|
||||
|
||||
override fun recentSession(): SessionSummary? = recentSessionId?.let(::findSession)
|
||||
|
||||
override fun pinnedCount(): Int = sessions.count { it.isPinned }
|
||||
|
||||
override fun markSessionOpened(sessionId: String) {
|
||||
recentSessionId = sessionId
|
||||
sessions = sessions.map {
|
||||
if (it.id == sessionId) it.copy(unreadCount = 0) else it
|
||||
}
|
||||
}
|
||||
|
||||
override fun togglePinned(sessionId: String): Boolean {
|
||||
var pinned = false
|
||||
sessions = sessions.map {
|
||||
if (it.id == sessionId) {
|
||||
pinned = !it.isPinned
|
||||
it.copy(isPinned = pinned)
|
||||
} else {
|
||||
it
|
||||
}
|
||||
}.sortedWith(compareByDescending<SessionSummary> { it.isPinned })
|
||||
return pinned
|
||||
}
|
||||
|
||||
override fun sendMessage(sessionId: String, text: String) {
|
||||
val currentMessages = messageStore[sessionId].orEmpty()
|
||||
messageStore = messageStore + (
|
||||
sessionId to (currentMessages + ChatMessage(
|
||||
id = "local-$sessionId-${currentMessages.size + 1}",
|
||||
role = MessageRole.User,
|
||||
text = text,
|
||||
createdAt = "现在",
|
||||
status = "queued",
|
||||
))
|
||||
)
|
||||
}
|
||||
|
||||
suspend fun refreshStatus() {
|
||||
val remote = api.getStatus()
|
||||
status = ServerStatus(
|
||||
online = remote.online,
|
||||
openClawVersion = remote.openClawVersion,
|
||||
currentModel = remote.currentModel,
|
||||
defaultAgent = remote.defaultAgent,
|
||||
updatedAt = remote.updatedAt,
|
||||
)
|
||||
}
|
||||
|
||||
suspend fun refreshSessions() {
|
||||
sessions = api.getSessions().map(SessionSummaryDto::toDomain)
|
||||
}
|
||||
|
||||
suspend fun refreshMessages(sessionId: String) {
|
||||
val remoteMessages = api.getMessages(sessionId).map { dto ->
|
||||
ChatMessage(
|
||||
id = dto.id,
|
||||
role = dto.role.toMessageRole(),
|
||||
text = dto.text,
|
||||
createdAt = dto.createdAt,
|
||||
status = dto.status,
|
||||
)
|
||||
}
|
||||
messageStore = messageStore + (sessionId to remoteMessages)
|
||||
}
|
||||
|
||||
suspend fun sendMessageRemote(sessionId: String, text: String) {
|
||||
sendMessage(sessionId, text)
|
||||
api.sendMessage(sessionId, text)
|
||||
refreshMessages(sessionId)
|
||||
}
|
||||
|
||||
private fun SessionSummaryDto.toDomain(): SessionSummary {
|
||||
return SessionSummary(
|
||||
id = id,
|
||||
title = title,
|
||||
lastMessage = lastMessage ?: "",
|
||||
updatedAt = updatedAt,
|
||||
)
|
||||
}
|
||||
|
||||
private fun String.toMessageRole(): MessageRole {
|
||||
return when (lowercase()) {
|
||||
"user" -> MessageRole.User
|
||||
"assistant" -> MessageRole.Assistant
|
||||
else -> MessageRole.System
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package cn.xiaobai.openclawapp.data
|
||||
|
||||
object RepositoryFactory {
|
||||
fun createMock(): OpenClawRepository = MockOpenClawRepository()
|
||||
|
||||
fun createRemote(config: ServerConfig): OpenClawRepository = RemoteOpenClawRepository(config)
|
||||
}
|
||||
+27
-3
@@ -1,5 +1,6 @@
|
||||
package cn.xiaobai.openclawapp.feature.config
|
||||
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
@@ -15,16 +16,20 @@ import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import cn.xiaobai.openclawapp.app.DataSourceMode
|
||||
import cn.xiaobai.openclawapp.ui.HeroCard
|
||||
import cn.xiaobai.openclawapp.ui.SelectableRowCard
|
||||
|
||||
@Composable
|
||||
fun ServerConfigScreen(
|
||||
baseUrl: String,
|
||||
token: String,
|
||||
defaultAgent: String,
|
||||
dataSource: DataSourceMode,
|
||||
onBaseUrlChange: (String) -> Unit,
|
||||
onTokenChange: (String) -> Unit,
|
||||
onDefaultAgentChange: (String) -> Unit,
|
||||
onDataSourceChange: (DataSourceMode) -> Unit,
|
||||
onConnect: () -> Unit,
|
||||
) {
|
||||
Column(
|
||||
@@ -36,10 +41,29 @@ fun ServerConfigScreen(
|
||||
) {
|
||||
HeroCard(
|
||||
title = "连接 OpenClaw",
|
||||
subtitle = "第一版先连接你自己的 Mobile Gateway / BFF。等接口稳定后,再无缝切到真实 OpenClaw。",
|
||||
subtitle = "第一版先支持 Mock 和 Remote 两种数据源。Mock 保证演示流畅,Remote 负责对接真实 Mobile Gateway / BFF。",
|
||||
badge = "Setup",
|
||||
)
|
||||
|
||||
Card(modifier = Modifier.fillMaxWidth()) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(18.dp),
|
||||
verticalArrangement = Arrangement.spacedBy(14.dp),
|
||||
) {
|
||||
Text("数据源", style = MaterialTheme.typography.titleMedium)
|
||||
DataSourceMode.entries.forEach { mode ->
|
||||
SelectableRowCard(
|
||||
title = mode.label,
|
||||
trailing = if (mode == dataSource) "当前" else null,
|
||||
selected = mode == dataSource,
|
||||
modifier = Modifier.clickable { onDataSourceChange(mode) },
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Card(modifier = Modifier.fillMaxWidth()) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
@@ -83,7 +107,7 @@ fun ServerConfigScreen(
|
||||
) {
|
||||
Text("接入建议", style = MaterialTheme.typography.titleMedium)
|
||||
Text(
|
||||
"• App 只连 BFF,不直接暴露 OpenClaw 密钥\n• 聊天消息走 REST + SSE\n• 推送通知后续由 BFF 统一下发",
|
||||
"• App 只连 BFF,不直接暴露 OpenClaw 密钥\n• 聊天消息走 REST + SSE\n• 这一步先把 Repository / API / DTO 结构搭起来,再切真实接口",
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
@@ -91,7 +115,7 @@ fun ServerConfigScreen(
|
||||
}
|
||||
|
||||
Button(onClick = onConnect, modifier = Modifier.fillMaxWidth()) {
|
||||
Text("进入应用")
|
||||
Text(if (dataSource == DataSourceMode.Mock) "进入应用(Mock)" else "进入应用(Remote 骨架)")
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
-1
@@ -13,6 +13,7 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import cn.xiaobai.openclawapp.app.AppThemeMode
|
||||
import cn.xiaobai.openclawapp.app.DataSourceMode
|
||||
import cn.xiaobai.openclawapp.data.ServerConfig
|
||||
import cn.xiaobai.openclawapp.ui.HeroCard
|
||||
import cn.xiaobai.openclawapp.ui.LabelValueCard
|
||||
@@ -25,8 +26,10 @@ fun SettingsScreen(
|
||||
currentModel: String,
|
||||
availableAgents: List<String>,
|
||||
currentTheme: AppThemeMode,
|
||||
currentDataSource: DataSourceMode,
|
||||
onSelectAgent: (String) -> Unit,
|
||||
onSelectTheme: (AppThemeMode) -> Unit,
|
||||
onSelectDataSource: (DataSourceMode) -> Unit,
|
||||
onDisconnect: () -> Unit,
|
||||
) {
|
||||
LazyColumn(
|
||||
@@ -36,7 +39,7 @@ fun SettingsScreen(
|
||||
item {
|
||||
HeroCard(
|
||||
title = "连接配置",
|
||||
subtitle = "这里先承载服务器地址、token 状态、默认 Agent 和主题。等网络层接入后,再往下拆成账号、通知和实验功能。",
|
||||
subtitle = "这里先承载服务器地址、token 状态、默认 Agent、主题和数据源。等网络层接通后,再继续拆细。",
|
||||
badge = "Settings",
|
||||
)
|
||||
}
|
||||
@@ -51,6 +54,19 @@ fun SettingsScreen(
|
||||
LabelValueCard(label = "访问令牌", value = if (serverConfig.token.isBlank()) "未设置" else "已配置")
|
||||
}
|
||||
|
||||
item {
|
||||
Text("数据源", style = MaterialTheme.typography.titleMedium)
|
||||
}
|
||||
|
||||
items(DataSourceMode.entries) { mode ->
|
||||
SelectableRowCard(
|
||||
title = mode.label,
|
||||
trailing = if (mode == currentDataSource) "当前" else null,
|
||||
selected = mode == currentDataSource,
|
||||
modifier = Modifier.clickable { onSelectDataSource(mode) },
|
||||
)
|
||||
}
|
||||
|
||||
item {
|
||||
Text("主题", style = MaterialTheme.typography.titleMedium)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package cn.xiaobai.openclawapp.network
|
||||
|
||||
import io.ktor.client.HttpClient
|
||||
import io.ktor.client.call.body
|
||||
import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
|
||||
import io.ktor.client.request.get
|
||||
import io.ktor.client.request.header
|
||||
import io.ktor.client.request.post
|
||||
import io.ktor.client.request.setBody
|
||||
import io.ktor.http.ContentType
|
||||
import io.ktor.http.HttpHeaders
|
||||
import io.ktor.http.contentType
|
||||
import io.ktor.serialization.kotlinx.json.json
|
||||
import kotlinx.serialization.json.Json
|
||||
|
||||
class MobileGatewayApi(
|
||||
private val baseUrl: String,
|
||||
private val tokenProvider: () -> String,
|
||||
private val client: HttpClient = defaultHttpClient(),
|
||||
) {
|
||||
suspend fun getStatus(): StatusDto {
|
||||
return client.get("${baseUrl.trimEnd('/')}/api/status") {
|
||||
authHeader()
|
||||
}.body()
|
||||
}
|
||||
|
||||
suspend fun getSessions(): List<SessionSummaryDto> {
|
||||
return client.get("${baseUrl.trimEnd('/')}/api/sessions") {
|
||||
authHeader()
|
||||
}.body()
|
||||
}
|
||||
|
||||
suspend fun getMessages(sessionId: String): List<ChatMessageDto> {
|
||||
return client.get("${baseUrl.trimEnd('/')}/api/sessions/$sessionId/messages") {
|
||||
authHeader()
|
||||
}.body()
|
||||
}
|
||||
|
||||
suspend fun sendMessage(sessionId: String, message: String): SendMessageResponseDto {
|
||||
return client.post("${baseUrl.trimEnd('/')}/api/sessions/$sessionId/messages") {
|
||||
authHeader()
|
||||
contentType(ContentType.Application.Json)
|
||||
setBody(SendMessageRequestDto(message = message))
|
||||
}.body()
|
||||
}
|
||||
|
||||
suspend fun getAgents(): List<AgentDto> {
|
||||
return client.get("${baseUrl.trimEnd('/')}/api/agents") {
|
||||
authHeader()
|
||||
}.body()
|
||||
}
|
||||
|
||||
private fun io.ktor.client.request.HttpRequestBuilder.authHeader() {
|
||||
val token = tokenProvider().trim()
|
||||
if (token.isNotBlank()) {
|
||||
header(HttpHeaders.Authorization, "Bearer $token")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun defaultHttpClient(): HttpClient {
|
||||
return HttpClient {
|
||||
install(ContentNegotiation) {
|
||||
json(
|
||||
Json {
|
||||
ignoreUnknownKeys = true
|
||||
explicitNulls = false
|
||||
isLenient = true
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package cn.xiaobai.openclawapp.network
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class StatusDto(
|
||||
val online: Boolean,
|
||||
val openClawVersion: String,
|
||||
val currentModel: String,
|
||||
val defaultAgent: String,
|
||||
val updatedAt: String,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class SessionSummaryDto(
|
||||
val id: String,
|
||||
val title: String,
|
||||
val lastMessage: String? = null,
|
||||
val updatedAt: String,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class ChatMessageDto(
|
||||
val id: String,
|
||||
val role: String,
|
||||
val text: String,
|
||||
val createdAt: String,
|
||||
val status: String? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class SendMessageRequestDto(
|
||||
val message: String,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class SendMessageResponseDto(
|
||||
val accepted: Boolean,
|
||||
val messageId: String? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class AgentDto(
|
||||
val id: String,
|
||||
val name: String,
|
||||
)
|
||||
Reference in new issue
Block a user