🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
const THREAD_TITLE_LENGTH = 60;
/**
* A thread is named by the Agent that opened it, or else after the first line of the message it
* branched from, when loaded.
*/
export const threadTitle = (
root?: { content: string } | null,
thread?: { title?: string } | null,
) => {
if (thread?.title) return thread.title;
const line = root?.content.trim().split('\n')[0];
return line ? line.slice(0, THREAD_TITLE_LENGTH) : undefined;
};