feat: globalize Magic Notes and improve runtime tools

This commit is contained in:
lofyer
2026-08-10 10:27:14 +08:00
parent 1a8e110866
commit 5ea022ad5c
47 changed files with 2442 additions and 1177 deletions
@@ -141,6 +141,24 @@ export async function analyzeMagicNoteEntry(
)
}
export async function analyzeMagicNoteDraft(
runtime: AgentRuntime,
plainText: string,
requestId: string,
onModelUsage?: (event: RuntimeModelUsageEvent) => void
): Promise<MagicNoteComment[]> {
return analyzeComments(
runtime,
{
source: plainText,
conversationId: `magic-note-drafts:${requestId}`,
subject: '未保存笔记草稿'
},
requestId,
onModelUsage
)
}
export function analyzeMagicTodo(
runtime: AgentRuntime,
todo: MagicTodoItem,