Skip to content

Conversation

@usualoma
Copy link
Member

Add support for showing CodeLens on @example lines in JSDoc comments that contain HTTP request examples like POST { "name": "John" }. When clicked, the request is sent with application/json content type.

  • Add parseJSDocExamplesFromText() to parse @example HTTP patterns
  • Support multiline JSON in @example blocks
  • Add jsonBody and contentType fields to RequestLensCommandArgs
  • Skip body prompt when jsonBody is provided from @example
CleanShot.2026-01-21.at.21.11.59.mp4

Add support for showing CodeLens on @example lines in JSDoc comments
that contain HTTP request examples like POST { "name": "John" }.
When clicked, the request is sent with application/json content type.

- Add parseJSDocExamplesFromText() to parse @example HTTP patterns
- Support multiline JSON in @example blocks
- Add jsonBody and contentType fields to RequestLensCommandArgs
- Skip body prompt when jsonBody is provided from @example

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

Installing this PR package

gh run download 21209121098 -n package -R honojs/vscode -D .
code --install-extension hono-0.0.2+build-f647191.vsix

@usualoma
Copy link
Member Author

@yusukebe

But I think writing raw JSON or foo=bar for the POST body is a little tricky. Improving it will be worth it if it's possible.

One idea is that if you find @example and the POST {…json string} below it, you could send that as a POST request. (Though as it stands, it might be a bit too conspicuous.)

@yusukebe
Copy link
Member

@usualoma

Interesting idea!

By the way, my ideal interface is like Postman. If you include form-data, with Postman, you can add the key and value with a table interface like this:

CleanShot 2026-01-21 at 23 01 39@2x

It's good.

And for JSON, you have to write raw JSON, but syntax highlighting is enabled.

CleanShot 2026-01-21 at 23 05 59@2x

However, it may be too much for an extension.

@usualoma
Copy link
Member Author

@yusukebe
Thanks for the response.
I see. So it would be displayed in the sidebar? I'll think about it.

Base automatically changed from feat-specify-entrypoint to main January 22, 2026 00:11
@yusukebe
Copy link
Member

So it would be displayed in the sidebar?

It’s my irresponsible answer, but anywhere is fine as long as it's useful!

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.

3 participants