Skip to content

Artifacts: Code Snippet with Language Metadata (M2 #14) #57

Description

@ddroid

What to build

Extend the artifact system to support saving code snippets with language metadata. When a user saves a code block from an assistant message as an artifact, Ronin should preserve the language identifier from the fence and store it as artifact metadata.

In the artifact panel, code snippet artifacts should render with syntax highlighting (leveraging M2 #2) and show the language badge. The artifact kind should include snippet with a language metadata field.

Acceptance criteria

  • Saving a code block as an artifact preserves the language from the code fence
  • Artifact kind = "snippet" includes a language metadata field in the database
  • Code snippet artifacts render with syntax highlighting in the artifact panel
  • Language badge is shown on code snippet artifact cards
  • User can save a code block as a snippet artifact directly from the code block's copy/save menu
  • Schema migration adds language metadata field to artifacts if needed
  • Tests cover code snippet artifact creation with language metadata

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions