Skip to content

Text Highlight (Pin - 1): Update to Data Files and OnitPanelState#342

Closed
lk340 wants to merge 1 commit intofeature/text-highlight/auto-add-to-contextfrom
feature/text-highlight/history-and-messages-builder
Closed

Text Highlight (Pin - 1): Update to Data Files and OnitPanelState#342
lk340 wants to merge 1 commit intofeature/text-highlight/auto-add-to-contextfrom
feature/text-highlight/history-and-messages-builder

Conversation

@lk340
Copy link
Collaborator

@lk340 lk340 commented Jul 17, 2025

Summary

This PR only tackles the data and OnitPanelState aspect of the pinned text highlight feature. As a result, this branch will not build. I did this to separate concerns and make the updated code more reviewable.

If you want to test the full buildable version of the pinned text highlight feature, checkout to the branch in the last PR: #341

Parts

  1. Text Highlight: Update Highlighted Text Behavior #339
  2. Text Highlight: Auto-add To Context #340
  3. YOU ARE HERE (Pin 1)
  4. Text Highlight (Pin - 2): Update to Managers and UI #343 (Pin 2)
  5. Text Highlight: Pin #341 (Pin 3)

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR implements significant data model and state management changes to support a new pinned text highlight feature. The key changes include:

  1. Refactoring OnitPanelState to handle multiple types of text inputs:

    • selectedPendingInput (currently selected)
    • trackedPendingInput (being tracked)
    • unpinnedPendingInput (temporary)
    • pinnedPendingInputs (persisted)
  2. Updating all data models and clients to support multiple inputs per instruction by changing:

    • [Input?][[Input]] in FetchingClient and StreamingClient
    • input: Input?inputs: [Input] in Prompt model
    • Message builders updated to handle multiple inputs per instruction

These changes lay the groundwork for allowing users to pin multiple text selections as context for their conversations, rather than being limited to a single selection.

Confidence score: 3/5

  1. The PR introduces significant changes to core data structures but appears well-thought-out
  2. Score reduced because this is an intentionally non-buildable PR, making it impossible to verify the changes work together
  3. Files needing attention:
    • OnitPanelState+Chat.swift: Verify that history management properly handles the new input structure
    • ChatEndpointMessagesBuilder.swift: Ensure message formatting remains clear with multiple inputs

7 files reviewed, no comments
Edit PR Review Bot Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant