feat(distill,conversations,scheduler,api,ui): close deep chats with a distiller fork, digest and index, idle and weekly state jobs

This commit is contained in:
hh
2026-08-29 03:15:39 +02:00
parent 12728b2eb4
commit 1786406b31
11 changed files with 1103 additions and 19 deletions
+11
View File
@@ -234,6 +234,17 @@ export class ApiClient {
return this.post(`/api/conversations/${id}/merge`);
}
close(id: string): Promise<{
id: string;
status: string;
fork?: string;
text?: string;
digest?: string | null;
error?: string | null;
}> {
return this.post(`/api/conversations/${id}/close`);
}
bind(
id: string,
frontend: string,
@@ -87,6 +87,15 @@
}
}
async function distill() {
const result = await client.close(info.id);
if (result.error) {
toast.warning(`Digest: ${result.error}`);
} else if (result.digest) {
toast.message(`Digest: ${result.digest}`);
}
}
function copyId() {
navigator.clipboard
.writeText(info.id)
@@ -153,6 +162,11 @@
Merge into parent
</DropdownMenu.Item>
{/if}
{#if info.kind === "deep" && info.status === "open"}
<DropdownMenu.Item onclick={() => run(distill, "Chat closed")}>
Close with digest
</DropdownMenu.Item>
{/if}
{#if info.status === "open"}
<DropdownMenu.Item
onclick={() =>