fix: close PI core chat review gaps
This commit is contained in:
@@ -81,7 +81,18 @@ export function createCodingComposition(
|
||||
});
|
||||
const extensionHost = new PiManagedExtensionHost();
|
||||
extensionHost.configureProductTools(productTools);
|
||||
const registry = new PiSessionRegistry({ projectStore });
|
||||
const conversationStores = new Map<string, ReturnType<typeof createCodingConversationStore>>();
|
||||
const conversationStoreForProject = (projectPath: string) => {
|
||||
const existing = conversationStores.get(projectPath);
|
||||
if (existing) return existing;
|
||||
const created = createCodingConversationStore(projectPath);
|
||||
conversationStores.set(projectPath, created);
|
||||
return created;
|
||||
};
|
||||
const registry = new PiSessionRegistry({
|
||||
projectStore,
|
||||
createConversationStore: conversationStoreForProject,
|
||||
});
|
||||
const revisions = new PiManagedInputRevisionCoordinator();
|
||||
const processBudget = new PiProcessBudget();
|
||||
const loadProviderInput = async () => ({
|
||||
@@ -145,15 +156,16 @@ export function createCodingComposition(
|
||||
})),
|
||||
});
|
||||
const projects = new CodingProjectService(projectStore, {
|
||||
createConversationStore: conversationStoreForProject,
|
||||
onResourcesChanged: async (project) => {
|
||||
runtime.markResourcesStale();
|
||||
const conversations = await createCodingConversationStore(project.path).read()
|
||||
const conversations = await conversationStoreForProject(project.path).read()
|
||||
.then((file) => file.conversations)
|
||||
.catch(() => []);
|
||||
for (const conversation of conversations) registry.forget(conversation.id);
|
||||
},
|
||||
onProjectDeactivated: async (project) => {
|
||||
const conversations = await createCodingConversationStore(project.path).read()
|
||||
const conversations = await conversationStoreForProject(project.path).read()
|
||||
.then((file) => file.conversations)
|
||||
.catch(() => []);
|
||||
await Promise.allSettled([
|
||||
|
||||
Reference in New Issue
Block a user