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
Notes from Connor
vscode-prompt-tsx/src/base/results.ts
Line 12 in bd0623f
vscode-prompt-tsx/src/base/promptRenderer.ts
Line 948 in bd0623f
vscode-prompt-tsx/src/base/promptRenderer.ts
Lines 421 to 424 in bd0623f
Then I can remove the hack I did here https://github.com/microsoft/vscode-copilot/pull/13129/files#diff-5e5185bdca8d65a2172bf8f5e881001e40f9748dff53ade752f6be110073e034R55