✨ feat(vscode): 问 AI 收起再展开、重启后接着这块最近的会话问;代码改了对不上的问答不再显示
This commit is contained in:
1 parent
cbe447ade8
commit
f0a3ad80e1
16 files changed
+82
-211
No files matched your search
@@ -88,3 +88,8 @@ export function withoutEntry(map: QaMap, key: string, anchor: string, entryId: s
|
||||
delete next[key]
|
||||
return threads.length > 0 ? { ...next, [key]: threads } : next
|
||||
}
|
||||
|
||||
/** 再问 anchor 那块时接着的会话:这块最近一次问答的会话 id;没问过、或那次没记会话 id 时没有,重新开会话。 */
|
||||
export function latestSession(threads: readonly QaThread[] | undefined, anchor: string): string | undefined {
|
||||
return threads?.find(thread => thread.anchor === anchor)?.entries.at(-1)?.sessionId || undefined
|
||||
}
|
||||
Reference in new issue
Block a user