Fix pending token compile regressions
This commit is contained in:
1 parent
dcd4b2adbd
commit
c26dc99ef1
1 file changed
+12
-1
+12
-1
@@ -36,6 +36,7 @@ private data class AttachmentRetryPayload(
|
||||
val fileName: String,
|
||||
val bytes: ByteArray,
|
||||
val contentType: String?,
|
||||
val fingerprint: String? = null,
|
||||
)
|
||||
|
||||
private data class TextRetryPayload(
|
||||
@@ -199,6 +200,7 @@ class RemoteOpenClawRepository(
|
||||
fileName = item.fileName,
|
||||
bytes = bytes,
|
||||
contentType = item.contentType,
|
||||
fingerprint = item.fingerprint ?: attachmentFingerprint(item.fileName, bytes, item.contentType),
|
||||
)
|
||||
attachmentOpenStore[item.messageId] = AttachmentOpenPayload(
|
||||
fileName = item.fileName,
|
||||
@@ -307,7 +309,13 @@ class RemoteOpenClawRepository(
|
||||
) {
|
||||
val currentMessages = messageStore[sessionId].orEmpty()
|
||||
val localId = "local-attachment-$sessionId-${currentMessages.size + 1}"
|
||||
attachmentRetryStore[localId] = AttachmentRetryPayload(sessionId, fileName, bytes, contentType)
|
||||
attachmentRetryStore[localId] = AttachmentRetryPayload(
|
||||
sessionId = sessionId,
|
||||
fileName = fileName,
|
||||
bytes = bytes,
|
||||
contentType = contentType,
|
||||
fingerprint = attachmentFingerprint(fileName, bytes, contentType),
|
||||
)
|
||||
attachmentOpenStore[localId] = AttachmentOpenPayload(fileName, bytes, contentType)
|
||||
pendingAttachmentQueue[localId] = PendingAttachmentSend(
|
||||
messageId = localId,
|
||||
@@ -937,6 +945,7 @@ class RemoteOpenClawRepository(
|
||||
sessionId = sessionId,
|
||||
text = domain.text,
|
||||
createdAt = domain.createdAt,
|
||||
clientToken = domain.clientToken ?: textClientToken(sessionId, domain.text, domain.id.hashCode()),
|
||||
autoRetryEligible = true,
|
||||
)
|
||||
autoRetryMessageIds.add(domain.id)
|
||||
@@ -949,6 +958,7 @@ class RemoteOpenClawRepository(
|
||||
sessionId = sessionId,
|
||||
text = domain.text,
|
||||
createdAt = domain.createdAt,
|
||||
clientToken = domain.clientToken ?: textClientToken(sessionId, domain.text, domain.id.hashCode()),
|
||||
autoRetryEligible = false,
|
||||
)
|
||||
autoRetryMessageIds.remove(domain.id)
|
||||
@@ -961,6 +971,7 @@ class RemoteOpenClawRepository(
|
||||
sessionId = sessionId,
|
||||
text = domain.text,
|
||||
createdAt = domain.createdAt,
|
||||
clientToken = domain.clientToken ?: textClientToken(sessionId, domain.text, domain.id.hashCode()),
|
||||
autoRetryEligible = false,
|
||||
)
|
||||
autoRetryMessageIds.remove(domain.id)
|
||||
|
||||
Reference in new issue
Block a user