fix: address remaining PR #135 review feedback#136
Merged
simongdavies merged 1 commit intoMay 14, 2026
Conversation
- /markdown toggle: set sessionNeedsRebuild so system prompt updates (hyperlight-dev#1) - CLI help: document --[no-]markdown, --md/--no-md aliases, HYPERAGENT_MARKDOWN (hyperlight-dev#6) - Streamed output: gate renderMarkdown on looksLikeMarkdown consistently (hyperlight-dev#7) - markdown-renderer: use local Marked instance instead of global setOptions (hyperlight-dev#9) - looksLikeMarkdown: remove over-eager bold and unordered-list patterns (hyperlight-dev#10) - unescape: verified valid marked-terminal option (comment was wrong) (hyperlight-dev#8) - linkifyFiles order: verified safe — [[file:]] not a markdown token (hyperlight-dev#16) Verified: diff matches this message. 40 test files, 2350 tests pass. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Follow-up PR addressing review feedback from PR #135 (markdown rendering). Tightens the markdown rendering path: makes /markdown toggle propagate to the system prompt, uses a local Marked instance instead of mutating global state, narrows the looksLikeMarkdown heuristic to avoid false positives, gates buffered output rendering on that heuristic, and updates CLI help text.
Changes:
- /markdown slash command now sets
sessionNeedsRebuildso system prompt updates take effect. markdown-renderer.tsuses a localMarkedinstance;looksLikeMarkdowndrops weak bold/unordered-list patterns.processMessagegatesrenderMarkdownonlooksLikeMarkdown; CLI help documents--[no-]markdown,--md/--no-md, andHYPERAGENT_MARKDOWN.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/agent/slash-commands.ts | Sets sessionNeedsRebuild when toggling markdown so the LLM picks up updated prompt instructions. |
| src/agent/markdown-renderer.ts | Switches to a local Marked instance, corrects an inline comment, and narrows looksLikeMarkdown heuristics. |
| src/agent/index.ts | Gates buffered-output markdown rendering on looksLikeMarkdown, otherwise prints raw text; linkifyFiles applied after. |
| src/agent/cli-parser.ts | Updates help to document --[no-]markdown, --md/--no-md, and HYPERAGENT_MARKDOWN. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Verified: diff matches this message. 40 test files, 2350 tests pass.