#39 Phase 1.2: store.ts 统一 thread 存储,去掉 history prefix #41
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #39
Depends on: #40
目标
所有 thread 统一存
@uwf/thread/<id>,用 tag 表达 status,去掉@uwf/history/*prefix。改动
packages/cli/src/store.ts删除:
HISTORY_VAR_PREFIXThreadHistoryLinetypeloadAllHistory()findHistoryEntry()addHistoryEntry()parseHistoryJsonlLine()修改
entryFromVariable():修改
setThread():statustagcompletedAttag(如果非 null)新增:
loadActiveThreads(varStore)— 返回 status 不是 completed/cancelled 的 threadloadHistoryThreads(varStore)— 返回 status 是 completed/cancelled 的 threadcompleteThread(varStore, threadId, reason)— 设置 status + completedAt,不删除 entry删除
deleteThread()— 不再需要删除 thread entry,完成时只改 status tag迁移:
migrateHistoryToThreadVars()— 读@uwf/history/*,写到@uwf/thread/*(加 status tag),然后删除旧变量createUwfStore()中调用注意
proman build && proman test通过