@hef2024/llmasaservice-ui 0.22.7 → 0.22.8
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 +25 -0
- package/dist/index.mjs +25 -0
- package/package.json +1 -1
- package/src/AIAgentPanel.tsx +27 -0
package/dist/index.js
CHANGED
|
@@ -6329,6 +6329,22 @@ var AIAgentPanel = import_react14.default.forwardRef(({
|
|
|
6329
6329
|
if (prevContextRef.current.length !== contextString.length) {
|
|
6330
6330
|
console.log("AIAgentPanel - Length difference:", contextString.length - prevContextRef.current.length);
|
|
6331
6331
|
}
|
|
6332
|
+
try {
|
|
6333
|
+
const oldSections = JSON.parse(prevContextRef.current);
|
|
6334
|
+
const newSections = JSON.parse(contextString);
|
|
6335
|
+
console.log("AIAgentPanel - Section count old/new:", oldSections.length, newSections.length);
|
|
6336
|
+
newSections.forEach((newSec, idx) => {
|
|
6337
|
+
const oldSec = oldSections[idx];
|
|
6338
|
+
if (!oldSec || JSON.stringify(oldSec.data) !== JSON.stringify(newSec.data)) {
|
|
6339
|
+
console.log(`AIAgentPanel - Section "${newSec.id}" changed:`, {
|
|
6340
|
+
oldDataLength: oldSec ? JSON.stringify(oldSec.data).length : 0,
|
|
6341
|
+
newDataLength: JSON.stringify(newSec.data).length
|
|
6342
|
+
});
|
|
6343
|
+
}
|
|
6344
|
+
});
|
|
6345
|
+
} catch (e) {
|
|
6346
|
+
console.log("AIAgentPanel - Could not parse for diff:", e);
|
|
6347
|
+
}
|
|
6332
6348
|
prevContextRef.current = contextString;
|
|
6333
6349
|
if (contextNotificationTimeoutRef.current) {
|
|
6334
6350
|
clearTimeout(contextNotificationTimeoutRef.current);
|
|
@@ -6341,6 +6357,15 @@ var AIAgentPanel = import_react14.default.forwardRef(({
|
|
|
6341
6357
|
}, 3e3);
|
|
6342
6358
|
} else {
|
|
6343
6359
|
console.log("AIAgentPanel - \u274C Context UNCHANGED (strings match)");
|
|
6360
|
+
console.log("AIAgentPanel - Current context data:", mergedContext.sections.map((s) => ({
|
|
6361
|
+
id: s.id,
|
|
6362
|
+
dataKeys: Object.keys(s.data || {}),
|
|
6363
|
+
dataLength: JSON.stringify(s.data).length,
|
|
6364
|
+
dataPreview: JSON.stringify(s.data).substring(0, 200)
|
|
6365
|
+
})));
|
|
6366
|
+
console.log("AIAgentPanel - prevContextRef length:", prevContextRef.current.length);
|
|
6367
|
+
console.log("AIAgentPanel - new contextString length:", contextString.length);
|
|
6368
|
+
console.log("AIAgentPanel - Are they identical?", prevContextRef.current === contextString);
|
|
6344
6369
|
}
|
|
6345
6370
|
}, [mergedContext.sections]);
|
|
6346
6371
|
(0, import_react14.useEffect)(() => {
|
package/dist/index.mjs
CHANGED
|
@@ -6296,6 +6296,22 @@ var AIAgentPanel = React13.forwardRef(({
|
|
|
6296
6296
|
if (prevContextRef.current.length !== contextString.length) {
|
|
6297
6297
|
console.log("AIAgentPanel - Length difference:", contextString.length - prevContextRef.current.length);
|
|
6298
6298
|
}
|
|
6299
|
+
try {
|
|
6300
|
+
const oldSections = JSON.parse(prevContextRef.current);
|
|
6301
|
+
const newSections = JSON.parse(contextString);
|
|
6302
|
+
console.log("AIAgentPanel - Section count old/new:", oldSections.length, newSections.length);
|
|
6303
|
+
newSections.forEach((newSec, idx) => {
|
|
6304
|
+
const oldSec = oldSections[idx];
|
|
6305
|
+
if (!oldSec || JSON.stringify(oldSec.data) !== JSON.stringify(newSec.data)) {
|
|
6306
|
+
console.log(`AIAgentPanel - Section "${newSec.id}" changed:`, {
|
|
6307
|
+
oldDataLength: oldSec ? JSON.stringify(oldSec.data).length : 0,
|
|
6308
|
+
newDataLength: JSON.stringify(newSec.data).length
|
|
6309
|
+
});
|
|
6310
|
+
}
|
|
6311
|
+
});
|
|
6312
|
+
} catch (e) {
|
|
6313
|
+
console.log("AIAgentPanel - Could not parse for diff:", e);
|
|
6314
|
+
}
|
|
6299
6315
|
prevContextRef.current = contextString;
|
|
6300
6316
|
if (contextNotificationTimeoutRef.current) {
|
|
6301
6317
|
clearTimeout(contextNotificationTimeoutRef.current);
|
|
@@ -6308,6 +6324,15 @@ var AIAgentPanel = React13.forwardRef(({
|
|
|
6308
6324
|
}, 3e3);
|
|
6309
6325
|
} else {
|
|
6310
6326
|
console.log("AIAgentPanel - \u274C Context UNCHANGED (strings match)");
|
|
6327
|
+
console.log("AIAgentPanel - Current context data:", mergedContext.sections.map((s) => ({
|
|
6328
|
+
id: s.id,
|
|
6329
|
+
dataKeys: Object.keys(s.data || {}),
|
|
6330
|
+
dataLength: JSON.stringify(s.data).length,
|
|
6331
|
+
dataPreview: JSON.stringify(s.data).substring(0, 200)
|
|
6332
|
+
})));
|
|
6333
|
+
console.log("AIAgentPanel - prevContextRef length:", prevContextRef.current.length);
|
|
6334
|
+
console.log("AIAgentPanel - new contextString length:", contextString.length);
|
|
6335
|
+
console.log("AIAgentPanel - Are they identical?", prevContextRef.current === contextString);
|
|
6311
6336
|
}
|
|
6312
6337
|
}, [mergedContext.sections]);
|
|
6313
6338
|
useEffect9(() => {
|
package/package.json
CHANGED
package/src/AIAgentPanel.tsx
CHANGED
|
@@ -1567,6 +1567,24 @@ const AIAgentPanel = React.forwardRef<AIAgentPanelHandle, AIAgentPanelProps>(({
|
|
|
1567
1567
|
console.log('AIAgentPanel - Length difference:', contextString.length - prevContextRef.current.length);
|
|
1568
1568
|
}
|
|
1569
1569
|
|
|
1570
|
+
// Show detailed diff for debugging
|
|
1571
|
+
try {
|
|
1572
|
+
const oldSections = JSON.parse(prevContextRef.current);
|
|
1573
|
+
const newSections = JSON.parse(contextString);
|
|
1574
|
+
console.log('AIAgentPanel - Section count old/new:', oldSections.length, newSections.length);
|
|
1575
|
+
newSections.forEach((newSec: any, idx: number) => {
|
|
1576
|
+
const oldSec = oldSections[idx];
|
|
1577
|
+
if (!oldSec || JSON.stringify(oldSec.data) !== JSON.stringify(newSec.data)) {
|
|
1578
|
+
console.log(`AIAgentPanel - Section "${newSec.id}" changed:`, {
|
|
1579
|
+
oldDataLength: oldSec ? JSON.stringify(oldSec.data).length : 0,
|
|
1580
|
+
newDataLength: JSON.stringify(newSec.data).length
|
|
1581
|
+
});
|
|
1582
|
+
}
|
|
1583
|
+
});
|
|
1584
|
+
} catch (e) {
|
|
1585
|
+
console.log('AIAgentPanel - Could not parse for diff:', e);
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1570
1588
|
prevContextRef.current = contextString;
|
|
1571
1589
|
|
|
1572
1590
|
// Clear any existing timeout before setting a new one
|
|
@@ -1585,6 +1603,15 @@ const AIAgentPanel = React.forwardRef<AIAgentPanelHandle, AIAgentPanelProps>(({
|
|
|
1585
1603
|
}, 3000);
|
|
1586
1604
|
} else {
|
|
1587
1605
|
console.log('AIAgentPanel - ❌ Context UNCHANGED (strings match)');
|
|
1606
|
+
console.log('AIAgentPanel - Current context data:', mergedContext.sections.map(s => ({
|
|
1607
|
+
id: s.id,
|
|
1608
|
+
dataKeys: Object.keys(s.data || {}),
|
|
1609
|
+
dataLength: JSON.stringify(s.data).length,
|
|
1610
|
+
dataPreview: JSON.stringify(s.data).substring(0, 200)
|
|
1611
|
+
})));
|
|
1612
|
+
console.log('AIAgentPanel - prevContextRef length:', prevContextRef.current.length);
|
|
1613
|
+
console.log('AIAgentPanel - new contextString length:', contextString.length);
|
|
1614
|
+
console.log('AIAgentPanel - Are they identical?', prevContextRef.current === contextString);
|
|
1588
1615
|
}
|
|
1589
1616
|
|
|
1590
1617
|
// Note: No cleanup on every re-render - only clear timeout when context changes
|