Skip to content

feat: Fix flickering in iTerm + scrolling + performance issues.#181

Merged
NTaylorMullen merged 1 commit intomainfrom
ntm/b.412716309.411450097
Apr 26, 2025
Merged

feat: Fix flickering in iTerm + scrolling + performance issues.#181
NTaylorMullen merged 1 commit intomainfrom
ntm/b.412716309.411450097

Conversation

@NTaylorMullen
Copy link
Copy Markdown
Collaborator

  • Refactors history display using Ink's component to prevent flickering and improve performance by rendering completed items statically.
  • Introduces ConsolePatcher component to capture and display console.log, console.warn, and console.error output within the Ink UI, addressing native handling issues.
  • Introduce a new content splitting mechanism to work better for static items. Basically when content gets too long we will now split content into multiple blocks for Gemini messages to ensure that we can statically cache larger pieces of history.

Fixes:

@NTaylorMullen NTaylorMullen force-pushed the ntm/b.412716309.411450097 branch from 5aaa9c4 to cb9d8a6 Compare April 26, 2025 00:14
Copy link
Copy Markdown
Contributor

@KeijiBranshi KeijiBranshi left a comment

Choose a reason for hiding this comment

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

first pass

Comment on lines 42 to 44
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm surprised we don't have a lint rule for these sort of shenanigans.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

lol you no like?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

question: what's the different between gemini and gemini_content?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Totally fair question, I tried to put some details in GeminiMessageContent.tsx

@NTaylorMullen NTaylorMullen force-pushed the ntm/b.412716309.411450097 branch 2 times, most recently from 5f218dc to f1281bc Compare April 26, 2025 22:52
- Refactors history display using Ink's <Static> component to prevent flickering and improve performance by rendering completed items statically.
- Introduces ConsolePatcher component to capture and display console.log, console.warn, and console.error output within the Ink UI, addressing native handling issues.
- Introduce a new content splitting mechanism to work better for static items. Basically when content gets too long we will now split content into multiple blocks for Gemini messages to ensure that we can statically cache larger pieces of history.

Fixes:
- https://b.corp.google.com/issues/411450097
- https://b.corp.google.com/issues/412716309
@NTaylorMullen NTaylorMullen force-pushed the ntm/b.412716309.411450097 branch from f1281bc to a6a2eb2 Compare April 26, 2025 22:53
@NTaylorMullen NTaylorMullen merged commit 5be89be into main Apr 26, 2025
3 checks passed
NTaylorMullen added a commit that referenced this pull request Apr 27, 2025
- The push for these changes didn't make it through.... Just doing a quick fix here which should have been in: #181
}

export const InputPrompt: React.FC<InputPromptProps> = ({ onSubmit }) => {
const [value, setValue] = React.useState('');
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Unintentional. Fixed in: #185

NTaylorMullen added a commit that referenced this pull request Apr 27, 2025
- The push for these changes didn't make it through.... Just doing a quick fix here which should have been in: #181
@NTaylorMullen NTaylorMullen deleted the ntm/b.412716309.411450097 branch May 20, 2025 23:54
keithballinger pushed a commit that referenced this pull request Jun 13, 2025
- The push for these changes didn't make it through.... Just doing a quick fix here which should have been in: #181
elminramazanov pushed a commit to elminramazanov/claimfront that referenced this pull request Jun 25, 2025
- The push for these changes didn't make it through.... Just doing a quick fix here which should have been in: google-gemini/gemini-cli#181
viridivn pushed a commit to viridivn/gemini-cli that referenced this pull request Jun 29, 2025
- The push for these changes didn't make it through.... Just doing a quick fix here which should have been in: google-gemini#181
happy-dev100 added a commit to happy-dev100/gemini that referenced this pull request Sep 19, 2025
- The push for these changes didn't make it through.... Just doing a quick fix here which should have been in: google-gemini/gemini-cli#181
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.

2 participants