feat(coding): add core host api composition

This commit is contained in:
2026-08-23 20:00:35 +08:00
parent 98bac20639
commit 22b4a9f9c4
23 changed files with 2258 additions and 59 deletions

View File

@@ -235,6 +235,20 @@ export function createCodingConversationStore(
});
},
async delete(conversationId: string): Promise<void> {
await mutate(async (file) => {
const current = file.conversations.find((item) => item.id === conversationId);
if (!current) throw new Error('Conversation does not exist');
return {
result: undefined,
file: {
schemaVersion: 2,
conversations: file.conversations.filter((item) => item.id !== conversationId),
},
};
});
},
async ensureSessionBinding(
conversationId: string,
createBinding: () => Promise<PiSessionBinding>,