Tags: microsoft/vscode-prompt-tsx
Tags
fix: containers without priority set should have max priority (#109) * fix: containers without priority set should have max priority Closes microsoft/vscode-copilot#9289 * run validation on pr * 0.3.0-alpha.6
feat: add Expandable elements (#105) Expandable can be used like so, providing a callback which returns a string or a promise to a string: ```tsx <Expandable value={async sizing => { let data = 'hi'; while (true) { const more = getMoreUsefulData(); if (await sizing.countTokens(data + more) > sizing.tokenBudget) { break } data += more; } } return data; }} /> ``` After the prompt is rendered, the renderer sums up the tokens used by all messages. If there is unused budget, then any `<Expandable />` elements' values are called again with their `PromptSizing` is increased by the token excess. If there are multiple `<Expandable />` elements, then they're re-called in the order in which they were initially rendered. Because they're designed to fill up any remaining space, it usually makes sense to have at most one `<Expandable />` element per prompt.
PreviousNext