fix(chat): render reasoning card inside bubble and preserve persistence (#691)
* fix(chat): render reasoning card inside bubble and preserve persistence Move ReasoningCard inside AssistantBubble and preserve reasoningText across REST re-fetches, MessageStart, and buffer flushes. * style(chat): resolve ktlint unused imports and blank line formatting
This commit is contained in:
6 files changed
+89
-38
No files matched your search
@@ -17,6 +17,8 @@ data class SessionMessage(
|
||||
val content: JsonElement? = null,
|
||||
val timestamp: JsonElement? = null,
|
||||
val type: String? = null,
|
||||
val reasoning: JsonElement? = null,
|
||||
val reasoning_text: JsonElement? = null,
|
||||
) {
|
||||
val timestampText: String?
|
||||
get() = (timestamp as? JsonPrimitive)?.content
|
||||
@@ -28,4 +30,12 @@ data class SessionMessage(
|
||||
null -> ""
|
||||
else -> content.toString()
|
||||
}
|
||||
|
||||
val reasoningText: String
|
||||
get() =
|
||||
when (val r = reasoning ?: reasoning_text) {
|
||||
is JsonPrimitive -> r.content
|
||||
null -> ""
|
||||
else -> r.toString()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user