mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-11 14:10:50 +02:00
fix(native): retain actionable final replies and document links
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
3737f89626
commit
be604fcbf8
15 files changed
+195
-12
No files matched your search
@@ -830,6 +830,7 @@ describe("PaperclipRunnerToolAuthority", () => {
|
||||
disposition: "applied",
|
||||
created: true,
|
||||
document: { key: "plan", body },
|
||||
documentHref: "/RNT/issues/RNT-1#document-plan",
|
||||
});
|
||||
expect(
|
||||
await db
|
||||
|
||||
@@ -48,6 +48,7 @@ import {
|
||||
agentWakeupRequests,
|
||||
chatEndpoints,
|
||||
chatConversations,
|
||||
companies,
|
||||
documentRevisions,
|
||||
heartbeatRuns,
|
||||
issueApprovals,
|
||||
@@ -928,10 +929,15 @@ export class PaperclipRunnerToolAuthority {
|
||||
},
|
||||
});
|
||||
publication = activity.publication;
|
||||
const [target] = await tx.select({ identifier: issues.identifier, issuePrefix: companies.issuePrefix })
|
||||
.from(issues).innerJoin(companies, eq(companies.id, issues.companyId))
|
||||
.where(and(eq(issues.id, this.binding.issueId), eq(issues.companyId, this.binding.companyId)));
|
||||
if (!target) throw new Error("paperclip_runner_document_task_not_found");
|
||||
return {
|
||||
disposition: "applied",
|
||||
created: write.created,
|
||||
document: write.document,
|
||||
documentHref: `/${encodeURIComponent(target.issuePrefix)}/issues/${encodeURIComponent(target.identifier ?? this.binding.issueId)}#document-${encodeURIComponent(write.document.key)}`,
|
||||
};
|
||||
});
|
||||
if (publication) publishActivity(publication);
|
||||
|
||||
Reference in new issue
Block a user