@designcrowd/library.brand-page 6.0.24-reset-ai-thread-1 → 6.0.24
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-DIRDxUsV.js → CreatedOnBrandCrowd-de-de-D669Q0UD.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BGrr_36m.js → CreatedOnBrandCrowd-en-us-C0HAYUEw.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DkiMoCGx.js → CreatedOnBrandCrowd-es-es-DGCWU-bQ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-CfeJxZ-x.js → CreatedOnBrandCrowd-fr-ca-CvcFLqKJ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-CfeJxZ-x.js → CreatedOnBrandCrowd-fr-fr-CvcFLqKJ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-BbplLZMf.js → CreatedOnBrandCrowd-pt-br-D5e12KZS.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-BbplLZMf.js → CreatedOnBrandCrowd-pt-pt-D5e12KZS.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CoHle1Oe.js → CreatedOnDcom-de-de-C4QarKT8.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-fYAo5wvt.js → CreatedOnDcom-en-us-DS8BkTOn.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-BZiD09N1.js → CreatedOnDcom-es-es-BvlOUtuw.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-ByHTC7f_.js → CreatedOnDcom-fr-ca--kcrYKK_.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-CQHUfpZP.js → CreatedOnDcom-fr-fr-j72SmiWV.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-BuUpEUky.js → CreatedOnDcom-pt-br-Ca3yZjNV.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-DMuVj6ee.js → CreatedOnDcom-pt-pt-Mz9PBF5e.js} +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +9 -21
- package/lib/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.d.ts +2 -8
- package/lib/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.js +0 -20
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +0 -7
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-5xPSZoNt.js → lib-wv-Dx_yi.js} +13701 -13710
- package/lib/src/shared/content-settings/components/GenericTextInput.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/email-field/EmailField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/radio-field/RadioField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/tel-field/TelField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/text-field/TextField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/youtube-video-field/YoutubeVideoField.mixin.d.ts +2 -2
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +1 -1
- package/package.json +1 -1
- package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +9 -28
- package/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.ts +0 -23
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +0 -8
|
@@ -59,7 +59,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
59
59
|
selectedTabName: import("vue").ComputedRef<string>;
|
|
60
60
|
isAdmin: import("vue").ComputedRef<boolean>;
|
|
61
61
|
contentErrorCount: import("vue").ComputedRef<number>;
|
|
62
|
-
mode: import("vue").ComputedRef<"images" | "
|
|
62
|
+
mode: import("vue").ComputedRef<"images" | "pages" | "add" | "edit" | "focusedContentItem">;
|
|
63
63
|
brandPageMakerStore: import("pinia").Store<"brandPageMaker", import("@brand-page-maker/stores").BrandPageMakerState, {
|
|
64
64
|
contentErrorCount(): number;
|
|
65
65
|
brandPageBaseUrl(): string;
|
|
@@ -480,9 +480,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
480
480
|
}>> & Readonly<{
|
|
481
481
|
"onUpdate-settings"?: ((...args: any[]) => any) | undefined;
|
|
482
482
|
}>, {
|
|
483
|
-
brandPageType: string;
|
|
484
483
|
pageTitle: string;
|
|
485
484
|
designDraftToken: string;
|
|
485
|
+
brandPageType: string;
|
|
486
486
|
pageDescription: string;
|
|
487
487
|
isMaker: boolean;
|
|
488
488
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -36,17 +36,18 @@ export function useAiWebsiteBuilderChat() {
|
|
|
36
36
|
const aiMetadataBuilder = useAiMetadataBuilder(aiLogger);
|
|
37
37
|
const checkpointStore = useAiCheckpointStore();
|
|
38
38
|
const eventTracker = useEventTracker();
|
|
39
|
-
const createWelcomeMessage = () => ({
|
|
40
|
-
id: '1',
|
|
41
|
-
type: 'text',
|
|
42
|
-
role: 'agent',
|
|
43
|
-
text: 'What changes would you like to make to your website?',
|
|
44
|
-
timestamp: new Date(),
|
|
45
|
-
});
|
|
46
39
|
const hasStoredMessages = aiThreadStore.messages.length > 0;
|
|
47
40
|
const threadItems = ref(aiThreadStore.messages.length > 0
|
|
48
41
|
? aiThreadStore.messages
|
|
49
|
-
: [
|
|
42
|
+
: [
|
|
43
|
+
{
|
|
44
|
+
id: '1',
|
|
45
|
+
type: 'text',
|
|
46
|
+
role: 'agent',
|
|
47
|
+
text: 'What changes would you like to make to your website?',
|
|
48
|
+
timestamp: new Date(),
|
|
49
|
+
},
|
|
50
|
+
]);
|
|
50
51
|
// ---------------------------------------------------------------------------
|
|
51
52
|
// Undo snapshot lifecycle (WL9) — reuses the existing `checkpointStore`,
|
|
52
53
|
// which stores pre-prompt BrandPageModel snapshots keyed by user message id.
|
|
@@ -99,19 +100,6 @@ export function useAiWebsiteBuilderChat() {
|
|
|
99
100
|
const isStopped = ref(false);
|
|
100
101
|
const generatedText = ref(null);
|
|
101
102
|
const generatedStyle = ref(null);
|
|
102
|
-
// External reset (e.g. template switch, BP-5896): tear down the build WS
|
|
103
|
-
// client so a late push can't repopulate the fresh thread, then re-seed
|
|
104
|
-
// the welcome bubble. Keyed off `resetToken` — NOT `messages` — to avoid
|
|
105
|
-
// looping with the deep `threadItems` → `messages` watch above.
|
|
106
|
-
watch(() => aiThreadStore.resetToken, () => {
|
|
107
|
-
if (activeBuildWsClient) {
|
|
108
|
-
activeBuildWsClient.disconnect();
|
|
109
|
-
activeBuildWsClient = null;
|
|
110
|
-
}
|
|
111
|
-
currentTypingMessageId.value = null;
|
|
112
|
-
isStopped.value = false;
|
|
113
|
-
threadItems.value = [createWelcomeMessage()];
|
|
114
|
-
});
|
|
115
103
|
const SERVICE_UNAVAILABLE_MESSAGE = 'This service is not available right now. Please try again later.';
|
|
116
104
|
const addServiceUnavailableBubble = () => {
|
|
117
105
|
threadItems.value.push({
|
|
@@ -8,9 +8,7 @@ export declare const useAiWebsiteBuilderThreadStore: import("pinia").StoreDefini
|
|
|
8
8
|
buildSectionsCompleted: import("vue").Ref<number, number>;
|
|
9
9
|
promptText: import("vue").Ref<string, string>;
|
|
10
10
|
stopGeneration: import("vue").Ref<(() => void) | null, (() => void) | null>;
|
|
11
|
-
|
|
12
|
-
reset: () => void;
|
|
13
|
-
}, "threadId" | "runId" | "messages" | "isProcessing" | "buildId" | "isBuildInProgress" | "buildSectionsCompleted" | "promptText" | "stopGeneration" | "resetToken">, Pick<{
|
|
11
|
+
}, "threadId" | "runId" | "messages" | "isProcessing" | "buildId" | "isBuildInProgress" | "buildSectionsCompleted" | "promptText" | "stopGeneration">, Pick<{
|
|
14
12
|
threadId: import("vue").Ref<string | null, string | null>;
|
|
15
13
|
runId: import("vue").Ref<string | null, string | null>;
|
|
16
14
|
messages: import("vue").Ref<any[], any[]>;
|
|
@@ -20,8 +18,6 @@ export declare const useAiWebsiteBuilderThreadStore: import("pinia").StoreDefini
|
|
|
20
18
|
buildSectionsCompleted: import("vue").Ref<number, number>;
|
|
21
19
|
promptText: import("vue").Ref<string, string>;
|
|
22
20
|
stopGeneration: import("vue").Ref<(() => void) | null, (() => void) | null>;
|
|
23
|
-
resetToken: import("vue").Ref<number, number>;
|
|
24
|
-
reset: () => void;
|
|
25
21
|
}, never>, Pick<{
|
|
26
22
|
threadId: import("vue").Ref<string | null, string | null>;
|
|
27
23
|
runId: import("vue").Ref<string | null, string | null>;
|
|
@@ -32,6 +28,4 @@ export declare const useAiWebsiteBuilderThreadStore: import("pinia").StoreDefini
|
|
|
32
28
|
buildSectionsCompleted: import("vue").Ref<number, number>;
|
|
33
29
|
promptText: import("vue").Ref<string, string>;
|
|
34
30
|
stopGeneration: import("vue").Ref<(() => void) | null, (() => void) | null>;
|
|
35
|
-
|
|
36
|
-
reset: () => void;
|
|
37
|
-
}, "reset">>;
|
|
31
|
+
}, never>>;
|
|
@@ -10,24 +10,6 @@ export const useAiWebsiteBuilderThreadStore = defineStore('aiWebsiteBuilderThrea
|
|
|
10
10
|
const buildSectionsCompleted = ref(0);
|
|
11
11
|
const promptText = ref('');
|
|
12
12
|
const stopGeneration = ref(null);
|
|
13
|
-
// Bumped on every reset so consumers (useAiWebsiteBuilderChat) can react
|
|
14
|
-
// without watching `messages`, which would loop with its own deep watch.
|
|
15
|
-
const resetToken = ref(0);
|
|
16
|
-
const reset = () => {
|
|
17
|
-
if (isProcessing.value || isBuildInProgress.value) {
|
|
18
|
-
stopGeneration.value?.();
|
|
19
|
-
}
|
|
20
|
-
threadId.value = null;
|
|
21
|
-
runId.value = null;
|
|
22
|
-
messages.value = [];
|
|
23
|
-
isProcessing.value = false;
|
|
24
|
-
buildId.value = null;
|
|
25
|
-
isBuildInProgress.value = false;
|
|
26
|
-
buildSectionsCompleted.value = 0;
|
|
27
|
-
promptText.value = '';
|
|
28
|
-
stopGeneration.value = null;
|
|
29
|
-
resetToken.value += 1;
|
|
30
|
-
};
|
|
31
13
|
return {
|
|
32
14
|
threadId,
|
|
33
15
|
runId,
|
|
@@ -38,7 +20,5 @@ export const useAiWebsiteBuilderThreadStore = defineStore('aiWebsiteBuilderThrea
|
|
|
38
20
|
buildSectionsCompleted,
|
|
39
21
|
promptText,
|
|
40
22
|
stopGeneration,
|
|
41
|
-
resetToken,
|
|
42
|
-
reset,
|
|
43
23
|
};
|
|
44
24
|
});
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { EMPTY_LOGO_IMAGE_MODEL, SENSITIVE_CONTENT_TYPES, TEXT_STYLE_TYPES, VIEWPORTS, } from '@brand-page';
|
|
2
2
|
import { BackgroundStyles, BRAND_PAGE_TYPES, BrandPageModel, CONTENT_TYPES, NavigationDesktop, NavigationMobile, } from '@brand-page';
|
|
3
3
|
import { useBrandPageMakerUserStore } from '../user';
|
|
4
|
-
import { useAiWebsiteBuilderThreadStore } from '../ai-thread/ai-website-builder-thread-store';
|
|
5
|
-
import { useAiCheckpointStore } from '../ai-checkpoint/ai-checkpoint-store';
|
|
6
4
|
import { defineStore } from 'pinia';
|
|
7
5
|
import { toRaw } from 'vue';
|
|
8
6
|
import { useUiStore } from '../ui';
|
|
@@ -355,11 +353,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
355
353
|
backgroundStyles: brandPageModel.styles.backgroundStyles,
|
|
356
354
|
});
|
|
357
355
|
await this.recalculateLogoSizes(true);
|
|
358
|
-
// A template switch invalidates the AI conversation — the server-side
|
|
359
|
-
// thread's history still describes the previous template (BP-5896).
|
|
360
|
-
// reset() also stops any in-flight generation before clearing.
|
|
361
|
-
useAiWebsiteBuilderThreadStore().reset();
|
|
362
|
-
useAiCheckpointStore().clearAll();
|
|
363
356
|
this.setIsModifiedAfterTemplateApplied({
|
|
364
357
|
isModified: false,
|
|
365
358
|
});
|
package/lib/src/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as T, a as E, b as s, c as I, d as S, e as N, f as e, B as A, g as O, h as C, i as t, j as G, k as D, l as P, m as R, n as o, o as L, p as M, q as r, r as n, s as b, t as l, u as F, v as i, w as g, x as c, y as B, z as Y, C as U, D as d, E as u, F as H, G as p, H as y, I as m, J as K, K as k, L as V, M as X, N as v, O as h, P as f, Q as x, R as W, S as z, T as w, U as Z, V as j, W as q, X as J, Y as Q, Z as $, $ as aa, a0 as _a, a1 as Ta, a2 as Ea, a3 as sa, a4 as Ia, a5 as Sa, a6 as Na, a7 as ea, a8 as Aa, a9 as Oa, aa as Ca, ab as ta, ac as Ga, ad as Da, ae as Pa, af as Ra, ag as oa, ah as La, ai as Ma, aj as ra, ak as na, al as ba, am as la, an as Fa, ao as ia, ap as ga, aq as ca, ar as Ba, as as Ya, at as Ua, au as da, av as ua, aw as Ha, ax as pa, ay as ya, az as ma, aA as Ka, aB as ka, aC as Va, aD as Xa, aE as va, aF as ha, aG as fa, aH as xa, aI as Wa, aJ as za, aK as wa, aL as Za, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as $a, aR as a_, aS as __, aT as T_, aU as E_, aV as s_, aW as I_, aX as S_, aY as N_, aZ as e_, a_ as A_, a$ as O_, b0 as C_, b1 as t_, b2 as G_, b3 as D_, b4 as P_, b5 as R_, b6 as o_, b7 as L_, b8 as M_, b9 as r_, ba as n_, bb as b_, bc as l_, bd as F_, be as i_, bf as g_, bg as c_, bh as B_, bi as Y_, bj as U_, bk as d_, bl as u_, bm as H_, bn as p_, bo as y_, bp as m_, bq as K_, br as k_, bs as V_, bt as X_, bu as v_, bv as h_, bw as f_, bx as x_, by as W_, bz as z_, bA as w_, bB as Z_, bC as j_, bD as q_, bE as J_, bF as Q_, bG as $_, bH as aT, bI as _T, bJ as TT, bK as ET, bL as sT, bM as IT, bN as ST, bO as NT, bP as eT, bQ as AT, bR as OT, bS as CT, bT as tT, bU as GT, bV as DT, bW as PT, bX as RT, bY as oT, bZ as LT, b_ as MT, b$ as rT, c0 as nT, c1 as bT, c2 as lT, c3 as FT, c4 as iT, c5 as gT, c6 as cT, c7 as BT, c8 as YT, c9 as UT, ca as dT, cb as uT, cc as HT, cd as pT, ce as yT, cf as mT, cg as KT, ch as kT, ci as VT, cj as XT, ck as vT, cl as hT, cm as fT, cn as xT, co as WT, cp as zT, cq as wT, cr as ZT, cs as jT } from "./lib-
|
|
1
|
+
import { A as T, a as E, b as s, c as I, d as S, e as N, f as e, B as A, g as O, h as C, i as t, j as G, k as D, l as P, m as R, n as o, o as L, p as M, q as r, r as n, s as b, t as l, u as F, v as i, w as g, x as c, y as B, z as Y, C as U, D as d, E as u, F as H, G as p, H as y, I as m, J as K, K as k, L as V, M as X, N as v, O as h, P as f, Q as x, R as W, S as z, T as w, U as Z, V as j, W as q, X as J, Y as Q, Z as $, $ as aa, a0 as _a, a1 as Ta, a2 as Ea, a3 as sa, a4 as Ia, a5 as Sa, a6 as Na, a7 as ea, a8 as Aa, a9 as Oa, aa as Ca, ab as ta, ac as Ga, ad as Da, ae as Pa, af as Ra, ag as oa, ah as La, ai as Ma, aj as ra, ak as na, al as ba, am as la, an as Fa, ao as ia, ap as ga, aq as ca, ar as Ba, as as Ya, at as Ua, au as da, av as ua, aw as Ha, ax as pa, ay as ya, az as ma, aA as Ka, aB as ka, aC as Va, aD as Xa, aE as va, aF as ha, aG as fa, aH as xa, aI as Wa, aJ as za, aK as wa, aL as Za, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as $a, aR as a_, aS as __, aT as T_, aU as E_, aV as s_, aW as I_, aX as S_, aY as N_, aZ as e_, a_ as A_, a$ as O_, b0 as C_, b1 as t_, b2 as G_, b3 as D_, b4 as P_, b5 as R_, b6 as o_, b7 as L_, b8 as M_, b9 as r_, ba as n_, bb as b_, bc as l_, bd as F_, be as i_, bf as g_, bg as c_, bh as B_, bi as Y_, bj as U_, bk as d_, bl as u_, bm as H_, bn as p_, bo as y_, bp as m_, bq as K_, br as k_, bs as V_, bt as X_, bu as v_, bv as h_, bw as f_, bx as x_, by as W_, bz as z_, bA as w_, bB as Z_, bC as j_, bD as q_, bE as J_, bF as Q_, bG as $_, bH as aT, bI as _T, bJ as TT, bK as ET, bL as sT, bM as IT, bN as ST, bO as NT, bP as eT, bQ as AT, bR as OT, bS as CT, bT as tT, bU as GT, bV as DT, bW as PT, bX as RT, bY as oT, bZ as LT, b_ as MT, b$ as rT, c0 as nT, c1 as bT, c2 as lT, c3 as FT, c4 as iT, c5 as gT, c6 as cT, c7 as BT, c8 as YT, c9 as UT, ca as dT, cb as uT, cc as HT, cd as pT, ce as yT, cf as mT, cg as KT, ch as kT, ci as VT, cj as XT, ck as vT, cl as hT, cm as fT, cn as xT, co as WT, cp as zT, cq as wT, cr as ZT, cs as jT } from "./lib-wv-Dx_yi.js";
|
|
2
2
|
import { U as JT, u as QT } from "./useEventTracker-DmQ6AkNn.js";
|
|
3
3
|
import { createPinia as aE, setActivePinia as _E } from "pinia";
|
|
4
4
|
export {
|