fix: address code review findings

This commit is contained in:
lda
2026-07-09 16:53:10 +07:00 Verified
parent ad20f749ab
commit c3c724bbf2
2 changed files with 4 additions and 5 deletions
@@ -29,6 +29,8 @@ export type ProjectedChatMessage = {
const toolStateFromResult = (status: AgentMessagePart & { readonly type: "tool-result" }): ToolState =>
status.result.status === "failure" ? "error" : "success";
const WORKFLOW_START_TOOL = "startPreparedReportRun";
const projectPart = (part: AgentMessagePart): ProjectedChatPart | null => {
switch (part.type) {
case "text":
@@ -36,10 +38,10 @@ const projectPart = (part: AgentMessagePart): ProjectedChatPart | null => {
case "tool-call":
return {
kind: "tool",
label: part.call.name === "startPreparedReportRun" ? "Workflow operation" : "Tool call",
label: part.call.name === WORKFLOW_START_TOOL ? "Workflow operation" : "Tool call",
name: part.call.name,
state: "pending",
defaultOpen: part.call.name === "startPreparedReportRun",
defaultOpen: part.call.name === WORKFLOW_START_TOOL,
input: part.call.input,
};
case "tool-result":
@@ -1296,9 +1296,6 @@
opacity: 0.55;
}
/* Source-owned AI Elements-style primitives. These classes intentionally mirror
conversation/message/tool concepts so a future AI SDK driver can reuse the
same surface without changing the demo timeline state model. */
.operator-chat .ai-chat-conversation {
display: flex;
min-height: 0;