fix(web): construct apply_patch metadata before requesting permission (#10422)
This commit is contained in:
parent
e3c1861a3e
commit
f4cf3f4976
3 changed files with 81 additions and 16 deletions
|
|
@ -605,7 +605,12 @@ PART_MAPPING["tool"] = function ToolPartDisplay(props) {
|
|||
|
||||
const input = () => part.state?.input ?? emptyInput
|
||||
// @ts-expect-error
|
||||
const metadata = () => part.state?.metadata ?? emptyMetadata
|
||||
const partMetadata = () => part.state?.metadata ?? emptyMetadata
|
||||
const metadata = () => {
|
||||
const perm = permission()
|
||||
if (perm?.metadata) return { ...perm.metadata, ...partMetadata() }
|
||||
return partMetadata()
|
||||
}
|
||||
|
||||
const render = ToolRegistry.render(part.tool) ?? GenericTool
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue