@drewswiredin/backstage-plugin-assistants 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -45,13 +45,10 @@ const useStyles = makeStyles((theme) => ({
|
|
|
45
45
|
},
|
|
46
46
|
// The composer is narrower than the conversation: cap the footer (which holds
|
|
47
47
|
// the composer and is centered in the viewport) below the 90% thread width.
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
// composer off the bottom WITHOUT exposing the card's paper bg (a two-tone
|
|
51
|
-
// seam). Padding the card/threadBody instead would re-create that seam.
|
|
48
|
+
// Bottom padding is left at the react-ui stock value (1rem) — overriding it
|
|
49
|
+
// larger left a too-tall solid footer band beneath the composer.
|
|
52
50
|
"& .aui-thread-viewport-footer": {
|
|
53
|
-
maxWidth: "48rem"
|
|
54
|
-
paddingBottom: "2.5rem"
|
|
51
|
+
maxWidth: "48rem"
|
|
55
52
|
}
|
|
56
53
|
},
|
|
57
54
|
botAvatar: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationSurface.esm.js","sources":["../../../src/collapsible/surface/ConversationSurface.tsx"],"sourcesContent":["// The prebuilt react-ui `<Thread>` stylesheet is vendored locally under\n// `styles/` and imported once at the top of `CollapsiblePage.tsx`. It is NOT\n// imported here: react-ui's `sideEffects: false` lets bundlers tree-shake a\n// bare CSS import from inside a lazily-loaded component, which left the Thread\n// unstyled.\nimport {\n createContext,\n useContext,\n useEffect,\n useState,\n type CSSProperties,\n} from 'react';\nimport type { ProfileInfo } from '@backstage/core-plugin-api';\nimport { identityApiRef, useApi } from '@backstage/core-plugin-api';\nimport { Avatar as BackstageAvatar } from '@backstage/core-components';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport { Button, Typography } from '@material-ui/core';\nimport { BackstageLogo } from './BackstageLogo';\nimport { DEFAULT_AVATAR_COLOR, resolveAssistantColor } from './AssistantAvatar';\nimport { ThreadPrimitive } from '@assistant-ui/react';\nimport {\n AssistantActionBar,\n AssistantMessage,\n BranchPicker,\n Thread,\n ThreadWelcome,\n UserMessage,\n} from '@assistant-ui/react-ui';\nimport { MarkdownText } from './MarkdownText';\nimport { ReasoningPart, ThinkingMessage, ToolFallback } from './parts';\n\nconst DEFAULT_WELCOME_SUBTITLE =\n 'Ask me about services, APIs, teams, TechDocs, or anything in the catalog.';\n\n// The active assistant's avatar color. ConversationSurface provides it; the\n// message components (passed to <Thread> by reference, so they can't take props)\n// read it from context. Falls back to DEFAULT_AVATAR_COLOR.\nconst AvatarColorContext = createContext<string | undefined>(undefined);\n\nconst useStyles = makeStyles(theme => ({\n threadHost: {\n flex: 1,\n minHeight: 0,\n '& .aui-thread-root': {\n // Wide conversation pane to maximize room for diagrams / visual artifacts.\n // (The composer is narrowed independently via the footer max-width below.)\n '--aui-thread-max-width': '90%',\n '--aui-background':\n theme.palette.type === 'dark' ? '0 0% 18%' : '0 0% 100%',\n '--aui-foreground':\n theme.palette.type === 'dark' ? '0 0% 98%' : '240 10% 3.9%',\n '--aui-muted':\n theme.palette.type === 'dark' ? '0 0% 24%' : '240 4.8% 95.9%',\n '--aui-muted-foreground':\n theme.palette.type === 'dark' ? '0 0% 70%' : '240 3.8% 46.1%',\n '--aui-accent':\n theme.palette.type === 'dark' ? '0 0% 24%' : '240 4.8% 95.9%',\n '--aui-accent-foreground':\n theme.palette.type === 'dark' ? '0 0% 98%' : '240 5.9% 10%',\n '--aui-border':\n theme.palette.type === 'dark' ? '0 0% 40%' : '240 5.9% 90%',\n '--aui-input':\n theme.palette.type === 'dark' ? '0 0% 40%' : '240 5.9% 90%',\n '--aui-ring':\n theme.palette.type === 'dark' ? '207 90% 68%' : '210 90% 45%',\n '--aui-primary':\n theme.palette.type === 'dark' ? '0 0% 98%' : '240 5.9% 10%',\n '--aui-primary-foreground':\n theme.palette.type === 'dark' ? '240 5.9% 10%' : '0 0% 98%',\n },\n // Active composer border tinted to the agent color (set as --aui-composer-focus\n // on the host below); falls back to the theme primary if unset.\n '& .aui-composer-root:focus-within': {\n borderColor: 'var(--aui-composer-focus)',\n boxShadow: '0 0 0 1px var(--aui-composer-focus)',\n },\n '& .aui-assistant-message-content': {\n maxWidth: '100%',\n width: '100%',\n },\n // The composer is narrower than the conversation: cap the footer (which holds\n // the composer and is centered in the viewport) below the 90% thread width.\n // Breathing room below the composer lives here too — the footer is sticky\n // bottom:0 and inherits the Thread's --aui-background, so padding lifts the\n // composer off the bottom WITHOUT exposing the card's paper bg (a two-tone\n // seam). Padding the card/threadBody instead would re-create that seam.\n '& .aui-thread-viewport-footer': {\n maxWidth: '48rem',\n paddingBottom: '2.5rem',\n },\n },\n botAvatar: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n // Transparent so the tinted logo floats (overrides react-ui's aui-avatar-root).\n backgroundColor: 'transparent',\n // Bumped to ~match the user avatar (which has an encircling disc); the\n // floating logo looked small by comparison.\n width: 32,\n height: 32,\n },\n botLogo: {\n height: '100%',\n width: 'auto',\n },\n userMessageWithAvatar: {\n display: 'flex',\n width: '100%',\n maxWidth: 'var(--aui-thread-max-width)',\n flexDirection: 'column',\n alignItems: 'flex-end',\n gap: theme.spacing(0.5),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n },\n userMessageBody: {\n display: 'flex',\n maxWidth: '80%',\n alignItems: 'flex-start',\n justifyContent: 'flex-end',\n gap: theme.spacing(1),\n '& .aui-user-message-content': {\n maxWidth: '100%',\n },\n },\n userAvatar: {\n width: theme.spacing(5),\n height: theme.spacing(5),\n marginTop: theme.spacing(0.25),\n flexShrink: 0,\n },\n welcomeRoot: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n gap: theme.spacing(2),\n maxWidth: '28rem',\n textAlign: 'center',\n },\n welcomeLogo: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 56,\n height: 56,\n },\n welcomeLogoIcon: {\n width: 30,\n height: 'auto',\n },\n welcomeGreeting: {\n fontWeight: 500,\n color: theme.palette.text.primary,\n },\n welcomeSubtitle: {\n color: theme.palette.text.secondary,\n },\n suggestions: {\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'center',\n gap: theme.spacing(1),\n marginTop: theme.spacing(1),\n },\n suggestionButton: {\n textTransform: 'none',\n borderRadius: 999,\n },\n}));\n\n/** A circular MUI-styled bot avatar (no host asset dependency). */\nfunction AssistantBotAvatar() {\n const classes = useStyles();\n const color = useContext(AvatarColorContext) ?? DEFAULT_AVATAR_COLOR;\n\n return (\n <span\n className={`aui-avatar-root ${classes.botAvatar}`}\n style={{ color, backgroundColor: 'transparent' }}\n aria-label=\"Backstage assistant\"\n role=\"img\"\n >\n <BackstageLogo className={classes.botLogo} />\n </span>\n );\n}\n\nfunction AssistantMessageWithAvatar() {\n return (\n <AssistantMessage.Root>\n <AssistantBotAvatar />\n <AssistantMessage.Content components={{ Reasoning: ReasoningPart }} />\n <BranchPicker />\n <AssistantActionBar />\n </AssistantMessage.Root>\n );\n}\n\n/** Read the signed-in user's profile (display name, picture) once. */\nfunction useProfile() {\n const identityApi = useApi(identityApiRef);\n const [profile, setProfile] = useState<ProfileInfo>();\n\n useEffect(() => {\n let mounted = true;\n\n identityApi.getProfileInfo().then(value => {\n if (mounted) {\n setProfile(value);\n }\n });\n\n return () => {\n mounted = false;\n };\n }, [identityApi]);\n\n return profile;\n}\n\nfunction UserChatAvatar() {\n const classes = useStyles();\n const profile = useProfile();\n\n return (\n <BackstageAvatar\n classes={{ avatar: classes.userAvatar }}\n displayName={profile?.displayName ?? profile?.email ?? 'You'}\n picture={profile?.picture}\n />\n );\n}\n\nfunction UserMessageWithAvatar() {\n const classes = useStyles();\n\n return (\n <UserMessage.Root className={classes.userMessageWithAvatar}>\n <UserMessage.Attachments />\n <div className={classes.userMessageBody}>\n <UserMessage.Content />\n <UserChatAvatar />\n </div>\n </UserMessage.Root>\n );\n}\n\n/**\n * Props for {@link ConversationSurface}.\n *\n * @public\n */\nexport interface ConversationSurfaceProps {\n /** Placeholder text for the composer input (from the assistant's ui config). */\n composerPlaceholder?: string;\n /** Starter prompts shown as clickable chips on the empty thread. */\n suggestions?: Array<{ title: string; prompt: string }>;\n /** Overrides for the default empty-thread greeting. */\n welcome?: { title?: string; subtitle?: string };\n /** The active assistant's avatar tint (hex); defaults to Backstage teal. */\n assistantColor?: string;\n /** Host layout escape hatch (applied alongside the themed thread host). */\n className?: string;\n}\n\n/**\n * The react-ui `<Thread>` rendered with Implementation 1's custom message\n * components: a bot-avatar assistant message, an avatar'd user message,\n * Markdown (with streaming-safe Mermaid), a tool-call fallback, a thinking /\n * error empty-state, and a personalized empty-thread welcome with optional\n * starter-prompt chips.\n *\n * This is a \"bring your own runtime\" surface — it expects an\n * `AssistantRuntimeProvider` higher in the tree.\n *\n * @public\n */\nexport function ConversationSurface(props: ConversationSurfaceProps) {\n const { composerPlaceholder, suggestions, welcome, assistantColor, className } =\n props;\n const classes = useStyles();\n const theme = useTheme();\n // One mode-appropriate shade for every place the agent color appears here\n // (chat bot avatar via context, welcome logo, composer focus border).\n const resolvedColor = resolveAssistantColor(assistantColor, theme.palette.type);\n\n function EmptyThreadWelcome() {\n const profile = useProfile();\n const firstName = profile?.displayName?.split(' ')[0] ?? 'there';\n\n const title = welcome?.title ?? `Hi ${firstName}, welcome to Backstage`;\n const subtitle = welcome?.subtitle ?? DEFAULT_WELCOME_SUBTITLE;\n\n return (\n <ThreadWelcome.Root>\n <ThreadWelcome.Center>\n <div className={classes.welcomeRoot}>\n <span\n className={classes.welcomeLogo}\n style={{ color: resolvedColor }}\n aria-hidden=\"true\"\n >\n <BackstageLogo className={classes.welcomeLogoIcon} />\n </span>\n <Typography variant=\"h5\" className={classes.welcomeGreeting}>\n {title}\n </Typography>\n <Typography variant=\"body2\" className={classes.welcomeSubtitle}>\n {subtitle}\n </Typography>\n {suggestions && suggestions.length > 0 && (\n <div className={classes.suggestions}>\n {suggestions.map(suggestion => (\n <ThreadPrimitive.Suggestion\n key={suggestion.prompt}\n prompt={suggestion.prompt}\n send\n asChild\n >\n <Button\n variant=\"outlined\"\n size=\"small\"\n className={classes.suggestionButton}\n >\n {suggestion.title}\n </Button>\n </ThreadPrimitive.Suggestion>\n ))}\n </div>\n )}\n </div>\n </ThreadWelcome.Center>\n </ThreadWelcome.Root>\n );\n }\n\n return (\n <AvatarColorContext.Provider value={resolvedColor}>\n <div\n className={`${classes.threadHost} ${className ?? ''}`}\n style={\n {\n '--aui-composer-focus': resolvedColor,\n } as CSSProperties\n }\n >\n <Thread\n strings={\n composerPlaceholder\n ? { composer: { input: { placeholder: composerPlaceholder } } }\n : undefined\n }\n components={{\n AssistantMessage: AssistantMessageWithAvatar,\n ThreadWelcome: EmptyThreadWelcome,\n UserMessage: UserMessageWithAvatar,\n }}\n assistantMessage={{\n components: {\n Text: MarkdownText,\n Empty: ThinkingMessage,\n ToolFallback,\n },\n }}\n />\n </div>\n </AvatarColorContext.Provider>\n );\n}\n"],"names":["BackstageAvatar"],"mappings":";;;;;;;;;;;;;AA+BA,MAAM,wBAAA,GACJ,2EAAA;AAKF,MAAM,kBAAA,GAAqB,cAAkC,MAAS,CAAA;AAEtE,MAAM,SAAA,GAAY,WAAW,CAAA,KAAA,MAAU;AAAA,EACrC,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,CAAA;AAAA,IACN,SAAA,EAAW,CAAA;AAAA,IACX,oBAAA,EAAsB;AAAA;AAAA;AAAA,MAGpB,wBAAA,EAA0B,KAAA;AAAA,MAC1B,kBAAA,EACE,KAAA,CAAM,OAAA,CAAQ,IAAA,KAAS,SAAS,UAAA,GAAa,WAAA;AAAA,MAC/C,kBAAA,EACE,KAAA,CAAM,OAAA,CAAQ,IAAA,KAAS,SAAS,UAAA,GAAa,cAAA;AAAA,MAC/C,aAAA,EACE,KAAA,CAAM,OAAA,CAAQ,IAAA,KAAS,SAAS,UAAA,GAAa,gBAAA;AAAA,MAC/C,wBAAA,EACE,KAAA,CAAM,OAA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CAAA,EACF,CAAA;AAAA,EAEJ;AAEA,EAAA,uBACE,GAAA,CAAC,kBAAA,CAAmB,QAAA,EAAnB,EAA4B,OAAO,aAAA,EAClC,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAW,CAAA,EAAG,OAAA,CAAQ,UAAU,CAAA,CAAA,EAAI,aAAa,EAAE,CAAA,CAAA;AAAA,MACnD,KAAA,EACE;AAAA,QACE,sBAAA,EAAwB;AAAA,OAC1B;AAAA,MAGF,QAAA,kBAAA,GAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,OAAA,EACA,mBAAA,GACI,EAAE,QAAA,EAAU,EAAE,KAAA,EAAO,EAAE,WAAA,EAAa,mBAAA,EAAoB,EAAE,EAAE,GAC5D,MAAA;AAAA,UAEN,UAAA,EAAY;AAAA,YACV,gBAAA,EAAkB,0BAAA;AAAA,YAClB,aAAA,EAAe,kBAAA;AAAA,YACf,WAAA,EAAa;AAAA,WACf;AAAA,UACE,gBAAA,EAAkB;AAAA,YAChB,UAAA,EAAY;AAAA,cACV,IAAA,EAAM,YAAA;AAAA,cACN,KAAA,EAAO,eAAA;AAAA,cACP;AAAA;AACF;AACF;AAAA;AACF;AAAA,GACF,EACF,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"ConversationSurface.esm.js","sources":["../../../src/collapsible/surface/ConversationSurface.tsx"],"sourcesContent":["// The prebuilt react-ui `<Thread>` stylesheet is vendored locally under\n// `styles/` and imported once at the top of `CollapsiblePage.tsx`. It is NOT\n// imported here: react-ui's `sideEffects: false` lets bundlers tree-shake a\n// bare CSS import from inside a lazily-loaded component, which left the Thread\n// unstyled.\nimport {\n createContext,\n useContext,\n useEffect,\n useState,\n type CSSProperties,\n} from 'react';\nimport type { ProfileInfo } from '@backstage/core-plugin-api';\nimport { identityApiRef, useApi } from '@backstage/core-plugin-api';\nimport { Avatar as BackstageAvatar } from '@backstage/core-components';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport { Button, Typography } from '@material-ui/core';\nimport { BackstageLogo } from './BackstageLogo';\nimport { DEFAULT_AVATAR_COLOR, resolveAssistantColor } from './AssistantAvatar';\nimport { ThreadPrimitive } from '@assistant-ui/react';\nimport {\n AssistantActionBar,\n AssistantMessage,\n BranchPicker,\n Thread,\n ThreadWelcome,\n UserMessage,\n} from '@assistant-ui/react-ui';\nimport { MarkdownText } from './MarkdownText';\nimport { ReasoningPart, ThinkingMessage, ToolFallback } from './parts';\n\nconst DEFAULT_WELCOME_SUBTITLE =\n 'Ask me about services, APIs, teams, TechDocs, or anything in the catalog.';\n\n// The active assistant's avatar color. ConversationSurface provides it; the\n// message components (passed to <Thread> by reference, so they can't take props)\n// read it from context. Falls back to DEFAULT_AVATAR_COLOR.\nconst AvatarColorContext = createContext<string | undefined>(undefined);\n\nconst useStyles = makeStyles(theme => ({\n threadHost: {\n flex: 1,\n minHeight: 0,\n '& .aui-thread-root': {\n // Wide conversation pane to maximize room for diagrams / visual artifacts.\n // (The composer is narrowed independently via the footer max-width below.)\n '--aui-thread-max-width': '90%',\n '--aui-background':\n theme.palette.type === 'dark' ? '0 0% 18%' : '0 0% 100%',\n '--aui-foreground':\n theme.palette.type === 'dark' ? '0 0% 98%' : '240 10% 3.9%',\n '--aui-muted':\n theme.palette.type === 'dark' ? '0 0% 24%' : '240 4.8% 95.9%',\n '--aui-muted-foreground':\n theme.palette.type === 'dark' ? '0 0% 70%' : '240 3.8% 46.1%',\n '--aui-accent':\n theme.palette.type === 'dark' ? '0 0% 24%' : '240 4.8% 95.9%',\n '--aui-accent-foreground':\n theme.palette.type === 'dark' ? '0 0% 98%' : '240 5.9% 10%',\n '--aui-border':\n theme.palette.type === 'dark' ? '0 0% 40%' : '240 5.9% 90%',\n '--aui-input':\n theme.palette.type === 'dark' ? '0 0% 40%' : '240 5.9% 90%',\n '--aui-ring':\n theme.palette.type === 'dark' ? '207 90% 68%' : '210 90% 45%',\n '--aui-primary':\n theme.palette.type === 'dark' ? '0 0% 98%' : '240 5.9% 10%',\n '--aui-primary-foreground':\n theme.palette.type === 'dark' ? '240 5.9% 10%' : '0 0% 98%',\n },\n // Active composer border tinted to the agent color (set as --aui-composer-focus\n // on the host below); falls back to the theme primary if unset.\n '& .aui-composer-root:focus-within': {\n borderColor: 'var(--aui-composer-focus)',\n boxShadow: '0 0 0 1px var(--aui-composer-focus)',\n },\n '& .aui-assistant-message-content': {\n maxWidth: '100%',\n width: '100%',\n },\n // The composer is narrower than the conversation: cap the footer (which holds\n // the composer and is centered in the viewport) below the 90% thread width.\n // Bottom padding is left at the react-ui stock value (1rem) — overriding it\n // larger left a too-tall solid footer band beneath the composer.\n '& .aui-thread-viewport-footer': {\n maxWidth: '48rem',\n },\n },\n botAvatar: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n // Transparent so the tinted logo floats (overrides react-ui's aui-avatar-root).\n backgroundColor: 'transparent',\n // Bumped to ~match the user avatar (which has an encircling disc); the\n // floating logo looked small by comparison.\n width: 32,\n height: 32,\n },\n botLogo: {\n height: '100%',\n width: 'auto',\n },\n userMessageWithAvatar: {\n display: 'flex',\n width: '100%',\n maxWidth: 'var(--aui-thread-max-width)',\n flexDirection: 'column',\n alignItems: 'flex-end',\n gap: theme.spacing(0.5),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n },\n userMessageBody: {\n display: 'flex',\n maxWidth: '80%',\n alignItems: 'flex-start',\n justifyContent: 'flex-end',\n gap: theme.spacing(1),\n '& .aui-user-message-content': {\n maxWidth: '100%',\n },\n },\n userAvatar: {\n width: theme.spacing(5),\n height: theme.spacing(5),\n marginTop: theme.spacing(0.25),\n flexShrink: 0,\n },\n welcomeRoot: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n gap: theme.spacing(2),\n maxWidth: '28rem',\n textAlign: 'center',\n },\n welcomeLogo: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 56,\n height: 56,\n },\n welcomeLogoIcon: {\n width: 30,\n height: 'auto',\n },\n welcomeGreeting: {\n fontWeight: 500,\n color: theme.palette.text.primary,\n },\n welcomeSubtitle: {\n color: theme.palette.text.secondary,\n },\n suggestions: {\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'center',\n gap: theme.spacing(1),\n marginTop: theme.spacing(1),\n },\n suggestionButton: {\n textTransform: 'none',\n borderRadius: 999,\n },\n}));\n\n/** A circular MUI-styled bot avatar (no host asset dependency). */\nfunction AssistantBotAvatar() {\n const classes = useStyles();\n const color = useContext(AvatarColorContext) ?? DEFAULT_AVATAR_COLOR;\n\n return (\n <span\n className={`aui-avatar-root ${classes.botAvatar}`}\n style={{ color, backgroundColor: 'transparent' }}\n aria-label=\"Backstage assistant\"\n role=\"img\"\n >\n <BackstageLogo className={classes.botLogo} />\n </span>\n );\n}\n\nfunction AssistantMessageWithAvatar() {\n return (\n <AssistantMessage.Root>\n <AssistantBotAvatar />\n <AssistantMessage.Content components={{ Reasoning: ReasoningPart }} />\n <BranchPicker />\n <AssistantActionBar />\n </AssistantMessage.Root>\n );\n}\n\n/** Read the signed-in user's profile (display name, picture) once. */\nfunction useProfile() {\n const identityApi = useApi(identityApiRef);\n const [profile, setProfile] = useState<ProfileInfo>();\n\n useEffect(() => {\n let mounted = true;\n\n identityApi.getProfileInfo().then(value => {\n if (mounted) {\n setProfile(value);\n }\n });\n\n return () => {\n mounted = false;\n };\n }, [identityApi]);\n\n return profile;\n}\n\nfunction UserChatAvatar() {\n const classes = useStyles();\n const profile = useProfile();\n\n return (\n <BackstageAvatar\n classes={{ avatar: classes.userAvatar }}\n displayName={profile?.displayName ?? profile?.email ?? 'You'}\n picture={profile?.picture}\n />\n );\n}\n\nfunction UserMessageWithAvatar() {\n const classes = useStyles();\n\n return (\n <UserMessage.Root className={classes.userMessageWithAvatar}>\n <UserMessage.Attachments />\n <div className={classes.userMessageBody}>\n <UserMessage.Content />\n <UserChatAvatar />\n </div>\n </UserMessage.Root>\n );\n}\n\n/**\n * Props for {@link ConversationSurface}.\n *\n * @public\n */\nexport interface ConversationSurfaceProps {\n /** Placeholder text for the composer input (from the assistant's ui config). */\n composerPlaceholder?: string;\n /** Starter prompts shown as clickable chips on the empty thread. */\n suggestions?: Array<{ title: string; prompt: string }>;\n /** Overrides for the default empty-thread greeting. */\n welcome?: { title?: string; subtitle?: string };\n /** The active assistant's avatar tint (hex); defaults to Backstage teal. */\n assistantColor?: string;\n /** Host layout escape hatch (applied alongside the themed thread host). */\n className?: string;\n}\n\n/**\n * The react-ui `<Thread>` rendered with Implementation 1's custom message\n * components: a bot-avatar assistant message, an avatar'd user message,\n * Markdown (with streaming-safe Mermaid), a tool-call fallback, a thinking /\n * error empty-state, and a personalized empty-thread welcome with optional\n * starter-prompt chips.\n *\n * This is a \"bring your own runtime\" surface — it expects an\n * `AssistantRuntimeProvider` higher in the tree.\n *\n * @public\n */\nexport function ConversationSurface(props: ConversationSurfaceProps) {\n const { composerPlaceholder, suggestions, welcome, assistantColor, className } =\n props;\n const classes = useStyles();\n const theme = useTheme();\n // One mode-appropriate shade for every place the agent color appears here\n // (chat bot avatar via context, welcome logo, composer focus border).\n const resolvedColor = resolveAssistantColor(assistantColor, theme.palette.type);\n\n function EmptyThreadWelcome() {\n const profile = useProfile();\n const firstName = profile?.displayName?.split(' ')[0] ?? 'there';\n\n const title = welcome?.title ?? `Hi ${firstName}, welcome to Backstage`;\n const subtitle = welcome?.subtitle ?? DEFAULT_WELCOME_SUBTITLE;\n\n return (\n <ThreadWelcome.Root>\n <ThreadWelcome.Center>\n <div className={classes.welcomeRoot}>\n <span\n className={classes.welcomeLogo}\n style={{ color: resolvedColor }}\n aria-hidden=\"true\"\n >\n <BackstageLogo className={classes.welcomeLogoIcon} />\n </span>\n <Typography variant=\"h5\" className={classes.welcomeGreeting}>\n {title}\n </Typography>\n <Typography variant=\"body2\" className={classes.welcomeSubtitle}>\n {subtitle}\n </Typography>\n {suggestions && suggestions.length > 0 && (\n <div className={classes.suggestions}>\n {suggestions.map(suggestion => (\n <ThreadPrimitive.Suggestion\n key={suggestion.prompt}\n prompt={suggestion.prompt}\n send\n asChild\n >\n <Button\n variant=\"outlined\"\n size=\"small\"\n className={classes.suggestionButton}\n >\n {suggestion.title}\n </Button>\n </ThreadPrimitive.Suggestion>\n ))}\n </div>\n )}\n </div>\n </ThreadWelcome.Center>\n </ThreadWelcome.Root>\n );\n }\n\n return (\n <AvatarColorContext.Provider value={resolvedColor}>\n <div\n className={`${classes.threadHost} ${className ?? ''}`}\n style={\n {\n '--aui-composer-focus': resolvedColor,\n } as CSSProperties\n }\n >\n <Thread\n strings={\n composerPlaceholder\n ? { composer: { input: { placeholder: composerPlaceholder } } }\n : undefined\n }\n components={{\n AssistantMessage: AssistantMessageWithAvatar,\n ThreadWelcome: EmptyThreadWelcome,\n UserMessage: UserMessageWithAvatar,\n }}\n assistantMessage={{\n components: {\n Text: MarkdownText,\n Empty: ThinkingMessage,\n ToolFallback,\n },\n }}\n />\n </div>\n </AvatarColorContext.Provider>\n );\n}\n"],"names":["BackstageAvatar"],"mappings":";;;;;;;;;;;;;AA+BA,MAAM,wBAAA,GACJ,2EAAA;AAKF,MAAM,kBAAA,GAAqB,cAAkC,MAAS,CAAA;AAEtE,MAAM,SAAA,GAAY,WAAW,CAAA,KAAA,MAAU;AAAA,EACrC,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,CAAA;AAAA,IACN,SAAA,EAAW,CAAA;AAAA,IACX,oBAAA,EAAsB;AAAA;AAAA;AAAA,MAGpB,wBAAA,EAA0B,KAAA;AAAA,MAC1B,kBAAA,EACE,KAAA,CAAM,OAAA,CAAQ,IAAA,KAAS,SAAS,UAAA,GAAa,WAAA;AAAA,MAC/C,kBAAA,EACE,KAAA,CAAM,OAAA,CAAQ,IAAA,KAAS,SAAS,UAAA,GAAa,cAAA;AAAA,MAC/C,aAAA,EACE,KAAA,CAAM,OAAA,CAAQ,IAAA,KAAS,SAAS,UAAA,GA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AEJ,GACF,CAAA,EACF,CAAA;AAAA,EAEJ;AAEA,EAAA,uBACE,GAAA,CAAC,kBAAA,CAAmB,QAAA,EAAnB,EAA4B,OAAO,aAAA,EAClC,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAW,CAAA,EAAG,OAAA,CAAQ,UAAU,CAAA,CAAA,EAAI,aAAa,EAAE,CAAA,CAAA;AAAA,MACnD,KAAA,EACE;AAAA,QACE,sBAAA,EAAwB;AAAA,OAC1B;AAAA,MAGF,QAAA,kBAAA,GAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,OAAA,EACA,mBAAA,GACI,EAAE,QAAA,EAAU,EAAE,KAAA,EAAO,EAAE,WAAA,EAAa,mBAAA,EAAoB,EAAE,EAAE,GAC5D,MAAA;AAAA,UAEN,UAAA,EAAY;AAAA,YACV,gBAAA,EAAkB,0BAAA;AAAA,YAClB,aAAA,EAAe,kBAAA;AAAA,YACf,WAAA,EAAa;AAAA,WACf;AAAA,UACE,gBAAA,EAAkB;AAAA,YAChB,UAAA,EAAY;AAAA,cACV,IAAA,EAAM,YAAA;AAAA,cACN,KAAA,EAAO,eAAA;AAAA,cACP;AAAA;AACF;AACF;AAAA;AACF;AAAA,GACF,EACF,CAAA;AAEJ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drewswiredin/backstage-plugin-assistants",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "Frontend plugin — AI Assistants for Backstage.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@backstage/core-plugin-api": "^1.12.0",
|
|
67
67
|
"@backstage/frontend-plugin-api": "^0.17.0",
|
|
68
68
|
"@backstage/ui": "^0.15.0",
|
|
69
|
-
"@drewswiredin/backstage-plugin-assistants-common": "0.5.
|
|
69
|
+
"@drewswiredin/backstage-plugin-assistants-common": "0.5.3",
|
|
70
70
|
"@material-ui/core": "^4.12.4",
|
|
71
71
|
"@material-ui/icons": "^4.11.3",
|
|
72
72
|
"@remixicon/react": "^4.5.0",
|