Skip to content

Fix [undefined](undefined) output for optional docs/link fields in llms-full.txt#112

Merged
ethanholz merged 2 commits intofix/spdxfrom
copilot/sub-pr-111
Mar 7, 2026
Merged

Fix [undefined](undefined) output for optional docs/link fields in llms-full.txt#112
ethanholz merged 2 commits intofix/spdxfrom
copilot/sub-pr-111

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 7, 2026

docs and link are optional in SoftwareSchemaObject, but the /llms-full.txt endpoint unconditionally rendered them as markdown links, producing [undefined](undefined) for entries that omit these fields (e.g. bioemu.yaml).

Changes

  • src/pages/llms-full.txt.ts: Guard the - **Docs:** and - **Link:** bullet points behind existence checks so they are only emitted when the values are present.
// Before
markdownContent += `- **Docs:** [${item.data.docs}](${item.data.docs})\n`;
markdownContent += `- **Link:** [${item.data.link}](${item.data.link})\n`;

// After
if (item.data.docs) {
  markdownContent += `- **Docs:** [${item.data.docs}](${item.data.docs})\n`;
}
if (item.data.link) {
  markdownContent += `- **Link:** [${item.data.link}](${item.data.link})\n`;
}

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…t.ts

Co-authored-by: ethanholz <6245717+ethanholz@users.noreply.github.com>
Copilot AI changed the title [WIP] Update SPDX license handling based on feedback Fix [undefined](undefined) output for optional docs/link fields in llms-full.txt Mar 7, 2026
@ethanholz ethanholz marked this pull request as ready for review March 7, 2026 06:14
@ethanholz ethanholz merged commit a5f3393 into fix/spdx Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants