@arbidocs/sdk 0.3.132 → 0.3.133
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/{browser-B1XvwSa9.d.cts → browser-BSWvYcjS.d.cts} +8 -0
- package/dist/{browser-B1XvwSa9.d.ts → browser-BSWvYcjS.d.ts} +8 -0
- package/dist/browser.cjs +11 -10
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +11 -10
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +11 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -10
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -4187,14 +4187,10 @@ async function resolveWorkspace(store, workspaceOpt) {
|
|
|
4187
4187
|
}
|
|
4188
4188
|
|
|
4189
4189
|
// src/sse.ts
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
interjection: "Your message",
|
|
4195
|
-
planning: "Planning",
|
|
4196
|
-
tool_progress: "Working"
|
|
4197
|
-
};
|
|
4190
|
+
function humanizeStep(identifier) {
|
|
4191
|
+
const spaced = identifier.replace(/[_-]+/g, " ").trim();
|
|
4192
|
+
return spaced.charAt(0).toUpperCase() + spaced.slice(1);
|
|
4193
|
+
}
|
|
4198
4194
|
function buildDocNameMap(docs) {
|
|
4199
4195
|
const map = {};
|
|
4200
4196
|
for (const doc of docs) {
|
|
@@ -4247,13 +4243,13 @@ function formatAgentStepLabel(step, docNames) {
|
|
|
4247
4243
|
if (step.label) return `${step.label}${suffix}`;
|
|
4248
4244
|
const detail = step.detail;
|
|
4249
4245
|
if (step.step === "tool_progress" && detail && detail.length > 0) {
|
|
4250
|
-
const label = detail[0].label ||
|
|
4246
|
+
const label = detail[0].label || humanizeStep(step.step);
|
|
4251
4247
|
if (suffix) return `${label}${suffix}`;
|
|
4252
4248
|
const message = detail[0].message;
|
|
4253
4249
|
return message ? `${label}: ${resolveDocRefs(message, docNames)}` : label;
|
|
4254
4250
|
}
|
|
4255
4251
|
if (step.step) {
|
|
4256
|
-
return
|
|
4252
|
+
return humanizeStep(step.step);
|
|
4257
4253
|
}
|
|
4258
4254
|
if (detail && detail.length > 0) {
|
|
4259
4255
|
if (detail[0].label) return `${detail[0].label}${suffix}`;
|
|
@@ -4376,6 +4372,11 @@ async function streamSSE(response, callbacks = {}) {
|
|
|
4376
4372
|
callbacks.onAgentStep?.(data);
|
|
4377
4373
|
if (data.t != null) callbacks.onElapsedTime?.(data.t);
|
|
4378
4374
|
},
|
|
4375
|
+
"arbi.generating": (raw) => {
|
|
4376
|
+
const data = JSON.parse(raw);
|
|
4377
|
+
callbacks.onGenerating?.(data);
|
|
4378
|
+
if (data.t != null) callbacks.onElapsedTime?.(data.t);
|
|
4379
|
+
},
|
|
4379
4380
|
"arbi.agent_step_delta": (raw) => {
|
|
4380
4381
|
const data = JSON.parse(raw);
|
|
4381
4382
|
callbacks.onAgentStepDelta?.(data);
|