Package 

Class StreamingReasoningKt

    • Method Summary

      Modifier and Type Method Description
      final static Unit StreamingReasoning(String text, Boolean isThinking, Modifier modifier, Double durationSeconds, String summary, String footnote, Boolean initiallyExpanded, Boolean showsLiveReasoning, Dp maxExpandedHeight, TextStyle textStyle, StreamingReasoningColors colors) A model's reasoning (its "thinking"), shown alongside its reply.
      final static Unit StreamingReasoning(AIReasoningPart part, Modifier modifier, String text, String footnote, TextStyle textStyle, StreamingReasoningColors colors) Shows a reasoning step: its live text when the app has it, otherwise the step's preview, with its summary beside "Thought for 12s" once it is done.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • StreamingReasoning

        @Composable() final static Unit StreamingReasoning(String text, Boolean isThinking, Modifier modifier, Double durationSeconds, String summary, String footnote, Boolean initiallyExpanded, Boolean showsLiveReasoning, Dp maxExpandedHeight, TextStyle textStyle, StreamingReasoningColors colors)

        A model's reasoning (its "thinking"), shown alongside its reply.

        While the model thinks, the reasoning is open under a "Thinking… 7s" header: a panel that grows with the thoughts, up to maxExpandedHeight, then keeps the newest in view, revealing new text smoothly as it arrives. When the model is done the view folds into "Thought for 12s" and its summary, unless the reader opened or closed it themselves, and tapping the header opens the whole reasoning again.

        Reasoning can run to tens of kilobytes and grow many times a second, so the view only lays out what changes: the text is split into paragraphs that render lazily, and only the paragraph still being written is laid out again. Folding shrinks the panel in place, so whatever sits below it glides up with it instead of jumping.

        StreamingReasoning(text = reasoning, isThinking = answer.isEmpty(), durationSeconds = 12.0)
        Parameters:
        text - The reasoning so far.
        isThinking - Whether the model is still thinking.
        modifier - The modifier to apply to the view.
        durationSeconds - How long the model has thought, shown as "Thought for 12s" once it is done.
        summary - A one-line summary shown beside the header once the model is done.
        footnote - A note under the open reasoning, such as how long it is kept.
        initiallyExpanded - Whether the reasoning is open once the model is done.
        showsLiveReasoning - Whether the reasoning is open while the model thinks.
        maxExpandedHeight - How tall the reasoning grows before it scrolls.
        textStyle - The style of the reasoning.
        colors - The palette of the view.
      • StreamingReasoning

        @Composable() final static Unit StreamingReasoning(AIReasoningPart part, Modifier modifier, String text, String footnote, TextStyle textStyle, StreamingReasoningColors colors)

        Shows a reasoning step: its live text when the app has it, otherwise the step's preview, with its summary beside "Thought for 12s" once it is done.

        Parameters:
        part - The reasoning step.
        modifier - The modifier to apply to the view.
        text - The step's whole reasoning, when the app watched it live.
        footnote - A note under the open reasoning, such as how long it is kept.
        textStyle - The style of the reasoning.
        colors - The palette of the view.