refactor: cleanup auto-rename code

This commit is contained in:
Zoe
2026-02-25 20:38:55 +00:00
parent e4536cbb8c
commit c3370c27a7
6 changed files with 71 additions and 40 deletions
+1 -10
View File
@@ -110,16 +110,7 @@ const handleChatSubmit = async (message: string, model: ModelWithProvider | null
await navigateTo(`/agent/${agent.id}/topic/${topic.id}`);
autoRename(topic.id, message).then(async res => {
if (res.ok === false) {
console.error('Failed to auto-rename:', res.error);
await triplit.update('topics', topic.id, {
renaming: false,
});
return;
}
});
autoRename(topic.id, message);
return sendMessage(message, topic, [], agent, model.provider, model).then(async res => {
if (res.ok === false) {