Merge pull request #425 from devchat-ai/fix/document-symbols-substructure-#233
Fix document_symbols substructure information in ide_services
This commit is contained in:
commit
6e998e89e6
@ -91,7 +91,7 @@ const convertSymbolInformation = (symbol: vscode.SymbolInformation): any => {
|
|||||||
// Generic function to convert an array of DocumentSymbol or SymbolInformation to a plain object array
|
// Generic function to convert an array of DocumentSymbol or SymbolInformation to a plain object array
|
||||||
export const convertSymbolsToPlainObjects = (symbols: vscode.DocumentSymbol[] | vscode.SymbolInformation[]): any[] => {
|
export const convertSymbolsToPlainObjects = (symbols: vscode.DocumentSymbol[] | vscode.SymbolInformation[]): any[] => {
|
||||||
return symbols.map(symbol => {
|
return symbols.map(symbol => {
|
||||||
if (symbol instanceof vscode.DocumentSymbol) {
|
if (symbol.children) {
|
||||||
// Handle DocumentSymbol with recursive conversion
|
// Handle DocumentSymbol with recursive conversion
|
||||||
return convertDocumentSymbol(symbol);
|
return convertDocumentSymbol(symbol);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user