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.
Files changed (93) hide show
  1. package/dist/agent/index.js +40 -15
  2. package/dist/agent/index.js.map +1 -1
  3. package/dist/cli.js +40 -15
  4. package/dist/cli.js.map +1 -1
  5. package/dist/index.js +40 -15
  6. package/dist/index.js.map +1 -1
  7. package/dist/server/index.js +40 -15
  8. package/dist/server/index.js.map +1 -1
  9. package/dist/tools/index.js +34 -15
  10. package/dist/tools/index.js.map +1 -1
  11. package/package.json +1 -1
  12. package/web/.next/BUILD_ID +1 -1
  13. package/web/.next/standalone/web/.next/BUILD_ID +1 -1
  14. package/web/.next/standalone/web/.next/build-manifest.json +2 -2
  15. package/web/.next/standalone/web/.next/prerender-manifest.json +3 -3
  16. package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page_client-reference-manifest.js +1 -1
  17. package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -2
  18. package/web/.next/standalone/web/.next/server/app/_global-error.rsc +1 -1
  19. package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  20. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  21. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  22. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  23. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  24. package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -1
  25. package/web/.next/standalone/web/.next/server/app/_not-found.rsc +1 -1
  26. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  27. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  28. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  29. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  30. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  31. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  32. package/web/.next/standalone/web/.next/server/app/docs/installation.html +2 -2
  33. package/web/.next/standalone/web/.next/server/app/docs/installation.rsc +1 -1
  34. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_full.segment.rsc +1 -1
  35. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_head.segment.rsc +1 -1
  36. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_index.segment.rsc +1 -1
  37. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_tree.segment.rsc +1 -1
  38. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation/__PAGE__.segment.rsc +1 -1
  39. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation.segment.rsc +1 -1
  40. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs.segment.rsc +1 -1
  41. package/web/.next/standalone/web/.next/server/app/docs/skills.html +2 -2
  42. package/web/.next/standalone/web/.next/server/app/docs/skills.rsc +1 -1
  43. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_full.segment.rsc +1 -1
  44. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_head.segment.rsc +1 -1
  45. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_index.segment.rsc +1 -1
  46. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_tree.segment.rsc +1 -1
  47. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills/__PAGE__.segment.rsc +1 -1
  48. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills.segment.rsc +1 -1
  49. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs.segment.rsc +1 -1
  50. package/web/.next/standalone/web/.next/server/app/docs/tools.html +2 -2
  51. package/web/.next/standalone/web/.next/server/app/docs/tools.rsc +1 -1
  52. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_full.segment.rsc +1 -1
  53. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_head.segment.rsc +1 -1
  54. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_index.segment.rsc +1 -1
  55. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_tree.segment.rsc +1 -1
  56. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools/__PAGE__.segment.rsc +1 -1
  57. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools.segment.rsc +1 -1
  58. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs.segment.rsc +1 -1
  59. package/web/.next/standalone/web/.next/server/app/docs.html +2 -2
  60. package/web/.next/standalone/web/.next/server/app/docs.rsc +1 -1
  61. package/web/.next/standalone/web/.next/server/app/docs.segments/_full.segment.rsc +1 -1
  62. package/web/.next/standalone/web/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  63. package/web/.next/standalone/web/.next/server/app/docs.segments/_index.segment.rsc +1 -1
  64. package/web/.next/standalone/web/.next/server/app/docs.segments/_tree.segment.rsc +1 -1
  65. package/web/.next/standalone/web/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
  66. package/web/.next/standalone/web/.next/server/app/docs.segments/docs.segment.rsc +1 -1
  67. package/web/.next/standalone/web/.next/server/app/embed/[id]/page_client-reference-manifest.js +1 -1
  68. package/web/.next/standalone/web/.next/server/app/index.html +1 -1
  69. package/web/.next/standalone/web/.next/server/app/index.rsc +1 -1
  70. package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p/__PAGE__.segment.rsc +1 -1
  71. package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p.segment.rsc +1 -1
  72. package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
  73. package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  74. package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
  75. package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  76. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__a87e1c27._.js +1 -1
  77. package/web/.next/standalone/web/.next/server/pages/404.html +1 -1
  78. package/web/.next/standalone/web/.next/server/pages/500.html +2 -2
  79. package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -1
  80. package/web/.next/standalone/web/.next/server/server-reference-manifest.json +1 -1
  81. package/web/.next/standalone/web/.next/static/{static/chunks/1685d98ff8751ba3.js → chunks/9b4c4424a720586b.js} +6 -6
  82. package/web/.next/{static/chunks/1685d98ff8751ba3.js → standalone/web/.next/static/static/chunks/9b4c4424a720586b.js} +6 -6
  83. package/web/.next/standalone/web/src/components/chat-interface.tsx +42 -16
  84. package/web/.next/{standalone/web/.next/static/chunks/1685d98ff8751ba3.js → static/chunks/9b4c4424a720586b.js} +6 -6
  85. /package/web/.next/standalone/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_buildManifest.js +0 -0
  86. /package/web/.next/standalone/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_clientMiddlewareManifest.json +0 -0
  87. /package/web/.next/standalone/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_ssgManifest.js +0 -0
  88. /package/web/.next/standalone/web/.next/static/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_buildManifest.js +0 -0
  89. /package/web/.next/standalone/web/.next/static/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_clientMiddlewareManifest.json +0 -0
  90. /package/web/.next/standalone/web/.next/static/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_ssgManifest.js +0 -0
  91. /package/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_buildManifest.js +0 -0
  92. /package/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_clientMiddlewareManifest.json +0 -0
  93. /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
- // Create a new streaming tool call
1063
- const streamingToolCall: ToolCallInfo = {
1064
- toolCallId: event.toolCallId,
1065
- toolName: event.toolName,
1066
- input: {},
1067
- status: 'streaming' as const,
1068
- streamingArgsText: '',
1069
- };
1070
- toolCallsRef.current = [...toolCallsRef.current, streamingToolCall];
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 placeholder
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 placeholder if it exists
1129
- liveContent: placeholderWriteFile?.liveContent,
1130
- liveOldString: placeholderWriteFile?.liveOldString,
1131
- liveNewString: placeholderWriteFile?.liveNewString,
1132
- // Preserve explore steps from placeholder if it exists
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