@get-bb/plugin-sdk 0.4.108 → 0.5.9
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 +4 -3
- package/bundled-types/bb-plugin-sdk-app.d.ts +16711 -313
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +48 -2
- package/bundled-types/bb-plugin-sdk.d.ts +4321 -4052
- package/dist/app.js +19 -1
- package/dist/host.js +60 -13827
- package/dist/internal/composer-customization-validation.js +0 -7
- package/dist/internal/plugin-app-collector.js +15 -13793
- package/dist/provider-bridge-acp.js +461 -183
- package/dist/provider-bridge.js +19 -2
- package/dist/testing/app.js +261 -13951
- package/package.json +6 -8
package/dist/provider-bridge.js
CHANGED
|
@@ -4282,6 +4282,23 @@ function shouldAutoDenyInteractiveRequest(policy) {
|
|
|
4282
4282
|
return policy.permissionEscalation === "deny";
|
|
4283
4283
|
}
|
|
4284
4284
|
|
|
4285
|
+
// ../text-utils/src/utf16.ts
|
|
4286
|
+
function isHighSurrogateAt(value, index) {
|
|
4287
|
+
const code = value.charCodeAt(index);
|
|
4288
|
+
return code >= 55296 && code <= 56319;
|
|
4289
|
+
}
|
|
4290
|
+
function isLowSurrogateAt(value, index) {
|
|
4291
|
+
const code = value.charCodeAt(index);
|
|
4292
|
+
return code >= 56320 && code <= 57343;
|
|
4293
|
+
}
|
|
4294
|
+
function sliceUtf16Head(value, maxChars) {
|
|
4295
|
+
let end = Math.min(value.length, Math.max(0, maxChars));
|
|
4296
|
+
if (isHighSurrogateAt(value, end - 1) && isLowSurrogateAt(value, end)) {
|
|
4297
|
+
end -= 1;
|
|
4298
|
+
}
|
|
4299
|
+
return value.slice(0, end);
|
|
4300
|
+
}
|
|
4301
|
+
|
|
4285
4302
|
// ../provider-bridge-protocol/src/bridge-kit/presentation.ts
|
|
4286
4303
|
var PRESENTATION_TITLE_MAX_LENGTH = 160;
|
|
4287
4304
|
function presentationTitle(text) {
|
|
@@ -4289,10 +4306,10 @@ function presentationTitle(text) {
|
|
|
4289
4306
|
if (firstLine2.length === 0) {
|
|
4290
4307
|
return void 0;
|
|
4291
4308
|
}
|
|
4292
|
-
return firstLine2.length > PRESENTATION_TITLE_MAX_LENGTH ? `${firstLine2
|
|
4309
|
+
return firstLine2.length > PRESENTATION_TITLE_MAX_LENGTH ? `${sliceUtf16Head(firstLine2, PRESENTATION_TITLE_MAX_LENGTH - 1)}\u2026` : firstLine2;
|
|
4293
4310
|
}
|
|
4294
4311
|
function presentationDetail(text) {
|
|
4295
|
-
return text.length > THREAD_EVENT_ITEM_PRESENTATION_DETAIL_MAX_LENGTH ? `${text
|
|
4312
|
+
return text.length > THREAD_EVENT_ITEM_PRESENTATION_DETAIL_MAX_LENGTH ? `${sliceUtf16Head(text, THREAD_EVENT_ITEM_PRESENTATION_DETAIL_MAX_LENGTH - 1)}\u2026` : text;
|
|
4296
4313
|
}
|
|
4297
4314
|
function withTitle(presentation, title) {
|
|
4298
4315
|
return title === void 0 ? presentation : { ...presentation, title };
|