@maudecode/openclaw-cowtail 0.12.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +15 -2
- package/dist/setup-entry.js +15 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14754,7 +14754,11 @@ async function deliverCowtailReply(params) {
|
|
|
14754
14754
|
actions: [],
|
|
14755
14755
|
deliveryState: "pending"
|
|
14756
14756
|
});
|
|
14757
|
-
|
|
14757
|
+
const messageId = recordCreatedOpenClawMessageId(params.streamState, result);
|
|
14758
|
+
if (!messageId) {
|
|
14759
|
+
return;
|
|
14760
|
+
}
|
|
14761
|
+
params.streamState.messageId = messageId;
|
|
14758
14762
|
return;
|
|
14759
14763
|
}
|
|
14760
14764
|
await params.client.sendOpenClawMessageUpdate({
|
|
@@ -14784,7 +14788,11 @@ async function deliverCowtailReply(params) {
|
|
|
14784
14788
|
actions: [],
|
|
14785
14789
|
deliveryState: "pending"
|
|
14786
14790
|
});
|
|
14787
|
-
|
|
14791
|
+
const messageId = recordCreatedOpenClawMessageId(params.streamState, result);
|
|
14792
|
+
if (!messageId) {
|
|
14793
|
+
return;
|
|
14794
|
+
}
|
|
14795
|
+
params.streamState.messageId = messageId;
|
|
14788
14796
|
return;
|
|
14789
14797
|
}
|
|
14790
14798
|
await params.client.sendOpenClawMessageUpdate({
|
|
@@ -14840,6 +14848,11 @@ async function finalizeCowtailStreamedReply(params) {
|
|
|
14840
14848
|
params.streamState.completed = true;
|
|
14841
14849
|
}
|
|
14842
14850
|
function recordCreatedOpenClawMessageId(streamState, result) {
|
|
14851
|
+
if (result.payload?.dropped === true) {
|
|
14852
|
+
streamState.failed = true;
|
|
14853
|
+
streamState.completed = true;
|
|
14854
|
+
return;
|
|
14855
|
+
}
|
|
14843
14856
|
const messageId = result.payload?.messageId;
|
|
14844
14857
|
if (typeof messageId === "string" && messageId.trim()) {
|
|
14845
14858
|
return messageId;
|
package/dist/setup-entry.js
CHANGED
|
@@ -14754,7 +14754,11 @@ async function deliverCowtailReply(params) {
|
|
|
14754
14754
|
actions: [],
|
|
14755
14755
|
deliveryState: "pending"
|
|
14756
14756
|
});
|
|
14757
|
-
|
|
14757
|
+
const messageId = recordCreatedOpenClawMessageId(params.streamState, result);
|
|
14758
|
+
if (!messageId) {
|
|
14759
|
+
return;
|
|
14760
|
+
}
|
|
14761
|
+
params.streamState.messageId = messageId;
|
|
14758
14762
|
return;
|
|
14759
14763
|
}
|
|
14760
14764
|
await params.client.sendOpenClawMessageUpdate({
|
|
@@ -14784,7 +14788,11 @@ async function deliverCowtailReply(params) {
|
|
|
14784
14788
|
actions: [],
|
|
14785
14789
|
deliveryState: "pending"
|
|
14786
14790
|
});
|
|
14787
|
-
|
|
14791
|
+
const messageId = recordCreatedOpenClawMessageId(params.streamState, result);
|
|
14792
|
+
if (!messageId) {
|
|
14793
|
+
return;
|
|
14794
|
+
}
|
|
14795
|
+
params.streamState.messageId = messageId;
|
|
14788
14796
|
return;
|
|
14789
14797
|
}
|
|
14790
14798
|
await params.client.sendOpenClawMessageUpdate({
|
|
@@ -14840,6 +14848,11 @@ async function finalizeCowtailStreamedReply(params) {
|
|
|
14840
14848
|
params.streamState.completed = true;
|
|
14841
14849
|
}
|
|
14842
14850
|
function recordCreatedOpenClawMessageId(streamState, result) {
|
|
14851
|
+
if (result.payload?.dropped === true) {
|
|
14852
|
+
streamState.failed = true;
|
|
14853
|
+
streamState.completed = true;
|
|
14854
|
+
return;
|
|
14855
|
+
}
|
|
14843
14856
|
const messageId = result.payload?.messageId;
|
|
14844
14857
|
if (typeof messageId === "string" && messageId.trim()) {
|
|
14845
14858
|
return messageId;
|