Package 

Class CompoundChatAiComponentFactoryKt

    • Method Detail

      • CompoundChatAiComponentFactory

        @Composable() final static Unit CompoundChatAiComponentFactory(Object keys, Function1<ChatAiComponentFactory, ChatAiComponentFactory> factory, Function0<Unit> content)

        Builds a compound ChatAiComponentFactory by wrapping the current factory and provides it to content through LocalChatAiComponentFactory.

        Use this to override some components while keeping the rest, without rebuilding the whole factory:

        CompoundChatAiComponentFactory(
            factory = { current ->
                object : ChatAiComponentFactory by current {
                    @Composable
                    override fun RowScope.ComposerLeadingContent(params: ComposerLeadingContentParams) {
                        // Render nothing to hide the attachment button.
                    }
                }
            },
        ) {
            ChatComposer(/* ... */)
         }
        Parameters:
        keys - Keys that control recomposition.
        factory - Builds a new ChatAiComponentFactory from the current one.
        content - The content that uses the compound factory.