@wallavi/widget 1.13.3 → 1.14.0

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/index.js CHANGED
@@ -227,7 +227,7 @@ async function consumeStream(body, handler) {
227
227
  function applyUiEventToMessages(prev, proto, msgId) {
228
228
  let idx = prev.findIndex((m) => m.id === msgId);
229
229
  if (idx === -1) {
230
- if (proto.type === "finish" || proto.type === "debug-trace" || proto.type === "step-start" || proto.type === "step-end" || proto.type === "navigate" || proto.type === "suggestions") {
230
+ if (proto.type === "finish" || proto.type === "debug-trace" || proto.type === "step-start" || proto.type === "step-end" || proto.type === "suggestions") {
231
231
  return prev;
232
232
  }
233
233
  prev = [...prev, { id: msgId, role: "assistant", parts: [] }];
@@ -901,10 +901,6 @@ function useChat({
901
901
  }, [messages]);
902
902
  const applyStreamEvent = react.useCallback(
903
903
  (proto, msgId) => {
904
- if (proto.type === "navigate") {
905
- if (proto.path.startsWith("/")) onNavigateRef.current?.(proto.path);
906
- return;
907
- }
908
904
  if (proto.type === "client-action") {
909
905
  executeDeclarativeSteps(
910
906
  proto.steps,
package/dist/index.mjs CHANGED
@@ -201,7 +201,7 @@ async function consumeStream(body, handler) {
201
201
  function applyUiEventToMessages(prev, proto, msgId) {
202
202
  let idx = prev.findIndex((m) => m.id === msgId);
203
203
  if (idx === -1) {
204
- if (proto.type === "finish" || proto.type === "debug-trace" || proto.type === "step-start" || proto.type === "step-end" || proto.type === "navigate" || proto.type === "suggestions") {
204
+ if (proto.type === "finish" || proto.type === "debug-trace" || proto.type === "step-start" || proto.type === "step-end" || proto.type === "suggestions") {
205
205
  return prev;
206
206
  }
207
207
  prev = [...prev, { id: msgId, role: "assistant", parts: [] }];
@@ -875,10 +875,6 @@ function useChat({
875
875
  }, [messages]);
876
876
  const applyStreamEvent = useCallback(
877
877
  (proto, msgId) => {
878
- if (proto.type === "navigate") {
879
- if (proto.path.startsWith("/")) onNavigateRef.current?.(proto.path);
880
- return;
881
- }
882
878
  if (proto.type === "client-action") {
883
879
  executeDeclarativeSteps(
884
880
  proto.steps,
package/package.json CHANGED
@@ -22,8 +22,8 @@
22
22
  "tsup": "^8.3.5",
23
23
  "tsx": "^4.19.2",
24
24
  "typescript": "^5.7.3",
25
- "@wallavi/protocol": "0.0.1",
26
- "@wallavi/typescript-config": "0.0.1"
25
+ "@wallavi/typescript-config": "0.0.1",
26
+ "@wallavi/protocol": "0.0.1"
27
27
  },
28
28
  "exports": {
29
29
  ".": {
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "private": false,
46
46
  "types": "./dist/index.d.ts",
47
- "version": "1.13.3",
47
+ "version": "1.14.0",
48
48
  "scripts": {
49
49
  "build": "tsup && pnpm build:css",
50
50
  "build:css": "tailwindcss -i ./src/styles.css -o ./dist/styles.css --config tailwind.config.cjs --minify",