Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vscode): adding clickble symbol render in chat panel #3420

Merged

Conversation

Sma1lboy
Copy link
Collaborator

@Sma1lboy Sma1lboy commented Nov 14, 2024

Feature

  • Implemented onLookupSymbol with rendered inline blocks.
  • Inline code blocks will not be rendered as clickable if navigate is not exposed.

Demo

Screen.Recording.2024-12-05.at.15.59.48.mov
Screen.Recording.2024-11-30.at.06.37.15.mov

@wsxiaoys wsxiaoys requested a review from liangfung November 14, 2024 04:06
@wsxiaoys wsxiaoys changed the title feat: adding clickble keyword render in chat panel feat: adding clickble symbol render in chat panel Nov 18, 2024
@wsxiaoys
Copy link
Member

Need handle cases that certain backend doesn't support such feature (e.g IntelliJ)

@Sma1lboy Sma1lboy force-pushed the feat-adding-clickble-keywords-chat-panel branch from ddcbe91 to c3d0709 Compare November 30, 2024 10:32
The code changes in `ChatPage` component add support for the `onNavigateSymbol` and `onHoverSymbol` capabilities. These capabilities are checked and set using the `hasCapability` method of the server. The `onNavigateSymbol` and `onHoverSymbol` methods are conditionally used based on the support for these capabilities. This change enhances the functionality of the ChatPage component in the Tabby UI.
@Sma1lboy Sma1lboy marked this pull request as ready for review November 30, 2024 11:26
@Sma1lboy Sma1lboy requested a review from wsxiaoys November 30, 2024 11:26
The ClientApi interface has been updated to make the onNavigateSymbol method optional. This change allows for better flexibility in implementing the interface, as the onNavigateSymbol method is now conditionally used based on the support for the capability. This update enhances the usability of the ClientApi interface in the Tabby UI.
The code changes in `ChatPage` component add support for the `onHoverSymbol` capability. This capability is checked and set using the `hasCapability` method of the server. The `onHoverSymbol` method is conditionally used based on the support for this capability. This change enhances the functionality of the ChatPage component in the Tabby UI.
@Sma1lboy Sma1lboy requested a review from wsxiaoys December 4, 2024 00:57
@Sma1lboy Sma1lboy force-pushed the feat-adding-clickble-keywords-chat-panel branch from ac937a2 to b45e256 Compare December 4, 2024 06:15
@Sma1lboy Sma1lboy force-pushed the feat-adding-clickble-keywords-chat-panel branch from dbb0963 to 9be446b Compare December 5, 2024 22:03
@wsxiaoys wsxiaoys enabled auto-merge (squash) December 8, 2024 15:53
@wsxiaoys wsxiaoys disabled auto-merge December 8, 2024 15:53
@wsxiaoys wsxiaoys changed the title feat: adding clickble symbol render in chat panel feat(vscode): adding clickble symbol render in chat panel Dec 8, 2024
@wsxiaoys wsxiaoys enabled auto-merge (squash) December 8, 2024 15:53
@wsxiaoys wsxiaoys disabled auto-merge December 8, 2024 16:05
@wsxiaoys wsxiaoys merged commit c61a9ee into TabbyML:main Dec 8, 2024
3 checks passed
wsxiaoys added a commit that referenced this pull request Dec 9, 2024
* feat: add onRenderLsp event handler for rendering language server protocol

* feat: Add onRenderLsp event handler for rendering language server protocol

* chore(vscode): update targetFile path to use workspace relative path

* refactor: Update code to use KeywordInfo type for onRenderLsp event handler

* feat: add onNavigateSymbol method to ClientApi interface

* feat: add onNavigateSymbol method to ClientApi interface

* feat: add onNavigateSymbol method to ClientApi interface

* feat: add onHoverSymbol method to ClientApi interface

* feat: add onHoverSymbol and findSymbolInfo methods to WebviewHelper

* feat: add onHoverSymbol and findSymbolInfo methods to WebviewHelper

* fix: update onNavigateSymbol parameter name in ClientApi interface

* fix: update onNavigateSymbol parameter name in ClientApi interface

* feat: Add support for onNavigateSymbol and onHoverSymbol in ChatPage

The code changes in `ChatPage` component add support for the `onNavigateSymbol` and `onHoverSymbol` capabilities. These capabilities are checked and set using the `hasCapability` method of the server. The `onNavigateSymbol` and `onHoverSymbol` methods are conditionally used based on the support for these capabilities. This change enhances the functionality of the ChatPage component in the Tabby UI.

* chore: remove unused type

* feat: Update ClientApi interface to make onNavigateSymbol optional

The ClientApi interface has been updated to make the onNavigateSymbol method optional. This change allows for better flexibility in implementing the interface, as the onNavigateSymbol method is now conditionally used based on the support for the capability. This update enhances the usability of the ClientApi interface in the Tabby UI.

* feat: Add support for onHoverSymbol in ChatPage

The code changes in `ChatPage` component add support for the `onHoverSymbol` capability. This capability is checked and set using the `hasCapability` method of the server. The `onHoverSymbol` method is conditionally used based on the support for this capability. This change enhances the functionality of the ChatPage component in the Tabby UI.

* [autofix.ci] apply automated fixes

* feat: Add activeSelection prop to MessageMarkdown and update imports

* feat: Rename parameter in onNavigateSymbol to hintFilepaths for clarity

* feat: Implement CodeElement component for rendering code in Markdown

* refactor: Remove onNavigateToContext prop from MessageMarkdown and related components for simplification

* feat: Rename onNavigateSymbol to onLookupSymbol and update its signature for improved clarity

* feat: Rename onNavigateSymbol to onLookupSymbol and refactor symbol lookup logic for improved clarity and maintainability

* feat: Rename onNavigateSymbol to onLookupSymbol and update related logic for consistency across components

* [autofix.ci] apply automated fixes

* update: render symbol

* Update icons.tsx

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: liangfung <[email protected]>
Co-authored-by: Meng Zhang <[email protected]>
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