MCPcopy Create free account
hub / github.com/anomalyco/opencode / Message

Function Message

packages/session-ui/src/components/message-part.tsx:897–923  ·  view source on GitHub ↗
(props: MessageProps)

Source from the content-addressed store, hash-verified

895}
896
897export function Message(props: MessageProps) {
898 return (
899 <Switch>
900 <Match when={props.message.role === "user" && props.message}>
901 {(userMessage) => (
902 <UserMessageDisplay
903 message={userMessage() as UserMessage}
904 parts={props.parts}
905 actions={props.actions}
906 useV2Actions={props.useV2Actions}
907 />
908 )}
909 </Match>
910 <Match when={props.message.role === "assistant" && props.message}>
911 {(assistantMessage) => (
912 <AssistantMessageDisplay
913 message={assistantMessage() as AssistantMessage}
914 parts={props.parts}
915 showAssistantCopyPartID={props.showAssistantCopyPartID}
916 showReasoningSummaries={props.showReasoningSummaries}
917 useV2Actions={props.useV2Actions}
918 />
919 )}
920 </Match>
921 </Switch>
922 )
923}
924
925export function AssistantMessageDisplay(props: {
926 message: AssistantMessage

Callers

nothing calls this directly

Calls 2

userMessageFunction · 0.50
assistantMessageFunction · 0.50

Tested by

no test coverage detected