feat(coding): add core host api composition
This commit is contained in:
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user