feat(coding): add model tools and device packages

This commit is contained in:
2026-09-02 18:35:26 +08:00
parent 841273b433
commit 664b8823a0
60 changed files with 3847 additions and 2068 deletions

View File

@@ -356,6 +356,18 @@ export class PiWorkerPool {
return this.revisions.markResourcesStale();
}
async refreshResources(): Promise<void> {
this.revisions.markResourcesStale();
const idleWorkers = [...this.workers.values()].filter((record) => (
(record.state === 'ready' || record.state === 'idle')
&& !this.activeRuns.has(record.conversation.conversationId)
));
await Promise.all(idleWorkers.map(async (record) => {
if (this.workers.get(record.conversation.conversationId) !== record) return;
await this.ensureFresh(record);
}));
}
async fork(
sourceConversationId: string,
conversation: PrepareConversationInput,