In settingComponent.ts, the ControllerType type now includes 'tag' as a possible value. The InputComponentProps type has been adjusted to allow value to be either string or string[].
ModelConfigInput Component:
The code in ModelConfigInput/index.tsx has been refactored to use a return statement with curly brackets {} instead of an implicit return, although its logic remains largely unchanged.
SettingComponent Component:
In ModelSetting/SettingComponent.tsx, added support for the 'tag' controller type, including handling for the value to be string[] and modifying the onValueUpdated function to handle arrays of strings.
ModelSetting Component:
In ModelSetting/index.tsx, the onValueChanged function signature was updated to accept string[].
TagInput Component:
A new component TagInput was created in TagInput/index.tsx. It provides the ability to enter tag-like data, allowing users to add strings to an array and render them as badges with an option to remove them.
ThreadRightPanel Component:
In ThreadRightPanel/index.tsx, the onValueChanged function now supports receiving string[] values.
Component Utilities:
In componentSettings.ts, support was added for the 'tag' controller type, setting its value from keySetting.
In predefinedComponent.ts, the existing 'stop' setting was switched from an input type to a tag type, with a default value of an empty string array and a new placeholder.
Fixes Issues
default
adding custom
Thread json
No Stop word
Closes #4088
Closes #3536
Self Checklist
[ ] Added relevant comments, esp in complex areas
[ ] Updated docs (for bug fixes / features)
[ ] Created issues for follow-up changes or refactoring needed
Describe Your Changes
Type Modifications:
In settingComponent.ts, the
ControllerType
type now includes 'tag' as a possible value. TheInputComponentProps
type has been adjusted to allow value to be either string or string[].ModelConfigInput
Component:The code in
ModelConfigInput/index.tsx
has been refactored to use a return statement with curly brackets {} instead of an implicit return, although its logic remains largely unchanged.SettingComponent
Component:In ModelSetting/SettingComponent.tsx, added support for the 'tag' controller type, including handling for the value to be string[] and modifying the
onValueUpdated
function to handle arrays of strings.ModelSetting
Component:In ModelSetting/index.tsx, the onValueChanged function signature was updated to accept string[]. TagInput Component:
A new component
TagInput
was created inTagInput/index.tsx
. It provides the ability to enter tag-like data, allowing users to add strings to an array and render them as badges with an option to remove them.ThreadRightPanel
Component:In
ThreadRightPanel/index.tsx
, theonValueChanged
function now supports receivingstring[]
values.Component Utilities: In
componentSettings.ts
, support was added for the 'tag' controller type, setting its value fromkeySetting
. InpredefinedComponent.ts
, the existing 'stop' setting was switched from an input type to a tag type, with a default value of an empty string array and a new placeholder.Fixes Issues
default
adding custom
Thread json
No Stop word
Self Checklist