@agimon-ai/po-author 0.0.0-alpha.5 → 0.0.0-alpha.7
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/extensions/web.mjs
CHANGED
|
@@ -243,7 +243,11 @@ var AuthorBrowserBridge = class {
|
|
|
243
243
|
apply(sessionId, message) {
|
|
244
244
|
if (message.alias === void 0) return;
|
|
245
245
|
const canvas = this.#canvases.get(canvasKey(sessionId, message.alias));
|
|
246
|
-
if (canvas === void 0
|
|
246
|
+
if (canvas === void 0) return;
|
|
247
|
+
if (message.kind === "rejected") {
|
|
248
|
+
console.warn(`Author canvas '${canvas.alias}' was rejected: ${message.reason}`);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
247
251
|
if (message.generation !== canvas.generation || message.ownerToken !== canvas.ownerToken && canvas.ownerToken !== void 0) return;
|
|
248
252
|
if (message.kind === "accepted") {
|
|
249
253
|
canvas.ownerToken = message.ownerToken;
|
|
@@ -384,7 +388,7 @@ var AuthorBrowserBridge = class {
|
|
|
384
388
|
sessionId: canvas.sessionId,
|
|
385
389
|
message: payload
|
|
386
390
|
}
|
|
387
|
-
}).catch(() =>
|
|
391
|
+
}).catch((error) => console.warn(`Author canvas '${canvas.alias}' could not send '${payload.kind}': ${error instanceof Error ? error.message : String(error)}`));
|
|
388
392
|
}
|
|
389
393
|
#current(canvas, requestId, controller) {
|
|
390
394
|
return this.#canvases.get(canvasKey(canvas.sessionId, canvas.alias)) === canvas && canvas.pending.get(requestId) === controller;
|
|
@@ -1889,7 +1893,7 @@ function AuthorRequestLog({ requests }) {
|
|
|
1889
1893
|
children: [
|
|
1890
1894
|
/* @__PURE__ */ jsx("h3", {
|
|
1891
1895
|
className: "text-lg font-semibold text-po-hi",
|
|
1892
|
-
children: "
|
|
1896
|
+
children: "Author"
|
|
1893
1897
|
}),
|
|
1894
1898
|
latest === void 0 ? /* @__PURE__ */ jsx("p", {
|
|
1895
1899
|
className: "text-sm leading-relaxed text-po-dim",
|
|
@@ -2106,7 +2110,7 @@ function AuthorPanel({ sessionId, activeMinorModes, submitCapture, statuses, ren
|
|
|
2106
2110
|
//#region src/extensions/workspaces/sessions/(frontend)/dock/authoring.web.tsx
|
|
2107
2111
|
var authoring_web_default = defineDockFace({
|
|
2108
2112
|
id: "authoring",
|
|
2109
|
-
label: "
|
|
2113
|
+
label: "Author",
|
|
2110
2114
|
order: 30,
|
|
2111
2115
|
autoSelect: true,
|
|
2112
2116
|
panel: AuthorPanel,
|