πŸ“„ File detail

tools/LSPTool/prompt.ts

🧩 .tsπŸ“ 22 linesπŸ’Ύ 1,114 bytesπŸ“ text
← Back to All Files

🎯 Use case

This module implements the β€œLSPTool” tool (L S P) β€” something the model can call at runtime alongside other agent tools. On the API surface it exposes LSP_TOOL_NAME and DESCRIPTION β€” mainly types, interfaces, or factory objects.

Generated from folder role, exports, dependency roots, and inline comments β€” not hand-reviewed for every path.

🧠 Inline summary

export const LSP_TOOL_NAME = 'LSP' as const export const DESCRIPTION = `Interact with Language Server Protocol (LSP) servers to get code intelligence features. Supported operations:

πŸ“€ Exports (heuristic)

  • LSP_TOOL_NAME
  • DESCRIPTION

πŸ–₯️ Source preview

export const LSP_TOOL_NAME = 'LSP' as const

export const DESCRIPTION = `Interact with Language Server Protocol (LSP) servers to get code intelligence features.

Supported operations:
- goToDefinition: Find where a symbol is defined
- findReferences: Find all references to a symbol
- hover: Get hover information (documentation, type info) for a symbol
- documentSymbol: Get all symbols (functions, classes, variables) in a document
- workspaceSymbol: Search for symbols across the entire workspace
- goToImplementation: Find implementations of an interface or abstract method
- prepareCallHierarchy: Get call hierarchy item at a position (functions/methods)
- incomingCalls: Find all functions/methods that call the function at a position
- outgoingCalls: Find all functions/methods called by the function at a position

All operations require:
- filePath: The file to operate on
- line: The line number (1-based, as shown in editors)
- character: The character offset (1-based, as shown in editors)

Note: LSP servers must be configured for the file type. If no server is available, an error will be returned.`