@ottocode/web-sdk 0.1.236 → 0.1.237
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/components/index.js +43 -6
- package/dist/components/index.js.map +7 -7
- package/dist/components/messages/AssistantMessageGroup.d.ts.map +1 -1
- package/dist/components/messages/ToolApprovalCard.d.ts.map +1 -1
- package/dist/components/messages/renderers/ApplyPatchRenderer.d.ts +2 -2
- package/dist/components/messages/renderers/ApplyPatchRenderer.d.ts.map +1 -1
- package/dist/components/messages/renderers/index.d.ts.map +1 -1
- package/dist/components/ui/ToolApprovalDialog.d.ts.map +1 -1
- package/dist/index.js +43 -6
- package/dist/index.js.map +7 -7
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantMessageGroup.d.ts","sourceRoot":"","sources":["../../../src/components/messages/AssistantMessageGroup.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAe,MAAM,iBAAiB,CAAC;AAe5D,UAAU,0BAA0B;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,uBAAuB,EAAE,OAAO,CAAC;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAiCD,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"AssistantMessageGroup.d.ts","sourceRoot":"","sources":["../../../src/components/messages/AssistantMessageGroup.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAe,MAAM,iBAAiB,CAAC;AAe5D,UAAU,0BAA0B;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,uBAAuB,EAAE,OAAO,CAAC;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAiCD,eAAO,MAAM,qBAAqB,kEAihBjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolApprovalCard.d.ts","sourceRoot":"","sources":["../../../src/components/messages/ToolApprovalCard.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAG1E,UAAU,qBAAqB;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAC1C,eAAe,EAAE,mBAAmB,CAAC;IACrC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD;
|
|
1
|
+
{"version":3,"file":"ToolApprovalCard.d.ts","sourceRoot":"","sources":["../../../src/components/messages/ToolApprovalCard.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAG1E,UAAU,qBAAqB;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAC1C,eAAe,EAAE,mBAAmB,CAAC;IACrC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD;AA0FD,eAAO,MAAM,gBAAgB,6DAgK3B,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function ApplyPatchRenderer({ contentJson, toolDurationMs, isExpanded, onToggle, }:
|
|
1
|
+
import type { GenericRendererProps } from './types';
|
|
2
|
+
export declare function ApplyPatchRenderer({ contentJson, toolDurationMs, isExpanded, onToggle, toolName, }: GenericRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=ApplyPatchRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplyPatchRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/renderers/ApplyPatchRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ApplyPatchRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/renderers/ApplyPatchRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAqBpD,wBAAgB,kBAAkB,CAAC,EAClC,WAAW,EACX,cAAc,EACd,UAAU,EACV,QAAQ,EACR,QAAQ,GACR,EAAE,oBAAoB,2CAwJtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/renderers/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAwB3C,UAAU,uBAAuB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/renderers/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAwB3C,UAAU,uBAAuB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAqDD,wBAAgB,kBAAkB,CAAC,EAClC,QAAQ,EACR,WAAW,EACX,cAAc,EACd,KAAK,EACL,mBAAmB,EACnB,OAAO,EACP,SAAS,EACT,OAAO,EACP,SAAS,GACT,EAAE,uBAAuB,2CAyFzB;AAED,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolApprovalDialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/ToolApprovalDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ToolApprovalDialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/ToolApprovalDialog.tsx"],"names":[],"mappings":"AAeA,UAAU,uBAAuB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAAC,EAClC,OAAO,EACP,SAAS,GACT,EAAE,uBAAuB,2CAkGzB"}
|
package/dist/index.js
CHANGED
|
@@ -384,6 +384,8 @@ import { Shield, Check, X as X2, Terminal, FileEdit, GitCommit } from "lucide-re
|
|
|
384
384
|
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
385
385
|
var TOOL_ICONS = {
|
|
386
386
|
bash: Terminal,
|
|
387
|
+
edit: FileEdit,
|
|
388
|
+
multiedit: FileEdit,
|
|
387
389
|
write: FileEdit,
|
|
388
390
|
apply_patch: FileEdit,
|
|
389
391
|
terminal: Terminal,
|
|
@@ -6456,6 +6458,8 @@ function normalizeToolTarget(toolName, args) {
|
|
|
6456
6458
|
return null;
|
|
6457
6459
|
const keyMap = {
|
|
6458
6460
|
read: ["path"],
|
|
6461
|
+
edit: ["path"],
|
|
6462
|
+
multiedit: ["path"],
|
|
6459
6463
|
write: ["path"],
|
|
6460
6464
|
apply_patch: ["path"],
|
|
6461
6465
|
glob: ["pattern"],
|
|
@@ -6563,6 +6567,12 @@ var ToolApprovalCard = memo6(function ToolApprovalCard2({
|
|
|
6563
6567
|
})
|
|
6564
6568
|
});
|
|
6565
6569
|
}
|
|
6570
|
+
if ((toolName === "edit" || toolName === "multiedit") && (primary?.value || filePath)) {
|
|
6571
|
+
return /* @__PURE__ */ jsx23("div", {
|
|
6572
|
+
className: "ml-6 text-xs text-muted-foreground",
|
|
6573
|
+
children: toolName === "multiedit" ? "Multiple exact replacements will be applied atomically." : "An exact text replacement will be applied to this file."
|
|
6574
|
+
});
|
|
6575
|
+
}
|
|
6566
6576
|
if (toolName === "bash" && args?.cmd) {
|
|
6567
6577
|
const cmd = String(args.cmd);
|
|
6568
6578
|
return /* @__PURE__ */ jsx23("div", {
|
|
@@ -7757,7 +7767,8 @@ function ApplyPatchRenderer({
|
|
|
7757
7767
|
contentJson,
|
|
7758
7768
|
toolDurationMs,
|
|
7759
7769
|
isExpanded,
|
|
7760
|
-
onToggle
|
|
7770
|
+
onToggle,
|
|
7771
|
+
toolName
|
|
7761
7772
|
}) {
|
|
7762
7773
|
const artifact = contentJson.artifact;
|
|
7763
7774
|
const timeStr = formatDuration(toolDurationMs);
|
|
@@ -7783,7 +7794,9 @@ function ApplyPatchRenderer({
|
|
|
7783
7794
|
const deletions = Number(summary.deletions || 0);
|
|
7784
7795
|
const patch = artifact?.patch ? String(artifact.patch) : "";
|
|
7785
7796
|
const changes = Array.isArray(contentJson.result?.changes) ? contentJson.result?.changes : [];
|
|
7786
|
-
const
|
|
7797
|
+
const rendererToolName = toolName || contentJson.name || "apply_patch";
|
|
7798
|
+
const titleLabel = rendererToolName.replace(/_/g, " ");
|
|
7799
|
+
const singleFilePath = files === 1 ? changes[0]?.filePath || (typeof contentJson.result?.path === "string" ? contentJson.result.path : typeof contentJson.args?.path === "string" ? contentJson.args.path : null) : null;
|
|
7787
7800
|
const hasError = contentJson.error || contentJson.result && "ok" in contentJson.result && contentJson.result.ok === false;
|
|
7788
7801
|
const errorMessage = typeof contentJson.error === "string" ? contentJson.error : contentJson.result && ("error" in contentJson.result) && typeof contentJson.result.error === "string" ? contentJson.result.error : null;
|
|
7789
7802
|
const errorStack = contentJson.result && typeof contentJson.result === "object" && "stack" in contentJson.result && typeof contentJson.result.stack === "string" ? contentJson.result.stack : undefined;
|
|
@@ -7801,7 +7814,7 @@ function ApplyPatchRenderer({
|
|
|
7801
7814
|
/* @__PURE__ */ jsxs28("span", {
|
|
7802
7815
|
className: "font-medium flex-shrink-0",
|
|
7803
7816
|
children: [
|
|
7804
|
-
|
|
7817
|
+
titleLabel,
|
|
7805
7818
|
hasError ? " error" : ""
|
|
7806
7819
|
]
|
|
7807
7820
|
}),
|
|
@@ -10562,6 +10575,8 @@ function ReasoningRenderer({ part }) {
|
|
|
10562
10575
|
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
10563
10576
|
var TOOL_NAME_ALIASES = {
|
|
10564
10577
|
Read: "read",
|
|
10578
|
+
Edit: "edit",
|
|
10579
|
+
MultiEdit: "multiedit",
|
|
10565
10580
|
Write: "write",
|
|
10566
10581
|
Ls: "ls",
|
|
10567
10582
|
Tree: "tree",
|
|
@@ -10588,6 +10603,8 @@ function normalizeToolName(name) {
|
|
|
10588
10603
|
}
|
|
10589
10604
|
var COMPACT_DETAIL_TOOL_NAMES = new Set([
|
|
10590
10605
|
"bash",
|
|
10606
|
+
"edit",
|
|
10607
|
+
"multiedit",
|
|
10591
10608
|
"write",
|
|
10592
10609
|
"apply_patch",
|
|
10593
10610
|
"terminal"
|
|
@@ -10625,6 +10642,12 @@ function ToolResultRenderer({
|
|
|
10625
10642
|
return /* @__PURE__ */ jsx52(ReadRenderer, {
|
|
10626
10643
|
...props
|
|
10627
10644
|
});
|
|
10645
|
+
case "edit":
|
|
10646
|
+
case "multiedit":
|
|
10647
|
+
return /* @__PURE__ */ jsx52(ApplyPatchRenderer, {
|
|
10648
|
+
...props,
|
|
10649
|
+
toolName: normalizedName
|
|
10650
|
+
});
|
|
10628
10651
|
case "write":
|
|
10629
10652
|
return /* @__PURE__ */ jsx52(WriteRenderer, {
|
|
10630
10653
|
...props
|
|
@@ -12501,7 +12524,14 @@ var AssistantMessageGroup = memo8(function AssistantMessageGroup2({
|
|
|
12501
12524
|
const hasFinish = parts.some((part) => part.toolName === "finish");
|
|
12502
12525
|
const latestProgressUpdateIndex = parts.reduce((lastIndex, part, index) => part.type === "tool_result" && part.toolName === "progress_update" ? index : lastIndex, -1);
|
|
12503
12526
|
const latestProgressUpdatePart = latestProgressUpdateIndex >= 0 ? parts[latestProgressUpdateIndex] : null;
|
|
12504
|
-
const liveActionToolCallIds = new Set(parts.filter((part) => part.ephemeral && [
|
|
12527
|
+
const liveActionToolCallIds = new Set(parts.filter((part) => part.ephemeral && [
|
|
12528
|
+
"bash",
|
|
12529
|
+
"edit",
|
|
12530
|
+
"multiedit",
|
|
12531
|
+
"write",
|
|
12532
|
+
"apply_patch",
|
|
12533
|
+
"terminal"
|
|
12534
|
+
].includes(part.toolName || "")).map((part) => part.toolCallId).filter((callId) => Boolean(callId)));
|
|
12505
12535
|
const renderItems = useMemo10(() => {
|
|
12506
12536
|
const items = [];
|
|
12507
12537
|
let compactBuffer = [];
|
|
@@ -12694,7 +12724,14 @@ var AssistantMessageGroup = memo8(function AssistantMessageGroup2({
|
|
|
12694
12724
|
}
|
|
12695
12725
|
const { part, index } = item;
|
|
12696
12726
|
const isLastPart = index === parts.length - 1;
|
|
12697
|
-
const isActionTool = part.ephemeral && (part.type === "tool_call" || part.type === "tool_result") && [
|
|
12727
|
+
const isActionTool = part.ephemeral && (part.type === "tool_call" || part.type === "tool_result") && [
|
|
12728
|
+
"bash",
|
|
12729
|
+
"edit",
|
|
12730
|
+
"multiedit",
|
|
12731
|
+
"write",
|
|
12732
|
+
"apply_patch",
|
|
12733
|
+
"terminal"
|
|
12734
|
+
].includes(part.toolName || "");
|
|
12698
12735
|
if (isActionTool) {
|
|
12699
12736
|
return /* @__PURE__ */ jsx57(ActionToolBox, {
|
|
12700
12737
|
part,
|
|
@@ -26799,4 +26836,4 @@ export {
|
|
|
26799
26836
|
API_BASE_URL
|
|
26800
26837
|
};
|
|
26801
26838
|
|
|
26802
|
-
//# debugId=
|
|
26839
|
+
//# debugId=0FDB04F784CC095A64756E2164756E21
|