feat: show thinking placeholder during remote send
This commit is contained in:
1 parent
2595107244
commit
c01e4623b7
1 file changed
+15
-6
+15
-6
@@ -85,12 +85,21 @@ class RemoteOpenClawRepository(
|
||||
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",
|
||||
sessionId to (currentMessages + listOf(
|
||||
ChatMessage(
|
||||
id = "local-user-$sessionId-${currentMessages.size + 1}",
|
||||
role = MessageRole.User,
|
||||
text = text,
|
||||
createdAt = "现在",
|
||||
status = "queued",
|
||||
),
|
||||
ChatMessage(
|
||||
id = "local-thinking-$sessionId-${currentMessages.size + 2}",
|
||||
role = MessageRole.System,
|
||||
text = "OpenClaw 正在思考中…",
|
||||
createdAt = "现在",
|
||||
status = "thinking",
|
||||
),
|
||||
))
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user