@inline-openclaw/inline 0.0.23 → 0.0.25
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 +80 -33
- package/dist/index.js.map +11 -11
- package/dist/inline/channel.d.ts.map +1 -1
- package/dist/inline/message-content.d.ts +1 -1
- package/dist/inline/message-content.d.ts.map +1 -1
- package/dist/inline/monitor.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2695,7 +2695,7 @@ var require_commonjs = __commonJS((exports) => {
|
|
|
2695
2695
|
} });
|
|
2696
2696
|
});
|
|
2697
2697
|
|
|
2698
|
-
// ../../node_modules/.bun/ws@8.
|
|
2698
|
+
// ../../node_modules/.bun/ws@8.20.0/node_modules/ws/lib/constants.js
|
|
2699
2699
|
var require_constants = __commonJS((exports, module) => {
|
|
2700
2700
|
var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
|
|
2701
2701
|
var hasBlob = typeof Blob !== "undefined";
|
|
@@ -2715,7 +2715,7 @@ var require_constants = __commonJS((exports, module) => {
|
|
|
2715
2715
|
};
|
|
2716
2716
|
});
|
|
2717
2717
|
|
|
2718
|
-
// ../../node_modules/.bun/ws@8.
|
|
2718
|
+
// ../../node_modules/.bun/ws@8.20.0/node_modules/ws/lib/buffer-util.js
|
|
2719
2719
|
var require_buffer_util = __commonJS((exports, module) => {
|
|
2720
2720
|
var { EMPTY_BUFFER } = require_constants();
|
|
2721
2721
|
var FastBuffer = Buffer[Symbol.species];
|
|
@@ -2793,7 +2793,7 @@ var require_buffer_util = __commonJS((exports, module) => {
|
|
|
2793
2793
|
}
|
|
2794
2794
|
});
|
|
2795
2795
|
|
|
2796
|
-
// ../../node_modules/.bun/ws@8.
|
|
2796
|
+
// ../../node_modules/.bun/ws@8.20.0/node_modules/ws/lib/limiter.js
|
|
2797
2797
|
var require_limiter = __commonJS((exports, module) => {
|
|
2798
2798
|
var kDone = Symbol("kDone");
|
|
2799
2799
|
var kRun = Symbol("kRun");
|
|
@@ -2825,7 +2825,7 @@ var require_limiter = __commonJS((exports, module) => {
|
|
|
2825
2825
|
module.exports = Limiter;
|
|
2826
2826
|
});
|
|
2827
2827
|
|
|
2828
|
-
// ../../node_modules/.bun/ws@8.
|
|
2828
|
+
// ../../node_modules/.bun/ws@8.20.0/node_modules/ws/lib/permessage-deflate.js
|
|
2829
2829
|
var require_permessage_deflate = __commonJS((exports, module) => {
|
|
2830
2830
|
var zlib = __require("zlib");
|
|
2831
2831
|
var bufferUtil = require_buffer_util();
|
|
@@ -2841,11 +2841,11 @@ var require_permessage_deflate = __commonJS((exports, module) => {
|
|
|
2841
2841
|
var zlibLimiter;
|
|
2842
2842
|
|
|
2843
2843
|
class PerMessageDeflate {
|
|
2844
|
-
constructor(options
|
|
2845
|
-
this._maxPayload = maxPayload | 0;
|
|
2844
|
+
constructor(options) {
|
|
2846
2845
|
this._options = options || {};
|
|
2847
2846
|
this._threshold = this._options.threshold !== undefined ? this._options.threshold : 1024;
|
|
2848
|
-
this.
|
|
2847
|
+
this._maxPayload = this._options.maxPayload | 0;
|
|
2848
|
+
this._isServer = !!this._options.isServer;
|
|
2849
2849
|
this._deflate = null;
|
|
2850
2850
|
this._inflate = null;
|
|
2851
2851
|
this.params = null;
|
|
@@ -3089,7 +3089,7 @@ var require_permessage_deflate = __commonJS((exports, module) => {
|
|
|
3089
3089
|
}
|
|
3090
3090
|
});
|
|
3091
3091
|
|
|
3092
|
-
// ../../node_modules/.bun/ws@8.
|
|
3092
|
+
// ../../node_modules/.bun/ws@8.20.0/node_modules/ws/lib/validation.js
|
|
3093
3093
|
var require_validation = __commonJS((exports, module) => {
|
|
3094
3094
|
var { isUtf8 } = __require("buffer");
|
|
3095
3095
|
var { hasBlob } = require_constants();
|
|
@@ -3276,7 +3276,7 @@ var require_validation = __commonJS((exports, module) => {
|
|
|
3276
3276
|
}
|
|
3277
3277
|
});
|
|
3278
3278
|
|
|
3279
|
-
// ../../node_modules/.bun/ws@8.
|
|
3279
|
+
// ../../node_modules/.bun/ws@8.20.0/node_modules/ws/lib/receiver.js
|
|
3280
3280
|
var require_receiver = __commonJS((exports, module) => {
|
|
3281
3281
|
var { Writable } = __require("stream");
|
|
3282
3282
|
var PerMessageDeflate = require_permessage_deflate();
|
|
@@ -3657,7 +3657,7 @@ var require_receiver = __commonJS((exports, module) => {
|
|
|
3657
3657
|
module.exports = Receiver;
|
|
3658
3658
|
});
|
|
3659
3659
|
|
|
3660
|
-
// ../../node_modules/.bun/ws@8.
|
|
3660
|
+
// ../../node_modules/.bun/ws@8.20.0/node_modules/ws/lib/sender.js
|
|
3661
3661
|
var require_sender = __commonJS((exports, module) => {
|
|
3662
3662
|
var { Duplex } = __require("stream");
|
|
3663
3663
|
var { randomFillSync } = __require("crypto");
|
|
@@ -4011,7 +4011,7 @@ var require_sender = __commonJS((exports, module) => {
|
|
|
4011
4011
|
}
|
|
4012
4012
|
});
|
|
4013
4013
|
|
|
4014
|
-
// ../../node_modules/.bun/ws@8.
|
|
4014
|
+
// ../../node_modules/.bun/ws@8.20.0/node_modules/ws/lib/event-target.js
|
|
4015
4015
|
var require_event_target = __commonJS((exports, module) => {
|
|
4016
4016
|
var { kForOnEventAttribute, kListener } = require_constants();
|
|
4017
4017
|
var kCode = Symbol("kCode");
|
|
@@ -4162,7 +4162,7 @@ var require_event_target = __commonJS((exports, module) => {
|
|
|
4162
4162
|
}
|
|
4163
4163
|
});
|
|
4164
4164
|
|
|
4165
|
-
// ../../node_modules/.bun/ws@8.
|
|
4165
|
+
// ../../node_modules/.bun/ws@8.20.0/node_modules/ws/lib/extension.js
|
|
4166
4166
|
var require_extension = __commonJS((exports, module) => {
|
|
4167
4167
|
var { tokenChars } = require_validation();
|
|
4168
4168
|
function push(dest, name, elem) {
|
|
@@ -4327,7 +4327,7 @@ var require_extension = __commonJS((exports, module) => {
|
|
|
4327
4327
|
module.exports = { format, parse };
|
|
4328
4328
|
});
|
|
4329
4329
|
|
|
4330
|
-
// ../../node_modules/.bun/ws@8.
|
|
4330
|
+
// ../../node_modules/.bun/ws@8.20.0/node_modules/ws/lib/websocket.js
|
|
4331
4331
|
var require_websocket = __commonJS((exports, module) => {
|
|
4332
4332
|
var EventEmitter = __require("events");
|
|
4333
4333
|
var https = __require("https");
|
|
@@ -4716,7 +4716,7 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
4716
4716
|
} else {
|
|
4717
4717
|
try {
|
|
4718
4718
|
parsedUrl = new URL2(address);
|
|
4719
|
-
} catch
|
|
4719
|
+
} catch {
|
|
4720
4720
|
throw new SyntaxError(`Invalid URL: ${address}`);
|
|
4721
4721
|
}
|
|
4722
4722
|
}
|
|
@@ -4764,7 +4764,11 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
4764
4764
|
opts.path = parsedUrl.pathname + parsedUrl.search;
|
|
4765
4765
|
opts.timeout = opts.handshakeTimeout;
|
|
4766
4766
|
if (opts.perMessageDeflate) {
|
|
4767
|
-
perMessageDeflate = new PerMessageDeflate(
|
|
4767
|
+
perMessageDeflate = new PerMessageDeflate({
|
|
4768
|
+
...opts.perMessageDeflate,
|
|
4769
|
+
isServer: false,
|
|
4770
|
+
maxPayload: opts.maxPayload
|
|
4771
|
+
});
|
|
4768
4772
|
opts.headers["Sec-WebSocket-Extensions"] = format({
|
|
4769
4773
|
[PerMessageDeflate.extensionName]: perMessageDeflate.offer()
|
|
4770
4774
|
});
|
|
@@ -5089,7 +5093,7 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
5089
5093
|
}
|
|
5090
5094
|
});
|
|
5091
5095
|
|
|
5092
|
-
// ../../node_modules/.bun/ws@8.
|
|
5096
|
+
// ../../node_modules/.bun/ws@8.20.0/node_modules/ws/lib/stream.js
|
|
5093
5097
|
var require_stream = __commonJS((exports, module) => {
|
|
5094
5098
|
var WebSocket = require_websocket();
|
|
5095
5099
|
var { Duplex } = __require("stream");
|
|
@@ -5192,7 +5196,7 @@ var require_stream = __commonJS((exports, module) => {
|
|
|
5192
5196
|
module.exports = createWebSocketStream;
|
|
5193
5197
|
});
|
|
5194
5198
|
|
|
5195
|
-
// ../../node_modules/.bun/ws@8.
|
|
5199
|
+
// ../../node_modules/.bun/ws@8.20.0/node_modules/ws/lib/subprotocol.js
|
|
5196
5200
|
var require_subprotocol = __commonJS((exports, module) => {
|
|
5197
5201
|
var { tokenChars } = require_validation();
|
|
5198
5202
|
function parse(header) {
|
|
@@ -5237,7 +5241,7 @@ var require_subprotocol = __commonJS((exports, module) => {
|
|
|
5237
5241
|
module.exports = { parse };
|
|
5238
5242
|
});
|
|
5239
5243
|
|
|
5240
|
-
// ../../node_modules/.bun/ws@8.
|
|
5244
|
+
// ../../node_modules/.bun/ws@8.20.0/node_modules/ws/lib/websocket-server.js
|
|
5241
5245
|
var require_websocket_server = __commonJS((exports, module) => {
|
|
5242
5246
|
var EventEmitter = __require("events");
|
|
5243
5247
|
var http = __require("http");
|
|
@@ -5410,7 +5414,11 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
5410
5414
|
const secWebSocketExtensions = req.headers["sec-websocket-extensions"];
|
|
5411
5415
|
const extensions = {};
|
|
5412
5416
|
if (this.options.perMessageDeflate && secWebSocketExtensions !== undefined) {
|
|
5413
|
-
const perMessageDeflate = new PerMessageDeflate(
|
|
5417
|
+
const perMessageDeflate = new PerMessageDeflate({
|
|
5418
|
+
...this.options.perMessageDeflate,
|
|
5419
|
+
isServer: true,
|
|
5420
|
+
maxPayload: this.options.maxPayload
|
|
5421
|
+
});
|
|
5414
5422
|
try {
|
|
5415
5423
|
const offers = extension.parse(secWebSocketExtensions);
|
|
5416
5424
|
if (offers[PerMessageDeflate.extensionName]) {
|
|
@@ -7358,7 +7366,8 @@ class Message$Type extends import_runtime4.MessageType {
|
|
|
7358
7366
|
{ no: 17, name: "send_mode", kind: "enum", opt: true, T: () => ["MessageSendMode", MessageSendMode] },
|
|
7359
7367
|
{ no: 18, name: "fwd_from", kind: "message", T: () => MessageFwdHeader },
|
|
7360
7368
|
{ no: 19, name: "replies", kind: "message", T: () => MessageReplies },
|
|
7361
|
-
{ no: 20, name: "actions", kind: "message", T: () => MessageActions }
|
|
7369
|
+
{ no: 20, name: "actions", kind: "message", T: () => MessageActions },
|
|
7370
|
+
{ no: 21, name: "rev", kind: "scalar", opt: true, T: 3, L: 0 }
|
|
7362
7371
|
]);
|
|
7363
7372
|
}
|
|
7364
7373
|
create(value) {
|
|
@@ -7440,6 +7449,9 @@ class Message$Type extends import_runtime4.MessageType {
|
|
|
7440
7449
|
case 20:
|
|
7441
7450
|
message.actions = MessageActions.internalBinaryRead(reader, reader.uint32(), options, message.actions);
|
|
7442
7451
|
break;
|
|
7452
|
+
case 21:
|
|
7453
|
+
message.rev = reader.int64().toBigInt();
|
|
7454
|
+
break;
|
|
7443
7455
|
default:
|
|
7444
7456
|
let u = options.readUnknownField;
|
|
7445
7457
|
if (u === "throw")
|
|
@@ -7494,6 +7506,8 @@ class Message$Type extends import_runtime4.MessageType {
|
|
|
7494
7506
|
MessageReplies.internalBinaryWrite(message.replies, writer.tag(19, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
7495
7507
|
if (message.actions)
|
|
7496
7508
|
MessageActions.internalBinaryWrite(message.actions, writer.tag(20, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
7509
|
+
if (message.rev !== undefined)
|
|
7510
|
+
writer.tag(21, import_runtime.WireType.Varint).int64(message.rev);
|
|
7497
7511
|
let u = options.writeUnknownFields;
|
|
7498
7512
|
if (u !== false)
|
|
7499
7513
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -12987,7 +13001,8 @@ class MessageTranslation$Type extends import_runtime4.MessageType {
|
|
|
12987
13001
|
{ no: 2, name: "language", kind: "scalar", T: 9 },
|
|
12988
13002
|
{ no: 3, name: "translation", kind: "scalar", T: 9 },
|
|
12989
13003
|
{ no: 4, name: "date", kind: "scalar", T: 3, L: 0 },
|
|
12990
|
-
{ no: 5, name: "entities", kind: "message", T: () => MessageEntities }
|
|
13004
|
+
{ no: 5, name: "entities", kind: "message", T: () => MessageEntities },
|
|
13005
|
+
{ no: 6, name: "msg_rev", kind: "scalar", T: 3, L: 0 }
|
|
12991
13006
|
]);
|
|
12992
13007
|
}
|
|
12993
13008
|
create(value) {
|
|
@@ -12996,6 +13011,7 @@ class MessageTranslation$Type extends import_runtime4.MessageType {
|
|
|
12996
13011
|
message.language = "";
|
|
12997
13012
|
message.translation = "";
|
|
12998
13013
|
message.date = 0n;
|
|
13014
|
+
message.msgRev = 0n;
|
|
12999
13015
|
if (value !== undefined)
|
|
13000
13016
|
import_runtime3.reflectionMergePartial(this, message, value);
|
|
13001
13017
|
return message;
|
|
@@ -13020,6 +13036,9 @@ class MessageTranslation$Type extends import_runtime4.MessageType {
|
|
|
13020
13036
|
case 5:
|
|
13021
13037
|
message.entities = MessageEntities.internalBinaryRead(reader, reader.uint32(), options, message.entities);
|
|
13022
13038
|
break;
|
|
13039
|
+
case 6:
|
|
13040
|
+
message.msgRev = reader.int64().toBigInt();
|
|
13041
|
+
break;
|
|
13023
13042
|
default:
|
|
13024
13043
|
let u = options.readUnknownField;
|
|
13025
13044
|
if (u === "throw")
|
|
@@ -13042,6 +13061,8 @@ class MessageTranslation$Type extends import_runtime4.MessageType {
|
|
|
13042
13061
|
writer.tag(4, import_runtime.WireType.Varint).int64(message.date);
|
|
13043
13062
|
if (message.entities)
|
|
13044
13063
|
MessageEntities.internalBinaryWrite(message.entities, writer.tag(5, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
13064
|
+
if (message.msgRev !== 0n)
|
|
13065
|
+
writer.tag(6, import_runtime.WireType.Varint).int64(message.msgRev);
|
|
13045
13066
|
let u = options.writeUnknownFields;
|
|
13046
13067
|
if (u !== false)
|
|
13047
13068
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -18687,10 +18708,13 @@ class ProtocolClientError extends Error {
|
|
|
18687
18708
|
}
|
|
18688
18709
|
}
|
|
18689
18710
|
|
|
18690
|
-
// ../../node_modules/.bun/ws@8.
|
|
18711
|
+
// ../../node_modules/.bun/ws@8.20.0/node_modules/ws/wrapper.mjs
|
|
18691
18712
|
var import_stream = __toESM(require_stream(), 1);
|
|
18713
|
+
var import_extension = __toESM(require_extension(), 1);
|
|
18714
|
+
var import_permessage_deflate = __toESM(require_permessage_deflate(), 1);
|
|
18692
18715
|
var import_receiver = __toESM(require_receiver(), 1);
|
|
18693
18716
|
var import_sender = __toESM(require_sender(), 1);
|
|
18717
|
+
var import_subprotocol = __toESM(require_subprotocol(), 1);
|
|
18694
18718
|
var import_websocket = __toESM(require_websocket(), 1);
|
|
18695
18719
|
var import_websocket_server = __toESM(require_websocket_server(), 1);
|
|
18696
18720
|
|
|
@@ -34629,11 +34653,12 @@ function bestPhotoSize(photo) {
|
|
|
34629
34653
|
return best;
|
|
34630
34654
|
}
|
|
34631
34655
|
function messageMediaSummary(message) {
|
|
34632
|
-
const
|
|
34656
|
+
const mediaContainer = message.media;
|
|
34657
|
+
const media = mediaContainer && typeof mediaContainer === "object" ? "media" in mediaContainer && mediaContainer.media && typeof mediaContainer.media === "object" && "oneofKind" in mediaContainer.media ? mediaContainer.media : ("oneofKind" in mediaContainer) ? mediaContainer : null : null;
|
|
34633
34658
|
if (!media)
|
|
34634
34659
|
return null;
|
|
34635
34660
|
if (media.oneofKind === "photo") {
|
|
34636
|
-
const photo = media.photo
|
|
34661
|
+
const photo = media.photo?.photo;
|
|
34637
34662
|
const bestSize = photo ? bestPhotoSize(photo) : { cdnUrl: null, width: null, height: null, sizeBytes: null };
|
|
34638
34663
|
return {
|
|
34639
34664
|
kind: "photo",
|
|
@@ -34645,7 +34670,7 @@ function messageMediaSummary(message) {
|
|
|
34645
34670
|
};
|
|
34646
34671
|
}
|
|
34647
34672
|
if (media.oneofKind === "video") {
|
|
34648
|
-
const video = media.video
|
|
34673
|
+
const video = media.video?.video;
|
|
34649
34674
|
return {
|
|
34650
34675
|
kind: "video",
|
|
34651
34676
|
id: video?.id?.toString() ?? null,
|
|
@@ -34657,7 +34682,7 @@ function messageMediaSummary(message) {
|
|
|
34657
34682
|
};
|
|
34658
34683
|
}
|
|
34659
34684
|
if (media.oneofKind === "document") {
|
|
34660
|
-
const document = media.document
|
|
34685
|
+
const document = media.document?.document;
|
|
34661
34686
|
return {
|
|
34662
34687
|
kind: "document",
|
|
34663
34688
|
id: document?.id?.toString() ?? null,
|
|
@@ -34667,6 +34692,17 @@ function messageMediaSummary(message) {
|
|
|
34667
34692
|
sizeBytes: document?.size ?? null
|
|
34668
34693
|
};
|
|
34669
34694
|
}
|
|
34695
|
+
if (media.oneofKind === "voice") {
|
|
34696
|
+
const voice = media.voice?.voice;
|
|
34697
|
+
return {
|
|
34698
|
+
kind: "voice",
|
|
34699
|
+
id: voice?.id?.toString() ?? null,
|
|
34700
|
+
url: voice?.cdnUrl ?? null,
|
|
34701
|
+
mimeType: voice?.mimeType ?? null,
|
|
34702
|
+
sizeBytes: voice?.size ?? null,
|
|
34703
|
+
durationSeconds: voice?.duration ?? null
|
|
34704
|
+
};
|
|
34705
|
+
}
|
|
34670
34706
|
return {
|
|
34671
34707
|
kind: "nudge",
|
|
34672
34708
|
id: null,
|
|
@@ -34810,6 +34846,9 @@ function formatMediaSummary(media) {
|
|
|
34810
34846
|
if (media.kind === "video") {
|
|
34811
34847
|
return media.url ? `video attachment: ${media.url}` : "video attachment";
|
|
34812
34848
|
}
|
|
34849
|
+
if (media.kind === "voice") {
|
|
34850
|
+
return media.url ? `audio attachment: ${media.url}` : "audio attachment";
|
|
34851
|
+
}
|
|
34813
34852
|
const label = media.fileName ? `document attachment (${media.fileName})` : "document attachment";
|
|
34814
34853
|
return media.url ? `${label}: ${media.url}` : label;
|
|
34815
34854
|
}
|
|
@@ -35131,6 +35170,7 @@ function resolveInlineCompatNativeCommandMenu(commandBody) {
|
|
|
35131
35170
|
var CHANNEL_ID = "inline";
|
|
35132
35171
|
var DEFAULT_DM_HISTORY_LIMIT = 6;
|
|
35133
35172
|
var HISTORY_LINE_MAX_CHARS = 280;
|
|
35173
|
+
var URL_LIKE_PATTERN = /https?:\/\/\S+/i;
|
|
35134
35174
|
var BOT_MESSAGE_CACHE_LIMIT = 500;
|
|
35135
35175
|
var REACTION_TARGET_LOOKUP_LIMIT = 8;
|
|
35136
35176
|
var REPLY_TARGET_LOOKUP_LIMIT = 8;
|
|
@@ -35440,6 +35480,8 @@ function normalizeHistoryText(raw) {
|
|
|
35440
35480
|
return "";
|
|
35441
35481
|
if (compact.length <= HISTORY_LINE_MAX_CHARS)
|
|
35442
35482
|
return compact;
|
|
35483
|
+
if (URL_LIKE_PATTERN.test(compact))
|
|
35484
|
+
return compact;
|
|
35443
35485
|
return `${compact.slice(0, HISTORY_LINE_MAX_CHARS - 1)}…`;
|
|
35444
35486
|
}
|
|
35445
35487
|
function drainCompleteParagraphs(buffer) {
|
|
@@ -35639,6 +35681,8 @@ function buildInlineAttachmentPlaceholder(content) {
|
|
|
35639
35681
|
return "<media:video>";
|
|
35640
35682
|
case "document":
|
|
35641
35683
|
return "<media:document>";
|
|
35684
|
+
case "voice":
|
|
35685
|
+
return "<media:audio>";
|
|
35642
35686
|
default:
|
|
35643
35687
|
return "";
|
|
35644
35688
|
}
|
|
@@ -35902,6 +35946,7 @@ async function monitorInlineProvider(params) {
|
|
|
35902
35946
|
const rawEvent = event;
|
|
35903
35947
|
let msg;
|
|
35904
35948
|
let rawBody = "";
|
|
35949
|
+
let currentContent = null;
|
|
35905
35950
|
let currentAttachmentText = null;
|
|
35906
35951
|
let currentEntityText = null;
|
|
35907
35952
|
let reactionEvent = null;
|
|
@@ -35913,10 +35958,10 @@ async function monitorInlineProvider(params) {
|
|
|
35913
35958
|
...event.message,
|
|
35914
35959
|
chatId: event.chatId
|
|
35915
35960
|
};
|
|
35916
|
-
|
|
35917
|
-
rawBody = buildInlineInboundBodyText(
|
|
35918
|
-
currentAttachmentText =
|
|
35919
|
-
currentEntityText =
|
|
35961
|
+
currentContent = summarizeInlineMessageContent(msg);
|
|
35962
|
+
rawBody = buildInlineInboundBodyText(currentContent);
|
|
35963
|
+
currentAttachmentText = currentContent.attachmentText || null;
|
|
35964
|
+
currentEntityText = currentContent.entityText || null;
|
|
35920
35965
|
if (!rawBody)
|
|
35921
35966
|
continue;
|
|
35922
35967
|
if (msg.out || msg.fromId === meId)
|
|
@@ -36254,13 +36299,14 @@ ${JSON.stringify(payload)}`;
|
|
|
36254
36299
|
});
|
|
36255
36300
|
if (isGroup && mentionGate.shouldSkip) {
|
|
36256
36301
|
runtime2.log?.(`inline: drop group chat ${String(chatId)} (no mention)`);
|
|
36302
|
+
const pendingBody = normalizeHistoryText(currentContent?.text) ?? normalizeHistoryText(rawBody);
|
|
36257
36303
|
recordPendingHistoryEntryIfEnabled({
|
|
36258
36304
|
historyMap: groupPendingHistories,
|
|
36259
36305
|
historyKey: groupHistoryKey ?? "",
|
|
36260
36306
|
limit: historyLimit,
|
|
36261
|
-
entry: groupHistoryKey &&
|
|
36307
|
+
entry: groupHistoryKey && pendingBody ? {
|
|
36262
36308
|
sender: pendingHistorySender,
|
|
36263
|
-
body:
|
|
36309
|
+
body: pendingBody,
|
|
36264
36310
|
timestamp: messageTimestamp || Date.now(),
|
|
36265
36311
|
messageId: String(msg.id)
|
|
36266
36312
|
} : null
|
|
@@ -38713,6 +38759,7 @@ var inlineChannelPlugin = {
|
|
|
38713
38759
|
messageToolHints: ({ cfg, accountId }) => [
|
|
38714
38760
|
"- Inline targeting: omit `target` to reply in the current chat.",
|
|
38715
38761
|
"- Inline explicit targets: `chat:<chatId>` for chats and `user:<userId>` for direct users. Prefer `user:` for DM user targets.",
|
|
38762
|
+
"- Inline history tools: `read` and `search` return media-aware message payloads (`media`, `attachments`, `attachmentUrls`) so image-only history remains discoverable.",
|
|
38716
38763
|
"- Inline special tools: use `inline_nudge` to send a nudge, and `inline_forward` to forward message ids between chats or users.",
|
|
38717
38764
|
...isInlineReplyThreadsEnabled({ cfg, accountId: accountId ?? null }) ? [
|
|
38718
38765
|
"- Inline reply threads are enabled: use `thread-reply` to send into a real reply thread, with `threadId` set to the reply-thread chat id."
|
|
@@ -40083,5 +40130,5 @@ export {
|
|
|
40083
40130
|
src_default as default
|
|
40084
40131
|
};
|
|
40085
40132
|
|
|
40086
|
-
//# debugId=
|
|
40133
|
+
//# debugId=DA562915BABAD00064756E2164756E21
|
|
40087
40134
|
//# sourceMappingURL=index.js.map
|