Function
createTopic
(
pageId: string,
name: string,
startMessageId: string,
endMessageId?: string
)
Source from the content-addressed store, hash-verified
| 228 | * 创建新的 Topic |
| 229 | */ |
| 230 | export async function createTopic( |
| 231 | pageId: string, |
| 232 | name: string, |
| 233 | startMessageId: string, |
| 234 | endMessageId?: string |
| 235 | ): Promise<Topic> { |
| 236 | const topic: Topic = { |
| 237 | id: uuidv4(), |
| 238 | name, |
| 239 | startMessageId, |
| 240 | endMessageId, |
| 241 | collapsed: false |
| 242 | } |
| 243 | await stores.message.addTopic(pageId, topic) |
| 244 | return topic |
| 245 | } |
| 246 | |
| 247 | /** |
| 248 | * 更新 Topic |
Callers
nothing calls this directly
Tested by
no test coverage detected