Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix: fix page count issue (#11868)

Arvin Xu89572e461fd8
diff --git a/packages/builtin-tool-page-agent/src/client/Inspector/ModifyNodes/index.tsx b/packages/builtin-tool-page-agent/src/client/Inspector/ModifyNodes/index.tsx
index 9c6dfae6cf6..ca5ac3794d3 100644
--- a/packages/builtin-tool-page-agent/src/client/Inspector/ModifyNodes/index.tsx
+++ b/packages/builtin-tool-page-agent/src/client/Inspector/ModifyNodes/index.tsx
@@ -29,8 +29,11 @@ export const ModifyNodesInspector = memo<BuiltinInspectorProps<ModifyNodesArgs,
// Count operations by type
const counts = useMemo(() => {
- const operations = args?.operations || partialArgs?.operations || [];
- return operations.reduce(
+ const ops = args?.operations || partialArgs?.operations;
+ // During streaming, operations may be a partial object instead of array
+ if (!Array.isArray(ops)) return { insert: 0, modify: 0, remove: 0 };
+
+ return ops.reduce(
(acc, op) => {
switch (op.action) {
case 'insert': {
diff --git a/src/app/[variants]/(main)/home/features/InputArea/StarterList.tsx b/src/app/[variants]/(main)/home/features/InputArea/StarterList.tsx
index 28b79b4170a..aaae6934335 100644
--- a/src/app/[variants]/(main)/home/features/InputArea/StarterList.tsx
+++ b/src/app/[variants]/(main)/home/features/InputArea/StarterList.tsx
@@ -76,12 +76,12 @@ const StarterList = memo(() => {
key: 'image',
titleKey: 'starter.image',
},
- {
- disabled: true,
- icon: MicroscopeIcon,
- key: 'research',
- titleKey: 'starter.deepResearch',
- },
+ // {
+ // disabled: true,
+ // icon: MicroscopeIcon,
+ // key: 'research',
+ // titleKey: 'starter.deepResearch',
+ // },
],
[],
);