@ottocode/web-sdk 0.1.253 → 0.1.255
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 +28 -8
- package/dist/components/index.js.map +10 -10
- package/dist/components/messages/ActionToolBox.d.ts.map +1 -1
- 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/index.d.ts.map +1 -1
- package/dist/components/ui/ToolApprovalDialog.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -5
- package/dist/hooks/index.js.map +4 -4
- package/dist/hooks/useAuthStatus.d.ts.map +1 -1
- package/dist/hooks/useConfig.d.ts.map +1 -1
- package/dist/index.js +28 -8
- package/dist/index.js.map +10 -10
- package/dist/lib/api-client/config.d.ts +0 -1
- package/dist/lib/api-client/config.d.ts.map +1 -1
- package/dist/lib/api-client/index.d.ts +0 -1
- package/dist/lib/api-client/index.d.ts.map +1 -1
- package/dist/lib/index.js +2 -3
- package/dist/lib/index.js.map +3 -3
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuthStatus.d.ts","sourceRoot":"","sources":["../../src/hooks/useAuthStatus.ts"],"names":[],"mappings":"AAOA,wBAAgB,aAAa;;;;;;;;qBAcA,CAAC;;;;gBAId,CAAA;;;yBAEiB,CAAC;4BAC7B,CAAC;kBAAqB,CAAC;;qBACZ,CAAC;;;;;;;;;wBAIJ,CAAC;;;;;;;;;+BAwCO,MAAM;;;;4BAmBR,MAAM,UAAU,MAAM;;;;8BAoB1B;QACZ,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,aAAa,EACV,mBAAmB,GACnB,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,YAAY,GACZ,QAAQ,CAAC;QACZ,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,aAAa,EAAE,OAAO,CAAC;KACvB;;;;+
|
|
1
|
+
{"version":3,"file":"useAuthStatus.d.ts","sourceRoot":"","sources":["../../src/hooks/useAuthStatus.ts"],"names":[],"mappings":"AAOA,wBAAgB,aAAa;;;;;;;;qBAcA,CAAC;;;;gBAId,CAAA;;;yBAEiB,CAAC;4BAC7B,CAAC;kBAAqB,CAAC;;qBACZ,CAAC;;;;;;;;;wBAIJ,CAAC;;;;;;;;;+BAwCO,MAAM;;;;4BAmBR,MAAM,UAAU,MAAM;;;;8BAoB1B;QACZ,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,aAAa,EACV,mBAAmB,GACnB,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,YAAY,GACZ,QAAQ,CAAC;QACZ,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,aAAa,EAAE,OAAO,CAAC;KACvB;;;;+BA6BgB,MAAM;;;;;2BAoDZ,MAAM,SAAS,MAAM;iCAuBf,MAAM,SAAS,MAAM;;;;kCAyBrB,MAAM,QAAQ,MAAM,aAAa,MAAM;;uCA0DtC,MAAM;;;;;8BAWV,MAAM;;;;;;;;;;;;;;;;;EA4DrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfig.ts"],"names":[],"mappings":"AAKA,wBAAgB,SAAS;;;;;;;oBAgCR,CAAC;kBAEE,CAAA;qBAA2B,CAAC;sBAC7C,CAAH;wBAEG,CAAF;kCACS,CAAC;;UAhCV;AAED,wBAAgB,SAAS,CAAC,QAAQ,CAAC,EAAE,MAAM;;;;gBAsCgB,CAAC;qBAE7C,CAAC;cAAoB,CAAC;kBAEnB,CAAC;YAAkB,CAAC;qBAC5B,CAAC;uBACI,CAAC;iBACK,CAAC;yBACH,CAAC;;;;;;UAxCnB;AAED,wBAAgB,YAAY,0FAK3B;AAED,wBAAgB,iBAAiB;;;;;;
|
|
1
|
+
{"version":3,"file":"useConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfig.ts"],"names":[],"mappings":"AAKA,wBAAgB,SAAS;;;;;;;oBAgCR,CAAC;kBAEE,CAAA;qBAA2B,CAAC;sBAC7C,CAAH;wBAEG,CAAF;kCACS,CAAC;;UAhCV;AAED,wBAAgB,SAAS,CAAC,QAAQ,CAAC,EAAE,MAAM;;;;gBAsCgB,CAAC;qBAE7C,CAAC;cAAoB,CAAC;kBAEnB,CAAC;YAAkB,CAAC;qBAC5B,CAAC;uBACI,CAAC;iBACK,CAAC;yBACH,CAAC;;;;;;UAxCnB;AAED,wBAAgB,YAAY,0FAK3B;AAED,wBAAgB,iBAAiB;;;;;;oBAgD2sF,CAAC;kBAAsD,CAAC;qBAA2B,CAAC;sBAA4B,CAAC;wBAA8E,CAAC;kCAAwC,CAAC;;;YA3C18F,MAAM;eACH,MAAM;YACT,MAAM;mBACC,MAAM,GAAG,WAAW,GAAG,KAAK,GAAG,MAAM;iBACvC,OAAO;oBACJ,OAAO;qBACN,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO;uBACrD,OAAO;iCACG,MAAM,GAAG,IAAI;YAClC,QAAQ,GAAG,OAAO;;;;;;;;;wBALZ,CAAC;sBAEE,CAAA;yBAA2B,CAAC;0BAC7C,CAAH;4BAEG,CAAF;sCACS,CAAC;;;GAgCV"}
|
package/dist/index.js
CHANGED
|
@@ -388,6 +388,7 @@ var TOOL_ICONS = {
|
|
|
388
388
|
edit: FileEdit,
|
|
389
389
|
multiedit: FileEdit,
|
|
390
390
|
write: FileEdit,
|
|
391
|
+
copy_into: FileEdit,
|
|
391
392
|
apply_patch: FileEdit,
|
|
392
393
|
terminal: Terminal,
|
|
393
394
|
git_commit: GitCommit,
|
|
@@ -1187,8 +1188,7 @@ var configMixin = {
|
|
|
1187
1188
|
},
|
|
1188
1189
|
async deleteProviderSettings(provider) {
|
|
1189
1190
|
const response = await apiDeleteProviderSettings({
|
|
1190
|
-
path: { provider }
|
|
1191
|
-
query: { scope: "local" }
|
|
1191
|
+
path: { provider }
|
|
1192
1192
|
});
|
|
1193
1193
|
if (response.error)
|
|
1194
1194
|
throw new Error(extractErrorMessage(response.error));
|
|
@@ -6953,6 +6953,7 @@ function normalizeToolTarget(toolName, args) {
|
|
|
6953
6953
|
edit: ["path"],
|
|
6954
6954
|
multiedit: ["path"],
|
|
6955
6955
|
write: ["path"],
|
|
6956
|
+
copy_into: ["targetPath", "sourcePath"],
|
|
6956
6957
|
apply_patch: ["path"],
|
|
6957
6958
|
glob: ["pattern"],
|
|
6958
6959
|
grep: ["query", "pattern"],
|
|
@@ -7061,10 +7062,11 @@ var ToolApprovalCard = memo7(function ToolApprovalCard2({
|
|
|
7061
7062
|
})
|
|
7062
7063
|
});
|
|
7063
7064
|
}
|
|
7064
|
-
if ((toolName === "edit" || toolName === "multiedit") && (primary?.value || filePath)) {
|
|
7065
|
+
if ((toolName === "edit" || toolName === "multiedit" || toolName === "copy_into") && (primary?.value || filePath)) {
|
|
7066
|
+
const message = toolName === "copy_into" ? `Lines ${String(args?.startLine ?? "?")}-${String(args?.endLine ?? "?")} from ${String(args?.sourcePath ?? "source")} will be copied into this file.` : toolName === "multiedit" ? "Multiple exact replacements will be applied atomically." : "An exact text replacement will be applied to this file.";
|
|
7065
7067
|
return /* @__PURE__ */ jsx24("div", {
|
|
7066
7068
|
className: "ml-6 text-xs text-muted-foreground",
|
|
7067
|
-
children:
|
|
7069
|
+
children: message
|
|
7068
7070
|
});
|
|
7069
7071
|
}
|
|
7070
7072
|
if (isShellTool(normalizedToolName) && args?.cmd) {
|
|
@@ -11072,6 +11074,7 @@ var TOOL_NAME_ALIASES = {
|
|
|
11072
11074
|
Edit: "edit",
|
|
11073
11075
|
MultiEdit: "multiedit",
|
|
11074
11076
|
Write: "write",
|
|
11077
|
+
CopyInto: "copy_into",
|
|
11075
11078
|
Ls: "ls",
|
|
11076
11079
|
Tree: "tree",
|
|
11077
11080
|
Cd: "cd",
|
|
@@ -11102,6 +11105,7 @@ var COMPACT_DETAIL_TOOL_NAMES = new Set([
|
|
|
11102
11105
|
"edit",
|
|
11103
11106
|
"multiedit",
|
|
11104
11107
|
"write",
|
|
11108
|
+
"copy_into",
|
|
11105
11109
|
"apply_patch",
|
|
11106
11110
|
"terminal"
|
|
11107
11111
|
]);
|
|
@@ -11140,6 +11144,7 @@ function ToolResultRenderer({
|
|
|
11140
11144
|
});
|
|
11141
11145
|
case "edit":
|
|
11142
11146
|
case "multiedit":
|
|
11147
|
+
case "copy_into":
|
|
11143
11148
|
return /* @__PURE__ */ jsx53(ApplyPatchRenderer, {
|
|
11144
11149
|
...props,
|
|
11145
11150
|
toolName: normalizedName
|
|
@@ -11435,7 +11440,7 @@ var MessagePartItem = memo8(function MessagePartItem2({
|
|
|
11435
11440
|
return /* @__PURE__ */ jsx54(FileText5, {
|
|
11436
11441
|
className: "h-4 w-4 text-blue-600 dark:text-blue-300"
|
|
11437
11442
|
});
|
|
11438
|
-
if (toolName === "write")
|
|
11443
|
+
if (toolName === "write" || toolName === "copy_into")
|
|
11439
11444
|
return /* @__PURE__ */ jsx54(FileEdit2, {
|
|
11440
11445
|
className: "h-4 w-4 text-emerald-600 dark:text-emerald-300"
|
|
11441
11446
|
});
|
|
@@ -12356,6 +12361,11 @@ var TOOL_CONFIG = {
|
|
|
12356
12361
|
color: "text-purple-600 dark:text-purple-300",
|
|
12357
12362
|
label: "Editing"
|
|
12358
12363
|
},
|
|
12364
|
+
copy_into: {
|
|
12365
|
+
Icon: FileEdit3,
|
|
12366
|
+
color: "text-purple-600 dark:text-purple-300",
|
|
12367
|
+
label: "Copying"
|
|
12368
|
+
},
|
|
12359
12369
|
terminal: {
|
|
12360
12370
|
Icon: Terminal6,
|
|
12361
12371
|
color: "text-amber-600 dark:text-amber-300",
|
|
@@ -12379,6 +12389,8 @@ function getTargetFromArgs(toolName, args) {
|
|
|
12379
12389
|
return String(args.path || "");
|
|
12380
12390
|
if (toolName === "edit" || toolName === "multiedit")
|
|
12381
12391
|
return String(args.path || "");
|
|
12392
|
+
if (toolName === "copy_into")
|
|
12393
|
+
return String(args.targetPath || "");
|
|
12382
12394
|
if (toolName === "apply_patch") {
|
|
12383
12395
|
const patch = String(args.patch || "");
|
|
12384
12396
|
return getPatchTarget(patch) || "";
|
|
@@ -12398,6 +12410,9 @@ function getTargetFromStream(toolName, raw) {
|
|
|
12398
12410
|
if (toolName === "edit" || toolName === "multiedit") {
|
|
12399
12411
|
return extractJsonStringField(raw, "path");
|
|
12400
12412
|
}
|
|
12413
|
+
if (toolName === "copy_into") {
|
|
12414
|
+
return extractJsonStringField(raw, "targetPath");
|
|
12415
|
+
}
|
|
12401
12416
|
if (toolName === "apply_patch") {
|
|
12402
12417
|
const m = raw.match(/\*\*\*\s+(?:Update|Add|Delete|Replace in):\s+(.+?)(?:\\n|")/);
|
|
12403
12418
|
return m ? m[1].trim() : "";
|
|
@@ -12659,6 +12674,8 @@ function getContentFromArgs(toolName, args) {
|
|
|
12659
12674
|
return String(args.oldString || "");
|
|
12660
12675
|
if (toolName === "multiedit")
|
|
12661
12676
|
return "";
|
|
12677
|
+
if (toolName === "copy_into")
|
|
12678
|
+
return "";
|
|
12662
12679
|
return "";
|
|
12663
12680
|
}
|
|
12664
12681
|
function extractJsonStringField(raw, field) {
|
|
@@ -12706,6 +12723,8 @@ function getContentFromStream(toolName, raw) {
|
|
|
12706
12723
|
return extractJsonStringField(raw, "oldString");
|
|
12707
12724
|
if (toolName === "multiedit")
|
|
12708
12725
|
return "";
|
|
12726
|
+
if (toolName === "copy_into")
|
|
12727
|
+
return "";
|
|
12709
12728
|
return "";
|
|
12710
12729
|
}
|
|
12711
12730
|
|
|
@@ -13064,6 +13083,7 @@ var AssistantMessageGroup = memo9(function AssistantMessageGroup2({
|
|
|
13064
13083
|
"edit",
|
|
13065
13084
|
"multiedit",
|
|
13066
13085
|
"write",
|
|
13086
|
+
"copy_into",
|
|
13067
13087
|
"apply_patch",
|
|
13068
13088
|
"terminal"
|
|
13069
13089
|
].includes(part.toolName || "")).map((part) => part.toolCallId).filter((callId) => Boolean(callId)));
|
|
@@ -13265,6 +13285,7 @@ var AssistantMessageGroup = memo9(function AssistantMessageGroup2({
|
|
|
13265
13285
|
"edit",
|
|
13266
13286
|
"multiedit",
|
|
13267
13287
|
"write",
|
|
13288
|
+
"copy_into",
|
|
13268
13289
|
"apply_patch",
|
|
13269
13290
|
"terminal"
|
|
13270
13291
|
].includes(part.toolName || "");
|
|
@@ -21358,8 +21379,7 @@ function useAuthStatus() {
|
|
|
21358
21379
|
...data.apiKey ? { apiKey: data.apiKey } : {},
|
|
21359
21380
|
compatibility: data.compatibility,
|
|
21360
21381
|
models: data.models,
|
|
21361
|
-
allowAnyModel: data.allowAnyModel
|
|
21362
|
-
scope: "local"
|
|
21382
|
+
allowAnyModel: data.allowAnyModel
|
|
21363
21383
|
});
|
|
21364
21384
|
await fetchAuthStatus();
|
|
21365
21385
|
return result;
|
|
@@ -28297,4 +28317,4 @@ export {
|
|
|
28297
28317
|
API_BASE_URL
|
|
28298
28318
|
};
|
|
28299
28319
|
|
|
28300
|
-
//# debugId=
|
|
28320
|
+
//# debugId=0D6593457D16E9FE64756E2164756E21
|