fix(coding): close PI-100 review findings
This commit is contained in:
@@ -25,7 +25,12 @@ import { createPiManagedSubagentChildOpener } from '../coding-runtime/pi/subagen
|
||||
import { PiSubagentScheduler } from '../coding-runtime/pi/subagent';
|
||||
import { PiProcessBudget, PiWorkerPool } from '../coding-runtime/pi/worker-pool';
|
||||
import { getProviderService } from '../services/providers/provider-service';
|
||||
import {
|
||||
isCodingProviderAuthenticationError,
|
||||
refreshCodingProviderCredential,
|
||||
} from './coding-provider-auth';
|
||||
import { createCodingProductHost, type CodingProductComposition } from './coding-product-services';
|
||||
import { archivePiConversationSession } from '../coding-runtime/pi/resource-loader';
|
||||
|
||||
export interface CodingCompositionPaths {
|
||||
executablePath: string;
|
||||
@@ -128,6 +133,8 @@ export function createCodingComposition(
|
||||
buildPiProviderCatalog(await loadProviderInput()),
|
||||
model,
|
||||
),
|
||||
isAuthenticationError: isCodingProviderAuthenticationError,
|
||||
refreshCredential: refreshCodingProviderCredential,
|
||||
resolveImages: async (refs) => await Promise.all(refs.map(async ({ attachmentId }) => {
|
||||
const record = await attachments.read(attachmentId);
|
||||
return {
|
||||
@@ -155,7 +162,15 @@ export function createCodingComposition(
|
||||
]);
|
||||
},
|
||||
});
|
||||
const conversations = new CodingConversationService(projects, runtime);
|
||||
const conversations = new CodingConversationService(projects, runtime, {
|
||||
archiveSession: async ({ projectId, sessionKey }) => {
|
||||
await archivePiConversationSession({
|
||||
userDataDir: options.paths.userDataDir,
|
||||
projectId,
|
||||
sessionKey,
|
||||
});
|
||||
},
|
||||
});
|
||||
const host = createCodingProductHost({
|
||||
projects,
|
||||
productTools,
|
||||
|
||||
Reference in New Issue
Block a user