43 | {message.parts?.map((part) => {
44 | switch (part.type) {
45 | case "text":
46 | return (
47 |
51 |
57 | {part.text as string}
58 |
59 |
60 | );
61 | case "tool-invocation":
62 | const { toolName, toolCallId, state } = part.toolInvocation;
63 | return (
64 |
70 | {toolName === "deepResearch" ? (
71 |
75 | ) : toolName === "webSearch" ? (
76 | state === "result" ? null : (
77 |
83 | Searching the web...
84 |
85 | )
86 | ) : null}
87 |
88 | );
89 |
90 | default:
91 | return null;
92 | }
93 | })}
94 |