mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 10:50:38 +09:00
Exclude self-comments from queued comment UI
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
eda127a2b2
commit
5d6217b70b
3 changed files with 23 additions and 1 deletions
|
|
@ -59,13 +59,20 @@ export function createOptimisticIssueComment(params: {
|
|||
}
|
||||
|
||||
export function isQueuedIssueComment(params: {
|
||||
comment: Pick<IssueTimelineComment, "createdAt"> & Partial<Pick<OptimisticIssueComment, "clientStatus">>;
|
||||
comment: Pick<IssueTimelineComment, "createdAt"> &
|
||||
Partial<Pick<OptimisticIssueComment, "clientStatus">> & {
|
||||
authorAgentId?: string | null;
|
||||
};
|
||||
activeRunStartedAt?: Date | string | null;
|
||||
activeRunAgentId?: string | null;
|
||||
runId?: string | null;
|
||||
interruptedRunId?: string | null;
|
||||
}) {
|
||||
if (params.runId) return false;
|
||||
if (params.interruptedRunId) return false;
|
||||
if (params.comment.authorAgentId && params.activeRunAgentId && params.comment.authorAgentId === params.activeRunAgentId) {
|
||||
return false;
|
||||
}
|
||||
if (params.comment.clientStatus === "queued") return true;
|
||||
if (!params.activeRunStartedAt) return false;
|
||||
return toTimestamp(params.comment.createdAt) >= toTimestamp(params.activeRunStartedAt);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue