feat(webui): add lightweight session messaging via mentions
This commit is contained in:
1 parent
2bdb11eeba
commit
0e184965e8
76 files changed
+8297
-658
No files matched your search
@@ -3,6 +3,7 @@ import { type ReactNode } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { SessionHandleHighlight } from "@/components/CliAppMentionText";
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
@@ -10,9 +11,11 @@ import {
|
||||
TooltipTrigger,
|
||||
} from "@/components/ui/tooltip";
|
||||
import { cn } from "@/lib/utils";
|
||||
import type { SessionHandle } from "@/lib/types";
|
||||
|
||||
interface ThreadHeaderProps {
|
||||
title: string;
|
||||
handle?: SessionHandle | null;
|
||||
onToggleSidebar: () => void;
|
||||
theme: "light" | "dark";
|
||||
onToggleTheme: () => void;
|
||||
@@ -32,6 +35,7 @@ interface ThreadHeaderProps {
|
||||
|
||||
export function ThreadHeader({
|
||||
title,
|
||||
handle = null,
|
||||
onToggleSidebar,
|
||||
theme,
|
||||
onToggleTheme,
|
||||
@@ -79,6 +83,16 @@ export function ThreadHeader({
|
||||
<span className="max-w-[min(60vw,32rem)] truncate">{title}</span>
|
||||
</div>
|
||||
) : null}
|
||||
{handle ? (
|
||||
<span
|
||||
data-testid="thread-handle-handle"
|
||||
className="flex shrink-0 items-center rounded-md px-1.5 py-1 text-[12px] font-medium"
|
||||
>
|
||||
<SessionHandleHighlight handle={handle}>
|
||||
@{handle.name}
|
||||
</SessionHandleHighlight>
|
||||
</span>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
<div className="ml-auto flex shrink-0 items-center gap-1">
|
||||
|
||||
Reference in new issue
Block a user