sparkecoder 0.1.76 → 0.1.77
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.d.ts +3 -3
- package/dist/agent/index.js +9 -3
- package/dist/agent/index.js.map +1 -1
- package/dist/cli.js +20 -8
- package/dist/cli.js.map +1 -1
- package/dist/db/index.d.ts +2 -2
- package/dist/{index-DRscBFFX.d.ts → index-DT1l57s0.d.ts} +25 -25
- package/dist/index.d.ts +5 -5
- package/dist/index.js +20 -8
- package/dist/index.js.map +1 -1
- package/dist/{schema-C7Mm4Ykn.d.ts → schema-XcP0dedO.d.ts} +3 -3
- package/dist/{search-CVVfuBPZ.d.ts → search-CCffrVJE.d.ts} +4 -4
- package/dist/server/index.js +20 -8
- package/dist/server/index.js.map +1 -1
- package/dist/tools/index.d.ts +3 -3
- 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/_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/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/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/package-lock.json +3 -3
- /package/web/.next/standalone/web/.next/static/{nZpzcWd5nqIPZFd3PiefU → jEMyQksXLQ60IvC0f9PYc}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{nZpzcWd5nqIPZFd3PiefU → jEMyQksXLQ60IvC0f9PYc}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{nZpzcWd5nqIPZFd3PiefU → jEMyQksXLQ60IvC0f9PYc}/_ssgManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{nZpzcWd5nqIPZFd3PiefU → jEMyQksXLQ60IvC0f9PYc}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{nZpzcWd5nqIPZFd3PiefU → jEMyQksXLQ60IvC0f9PYc}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/static/{nZpzcWd5nqIPZFd3PiefU → jEMyQksXLQ60IvC0f9PYc}/_ssgManifest.js +0 -0
- /package/web/.next/static/{nZpzcWd5nqIPZFd3PiefU → jEMyQksXLQ60IvC0f9PYc}/_buildManifest.js +0 -0
- /package/web/.next/static/{nZpzcWd5nqIPZFd3PiefU → jEMyQksXLQ60IvC0f9PYc}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{nZpzcWd5nqIPZFd3PiefU → jEMyQksXLQ60IvC0f9PYc}/_ssgManifest.js +0 -0
package/dist/cli.js
CHANGED
|
@@ -7619,6 +7619,13 @@ function truncateWriteFileInput(input) {
|
|
|
7619
7619
|
return out;
|
|
7620
7620
|
}
|
|
7621
7621
|
var approvalResolvers = /* @__PURE__ */ new Map();
|
|
7622
|
+
function stripDataUrlPrefix(data) {
|
|
7623
|
+
const commaIdx = data.indexOf(",");
|
|
7624
|
+
if (commaIdx !== -1 && data.startsWith("data:")) {
|
|
7625
|
+
return data.slice(commaIdx + 1);
|
|
7626
|
+
}
|
|
7627
|
+
return data;
|
|
7628
|
+
}
|
|
7622
7629
|
var Agent = class _Agent {
|
|
7623
7630
|
session;
|
|
7624
7631
|
context;
|
|
@@ -7719,8 +7726,7 @@ ${prompt}` });
|
|
|
7719
7726
|
if (attachment.type === "image") {
|
|
7720
7727
|
contentParts.push({
|
|
7721
7728
|
type: "image",
|
|
7722
|
-
image: attachment.data,
|
|
7723
|
-
// base64 data URL or raw base64
|
|
7729
|
+
image: stripDataUrlPrefix(attachment.data),
|
|
7724
7730
|
mediaType: attachment.mediaType,
|
|
7725
7731
|
filename: attachment.filename,
|
|
7726
7732
|
savedPath: attachment.savedPath
|
|
@@ -7728,7 +7734,7 @@ ${prompt}` });
|
|
|
7728
7734
|
} else {
|
|
7729
7735
|
contentParts.push({
|
|
7730
7736
|
type: "file",
|
|
7731
|
-
data: attachment.data,
|
|
7737
|
+
data: stripDataUrlPrefix(attachment.data),
|
|
7732
7738
|
mediaType: attachment.mediaType || "application/octet-stream",
|
|
7733
7739
|
filename: attachment.filename,
|
|
7734
7740
|
savedPath: attachment.savedPath
|
|
@@ -9405,6 +9411,13 @@ async function saveAttachmentToDisk(sessionId, attachment, index) {
|
|
|
9405
9411
|
writeFileSync4(filePath, buffer);
|
|
9406
9412
|
return filePath;
|
|
9407
9413
|
}
|
|
9414
|
+
function stripDataUrlPrefix2(data) {
|
|
9415
|
+
const commaIdx = data.indexOf(",");
|
|
9416
|
+
if (commaIdx !== -1 && data.startsWith("data:")) {
|
|
9417
|
+
return data.slice(commaIdx + 1);
|
|
9418
|
+
}
|
|
9419
|
+
return data;
|
|
9420
|
+
}
|
|
9408
9421
|
function getExtensionFromMediaType(mediaType, type) {
|
|
9409
9422
|
if (!mediaType) {
|
|
9410
9423
|
return type === "image" ? ".png" : ".bin";
|
|
@@ -9496,7 +9509,7 @@ ${prompt}` });
|
|
|
9496
9509
|
if (attachment.type === "image") {
|
|
9497
9510
|
contentParts.push({
|
|
9498
9511
|
type: "image",
|
|
9499
|
-
image: attachment.data,
|
|
9512
|
+
image: stripDataUrlPrefix2(attachment.data),
|
|
9500
9513
|
mediaType: attachment.mediaType,
|
|
9501
9514
|
filename: attachment.filename,
|
|
9502
9515
|
savedPath: attachment.savedPath
|
|
@@ -9504,7 +9517,7 @@ ${prompt}` });
|
|
|
9504
9517
|
} else {
|
|
9505
9518
|
contentParts.push({
|
|
9506
9519
|
type: "file",
|
|
9507
|
-
data: attachment.data,
|
|
9520
|
+
data: stripDataUrlPrefix2(attachment.data),
|
|
9508
9521
|
mediaType: attachment.mediaType || "application/octet-stream",
|
|
9509
9522
|
filename: attachment.filename,
|
|
9510
9523
|
savedPath: attachment.savedPath
|
|
@@ -9791,8 +9804,7 @@ ${prompt}` });
|
|
|
9791
9804
|
if (attachment.type === "image") {
|
|
9792
9805
|
contentParts.push({
|
|
9793
9806
|
type: "image",
|
|
9794
|
-
image: attachment.data,
|
|
9795
|
-
// base64 data URL or raw base64
|
|
9807
|
+
image: stripDataUrlPrefix2(attachment.data),
|
|
9796
9808
|
mediaType: attachment.mediaType,
|
|
9797
9809
|
filename: attachment.filename,
|
|
9798
9810
|
savedPath: attachment.savedPath
|
|
@@ -9800,7 +9812,7 @@ ${prompt}` });
|
|
|
9800
9812
|
} else {
|
|
9801
9813
|
contentParts.push({
|
|
9802
9814
|
type: "file",
|
|
9803
|
-
data: attachment.data,
|
|
9815
|
+
data: stripDataUrlPrefix2(attachment.data),
|
|
9804
9816
|
mediaType: attachment.mediaType || "application/octet-stream",
|
|
9805
9817
|
filename: attachment.filename,
|
|
9806
9818
|
savedPath: attachment.savedPath
|