serena.jetbrains.jetbrains_types#


JB_EXTERNAL_FILE_PREFIX = '<ext:'#

Prefix used for in relative paths of symbols that are from external libraries (i.e., not defined in the user’s codebase).

is_external_path(relative_path)[source]#
Parameters:

relative_path (str) – a relative path (e.g., from a symbol’s relative_path field)

Returns:

whether the path is an external path (i.e., from a library, not the user’s codebase)

class PluginStatusDTO[source]#

Bases: TypedDict

class PositionDTO[source]#

Bases: TypedDict

class TextRangeDTO[source]#

Bases: TypedDict

class SymbolDTO[source]#

Bases: TypedDict

quick_info: NotRequired[str]#

quick info text (e.g., type signature) for the symbol, as HTML string.

documentation: NotRequired[str]#

documentation text for the symbol (if available), as HTML string.

reference_line_no: NotRequired[int]#

for the case where this is a reference, the line number of the reference (0-based, relative to the file where the symbol is defined).

context: NotRequired[str]#

context around the symbol/reference, e.g., a few lines of code before and after the symbol definition or reference, to provide additional context for the LLM.

class SymbolCollectionResponse[source]#

Bases: TypedDict

class GetSymbolsOverviewResponse[source]#

Bases: SymbolCollectionResponse

documentation: NotRequired[str]#

Docstring of the collection (if applicable - usually present only if the collection is from a single file), as HTML string.

class TypeHierarchyNodeDTO[source]#

Bases: TypedDict

class TypeHierarchyResponse[source]#

Bases: TypedDict

class InspectionInfoDTO[source]#

Bases: TypedDict

class ListInspectionsResponse[source]#

Bases: TypedDict