(
input: {
operation?: string
filePath?: string
line?: number
character?: number
},
opts: { home?: boolean } = {},
)
| 443 | } |
| 444 | |
| 445 | function lspTitle( |
| 446 | input: { |
| 447 | operation?: string |
| 448 | filePath?: string |
| 449 | line?: number |
| 450 | character?: number |
| 451 | }, |
| 452 | opts: { home?: boolean } = {}, |
| 453 | ): string { |
| 454 | const op = input.operation || "request" |
| 455 | const file = input.filePath ? toolPath(input.filePath, opts) : "" |
| 456 | const line = typeof input.line === "number" ? input.line : undefined |
| 457 | const char = typeof input.character === "number" ? input.character : undefined |
| 458 | const pos = line !== undefined && char !== undefined ? `:${line}:${char}` : "" |
| 459 | if (!file) { |
| 460 | return `LSP ${op}` |
| 461 | } |
| 462 | |
| 463 | return `LSP ${op} ${file}${pos}` |
| 464 | } |
| 465 | |
| 466 | function runLsp(p: ToolProps<typeof LspTool>): ToolInline { |
| 467 | return { |
no test coverage detected