Skip to content

Commit 7bfdb5d

Browse files
committed
fix: issue preventing chat creation
1 parent 9bcda52 commit 7bfdb5d

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "narratrix"
3-
version = "0.13.0"
3+
version = "0.13.1"
44
description = "Multi-Platform AI Client focused in Roleplay and Tabletop experience"
55
authors = ["vitorfdl"]
66
edition = "2021"
@@ -18,7 +18,7 @@ tauri-build = { version = "2", features = [] }
1818

1919
[dependencies]
2020
tauri = { version = "2", features = ["protocol-asset"] }
21-
tauri-plugin-opener = "2.5.0"
21+
tauri-plugin-opener = "2"
2222
serde = { version = "1", features = ["derive"] }
2323
serde_json = "1"
2424
tauri-plugin-window-state = "2"

src/services/chat-service.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ export async function createChat(chatData: CreateChatParams): Promise<Chat> {
3030
updated_at: new Date(now),
3131
});
3232

33+
console.log(validatedChat);
34+
3335
// Convert arrays to JSON strings for storage
3436
const participantsStr = JSON.stringify(validatedChat.participants);
3537
const userCharacterSettingsStr = JSON.stringify(validatedChat.user_character_settings);
@@ -51,11 +53,11 @@ export async function createChat(chatData: CreateChatParams): Promise<Chat> {
5153
validatedChat.id,
5254
validatedChat.profile_id,
5355
validatedChat.name,
54-
validatedChat.chat_template_id,
56+
validatedChat.chat_template_id || null,
5557
participantsStr,
56-
validatedChat.user_character_id,
58+
validatedChat.user_character_id || null,
5759
userCharacterSettingsStr,
58-
validatedChat.active_chapter_id,
60+
validatedChat.active_chapter_id || null,
5961
now,
6062
now,
6163
],

0 commit comments

Comments
 (0)