feat(coding): complete PI conversation UI
This commit is contained in:
@@ -46,3 +46,21 @@ export async function createCodingProjectConversation(input: {
|
||||
);
|
||||
return response.conversation;
|
||||
}
|
||||
|
||||
export async function patchCodingProjectConversation(
|
||||
conversationId: string,
|
||||
patch: { title?: string; archived?: boolean; unread?: boolean },
|
||||
): Promise<CodingConversationMetadata> {
|
||||
const response = await hostApiFetch<{ conversation: CodingConversationMetadata }>(
|
||||
`/api/coding/conversations/${encodeURIComponent(conversationId)}`,
|
||||
{ method: 'PATCH', body: JSON.stringify(patch) },
|
||||
);
|
||||
return response.conversation;
|
||||
}
|
||||
|
||||
export async function deleteCodingProjectConversation(conversationId: string): Promise<void> {
|
||||
await hostApiFetch(
|
||||
`/api/coding/conversations/${encodeURIComponent(conversationId)}`,
|
||||
{ method: 'DELETE' },
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user