fix:基本实现相关功能

This commit is contained in:
2026-01-08 00:12:19 +08:00
commit f361a7027b
68 changed files with 10920 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
import { Annotation } from '@langchain/langgraph'
import { Occupation } from '@shared/types/reflections'
export const ReadingReflectionState = Annotation.Root({
// 输入任务
bookName: Annotation<string>(),
author: Annotation<string | undefined>(),
description: Annotation<string>(),
occupation: Annotation<Occupation>(),
tone: Annotation<string | undefined>(),
wordCount: Annotation<number>(),
// 标题:使用简单的覆盖逻辑
title: Annotation<string>({
reducer: (_oldValue, newValue) => newValue,
default: () => ''
}),
// 内容
content: Annotation<string>({
reducer: (_oldValue, newValue) => newValue,
default: () => ''
}),
// 摘要
summary: Annotation<string>({
reducer: (_oldValue, newValue) => newValue,
default: () => ''
}),
// 关键词:数组通常使用追加或替换逻辑
keywords: Annotation<string[]>({
reducer: (_oldValue, newValue) => newValue,
default: () => []
})
})