Skip to content

fix(chat-client): disable click event for empty history list item #973

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

Merged
merged 1 commit into from
Apr 16, 2025

Conversation

viktorsaws
Copy link
Contributor

Problem

Click on empty history list item open chat window and sends conversationClicked event to language server.

Solution

  • Do not invoke click event on empty history item in chat client
  • Do not handle click event on "empty" history item in language server
Screenshot 2025-04-16 at 13 25 21

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@viktorsaws viktorsaws requested a review from a team as a code owner April 16, 2025 11:28
@@ -20,6 +20,8 @@ import { Features } from '@aws/language-server-runtimes/server-interface/server'
import { ConversationItemGroup } from '@aws/language-server-runtimes/protocol'
import { getUserHomeDir } from '@aws/lsp-core/out/util/path'

export const EMPTY_CONVERSATION_LIST_ID = 'empty'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could move empty key to types package to properly share it between Chat Client and language server.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or we could introduce isClickable property on item level to decouple a bit.

@viktorsaws viktorsaws merged commit bc20a04 into main Apr 16, 2025
6 checks passed
@viktorsaws viktorsaws deleted the fix/click_on_empty_item branch April 16, 2025 11:50
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