Changeset 0.28.0.5 (#177)

This commit is contained in:
2026-03-12 15:47:22 +00:00
parent 52bd36ba48
commit 8f20e5fa60
13 changed files with 225 additions and 107 deletions

View File

@@ -35,7 +35,8 @@ const ChannelModels = {
}
try {
const roster = await API.listChannelModels(channelId);
this._roster = Array.isArray(roster) ? roster : [];
const models = roster.models || roster;
this._roster = Array.isArray(models) ? models : [];
} catch (e) {
console.debug('Channel models not loaded:', e.message);
this._roster = [];

View File

@@ -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,

View File

@@ -33,7 +33,7 @@ const ToolsToggle = (() => {
_loadDisabled();
try {
const resp = await API.getTools();
_tools = resp.data || [];
_tools = resp.tools || [];
_buildCategories();
_render();
_show();
@@ -52,7 +52,7 @@ const ToolsToggle = (() => {
async function refresh() {
try {
const resp = await API.getTools();
_tools = resp.data || [];
_tools = resp.tools || [];
_buildCategories();
_render();
} catch (e) { /* silent */ }