Skip to content

feat: tab completion for citation keys (from staging)#120

Merged
Junyi-99 merged 25 commits intomainfrom
staging
Feb 18, 2026
Merged

feat: tab completion for citation keys (from staging)#120
Junyi-99 merged 25 commits intomainfrom
staging

Conversation

@wjiayis
Copy link
Member

@wjiayis wjiayis commented Feb 17, 2026

Tested on staging. Functionality works as expected. Latency increased from 2s to 5s, but I suspect it's because the API key was at the brink of having no credits left. Will look into the latency more.

Junyi-99 and others added 18 commits January 27, 2026 02:58
#33 

In short, it'll

1. [Frontend] Recognize that user is trying to add a citation (trigger
text is `\cite{`)
2. [Frontend] Temporarily suppress default Overleaf dropdown suggestions
3. [Frontend] Get the last sentence as context for LLM
4. [Backend] Fetch bibliography in `.bib` files as raw text, and remove
irrelevant fields to save tokens
5. [Backend] Call XtraMCP to get paper abstract, using paper title as
key
6. [Backend] Query a fast LLM (hardcoded to `gpt-5.2` for now) to get at
most 3 citation keys
7. [Frontend] Suppress default Overleaf tab-completion to allow users to
accept citation suggestions
@wjiayis
Copy link
Member Author

wjiayis commented Feb 17, 2026

@Junyi-99 Are your changes on staging meant to be merged to main? If they are not, then feel free to merge #121 and close this PR.

@wjiayis wjiayis changed the title feat: tab completion for citation keys feat: tab completion for citation keys (from staging) Feb 17, 2026
@wjiayis wjiayis requested a review from Junyi-99 February 17, 2026 08:56
@wjiayis wjiayis self-assigned this Feb 17, 2026
@Junyi-99
Copy link
Member

@wjiayis Yes please merge it into main

- Updated `LoadingIndicator` to use `useReducer` for better state handling.
- Refactored `OnboardingGuide` to utilize `useReducer` for image loading state.
- Enhanced accessibility by adding `role` and `tabIndex` attributes to various interactive elements across components.
- Simplified state updates in `ChatHistoryModal` and `LoginWithOverleaf` by consolidating state management.
- Improved performance in `CodeBlock` by using `useMemo` for highlighted code.
- General code cleanup and consistency improvements across multiple components.
)

- Updated `LoadingIndicator` to use `useReducer` for better state
handling.
- Refactored `OnboardingGuide` to utilize `useReducer` for image loading
state.
- Enhanced accessibility by adding `role` and `tabIndex` attributes to
various interactive elements across components.
- Simplified state updates in `ChatHistoryModal` and `LoginWithOverleaf`
by consolidating state management.
- Improved performance in `CodeBlock` by using `useMemo` for highlighted
code.
- General code cleanup and consistency improvements across multiple
components.
- Improved accessibility by standardizing `onKeyDown` event handlers to use consistent formatting for key checks across multiple components.
- Refactored layout of JSX elements for better readability in `chat.pb.go`, `embed-sidebar`, and various components in the message entry container.
- General code cleanup to enhance maintainability and readability.
- Improved accessibility by standardizing `onKeyDown` event handlers to
use consistent formatting for key checks across multiple components.
- Refactored layout of JSX elements for better readability in
`chat.pb.go`, `embed-sidebar`, and various components in the message
entry container.
- General code cleanup to enhance maintainability and readability.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> <sup>[Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) is
generating a summary for commit
0a06800. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@Junyi-99 Junyi-99 merged commit aa88bdf into main Feb 18, 2026
2 checks passed
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.

3 participants