You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(types): add types for quickSettings to update permission in tool executions (#642)
## Problem
Require new field to attach to ChatResult to render the dropdown
component for quickSettings
Require a extra data field for ButtonClickParams for the functionality
to work
## Solution
Add quickSettings prop to ChatMessage
Add metadata field in ButtonClickParams. It's a map for re-useable
purpose
## Example Usage
```ts
const metadata: Record<string, string> = {}
const option = value[0]
const [serverName, toolName] = option.value.split('@')
const new_permission = option.id
metadata['toolName'] = toolName
metadata['serverName'] = serverName
metadata['permission'] = new_permission
const payload: ButtonClickParams = {
tabId,
messageId,
buttonId: 'trust-command',
metadata,
}
```
<!---
REMINDER:
- Read CONTRIBUTING.md first.
- Add test coverage for your changes.
- Link to related issues/commits.
- Testing: how did you test your changes?
- Screenshots if applicable
-->
## License
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
0 commit comments