Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion examples/next/app/blogs/[blog]/page.val.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import authorsVal from "../../../content/authors.val";
import { linkSchema } from "../../../components/link.val";

const blogSchema = s.object({
title: s.string().maxLength(3),
title: s.string(),
content: s.richtext({
style: {
bold: true,
},
inline: {
a: s.route(),
},
Expand Down
2 changes: 1 addition & 1 deletion examples/next/val.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { s, c, val, config, nextAppRouter, externalPageRouter } = initVal({
ai: {
chat: {
experimental: {
enable: false,
enable: true,
},
suggestions: [
"Summarize",
Expand Down
1 change: 1 addition & 0 deletions packages/shared/src/internal/sessionStorage.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export const VAL_CONFIG_SESSION_STORAGE_KEY = "val-config";
export const VAL_THEME_SESSION_STORAGE_KEY = "val-theme";
export const VAL_AI_SESSION_STORAGE_KEY = "val-ai-session";
24 changes: 12 additions & 12 deletions packages/ui/spa/components/AIChat.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ type Story = StoryObj<typeof AIChat>;

export const Empty: Story = {
args: {
onSendMessage: (text: string) => {
console.log("Send:", text);
onSendMessage: (content) => {
console.log("Send:", content);
return true;
},
},
Expand All @@ -42,8 +42,8 @@ export const CustomSuggestions: Story = {
"Fix validation errors",
"Generate a summary",
],
onSendMessage: (text: string) => {
console.log("Send:", text);
onSendMessage: (content) => {
console.log("Send:", content);
return true;
},
},
Expand Down Expand Up @@ -92,8 +92,8 @@ const conversationMessages: ChatMessage[] = [
export const WithConversation: Story = {
args: {
initialMessages: conversationMessages,
onSendMessage: (text: string) => {
console.log("Send:", text);
onSendMessage: (content) => {
console.log("Send:", content);
return true;
},
},
Expand Down Expand Up @@ -191,8 +191,8 @@ export const Error: Story = {
error: "Connection lost — the server closed the WebSocket unexpectedly",
},
],
onSendMessage: (text: string) => {
console.log("Retry send:", text);
onSendMessage: (content) => {
console.log("Retry send:", content);
return true;
},
},
Expand All @@ -216,8 +216,8 @@ export const ErrorAfterPartialResponse: Story = {
error: "Stream interrupted — request timed out after 30s",
},
],
onSendMessage: (text: string) => {
console.log("Retry send:", text);
onSendMessage: (content) => {
console.log("Retry send:", content);
return true;
},
},
Expand Down Expand Up @@ -287,8 +287,8 @@ export const LongMarkdown: Story = {
status: "complete",
},
],
onSendMessage: (text: string) => {
console.log("Send:", text);
onSendMessage: (content) => {
console.log("Send:", content);
return true;
},
},
Expand Down
Loading
Loading