sparkecoder 0.1.53 → 0.1.55
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/agent/index.js +40 -15
- package/dist/agent/index.js.map +1 -1
- package/dist/cli.js +40 -15
- package/dist/cli.js.map +1 -1
- package/dist/index.js +40 -15
- package/dist/index.js.map +1 -1
- package/dist/server/index.js +40 -15
- package/dist/server/index.js.map +1 -1
- package/dist/tools/index.js +34 -15
- package/dist/tools/index.js.map +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/web/.next/build-manifest.json +2 -2
- package/web/.next/standalone/web/.next/prerender-manifest.json +3 -3
- package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/standalone/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.html +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/installation.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.html +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/skills.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.html +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/tools.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.html +2 -2
- package/web/.next/standalone/web/.next/server/app/docs.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/docs.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/embed/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/index.html +1 -1
- package/web/.next/standalone/web/.next/server/app/index.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__a87e1c27._.js +1 -1
- package/web/.next/standalone/web/.next/server/pages/404.html +1 -1
- package/web/.next/standalone/web/.next/server/pages/500.html +2 -2
- package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/standalone/web/.next/static/{static/chunks/1685d98ff8751ba3.js → chunks/9b4c4424a720586b.js} +6 -6
- package/web/.next/{static/chunks/1685d98ff8751ba3.js → standalone/web/.next/static/static/chunks/9b4c4424a720586b.js} +6 -6
- package/web/.next/standalone/web/src/components/chat-interface.tsx +42 -16
- package/web/.next/{standalone/web/.next/static/chunks/1685d98ff8751ba3.js → static/chunks/9b4c4424a720586b.js} +6 -6
- /package/web/.next/standalone/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_ssgManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_ssgManifest.js +0 -0
- /package/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_buildManifest.js +0 -0
- /package/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_ssgManifest.js +0 -0
|
@@ -1059,15 +1059,40 @@ export function ChatInterface({ session, isEmbed = false }: ChatInterfaceProps)
|
|
|
1059
1059
|
setCurrentText('');
|
|
1060
1060
|
}
|
|
1061
1061
|
|
|
1062
|
-
//
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1062
|
+
// Check if there's already a placeholder for this tool type
|
|
1063
|
+
// (created from early tool-progress events before this SSE arrives)
|
|
1064
|
+
{
|
|
1065
|
+
const placeholderPrefix = `${event.toolName}_pending_`;
|
|
1066
|
+
const existingPlaceholder = toolCallsRef.current.find(
|
|
1067
|
+
tc => tc.toolName === event.toolName && tc.toolCallId.startsWith(placeholderPrefix)
|
|
1068
|
+
);
|
|
1069
|
+
const alreadyExists = toolCallsRef.current.some(tc => tc.toolCallId === event.toolCallId);
|
|
1070
|
+
|
|
1071
|
+
if (existingPlaceholder) {
|
|
1072
|
+
// Replace placeholder with real tool call, preserving accumulated data
|
|
1073
|
+
toolCallsRef.current = toolCallsRef.current.map((tc) => {
|
|
1074
|
+
if (tc.toolCallId !== existingPlaceholder.toolCallId) return tc;
|
|
1075
|
+
return {
|
|
1076
|
+
...tc,
|
|
1077
|
+
toolCallId: event.toolCallId,
|
|
1078
|
+
toolName: event.toolName,
|
|
1079
|
+
status: 'streaming' as const,
|
|
1080
|
+
streamingArgsText: '',
|
|
1081
|
+
};
|
|
1082
|
+
});
|
|
1083
|
+
} else if (!alreadyExists) {
|
|
1084
|
+
// Create a new streaming tool call
|
|
1085
|
+
const streamingToolCall: ToolCallInfo = {
|
|
1086
|
+
toolCallId: event.toolCallId,
|
|
1087
|
+
toolName: event.toolName,
|
|
1088
|
+
input: {},
|
|
1089
|
+
status: 'streaming' as const,
|
|
1090
|
+
streamingArgsText: '',
|
|
1091
|
+
};
|
|
1092
|
+
toolCallsRef.current = [...toolCallsRef.current, streamingToolCall];
|
|
1093
|
+
}
|
|
1094
|
+
// If alreadyExists, do nothing - tool-input-available will update it
|
|
1095
|
+
}
|
|
1071
1096
|
setCurrentToolCalls([...toolCallsRef.current]);
|
|
1072
1097
|
break;
|
|
1073
1098
|
|
|
@@ -1118,19 +1143,20 @@ export function ChatInterface({ session, isEmbed = false }: ChatInterfaceProps)
|
|
|
1118
1143
|
setCurrentText('');
|
|
1119
1144
|
}
|
|
1120
1145
|
|
|
1121
|
-
// Create/update the tool call info, preserving live content from
|
|
1146
|
+
// Create/update the tool call info, preserving live content from any source
|
|
1147
|
+
// (placeholder, existing streaming entry, or tool-input-start entry)
|
|
1122
1148
|
const toolCallInfo: ToolCallInfo = {
|
|
1123
1149
|
toolCallId: event.toolCallId,
|
|
1124
1150
|
toolName: event.toolName,
|
|
1125
1151
|
input: event.input,
|
|
1126
1152
|
status: 'running' as const,
|
|
1127
1153
|
streamingArgsText: existingToolCall?.streamingArgsText,
|
|
1128
|
-
// Preserve live content from
|
|
1129
|
-
liveContent: placeholderWriteFile?.liveContent,
|
|
1130
|
-
liveOldString: placeholderWriteFile?.liveOldString,
|
|
1131
|
-
liveNewString: placeholderWriteFile?.liveNewString,
|
|
1132
|
-
// Preserve explore steps from
|
|
1133
|
-
exploreSteps: placeholderExplore?.exploreSteps,
|
|
1154
|
+
// Preserve live content from whatever source has it
|
|
1155
|
+
liveContent: placeholderWriteFile?.liveContent || existingToolCall?.liveContent,
|
|
1156
|
+
liveOldString: placeholderWriteFile?.liveOldString || existingToolCall?.liveOldString,
|
|
1157
|
+
liveNewString: placeholderWriteFile?.liveNewString || existingToolCall?.liveNewString,
|
|
1158
|
+
// Preserve explore steps from whatever source has them
|
|
1159
|
+
exploreSteps: placeholderExplore?.exploreSteps || existingToolCall?.exploreSteps,
|
|
1134
1160
|
};
|
|
1135
1161
|
|
|
1136
1162
|
// Update toolCallsRef
|