Add "Type Declaration to Chat" Option (Python)

Summary

Introduce a right-click context menu option in Cursor AI IDE to add type declarations to the Chat for extra context.


“Add Type Declaration to Chat” somewhere in this list would be great for extra context.

Motivation

Simplify the process of generating type hints for functions and methods, enhancing code clarity and IDE support.

Proposed Implementation

  1. Add a context menu item “Add Type Declaration to Chat” for:
  • Function and method definitions
  • Class definitions
  1. On selection, AI will:
  • Analyze code to suggest type hints for parameters and return types
  • Generate and display these suggestions in the chat interface

Nice-To-Have

Add all Type Declarations of specific function to Chat.