这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@homanp
Copy link
Contributor

@homanp homanp commented Jul 23, 2025

What does this PR do?

This pull request introduces several updates across the codebase, focusing on performance improvements, code readability, and platform-specific optimizations. The key changes include memoization of chat entries to prevent unnecessary re-renders, adjustments to loading spinner intervals to reduce flickering on Windows, and enhancements for platform-specific behavior in the console. Additionally, a minor version bump and a new test function were added.

Performance and Optimization:

  • Memoized Chat Entries: Introduced MemoizedChatEntry in src/ui/components/chat-history.tsx to optimize rendering by preventing unnecessary re-renders of chat entries. This change includes updates to how entries are rendered in the ChatHistory component. [1] [2] [3]

  • Reduced Loading Spinner Flickering: Adjusted the spinner frame update interval to 500ms (from 250ms) and the loading text update interval to 4 seconds (from 2 seconds) in src/ui/components/loading-spinner.tsx to reduce flickering and state changes, especially on Windows. [1] [2]

Platform-Specific Enhancements:

  • Windows Console Behavior: Updated src/ui/components/chat-interface.tsx to conditionally clear the console only on non-Windows platforms or when not using PowerShell, addressing flickering issues in PowerShell.

Code Maintenance:

  • Version Bump: Updated the package version in package.json from 0.0.8 to 0.0.9.

  • Test Function Addition: Added a simple dummy_function in test.py for testing purposes.

Fixes #34

Checklist

  • I tested my changes
  • I reviewed my own code

@homanp homanp self-assigned this Jul 23, 2025
@homanp homanp changed the title Fix/flickering UI fix flickering UI in Powershell Jul 23, 2025
@homanp homanp merged commit e04a6ee into main Jul 23, 2025
2 checks passed
jasonkneen pushed a commit to jasonkneen/grok-cli that referenced this pull request Jul 24, 2025
* fix rendering issues in Ink

* fix tool names
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.

[Bug]: PowerShell terminal flickering and erratic behavior

2 participants