Skip to content

Commit 682244a

Browse files
Cristhianzlautofix-ci[bot]
authored andcommitted
feat(playground): Add auth gate, session persistence and token display to shareable playground (#12519)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 87e3ef7 commit 682244a

1 file changed

Lines changed: 0 additions & 37 deletions

File tree

  • src/frontend/src/components/core/playgroundComponent/chat-view/chat-messages/components

src/frontend/src/components/core/playgroundComponent/chat-view/chat-messages/components/bot-message.tsx

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import useAlertStore from "@/stores/alertStore";
1111
import useFlowStore from "@/stores/flowStore";
1212
import useFlowsManagerStore from "@/stores/flowsManagerStore";
1313
import type { chatMessagePropsType } from "@/types/components";
14-
import { formatTokenCount } from "@/utils/format-token-count";
1514
import { cn } from "@/utils/utils";
1615
import { useMessageDuration } from "../hooks/use-message-duration";
1716
import { useStreamingMessage } from "../hooks/use-streaming-message";
@@ -127,42 +126,6 @@ export const BotMessage = memo(
127126
? persistedDuration
128127
: liveDisplayTime;
129128

130-
const formattedTokenCount = formatTokenCount(
131-
chat.properties?.usage?.total_tokens,
132-
);
133-
134-
const tokenTooltipContent =
135-
displayTime > 0 ? (
136-
<div className="flex flex-col gap-1">
137-
<div className="flex items-center text-xxs text-secondary-foreground">
138-
<div>Last run:</div>
139-
<div className="ml-1">{chat.timestamp}</div>
140-
</div>
141-
<div className="flex items-center text-xxs text-secondary-foreground">
142-
<div>Duration:</div>
143-
<div className="ml-auto">{formatSeconds(displayTime)}</div>
144-
</div>
145-
{chat.properties?.usage?.input_tokens != null && (
146-
<div className="flex items-center text-xxs text-secondary-foreground">
147-
<div>Input:</div>
148-
<div className="ml-auto flex items-center gap-1 font-mono text-xs">
149-
<ForwardedIconComponent name="Coins" className="h-3 w-3" />
150-
{formatTokenCount(chat.properties.usage.input_tokens)}
151-
</div>
152-
</div>
153-
)}
154-
{chat.properties?.usage?.output_tokens != null && (
155-
<div className="flex items-center text-xxs text-secondary-foreground">
156-
<div>Output:</div>
157-
<div className="ml-auto flex items-center gap-1 font-mono text-xs">
158-
<ForwardedIconComponent name="Coins" className="h-3 w-3" />
159-
{formatTokenCount(chat.properties.usage.output_tokens)}
160-
</div>
161-
</div>
162-
)}
163-
</div>
164-
) : null;
165-
166129
return (
167130
<>
168131
<div className="w-full word-break-break-word mt-2">

0 commit comments

Comments
 (0)