( page: Page, context: McpContext, rawTitle: string, )
| 1418 | } |
| 1419 | |
| 1420 | function createStructuredPage( |
| 1421 | page: Page, |
| 1422 | context: McpContext, |
| 1423 | rawTitle: string, |
| 1424 | ) { |
| 1425 | const isolatedContextName = context.getIsolatedContextName(page); |
| 1426 | const title = truncateTitle(rawTitle); |
| 1427 | const entry: { |
| 1428 | id: number | undefined; |
| 1429 | url: string; |
| 1430 | title: string; |
| 1431 | selected: boolean; |
| 1432 | isolatedContext?: string; |
| 1433 | } = { |
| 1434 | id: context.getPageId(page), |
| 1435 | url: page.url(), |
| 1436 | title, |
| 1437 | selected: context.isPageSelected(page), |
| 1438 | }; |
| 1439 | if (isolatedContextName) { |
| 1440 | entry.isolatedContext = isolatedContextName; |
| 1441 | } |
| 1442 | return entry; |
| 1443 | } |
no test coverage detected
searching dependent graphs…