Skip to content

Support MetadataMap from renderElementJSON #152

Description

@roblourens

Notes from Connor

  • Maybe there's a subclass like TransferrablePromptMetadata that has a key and value we serialize?
    export abstract class PromptMetadata {
  • It's serialized here
    const json: JSONT.PieceJSON = {
    We could look for metadata that's instanceof TransferrablePromptMetadata. Hydrated in fromJSON in that same class.
  • Then we could update the MetadataMap type to take a string too and modify its implementation here
    metadata: {
    get: ctor => remainingMetadata.find(m => m instanceof ctor) as any,
    getAll: ctor => remainingMetadata.filter(m => m instanceof ctor) as any,
    },

Then I can remove the hack I did here https://github.com/microsoft/vscode-copilot/pull/13129/files#diff-5e5185bdca8d65a2172bf8f5e881001e40f9748dff53ade752f6be110073e034R55

Metadata

Metadata

Labels

feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions