Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add session metadata to serialization + frontmatter #458

Merged
merged 5 commits into from
Dec 28, 2023

Conversation

sourishkrout
Copy link
Member

@sourishkrout sourishkrout commented Dec 27, 2023

This allows the extension to deny the notebook UX for markdown files written as session outputs until deserialization has been implemented (currently one-way; serialization only).

Chose to pass the session output metadata as option separately (not modifying frontmatter directly) because as long as outputs serialization is one-way, the extension uses two serializer runs (original markdown + session outputs markdown). If we decided we won't ever support outputs deserialization, we could create a separate operation. However, let's not jump ahead.

These changes are required for stateful/vscode-runme#1025.

@sourishkrout sourishkrout marked this pull request as draft December 27, 2023 16:12
@sourishkrout sourishkrout marked this pull request as ready for review December 28, 2023 18:19

serializeOptions := &parserv1.SerializeRequestOptions{Outputs: &parserv1.SerializeRequestOutputOptions{Enabled: true, Summary: true}}
prasedFm := "---\nrunme:\n id: 01HF7B0KK32HBQ9X4AC2GPMZG5\n version: v2.0\nsidebar_position: 1\ntitle: Examples\n---"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean parsedFm?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Totally a typo. Fixed it.

Copy link
Contributor

@pastuxso pastuxso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the typo, looks good to me.

@sourishkrout sourishkrout merged commit f5e7a93 into main Dec 28, 2023
4 checks passed
@sourishkrout sourishkrout deleted the session-metadata branch December 28, 2023 19:57
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