refactor: cleanup auto-rename code
This commit is contained in:
@@ -49,16 +49,7 @@ const handleSubmit = async (message: string, model: ModelWithProvider | null) =>
|
||||
const topic = await createTopic();
|
||||
if (!topic) throw new Error('Failed to create topic');
|
||||
|
||||
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);
|
||||
|
||||
await navigateTo(`/agent/${route.params.id}/topic/${topic.id}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user