Changeset 0.19.1 (#83)
This commit is contained in:
@@ -469,6 +469,13 @@ async function sendMessage() {
|
||||
const title = text.slice(0, 50) + (text.length > 50 ? '...' : '');
|
||||
const resp = await API.createChannel(title, model, App.settings.systemPrompt, 'direct');
|
||||
const chat = { id: resp.id, title: resp.title, type: 'direct', model, messages: [], messageCount: 0, projectId: resp.project_id || null, updatedAt: resp.updated_at, settings: resp.settings || {} };
|
||||
// Auto-assign to active project (v0.19.1)
|
||||
if (App.activeProjectId && !chat.projectId) {
|
||||
try {
|
||||
await API.addChannelToProject(App.activeProjectId, chat.id, 0);
|
||||
chat.projectId = App.activeProjectId;
|
||||
} catch (_) { /* best effort — chat still works without project */ }
|
||||
}
|
||||
App.chats.unshift(chat);
|
||||
App.currentChatId = chat.id;
|
||||
UI.renderChatList();
|
||||
|
||||
Reference in New Issue
Block a user