add removal of chat sessions, auto title + icon, proper stick-to-bottom as response is streamed
This commit is contained in:
@@ -41,7 +41,7 @@ qint64 ChatMessage::contentElapsedMs() const {
|
||||
}
|
||||
|
||||
void ChatMessage::updateReasoningActive() {
|
||||
const bool active = m_streaming && !m_reasoning.isEmpty() && m_content.isEmpty();
|
||||
const bool active = m_streaming && m_content.isEmpty();
|
||||
if (m_reasoningActive == active)
|
||||
return;
|
||||
m_reasoningActive = active;
|
||||
@@ -69,7 +69,8 @@ void ChatMessage::appendReasoning(const QString& piece) {
|
||||
if (piece.isEmpty())
|
||||
return;
|
||||
if (m_reasoning.isEmpty()) {
|
||||
m_reasoningStartedAt = QDateTime::currentMSecsSinceEpoch();
|
||||
if (m_reasoningStartedAt <= 0)
|
||||
m_reasoningStartedAt = QDateTime::currentMSecsSinceEpoch();
|
||||
if (!m_timer.isActive())
|
||||
m_timer.start();
|
||||
}
|
||||
@@ -102,7 +103,12 @@ void ChatMessage::setStreaming(bool value) {
|
||||
return;
|
||||
m_streaming = value;
|
||||
Q_EMIT streamingChanged();
|
||||
if (!value) {
|
||||
if (value) {
|
||||
if (m_reasoningStartedAt <= 0)
|
||||
m_reasoningStartedAt = QDateTime::currentMSecsSinceEpoch();
|
||||
if (!m_timer.isActive())
|
||||
m_timer.start();
|
||||
} else {
|
||||
const qint64 now = QDateTime::currentMSecsSinceEpoch();
|
||||
if (reasoningInFlight())
|
||||
m_reasoningEndedAt = now;
|
||||
|
||||
Reference in New Issue
Block a user