mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-20 04:20:38 +09:00
Move date/menu to action bar and fix activity label sizing
- Agent comment header now only shows name (+ running badge) - Date, copy, thumbs up/down, and three-dots menu all in action bar - Activity event STATUS/ASSIGNEE labels changed from text-[9px] to text-xs to match value font size Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
29514606bb
commit
a57f6f48b4
1 changed files with 48 additions and 49 deletions
|
|
@ -558,8 +558,7 @@ function IssueChatAssistantMessage() {
|
||||||
</Avatar>
|
</Avatar>
|
||||||
|
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
<div className="mb-1.5 flex items-center justify-between gap-3">
|
<div className="mb-1.5 flex items-center gap-2">
|
||||||
<div className="flex items-center gap-2">
|
|
||||||
<span className="text-sm font-medium text-foreground">{authorName}</span>
|
<span className="text-sm font-medium text-foreground">{authorName}</span>
|
||||||
{isRunning ? (
|
{isRunning ? (
|
||||||
<span className="inline-flex items-center gap-1 rounded-full border border-cyan-400/40 bg-cyan-500/10 px-2 py-0.5 text-[10px] font-medium uppercase tracking-[0.14em] text-cyan-700 dark:text-cyan-200">
|
<span className="inline-flex items-center gap-1 rounded-full border border-cyan-400/40 bg-cyan-500/10 px-2 py-0.5 text-[10px] font-medium uppercase tracking-[0.14em] text-cyan-700 dark:text-cyan-200">
|
||||||
|
|
@ -568,10 +567,57 @@ function IssueChatAssistantMessage() {
|
||||||
</span>
|
</span>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-1 text-xs text-muted-foreground">
|
|
||||||
<a href={anchorId ? `#${anchorId}` : undefined} className="hover:text-foreground hover:underline">
|
<div className="space-y-3">
|
||||||
|
<MessagePrimitive.Parts
|
||||||
|
components={{
|
||||||
|
Text: ({ text }) => <IssueChatTextPart text={text} />,
|
||||||
|
ChainOfThought: IssueChatChainOfThought,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{message.content.length === 0 && waitingText ? (
|
||||||
|
<div className="rounded-sm bg-accent/20 px-3 py-2 text-sm text-muted-foreground">
|
||||||
|
{waitingText}
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
|
{notices.length > 0 ? (
|
||||||
|
<div className="space-y-2">
|
||||||
|
{notices.map((notice, index) => (
|
||||||
|
<div
|
||||||
|
key={`${message.id}:notice:${index}`}
|
||||||
|
className="rounded-sm border border-border/60 bg-accent/20 px-3 py-2 text-sm text-muted-foreground"
|
||||||
|
>
|
||||||
|
{notice}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="mt-2 flex items-center gap-1">
|
||||||
|
<a
|
||||||
|
href={anchorId ? `#${anchorId}` : undefined}
|
||||||
|
className="mr-1 text-xs text-muted-foreground hover:text-foreground hover:underline"
|
||||||
|
>
|
||||||
{message.createdAt ? formatShortDate(message.createdAt) : ""}
|
{message.createdAt ? formatShortDate(message.createdAt) : ""}
|
||||||
</a>
|
</a>
|
||||||
|
<ActionBarPrimitive.Copy
|
||||||
|
copiedDuration={2000}
|
||||||
|
className="group inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground data-[copied=true]:text-foreground"
|
||||||
|
title="Copy message"
|
||||||
|
aria-label="Copy message"
|
||||||
|
>
|
||||||
|
<Copy className="h-3.5 w-3.5 group-data-[copied=true]:hidden" />
|
||||||
|
<Check className="hidden h-3.5 w-3.5 group-data-[copied=true]:block" />
|
||||||
|
</ActionBarPrimitive.Copy>
|
||||||
|
{commentId && onVote ? (
|
||||||
|
<IssueChatFeedbackButtons
|
||||||
|
activeVote={activeVote}
|
||||||
|
sharingPreference={feedbackDataSharingPreference}
|
||||||
|
termsUrl={feedbackTermsUrl ?? null}
|
||||||
|
onVote={handleVote}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -606,53 +652,6 @@ function IssueChatAssistantMessage() {
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="space-y-3">
|
|
||||||
<MessagePrimitive.Parts
|
|
||||||
components={{
|
|
||||||
Text: ({ text }) => <IssueChatTextPart text={text} />,
|
|
||||||
ChainOfThought: IssueChatChainOfThought,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
{message.content.length === 0 && waitingText ? (
|
|
||||||
<div className="rounded-sm bg-accent/20 px-3 py-2 text-sm text-muted-foreground">
|
|
||||||
{waitingText}
|
|
||||||
</div>
|
|
||||||
) : null}
|
|
||||||
{notices.length > 0 ? (
|
|
||||||
<div className="space-y-2">
|
|
||||||
{notices.map((notice, index) => (
|
|
||||||
<div
|
|
||||||
key={`${message.id}:notice:${index}`}
|
|
||||||
className="rounded-sm border border-border/60 bg-accent/20 px-3 py-2 text-sm text-muted-foreground"
|
|
||||||
>
|
|
||||||
{notice}
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
) : null}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="mt-2 flex items-center gap-1">
|
|
||||||
<ActionBarPrimitive.Copy
|
|
||||||
copiedDuration={2000}
|
|
||||||
className="group inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground data-[copied=true]:text-foreground"
|
|
||||||
title="Copy message"
|
|
||||||
aria-label="Copy message"
|
|
||||||
>
|
|
||||||
<Copy className="h-3.5 w-3.5 group-data-[copied=true]:hidden" />
|
|
||||||
<Check className="hidden h-3.5 w-3.5 group-data-[copied=true]:block" />
|
|
||||||
</ActionBarPrimitive.Copy>
|
|
||||||
{commentId && onVote ? (
|
|
||||||
<IssueChatFeedbackButtons
|
|
||||||
activeVote={activeVote}
|
|
||||||
sharingPreference={feedbackDataSharingPreference}
|
|
||||||
termsUrl={feedbackTermsUrl ?? null}
|
|
||||||
onVote={handleVote}
|
|
||||||
/>
|
|
||||||
) : null}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</MessagePrimitive.Root>
|
</MessagePrimitive.Root>
|
||||||
);
|
);
|
||||||
|
|
@ -920,7 +919,7 @@ function IssueChatSystemMessage() {
|
||||||
|
|
||||||
{statusChange ? (
|
{statusChange ? (
|
||||||
<div className={cn("flex flex-wrap items-center gap-1.5 text-xs", isCurrentUser && "justify-end")}>
|
<div className={cn("flex flex-wrap items-center gap-1.5 text-xs", isCurrentUser && "justify-end")}>
|
||||||
<span className="text-[9px] font-medium uppercase tracking-[0.14em] text-muted-foreground">
|
<span className="text-xs font-medium uppercase tracking-wider text-muted-foreground">
|
||||||
Status
|
Status
|
||||||
</span>
|
</span>
|
||||||
<span className="text-muted-foreground">{humanizeValue(statusChange.from)}</span>
|
<span className="text-muted-foreground">{humanizeValue(statusChange.from)}</span>
|
||||||
|
|
@ -931,7 +930,7 @@ function IssueChatSystemMessage() {
|
||||||
|
|
||||||
{assigneeChange ? (
|
{assigneeChange ? (
|
||||||
<div className={cn("flex flex-wrap items-center gap-1.5 text-xs", isCurrentUser && "justify-end")}>
|
<div className={cn("flex flex-wrap items-center gap-1.5 text-xs", isCurrentUser && "justify-end")}>
|
||||||
<span className="text-[9px] font-medium uppercase tracking-[0.14em] text-muted-foreground">
|
<span className="text-xs font-medium uppercase tracking-wider text-muted-foreground">
|
||||||
Assignee
|
Assignee
|
||||||
</span>
|
</span>
|
||||||
<span className="text-muted-foreground">
|
<span className="text-muted-foreground">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue