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:
boob.yang 2024-01-31 12:46:21 +08:00 committed by GitHub
commit 6e998e89e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
export const convertSymbolsToPlainObjects = (symbols: vscode.DocumentSymbol[] | vscode.SymbolInformation[]): any[] => {
return symbols.map(symbol => {
if (symbol instanceof vscode.DocumentSymbol) {
if (symbol.children) {
// Handle DocumentSymbol with recursive conversion
return convertDocumentSymbol(symbol);
} else {