@blade-hq/agent-react 2610.0.0-beta.37 → 2610.0.0-beta.39
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/README.md +1 -1
- package/dist/embed/entry.d.ts +2 -0
- package/dist/index.js +20 -4
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.d.ts +3 -1
- package/dist/style.full.css +1 -1
- package/package.json +2 -2
- package/public-api.md +4 -0
package/README.md
CHANGED
|
@@ -187,7 +187,7 @@ await replay.exitToAutonomous() // 退出回放,之后真的运
|
|
|
187
187
|
|
|
188
188
|
记忆引用提示可通过 `MemoryRefsHint` 展示,`collectMemoryRefs` 用于从一轮消息中聚合引用,保证宿主自定义消息布局与 SDK 默认界面保持一致。
|
|
189
189
|
|
|
190
|
-
`onFollowupInteraction` 使用 `FollowupInteractionEvent`,覆盖下一步建议展示/采纳、成果展示/打开/下载以及结果评分。SDK
|
|
190
|
+
`onFollowupInteraction` 使用 `FollowupInteractionEvent`,覆盖下一步建议展示/采纳、成果展示/打开/下载以及结果评分。SDK 不内置分析服务;宿主回调抛错也不会中断用户点击或下载。
|
|
191
191
|
文件成果以文件名为文本的标准下载链接展示;Vue / 纯 HTML 使用的 `<blade-chat>` 与 `ChatView` 行为一致。
|
|
192
192
|
|
|
193
193
|
- 必须引入一份样式,按宿主有没有 Tailwind 二选一:
|
package/dist/embed/entry.d.ts
CHANGED
|
@@ -92,6 +92,8 @@ declare const BladeAgent: {
|
|
|
92
92
|
daemon_id?: string | null | undefined;
|
|
93
93
|
agent_runtime_id?: string | null | undefined;
|
|
94
94
|
workspace_path?: string | null | undefined;
|
|
95
|
+
ba_version?: string | null | undefined;
|
|
96
|
+
sandbox_version?: string | null | undefined;
|
|
95
97
|
match?: unknown;
|
|
96
98
|
}, {}>;
|
|
97
99
|
SessionStatus: import("arktype/internal/variants/string.ts").StringType<"completed" | "created" | "failed" | "interrupted" | "running" | "waiting_for_input", {}>;
|
package/dist/index.js
CHANGED
|
@@ -1151,12 +1151,28 @@ function cn(...inputs) {
|
|
|
1151
1151
|
return clsx(inputs);
|
|
1152
1152
|
}
|
|
1153
1153
|
async function copyToClipboard(text) {
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1154
|
+
const clipboard = typeof navigator !== "undefined" ? navigator.clipboard : void 0;
|
|
1155
|
+
if (clipboard && typeof clipboard.writeText === "function") {
|
|
1156
|
+
try {
|
|
1157
|
+
await clipboard.writeText(text);
|
|
1158
|
+
return true;
|
|
1159
|
+
} catch {
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
if (typeof document === "undefined" || typeof document.execCommand !== "function") {
|
|
1158
1163
|
return false;
|
|
1159
1164
|
}
|
|
1165
|
+
const textarea = document.createElement("textarea");
|
|
1166
|
+
textarea.value = text;
|
|
1167
|
+
textarea.style.position = "fixed";
|
|
1168
|
+
textarea.style.opacity = "0";
|
|
1169
|
+
document.body.appendChild(textarea);
|
|
1170
|
+
textarea.select();
|
|
1171
|
+
try {
|
|
1172
|
+
return document.execCommand("copy");
|
|
1173
|
+
} finally {
|
|
1174
|
+
document.body.removeChild(textarea);
|
|
1175
|
+
}
|
|
1160
1176
|
}
|
|
1161
1177
|
|
|
1162
1178
|
// src/components/ReplayBar.tsx
|