-
Notifications
You must be signed in to change notification settings - Fork 14
feat: align ep logs chat view with tokenized rollout prompts #431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
This file was deleted.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,9 +14,12 @@ export const MessageBubble = ({ message }: { message: Message }) => { | |
| const isTool = message.role === "tool"; | ||
| const hasToolCalls = message.tool_calls && message.tool_calls.length > 0; | ||
| const hasFunctionCall = message.function_call; | ||
| const hideMessageContent = message.role === "assistant" && hasToolCalls; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This unconditionally suppresses assistant Useful? React with 👍 / 👎. |
||
|
|
||
| // Get the message content as a string | ||
| const reasoning = (message as any).reasoning_content as string | undefined; | ||
| const titleLabel = | ||
| message.role === "system" && message.name ? message.name : message.role; | ||
| const getMessageContent = () => { | ||
| if (typeof message.content === "string") { | ||
| return message.content; | ||
|
|
@@ -33,11 +36,14 @@ export const MessageBubble = ({ message }: { message: Message }) => { | |
| } | ||
| }; | ||
|
|
||
| const messageContent = getMessageContent(); | ||
| const messageContent = hideMessageContent ? "" : getMessageContent(); | ||
| const hasMessageContent = messageContent.trim().length > 0; | ||
| const isLongMessage = messageContent.length > 200; // Threshold for considering a message "long" | ||
|
|
||
| const renderContent = () => { | ||
| if (hideMessageContent) { | ||
| return null; | ||
| } | ||
| if (typeof message.content === "string") { | ||
| return isLongMessage && !isExpanded | ||
| ? message.content.substring(0, 200) + "..." | ||
|
|
@@ -161,7 +167,7 @@ export const MessageBubble = ({ message }: { message: Message }) => { | |
| hasMessageContent ? "pr-8" : "" | ||
| }`} | ||
| > | ||
| {message.role} | ||
| {titleLabel} | ||
| </div> | ||
| <div className="whitespace-pre-wrap break-words overflow-hidden text-xs"> | ||
| {renderContent()} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The synthesized tool signature is hard-coded to an
actionargument and then forbids all other keys via[k: string]: never, regardless of each tool’s real schema. For tools whose parameters are notaction-based (e.g.get_weather(location, unit)intests/pytest/data/function_calling.jsonl), the displayed declaration is incorrect and can’t represent valid calls, which defeats the new “prompt-faithful” transcript behavior.Useful? React with 👍 / 👎.