Changeset 0.28.0.5 (#177)
This commit is contained in:
@@ -150,7 +150,7 @@ async function summarizeAndContinue() {
|
||||
const resp = await API.getActivePath(channelId);
|
||||
const chat = App.chats.find(c => c.id === channelId);
|
||||
if (chat && resp) {
|
||||
chat.messages = (resp.path || []).map(m => ({
|
||||
chat.messages = (resp.messages || []).map(m => ({
|
||||
id: m.id,
|
||||
parent_id: m.parent_id || null,
|
||||
role: m.role,
|
||||
@@ -244,7 +244,7 @@ async function selectChat(chatId) {
|
||||
if (chat.messages.length === 0 && chat.messageCount > 0) {
|
||||
try {
|
||||
const resp = await API.getActivePath(chatId);
|
||||
chat.messages = (resp.path || []).map(m => ({
|
||||
chat.messages = (resp.messages || []).map(m => ({
|
||||
id: m.id,
|
||||
parent_id: m.parent_id || null,
|
||||
role: m.role,
|
||||
@@ -767,7 +767,7 @@ async function reloadActivePath() {
|
||||
|
||||
try {
|
||||
const resp = await API.getActivePath(App.activeId);
|
||||
chat.messages = (resp.path || []).map(m => ({
|
||||
chat.messages = (resp.messages || []).map(m => ({
|
||||
id: m.id,
|
||||
parent_id: m.parent_id || null,
|
||||
role: m.role,
|
||||
@@ -958,8 +958,8 @@ async function switchSibling(messageId, direction) {
|
||||
|
||||
// Update local state with the new path
|
||||
const chat = App.getActiveChat();
|
||||
if (chat && resp.path) {
|
||||
chat.messages = resp.path.map(m => ({
|
||||
if (chat && resp.messages) {
|
||||
chat.messages = resp.messages.map(m => ({
|
||||
id: m.id,
|
||||
parent_id: m.parent_id || null,
|
||||
role: m.role,
|
||||
|
||||
Reference in New Issue
Block a user