@ynhcj/xiaoyi-channel 0.0.111-next → 0.0.112-next
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/src/provider.js +9 -0
- package/package.json +1 -1
package/dist/src/provider.js
CHANGED
|
@@ -452,6 +452,15 @@ export const xiaoyiProvider = {
|
|
|
452
452
|
let resolvedTaskId = null;
|
|
453
453
|
let resolvedDeviceType = null;
|
|
454
454
|
if (context.messages) {
|
|
455
|
+
console.log(`[xiaoyiprovider] user messages BEFORE strip (count=${context.messages.filter(m => m.role === "user").length}):`);
|
|
456
|
+
for (const msg of context.messages) {
|
|
457
|
+
if (msg.role !== "user")
|
|
458
|
+
continue;
|
|
459
|
+
const preview = typeof msg.content === "string"
|
|
460
|
+
? msg.content.slice(0, 200)
|
|
461
|
+
: JSON.stringify(msg.content).slice(0, 200);
|
|
462
|
+
console.log(`[xiaoyiprovider] user: ${preview}`);
|
|
463
|
+
}
|
|
455
464
|
for (let i = context.messages.length - 1; i >= 0; i--) {
|
|
456
465
|
const msg = context.messages[i];
|
|
457
466
|
if (msg.role !== "user" || !msg.content)
|