@inetafrica/open-claudia 1.9.0 → 1.9.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/bot-agent.js +1 -5
- package/bot.js +5 -9
- package/package.json +1 -1
package/bot-agent.js
CHANGED
|
@@ -830,11 +830,7 @@ async function runClaude(prompt, cwd, replyToMsgId, opts = {}) {
|
|
|
830
830
|
const chunks = splitMessage(finalText);
|
|
831
831
|
const firstChunk = chunks[0];
|
|
832
832
|
|
|
833
|
-
|
|
834
|
-
firstChunk.length < 4000 && chunks.length === 1 &&
|
|
835
|
-
lastUpdate.includes(firstChunk.slice(0, 200));
|
|
836
|
-
|
|
837
|
-
if (progressAlreadyHasFinal) {
|
|
833
|
+
if (statusMessageId && chunks.length === 1) {
|
|
838
834
|
await editMessage(statusMessageId, firstChunk);
|
|
839
835
|
} else {
|
|
840
836
|
const sent = await send(firstChunk, { replyTo: replyToMsgId });
|
package/bot.js
CHANGED
|
@@ -862,15 +862,11 @@ async function runClaude(prompt, cwd, replyToMsgId, opts = {}) {
|
|
|
862
862
|
const chunks = splitMessage(finalText);
|
|
863
863
|
const firstChunk = chunks[0];
|
|
864
864
|
|
|
865
|
-
// If
|
|
866
|
-
//
|
|
867
|
-
// or multi-chunk
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
lastUpdate.includes(firstChunk.slice(0, 200));
|
|
871
|
-
|
|
872
|
-
if (progressAlreadyHasFinal) {
|
|
873
|
-
// Edit the progress message to show clean final text (remove tool steps header)
|
|
865
|
+
// If there's already a progress message showing, edit it to the final text
|
|
866
|
+
// instead of sending a duplicate. Only send a NEW message if there was no
|
|
867
|
+
// progress message or the response is multi-chunk (too long for one edit).
|
|
868
|
+
if (statusMessageId && chunks.length === 1) {
|
|
869
|
+
// Edit progress message to clean final text
|
|
874
870
|
await editMessage(statusMessageId, firstChunk);
|
|
875
871
|
} else {
|
|
876
872
|
// Send final result as a new message (triggers notification)
|