bug fixes, and performance improvements, and drawer
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import type { BaseMessage } from "~/composables/useChat";
|
||||
import { nanoid } from "nanoid";
|
||||
import { provisionalTopicTitle } from "~~/utils/topic-title";
|
||||
import { attempt } from "~~/types/result";
|
||||
import * as schema from '~~/drizzle/schema';
|
||||
|
||||
@@ -153,11 +155,11 @@ export const useAgents = async () => {
|
||||
|
||||
// TODO: since topics are contained within each agent struct, all topic
|
||||
// actions must be done through the agents composable
|
||||
const createTopic = async (agentId: string) => {
|
||||
const createTopic = async (agentId: string, message?: BaseMessage) => {
|
||||
const topicId = nanoid();
|
||||
const topic = {
|
||||
id: topicId,
|
||||
name: 'New Topic',
|
||||
name: provisionalTopicTitle(message),
|
||||
agentId,
|
||||
};
|
||||
|
||||
@@ -214,6 +216,9 @@ export const useAgents = async () => {
|
||||
agentId: agent.id,
|
||||
userId: agent.userId,
|
||||
renaming: false,
|
||||
renameAttemptId: null,
|
||||
renameExpiresAt: null,
|
||||
titleSource: "manual",
|
||||
createdAt: new Date(),
|
||||
};
|
||||
agents.value = agents.value.map(a =>
|
||||
|
||||
Reference in New Issue
Block a user