refactor: simplify parameter

This commit is contained in:
Henry Li
2026-01-16 19:50:41 +08:00
parent df396fc246
commit b72eb61302

View File

@@ -2,11 +2,8 @@ import type { BaseMessage } from "@langchain/core/messages";
import type { AgentThread } from "./types"; import type { AgentThread } from "./types";
export function pathOfThread(thread: AgentThread, includeAssistantId = true) { export function pathOfThread(threadId: string) {
if (includeAssistantId) { return `/workspace/chats/${threadId}`;
return `/workspace/chats/${thread.thread_id}`;
}
return `/workspace/chats/${thread.thread_id}`;
} }
export function textOfMessage(message: BaseMessage) { export function textOfMessage(message: BaseMessage) {