@designcrowd/library.brand-page 6.2.14 → 6.2.15
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/lib/src/{CreatedOnBrandCrowd-de-de-Deoc6s8r.js → CreatedOnBrandCrowd-de-de-CYdJJjNJ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BxDzsLl-.js → CreatedOnBrandCrowd-en-us-BSGwyIBg.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-B-5VS2MV.js → CreatedOnBrandCrowd-es-es-C0cogd_P.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-C6h05sUZ.js → CreatedOnBrandCrowd-fr-ca-DR4TbHdK.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-C6h05sUZ.js → CreatedOnBrandCrowd-fr-fr-DR4TbHdK.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-BC6XU3ev.js → CreatedOnBrandCrowd-pt-br-D3QLE-Rk.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-BC6XU3ev.js → CreatedOnBrandCrowd-pt-pt-D3QLE-Rk.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-dUTedh8v.js → CreatedOnDcom-de-de-CwRHSP3M.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-DY0jkOeW.js → CreatedOnDcom-en-us-BEn36py1.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-DRioej2A.js → CreatedOnDcom-es-es-CQt-H117.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-CcglfcUU.js → CreatedOnDcom-fr-ca-Cc1tyCJh.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-B7v_e6HI.js → CreatedOnDcom-fr-fr-52ucQbtE.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-5XGcKJb7.js → CreatedOnDcom-pt-br-BPMJmtaC.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-DepC53tO.js → CreatedOnDcom-pt-pt-D9RqaBx4.js} +1 -1
- package/lib/src/brand-page-maker/composables/ai-chat/aiErrorCopy.d.ts +1 -1
- package/lib/src/brand-page-maker/composables/ai-chat/aiErrorCopy.js +2 -2
- package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +2 -2
- package/lib/src/clients/websocket-gateway-client.d.ts +1 -5
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-CidddZOL.js → lib-roR8wIA2.js} +3 -3
- package/lib/src/metadata-builder/builders/section-field-maps.d.ts +1 -1
- package/lib/src/metadata-builder/builders/section-field-maps.js +1 -1
- package/lib/src/metadata-builder/builders/undo-builder.d.ts +2 -2
- package/lib/src/metadata-builder/builders/undo-builder.js +2 -2
- package/lib/src/metadata-builder/parsers/section-tool-arguments.d.ts +2 -2
- package/lib/src/metadata-builder/parsers/section-tool-arguments.js +1 -1
- package/package.json +1 -1
- package/src/brand-page-maker/composables/ai-chat/aiErrorCopy.ts +2 -2
- package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +2 -2
- package/src/clients/websocket-gateway-client.ts +0 -5
- package/src/metadata-builder/builders/section-field-maps.ts +1 -1
- package/src/metadata-builder/builders/undo-builder.ts +2 -2
- package/src/metadata-builder/parsers/section-tool-arguments.ts +4 -4
|
@@ -15,7 +15,7 @@ export declare function pickErrorMessage(error: unknown): string;
|
|
|
15
15
|
* Pick a friendly chat message from a WebSocket error frame.
|
|
16
16
|
*
|
|
17
17
|
* Reads `msg.{code, message, error}` directly — the shape pushed by the
|
|
18
|
-
* ai-pipelines build_error
|
|
18
|
+
* ai-pipelines build_error WebSocket frames.
|
|
19
19
|
*/
|
|
20
20
|
export declare function pickWsErrorMessage(msg: ErrorPayload | undefined | null): string;
|
|
21
21
|
export interface RaygunReport {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// REL 1 Phase 1 / 1.5 — friendly chat copy keyed by the backend `code` field.
|
|
2
2
|
//
|
|
3
3
|
// Backend returns `{ error, code, message }` for known failure paths
|
|
4
|
-
// (both HTTP responses and WebSocket build_error
|
|
4
|
+
// (both HTTP responses and WebSocket build_error frames).
|
|
5
5
|
// We look up the code first, then fall back to message → error → generic.
|
|
6
6
|
// English-only for now; Phase 2 promotes this to proper i18n keys.
|
|
7
7
|
export const GENERIC_ERROR_MESSAGE = 'Something went wrong while putting your website together. Could you try that again?';
|
|
@@ -35,7 +35,7 @@ export function pickErrorMessage(error) {
|
|
|
35
35
|
* Pick a friendly chat message from a WebSocket error frame.
|
|
36
36
|
*
|
|
37
37
|
* Reads `msg.{code, message, error}` directly — the shape pushed by the
|
|
38
|
-
* ai-pipelines build_error
|
|
38
|
+
* ai-pipelines build_error WebSocket frames.
|
|
39
39
|
*/
|
|
40
40
|
export function pickWsErrorMessage(msg) {
|
|
41
41
|
return pickFromPayload(msg);
|
|
@@ -628,7 +628,7 @@ export function useAiWebsiteBuilderChat() {
|
|
|
628
628
|
});
|
|
629
629
|
return;
|
|
630
630
|
}
|
|
631
|
-
if (msg.type === '
|
|
631
|
+
if (msg.type === 'build_error') {
|
|
632
632
|
handleBuildError(msg);
|
|
633
633
|
return;
|
|
634
634
|
}
|
|
@@ -722,7 +722,7 @@ export function useAiWebsiteBuilderChat() {
|
|
|
722
722
|
threadItems.value[messageIndex].text = result.text;
|
|
723
723
|
threadItems.value[messageIndex].isTyping = false;
|
|
724
724
|
// Honour the isError flag set by error paths in callApiBuildAsync
|
|
725
|
-
// (apply-failure catch,
|
|
725
|
+
// (apply-failure catch, build_error WS frames).
|
|
726
726
|
// Without this, error text would render as a normal AI reply.
|
|
727
727
|
if (result.isError) {
|
|
728
728
|
threadItems.value[messageIndex].isError = true;
|
|
@@ -8,13 +8,9 @@ export interface PlanItem {
|
|
|
8
8
|
subIds?: string[];
|
|
9
9
|
}
|
|
10
10
|
export interface WebSocketMessage {
|
|
11
|
-
type: 'connected' | 'server_response' | '
|
|
11
|
+
type: 'connected' | 'server_response' | 'build_error' | 'chat_started' | 'plan_announced' | 'item_complete';
|
|
12
12
|
buildId?: string;
|
|
13
13
|
connectionId?: string;
|
|
14
|
-
pageId?: string;
|
|
15
|
-
order?: number;
|
|
16
|
-
sectionType?: string;
|
|
17
|
-
mode?: string;
|
|
18
14
|
toolCalls?: unknown[];
|
|
19
15
|
message?: string;
|
|
20
16
|
error?: string;
|
package/lib/src/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as s, a as S, b as I, c as N, d as e, e as A, f as O, g as t, B as C, h as D, i as G, j as P, k as R, l as o, m as L, n as M, o as r, p as n, q as c, r as i, s as l, t as b, u as F, v as g, w as B, x as Y, y as d, z as U, C as u, D as p, E as H, F as y, G as m, H as K, I as k, J as V, K as v, L as X, M as h, N as x, O as f, P as W, Q as z, R as w, S as J, T as Z, U as j, V as q, W as Q, X as $, Y as aa, Z as Ta, $ as Ea, a0 as _a, a1 as sa, a2 as Sa, a3 as Ia, a4 as Na, a5 as ea, a6 as Aa, a7 as Oa, a8 as ta, a9 as Ca, aa as Da, ab as Ga, ac as Pa, ad as Ra, ae as oa, af as La, ag as Ma, ah as ra, ai as na, aj as ca, ak as ia, al as la, am as ba, an as Fa, ao as ga, ap as Ba, aq as Ya, ar as da, as as Ua, at as ua, au as pa, av as Ha, aw as ya, ax as ma, ay as Ka, az as ka, aA as Va, aB as va, aC as Xa, aD as ha, aE as xa, aF as fa, aG as Wa, aH as za, aI as wa, aJ as Ja, aK as Za, aL as ja, aM as qa, aN as Qa, aO as $a, aP as aT, aQ as TT, aR as ET, aS as _T, aT as sT, aU as ST, aV as IT, aW as NT, aX as eT, aY as AT, aZ as OT, a_ as tT, a$ as CT, b0 as DT, b1 as GT, b2 as PT, b3 as RT, b4 as oT, b5 as LT, b6 as MT, b7 as rT, b8 as nT, b9 as cT, ba as iT, bb as lT, bc as bT, bd as FT, be as gT, bf as BT, bg as YT, bh as dT, bi as UT, bj as uT, bk as pT, bl as HT, bm as yT, bn as mT, bo as KT, bp as kT, bq as VT, br as vT, bs as XT, bt as hT, bu as xT, bv as fT, bw as WT, bx as zT, by as wT, bz as JT, bA as ZT, bB as jT, bC as qT, bD as QT, bE as $T, bF as aE, bG as TE, bH as EE, bI as _E, bJ as sE, bK as SE, bL as IE, bM as NE, bN as eE, bO as AE, bP as OE, bQ as tE, bR as CE, bS as DE, bT as GE, bU as PE, bV as RE, bW as oE, bX as LE, bY as ME, bZ as rE, b_ as nE, b$ as cE, c0 as iE, c1 as lE, c2 as bE, c3 as FE, c4 as gE, c5 as BE, c6 as YE, c7 as dE, c8 as UE, c9 as uE, ca as pE, cb as HE, cc as yE, cd as mE, ce as KE, cf as kE, cg as VE, ch as vE, ci as XE, cj as hE, ck as xE, cl as fE, cm as WE, cn as zE, co as wE, cp as JE, cq as ZE, cr as jE, cs as qE, ct as QE, cu as $E, cv as a_, cw as T_, cx as E_, cy as __, cz as s_, cA as S_, cB as I_, cC as N_, cD as e_, cE as A_, cF as O_, cG as t_, cH as C_, cI as D_, cJ as G_ } from "./lib-
|
|
1
|
+
import { A as s, a as S, b as I, c as N, d as e, e as A, f as O, g as t, B as C, h as D, i as G, j as P, k as R, l as o, m as L, n as M, o as r, p as n, q as c, r as i, s as l, t as b, u as F, v as g, w as B, x as Y, y as d, z as U, C as u, D as p, E as H, F as y, G as m, H as K, I as k, J as V, K as v, L as X, M as h, N as x, O as f, P as W, Q as z, R as w, S as J, T as Z, U as j, V as q, W as Q, X as $, Y as aa, Z as Ta, $ as Ea, a0 as _a, a1 as sa, a2 as Sa, a3 as Ia, a4 as Na, a5 as ea, a6 as Aa, a7 as Oa, a8 as ta, a9 as Ca, aa as Da, ab as Ga, ac as Pa, ad as Ra, ae as oa, af as La, ag as Ma, ah as ra, ai as na, aj as ca, ak as ia, al as la, am as ba, an as Fa, ao as ga, ap as Ba, aq as Ya, ar as da, as as Ua, at as ua, au as pa, av as Ha, aw as ya, ax as ma, ay as Ka, az as ka, aA as Va, aB as va, aC as Xa, aD as ha, aE as xa, aF as fa, aG as Wa, aH as za, aI as wa, aJ as Ja, aK as Za, aL as ja, aM as qa, aN as Qa, aO as $a, aP as aT, aQ as TT, aR as ET, aS as _T, aT as sT, aU as ST, aV as IT, aW as NT, aX as eT, aY as AT, aZ as OT, a_ as tT, a$ as CT, b0 as DT, b1 as GT, b2 as PT, b3 as RT, b4 as oT, b5 as LT, b6 as MT, b7 as rT, b8 as nT, b9 as cT, ba as iT, bb as lT, bc as bT, bd as FT, be as gT, bf as BT, bg as YT, bh as dT, bi as UT, bj as uT, bk as pT, bl as HT, bm as yT, bn as mT, bo as KT, bp as kT, bq as VT, br as vT, bs as XT, bt as hT, bu as xT, bv as fT, bw as WT, bx as zT, by as wT, bz as JT, bA as ZT, bB as jT, bC as qT, bD as QT, bE as $T, bF as aE, bG as TE, bH as EE, bI as _E, bJ as sE, bK as SE, bL as IE, bM as NE, bN as eE, bO as AE, bP as OE, bQ as tE, bR as CE, bS as DE, bT as GE, bU as PE, bV as RE, bW as oE, bX as LE, bY as ME, bZ as rE, b_ as nE, b$ as cE, c0 as iE, c1 as lE, c2 as bE, c3 as FE, c4 as gE, c5 as BE, c6 as YE, c7 as dE, c8 as UE, c9 as uE, ca as pE, cb as HE, cc as yE, cd as mE, ce as KE, cf as kE, cg as VE, ch as vE, ci as XE, cj as hE, ck as xE, cl as fE, cm as WE, cn as zE, co as wE, cp as JE, cq as ZE, cr as jE, cs as qE, ct as QE, cu as $E, cv as a_, cw as T_, cx as E_, cy as __, cz as s_, cA as S_, cB as I_, cC as N_, cD as e_, cE as A_, cF as O_, cG as t_, cH as C_, cI as D_, cJ as G_ } from "./lib-roR8wIA2.js";
|
|
2
2
|
import { U as R_, u as o_ } from "./useEventTracker-DwPTmzpa.js";
|
|
3
3
|
import "vue";
|
|
4
4
|
import "vue-cropperjs";
|
|
@@ -70831,10 +70831,10 @@ const Yw = t1({
|
|
|
70831
70831
|
Ee(() => n.context.isDesignCom, async () => {
|
|
70832
70832
|
const S = Ft().toLowerCase(), _ = n.context.isDesignCom ? "Dcom" : "BrandCrowd";
|
|
70833
70833
|
try {
|
|
70834
|
-
const { default: k } = await wE(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-de-de.vue": () => import("./CreatedOnBrandCrowd-de-de-
|
|
70834
|
+
const { default: k } = await wE(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-de-de.vue": () => import("./CreatedOnBrandCrowd-de-de-CYdJJjNJ.js"), "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-BSGwyIBg.js"), "./watermark/CreatedOnBrandCrowd-es-es.vue": () => import("./CreatedOnBrandCrowd-es-es-C0cogd_P.js"), "./watermark/CreatedOnBrandCrowd-fr-ca.vue": () => import("./CreatedOnBrandCrowd-fr-ca-DR4TbHdK.js"), "./watermark/CreatedOnBrandCrowd-fr-fr.vue": () => import("./CreatedOnBrandCrowd-fr-fr-DR4TbHdK.js"), "./watermark/CreatedOnBrandCrowd-pt-br.vue": () => import("./CreatedOnBrandCrowd-pt-br-D3QLE-Rk.js"), "./watermark/CreatedOnBrandCrowd-pt-pt.vue": () => import("./CreatedOnBrandCrowd-pt-pt-D3QLE-Rk.js"), "./watermark/CreatedOnDcom-de-de.vue": () => import("./CreatedOnDcom-de-de-CwRHSP3M.js"), "./watermark/CreatedOnDcom-en-us.vue": () => import("./CreatedOnDcom-en-us-BEn36py1.js"), "./watermark/CreatedOnDcom-es-es.vue": () => import("./CreatedOnDcom-es-es-CQt-H117.js"), "./watermark/CreatedOnDcom-fr-ca.vue": () => import("./CreatedOnDcom-fr-ca-Cc1tyCJh.js"), "./watermark/CreatedOnDcom-fr-fr.vue": () => import("./CreatedOnDcom-fr-fr-52ucQbtE.js"), "./watermark/CreatedOnDcom-pt-br.vue": () => import("./CreatedOnDcom-pt-br-BPMJmtaC.js"), "./watermark/CreatedOnDcom-pt-pt.vue": () => import("./CreatedOnDcom-pt-pt-D9RqaBx4.js") }), `./watermark/CreatedOn${_}-${S}.vue`, 3);
|
|
70835
70835
|
o.value = k;
|
|
70836
70836
|
} catch {
|
|
70837
|
-
const { default: x } = await wE(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-
|
|
70837
|
+
const { default: x } = await wE(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-BSGwyIBg.js"), "./watermark/CreatedOnDcom-en-us.vue": () => import("./CreatedOnDcom-en-us-BEn36py1.js") }), `./watermark/CreatedOn${_}-en-us.vue`, 3);
|
|
70838
70838
|
o.value = x;
|
|
70839
70839
|
}
|
|
70840
70840
|
}, {
|
|
@@ -127798,7 +127798,7 @@ function Ae2() {
|
|
|
127798
127798
|
});
|
|
127799
127799
|
return;
|
|
127800
127800
|
}
|
|
127801
|
-
if (z1.type === "
|
|
127801
|
+
if (z1.type === "build_error") {
|
|
127802
127802
|
Se(z1);
|
|
127803
127803
|
return;
|
|
127804
127804
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Maps AI tool call argument names → BrandPageModel content field names
|
|
3
3
|
* per section type.
|
|
4
4
|
*
|
|
5
|
-
* Reference: service.ai-pipelines/src/agents/
|
|
5
|
+
* Reference: service.ai-pipelines/src/agents/websiteV2/platform/tool_schemas/
|
|
6
6
|
* Reference: library.brand-page/src/brand-page/models/index.ts
|
|
7
7
|
*/
|
|
8
8
|
export type SectionFieldMap = Record<string, string>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Maps AI tool call argument names → BrandPageModel content field names
|
|
3
3
|
* per section type.
|
|
4
4
|
*
|
|
5
|
-
* Reference: service.ai-pipelines/src/agents/
|
|
5
|
+
* Reference: service.ai-pipelines/src/agents/websiteV2/platform/tool_schemas/
|
|
6
6
|
* Reference: library.brand-page/src/brand-page/models/index.ts
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
@@ -32,10 +32,10 @@ export interface UndoPayload {
|
|
|
32
32
|
* can observe that an undo was executed (useful for telemetry, UI messaging,
|
|
33
33
|
* and audit logs).
|
|
34
34
|
*
|
|
35
|
-
* Contract guarantee from the AI pipeline (
|
|
35
|
+
* Contract guarantee from the AI pipeline (WebsiteV2 main agent): the `undo`
|
|
36
36
|
* tool call is exclusive — it never co-occurs with build/update/delete tool
|
|
37
37
|
* calls in the same response. If that contract is ever violated upstream,
|
|
38
|
-
* fix the
|
|
38
|
+
* fix the agent — do not add defensive ordering here. The sequential
|
|
39
39
|
* MetadataExecutor will apply any subsequent builders on top of the restored
|
|
40
40
|
* snapshot, which is the semantically correct "undo-then-apply" ordering.
|
|
41
41
|
*/
|
|
@@ -9,10 +9,10 @@ import { BaseMetadataBuilder, } from '../models';
|
|
|
9
9
|
* can observe that an undo was executed (useful for telemetry, UI messaging,
|
|
10
10
|
* and audit logs).
|
|
11
11
|
*
|
|
12
|
-
* Contract guarantee from the AI pipeline (
|
|
12
|
+
* Contract guarantee from the AI pipeline (WebsiteV2 main agent): the `undo`
|
|
13
13
|
* tool call is exclusive — it never co-occurs with build/update/delete tool
|
|
14
14
|
* calls in the same response. If that contract is ever violated upstream,
|
|
15
|
-
* fix the
|
|
15
|
+
* fix the agent — do not add defensive ordering here. The sequential
|
|
16
16
|
* MetadataExecutor will apply any subsequent builders on top of the restored
|
|
17
17
|
* snapshot, which is the semantically correct "undo-then-apply" ordering.
|
|
18
18
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Typed interfaces for website builder section tool arguments.
|
|
3
3
|
*
|
|
4
|
-
* Canonical reference: service.ai-pipelines/src/agents/
|
|
4
|
+
* Canonical reference: service.ai-pipelines/src/agents/websiteV2/platform/tool_schemas/
|
|
5
5
|
* Every field defined there has a corresponding TS field here.
|
|
6
6
|
*/
|
|
7
7
|
import type { ContentType, CanonicalTextStyleType } from '../../brand-page/models';
|
|
@@ -81,7 +81,7 @@ export interface TextStyleArguments {
|
|
|
81
81
|
* the APPLICATION is per-section: every section's tool call writes the
|
|
82
82
|
* same site-decided hex into this field.
|
|
83
83
|
*
|
|
84
|
-
* See `ai-pipelines/src/agents/
|
|
84
|
+
* See `ai-pipelines/src/agents/websiteV2/platform/tools/section_types_tool.py`
|
|
85
85
|
* (`_button_text_style_field`) for the AI-side mirror.
|
|
86
86
|
*/
|
|
87
87
|
export interface ButtonTextStyleArguments {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Typed interfaces for website builder section tool arguments.
|
|
3
3
|
*
|
|
4
|
-
* Canonical reference: service.ai-pipelines/src/agents/
|
|
4
|
+
* Canonical reference: service.ai-pipelines/src/agents/websiteV2/platform/tool_schemas/
|
|
5
5
|
* Every field defined there has a corresponding TS field here.
|
|
6
6
|
*/
|
|
7
7
|
/** Type guard: checks if a value is a TiptapDocument object. */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// REL 1 Phase 1 / 1.5 — friendly chat copy keyed by the backend `code` field.
|
|
2
2
|
//
|
|
3
3
|
// Backend returns `{ error, code, message }` for known failure paths
|
|
4
|
-
// (both HTTP responses and WebSocket build_error
|
|
4
|
+
// (both HTTP responses and WebSocket build_error frames).
|
|
5
5
|
// We look up the code first, then fall back to message → error → generic.
|
|
6
6
|
// English-only for now; Phase 2 promotes this to proper i18n keys.
|
|
7
7
|
|
|
@@ -50,7 +50,7 @@ export function pickErrorMessage(error: unknown): string {
|
|
|
50
50
|
* Pick a friendly chat message from a WebSocket error frame.
|
|
51
51
|
*
|
|
52
52
|
* Reads `msg.{code, message, error}` directly — the shape pushed by the
|
|
53
|
-
* ai-pipelines build_error
|
|
53
|
+
* ai-pipelines build_error WebSocket frames.
|
|
54
54
|
*/
|
|
55
55
|
export function pickWsErrorMessage(
|
|
56
56
|
msg: ErrorPayload | undefined | null,
|
|
@@ -886,7 +886,7 @@ export function useAiWebsiteBuilderChat(): UseAiChatResult {
|
|
|
886
886
|
return;
|
|
887
887
|
}
|
|
888
888
|
|
|
889
|
-
if (msg.type === '
|
|
889
|
+
if (msg.type === 'build_error') {
|
|
890
890
|
handleBuildError(msg);
|
|
891
891
|
|
|
892
892
|
return;
|
|
@@ -999,7 +999,7 @@ export function useAiWebsiteBuilderChat(): UseAiChatResult {
|
|
|
999
999
|
threadItems.value[messageIndex].isTyping = false;
|
|
1000
1000
|
|
|
1001
1001
|
// Honour the isError flag set by error paths in callApiBuildAsync
|
|
1002
|
-
// (apply-failure catch,
|
|
1002
|
+
// (apply-failure catch, build_error WS frames).
|
|
1003
1003
|
// Without this, error text would render as a normal AI reply.
|
|
1004
1004
|
if (result.isError) {
|
|
1005
1005
|
threadItems.value[messageIndex].isError = true;
|
|
@@ -16,17 +16,12 @@ export interface WebSocketMessage {
|
|
|
16
16
|
type:
|
|
17
17
|
| 'connected'
|
|
18
18
|
| 'server_response'
|
|
19
|
-
| 'server_error'
|
|
20
19
|
| 'build_error'
|
|
21
20
|
| 'chat_started'
|
|
22
21
|
| 'plan_announced'
|
|
23
22
|
| 'item_complete';
|
|
24
23
|
buildId?: string;
|
|
25
24
|
connectionId?: string;
|
|
26
|
-
pageId?: string;
|
|
27
|
-
order?: number;
|
|
28
|
-
sectionType?: string;
|
|
29
|
-
mode?: string;
|
|
30
25
|
toolCalls?: unknown[];
|
|
31
26
|
message?: string;
|
|
32
27
|
error?: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Maps AI tool call argument names → BrandPageModel content field names
|
|
3
3
|
* per section type.
|
|
4
4
|
*
|
|
5
|
-
* Reference: service.ai-pipelines/src/agents/
|
|
5
|
+
* Reference: service.ai-pipelines/src/agents/websiteV2/platform/tool_schemas/
|
|
6
6
|
* Reference: library.brand-page/src/brand-page/models/index.ts
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -43,10 +43,10 @@ export interface UndoPayload {
|
|
|
43
43
|
* can observe that an undo was executed (useful for telemetry, UI messaging,
|
|
44
44
|
* and audit logs).
|
|
45
45
|
*
|
|
46
|
-
* Contract guarantee from the AI pipeline (
|
|
46
|
+
* Contract guarantee from the AI pipeline (WebsiteV2 main agent): the `undo`
|
|
47
47
|
* tool call is exclusive — it never co-occurs with build/update/delete tool
|
|
48
48
|
* calls in the same response. If that contract is ever violated upstream,
|
|
49
|
-
* fix the
|
|
49
|
+
* fix the agent — do not add defensive ordering here. The sequential
|
|
50
50
|
* MetadataExecutor will apply any subsequent builders on top of the restored
|
|
51
51
|
* snapshot, which is the semantically correct "undo-then-apply" ordering.
|
|
52
52
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Typed interfaces for website builder section tool arguments.
|
|
3
3
|
*
|
|
4
|
-
* Canonical reference: service.ai-pipelines/src/agents/
|
|
4
|
+
* Canonical reference: service.ai-pipelines/src/agents/websiteV2/platform/tool_schemas/
|
|
5
5
|
* Every field defined there has a corresponding TS field here.
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -25,7 +25,7 @@ type UnsupportedContentType =
|
|
|
25
25
|
export type SectionType = Exclude<ContentType, UnsupportedContentType>;
|
|
26
26
|
|
|
27
27
|
// ---------------------------------------------------------------------------
|
|
28
|
-
// Shared style type (matches TEXT_STYLE_SCHEMA in
|
|
28
|
+
// Shared style type (matches TEXT_STYLE_SCHEMA in websiteV2/platform/tools/section_types_tool.py)
|
|
29
29
|
// ---------------------------------------------------------------------------
|
|
30
30
|
|
|
31
31
|
// ---------------------------------------------------------------------------
|
|
@@ -91,7 +91,7 @@ export const isTiptapDocument = (value: unknown): value is TiptapDocument =>
|
|
|
91
91
|
Array.isArray((value as TiptapDocument).content);
|
|
92
92
|
|
|
93
93
|
// ---------------------------------------------------------------------------
|
|
94
|
-
// Shared style type (matches TEXT_STYLE_SCHEMA in
|
|
94
|
+
// Shared style type (matches TEXT_STYLE_SCHEMA in websiteV2/platform/tools/section_types_tool.py)
|
|
95
95
|
// ---------------------------------------------------------------------------
|
|
96
96
|
|
|
97
97
|
export interface TextStyleArguments {
|
|
@@ -127,7 +127,7 @@ export interface TextStyleArguments {
|
|
|
127
127
|
* the APPLICATION is per-section: every section's tool call writes the
|
|
128
128
|
* same site-decided hex into this field.
|
|
129
129
|
*
|
|
130
|
-
* See `ai-pipelines/src/agents/
|
|
130
|
+
* See `ai-pipelines/src/agents/websiteV2/platform/tools/section_types_tool.py`
|
|
131
131
|
* (`_button_text_style_field`) for the AI-side mirror.
|
|
132
132
|
*/
|
|
133
133
|
export interface ButtonTextStyleArguments {
|