| 3220 | `);if(typeof q==="string")return q;if("kind"in q)return q.value;return q.value}function HHK(q,K){if(!q)return"No hover information available. This may occur if the cursor is not on a symbol, or if the LSP server has not fully indexed the file.";let _=r1Y(q.contents);if(q.range){let z=q.range.start.line+1,Y=q.range.start.character+1;return`Hover info at ${z}:${Y}: |
| 3221 | |
| 3222 | ${_}`}return _}function TR6(q){return{[1]:"File",[2]:"Module",[3]:"Namespace",[4]:"Package",[5]:"Class",[6]:"Method",[7]:"Property",[8]:"Field",[9]:"Constructor",[10]:"Enum",[11]:"Interface",[12]:"Function",[13]:"Variable",[14]:"Constant",[15]:"String",[16]:"Number",[17]:"Boolean",[18]:"Array",[19]:"Object",[20]:"Key",[21]:"Null",[22]:"EnumMember",[23]:"Struct",[24]:"Event",[25]:"Operator",[26]:"TypeParameter"}[q]||"Unknown"}function JHK(q,K=0){let _=[],z=" ".repeat(K),Y=TR6(q.kind),$=`${z}${q.name} (${Y})`;if(q.detail)$+=` ${q.detail}`;let A=q.range.start.line+1;if($+=` - Line ${A}`,_.push($),q.children&&q.children.length>0)for(let O of q.children)_.push(...JHK(O,K+1));return _}function MHK(q,K){if(!q||q.length===0)return"No symbols found in document. This may occur if the file is empty, not supported by the LSP server, or if the server has not fully indexed the file.";let _=q[0];if(_&&"location"in _)return Ue1(q,K);let Y=["Document symbols:"];for(let $ of q)Y.push(...JHK($));return Y.join(` |
| 3223 | `)}function Ue1(q,K){if(!q||q.length===0)return"No symbols found in workspace. This may occur if the workspace is empty, or if the LSP server has not finished indexing the project.";let _=q.filter((A)=>!A||!A.location||!A.location.uri);if(_.length>0)N(`formatWorkspaceSymbolResult: Filtering out ${_.length} invalid symbol(s) - this should have been caught earlier`,{level:"warn"});let z=q.filter((A)=>A&&A.location&&A.location.uri);if(z.length===0)return"No symbols found in workspace. This may occur if the workspace is empty, or if the LSP server has not finished indexing the project.";let Y=[`Found ${z.length} ${A7(z.length,"symbol")} in workspace:`],$=wHK(z,K);for(let[A,O]of $){Y.push(` |
| 3224 | ${A}:`);for(let w of O){let j=TR6(w.kind),H=w.location.range.start.line+1,J=` ${w.name} (${j}) - Line ${H}`;if(w.containerName)J+=` in ${w.containerName}`;Y.push(J)}}return Y.join(` |
| 3225 | `)}function OHK(q,K){if(!q.uri)return N("formatCallHierarchyItem: CallHierarchyItem has undefined URI",{level:"warn"}),`${q.name} (${TR6(q.kind)}) - <unknown location>`;let _=h88(q.uri,K),z=q.range.start.line+1,Y=TR6(q.kind),$=`${q.name} (${Y}) - ${_}:${z}`;if(q.detail)$+=` [${q.detail}]`;return $}function XHK(q,K){if(!q||q.length===0)return"No call hierarchy item found at this position";if(q.length===1)return`Call hierarchy item: ${OHK(q[0],K)}`;let _=[`Found ${q.length} call hierarchy items:`];for(let z of q)_.push(` ${OHK(z,K)}`);return _.join(` |
| 3226 | `)}function PHK(q,K){if(!q||q.length===0)return"No incoming calls found (nothing calls this function)";let _=[`Found ${q.length} incoming ${A7(q.length,"call")}:`],z=new Map;for(let Y of q){if(!Y.from){N("formatIncomingCallsResult: CallHierarchyIncomingCall has undefined from field",{level:"warn"});continue}let $=h88(Y.from.uri,K),A=z.get($);if(A)A.push(Y);else z.set($,[Y])}for(let[Y,$]of z){_.push(` |
| 3227 | ${Y}:`);for(let A of $){if(!A.from)continue;let O=TR6(A.from.kind),w=A.from.range.start.line+1,j=` ${A.from.name} (${O}) - Line ${w}`;if(A.fromRanges&&A.fromRanges.length>0){let H=A.fromRanges.map((J)=>`${J.start.line+1}:${J.start.character+1}`).join(", ");j+=` [calls at: ${H}]`}_.push(j)}}return _.join(` |