Skip to content

MessageActionItem should permit additional fields #411

Open

Description

Although the LSP specification does not define it explicitly, from the definition of ShowMessageRequestClientCapabilities it follows that MessageActionItem can have additional fields:

	messageActionItem?: {
		/**
		 * Whether the client supports additional attributes which
		 * are preserved and sent back to the server in the
		 * request's response.
		 */
		additionalPropertiesSupport?: boolean;
	};

However, lsprotocol does not permit this:

    print(types.MessageActionItem(title="title", asdf="asdf"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: MessageActionItem.__init__() got an unexpected keyword argument 'asdf'

(See the pygls issue)

Thanks

Activity

  1. debonte commented on Jun 2, 2025

    @debonte
    Contributor

    I filed an issue on https://github.com/microsoft/language-server-protocol asking that they make this behavior of MessageActionItem clear in the LSP meta model

  2. added
    bugIssue identified by VS Code Team member as probable bug
    under-discussionIssue is under discussion for relevance, priority, approach
    and removed on Jun 2, 2025
  3. debonte commented on Jun 20, 2025

    @debonte
    Contributor

    Dirk is planning to make a protocol change so our generator will understand that MessageActionItem can have additional fields -- microsoft/language-server-protocol#2148 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable buglsp-update(For automation) marks that LSP spec requires updateunder-discussionIssue is under discussion for relevance, priority, approach

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions